Skip to content

Remove Pocket sharing service ahead of July 2025 shutdown #43795

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 8 commits into
base: trunk
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: removed

Remove Pocket SVG icons, font codepoints, and logo data ahead of Mozilla's July 2025 shutdown.
1 change: 0 additions & 1 deletion projects/js-packages/social-logos/official_links.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ Official links:
- Nextdoor: https://about.nextdoor.com/nextdoor-brand-use-guidelines/
- Patreon: https://www.patreon.com/brand
- Pinterest: https://business.pinterest.com/brand-guidelines/
- Pocket: https://blog.getpocket.com/press/
- Quora: https://www.quora.com/
- Reddit: https://www.redditinc.com/brand
- Snapchat: https://snap.com/brand-guidelines
Expand Down
1 change: 0 additions & 1 deletion projects/js-packages/social-logos/src/font/codepoints.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"medium": 63011,
"pinterest-alt": 61968,
"pinterest": 61961,
"pocket": 61988,
"polldaddy": 61975,
"print": 62569,
"reddit": 61986,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,6 @@ export const SocialLogoData = [
name: 'pinterest',
svg: <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g><path d="M12 2C6.477 2 2 6.477 2 12c0 4.236 2.636 7.855 6.356 9.312-.087-.791-.166-2.005.035-2.869.182-.78 1.173-4.971 1.173-4.971s-.299-.599-.299-1.484c0-1.39.806-2.429 1.809-2.429.853 0 1.265.641 1.265 1.409 0 .858-.546 2.141-.828 3.329-.236.996.499 1.807 1.481 1.807 1.777 0 3.144-1.874 3.144-4.579 0-2.394-1.72-4.068-4.177-4.068-2.845 0-4.515 2.134-4.515 4.34 0 .859.331 1.781.744 2.282a.3.3 0 0 1 .069.287c-.077.316-.246.995-.279 1.134-.044.183-.145.222-.334.134-1.249-.581-2.03-2.407-2.03-3.874 0-3.154 2.292-6.051 6.607-6.051 3.469 0 6.165 2.472 6.165 5.775 0 3.446-2.173 6.22-5.189 6.22-1.013 0-1.966-.526-2.292-1.148l-.623 2.377c-.226.869-.835 1.957-1.243 2.622.936.289 1.93.445 2.961.445 5.523 0 10-4.477 10-10S17.523 2 12 2"/></g></svg>,
},
{
name: 'pocket',
svg: <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g><path d="M21.927 4.194A1.82 1.82 0 0 0 20.222 3H3.839a1.823 1.823 0 0 0-1.813 1.814v6.035l.069 1.2c.29 2.73 1.707 5.115 3.899 6.778l.119.089.025.018a9.9 9.9 0 0 0 3.91 1.727 10.06 10.06 0 0 0 4.049-.014.3.3 0 0 0 .064-.023 9.9 9.9 0 0 0 3.753-1.691l.025-.018q.06-.043.119-.089c2.192-1.664 3.609-4.049 3.898-6.778l.069-1.2V4.814a1.8 1.8 0 0 0-.098-.62m-4.235 6.287-4.704 4.512a1.37 1.37 0 0 1-1.898 0l-4.705-4.512a1.371 1.371 0 1 1 1.898-1.979l3.756 3.601 3.755-3.601a1.372 1.372 0 0 1 1.898 1.979"/></g></svg>,
},
Comment on lines -155 to -158
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since social-logos is an npm package and might be used by many codebases, we should be careful about removing this part here, as it can break the existing code that might still be using it. We may deprecate the icon instead and remove it in the future.

{
name: 'polldaddy',
svg: <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g><path d="M12 2C6.487 2 2 6.487 2 12c0 5.514 4.487 10 10 10 5.514 0 10-4.486 10-10 0-5.513-4.486-10-10-10m.991 1.68c2.361.084 4.657 1.251 6.197 3.136.283.334.541.693.774 1.067a7.78 7.78 0 0 0-6.094-2.94 7.76 7.76 0 0 0-5.896 2.703q-.008.006-.016.014l-.152.159-.031.032a6.12 6.12 0 0 0-1.633 4.165 6.15 6.15 0 0 0 6.143 6.143c.57 0 1.123-.081 1.649-.227-1.849.839-4.131.747-5.926-.324-1.841-1.089-3.171-3.111-3.433-5.313A7.39 7.39 0 0 1 6.69 6.137C8.294 4.5 10.634 3.563 12.991 3.68m3.373 8.519c-.049-2.024-1.587-3.889-3.544-4.174-1.927-.343-3.917.857-4.451 2.661a3.67 3.67 0 0 0 .2 2.653c.39.8 1.067 1.451 1.894 1.759 1.664.654 3.63-.27 4.173-1.863.593-1.58-.396-3.423-1.94-3.776-1.52-.407-3.161.757-3.204 2.243a2.36 2.36 0 0 0 .753 1.879c.501.476 1.23.667 1.871.529a2.07 2.07 0 0 0 1.469-1.134 1.91 1.91 0 0 0-.087-1.767c-.297-.513-.859-.863-1.429-.881a1.7 1.7 0 0 0-1.437.679 1.53 1.53 0 0 0-.18 1.489q.006.016.016.03c.193.634.774 1.1 1.467 1.117a1.6 1.6 0 0 1-.97-.183c-.466-.244-.809-.747-.893-1.29a1.8 1.8 0 0 1 .499-1.539 2.02 2.02 0 0 1 1.58-.606c.593.04 1.159.35 1.517.859.364.496.51 1.156.383 1.773-.116.62-.529 1.174-1.093 1.514a2.52 2.52 0 0 1-1.914.286c-.65-.161-1.226-.606-1.584-1.206a2.83 2.83 0 0 1-.341-2.031c.143-.7.573-1.321 1.176-1.753 1.193-.883 3.056-.751 4.106.411 1.106 1.1 1.327 3.027.406 4.371-.877 1.376-2.74 2.086-4.374 1.594-1.639-.449-2.913-2.079-3.031-3.853-.07-.884.13-1.797.583-2.577.445-.777 1.155-1.432 1.972-1.862 1.64-.88 3.816-.743 5.349.424 1.251.924 2.083 2.42 2.236 4.009l.001.03c0 2.9-2.359 5.26-5.26 5.26a5.2 5.2 0 0 1-1.947-.376 5 5 0 0 0 2.613-.079 4.96 4.96 0 0 0 2.514-1.751c.618-.828.95-1.861.901-2.869M12 21.113c-5.024 0-9.111-4.087-9.111-9.113 0-4.789 3.713-8.723 8.411-9.081a7 7 0 0 0-.397.06c-2.644.453-5.017 2.106-6.32 4.409-1.309 2.301-1.391 5.19-.3 7.527 1.056 2.34 3.253 4.156 5.776 4.553 2.497.44 5.133-.483 6.787-2.301 1.719-1.797 2.269-4.529 1.486-6.796-.583-1.81-1.976-3.331-3.7-4.046 3.417.594 6.174 3.221 6.174 6.781 0 1.004-.241 2.02-.657 2.966-1.498 2.984-4.586 5.041-8.149 5.041"/></g></svg>,
Expand Down
17 changes: 0 additions & 17 deletions projects/js-packages/social-logos/src/svg/pocket.svg

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: removed

Remove Pocket support from social menu icon functions and CSS styling ahead of Mozilla's July 2025 shutdown.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ function jetpack_social_menu_social_links_icons() {
'nextdoor.com' => 'nextdoor',
'patreon.com' => 'patreon',
'pinterest.' => 'pinterest',
'getpocket.com' => 'pocket',
'ravelry.com' => 'ravelry',
'reddit.com' => 'reddit',
'slideshare.net' => 'slideshare',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@ Genericons
content: "\f210";
}

/* Pocket */
.jetpack-social-navigation-genericons a[href*="getpocket.com"]::before {
content: "\f224";
}

/* Polldaddy */
.jetpack-social-navigation-genericons a[href*="polldaddy.com"]::before {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: removed

Check failure on line 2 in projects/plugins/jetpack/changelog/remove-pocket-service-SOCIAL-47

View workflow job for this annotation

GitHub Actions / Changelogger validity

Type must be "major", "enhancement", "compat", "bugfix", or "other".

Remove the Pocket sharing service ahead of Mozilla's July 2025 shutdown. Existing Pocket configurations will gracefully degrade with no broken functionality. Users are provided with alternative read-later service suggestions in the sharing settings.
1 change: 1 addition & 0 deletions projects/plugins/jetpack/class.jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -2697,6 +2697,7 @@ public static function do_version_bump( $version, $old_version ) {

// If an admin page is visited after the update, the 'current_screen' action will fire.
add_action( 'current_screen', 'Jetpack::set_update_modal_display' );

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -743,44 +743,6 @@ public function process_request( $post, array $post_data ) {
}
}

/**
* Pocket sharing service.
*/
class Share_Pocket_Block extends Sharing_Source_Block {
/**
* Service short name.
*
* @var string
*/
public $shortname = 'pocket';

/**
* Service name.
*
* @return string
*/
public function get_name() {
return __( 'Pocket', 'jetpack' );
}

/**
* Process sharing request. Add actions that need to happen when sharing here.
*
* @param WP_Post $post Post object.
* @param array $post_data Array of information about the post we're sharing.
*
* @return void
*/
public function process_request( $post, array $post_data ) {
// Record stats
parent::process_request( $post, $post_data );

$pocket_url = esc_url_raw( 'https://getpocket.com/save/?url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&title=' . rawurlencode( $this->get_share_title( $post->ID ) ) );

parent::redirect_request( $pocket_url );
}
}

/**
* Telegram sharing service.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ function get_services() {
'twitter' => Share_Twitter_Block::class,
'tumblr' => Share_Tumblr_Block::class,
'pinterest' => Share_Pinterest_Block::class,
'pocket' => Share_Pocket_Block::class,
'telegram' => Share_Telegram_Block::class,
'threads' => Share_Threads_Block::class,
'whatsapp' => Jetpack_Share_WhatsApp_Block::class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ a.jetpack-sharing-button__button {

&.share-pinterest { background: var( --color-pinterest ); }

&.share-pocket { background: var( --color-pocket ); }

&.share-telegram { background: var( --color-telegram ); }

&.share-threads { background: var( --color-threads ); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ export const variations = [
title: 'Pinterest',
icon: <SocialLogo icon={ 'pinterest' } size={ 24 } />,
},
{
name: 'pocket',
attributes: { service: 'pocket', label: 'Pocket' },
title: 'Pocket',
icon: <SocialLogo icon={ 'pocket' } size={ 24 } />,
},
{
name: 'reddit',
attributes: { service: 'reddit', label: 'Reddit' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"whatsapp",
"telegram",
"pinterest",
"pocket",
"reddit",
"nextdoor",
"print",
Expand Down
14 changes: 0 additions & 14 deletions projects/plugins/jetpack/modules/sharedaddy/admin-sharing.css
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,6 @@ li.service.share-tumblr span::before {
content: '\f214';
}

li.service.share-pocket span::before {
content: '\f224';
}

li.service.share-pinterest span::before {
content: '\f209';
}
Expand Down Expand Up @@ -366,13 +362,6 @@ body.settings_page_sharing .advanced input[type="submit"] {
height: 20px;
}

.preview-pocket .option-smart-on {
background: url(images/smart-pocket.png) no-repeat top left;
background-size: 60px 20px;
width: 60px;
height: 20px;
}

.preview-item.share-deprecated {
opacity: 0.5;
}
Expand Down Expand Up @@ -410,9 +399,6 @@ body.settings_page_sharing .advanced input[type="submit"] {
background-image: url(images/[email protected]);
}

.preview-pocket .option-smart-on {
background-image: url(images/[email protected]);
}
}

/**
Expand Down
8 changes: 0 additions & 8 deletions projects/plugins/jetpack/modules/sharedaddy/amp-sharing.css
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,6 @@ amp-social-share[type="linkedin"]::before {
content: '\f207';
}

amp-social-share[type="pocket"] {
background: #ee4056;
}

amp-social-share[type="pocket"]::before {
content: '\f224';
}

amp-social-share[type="reddit"] {
background: #cee3f8;
color: #555;
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ public function get_all_services( $include_custom = true ) {
'twitter' => 'Share_Twitter',
'tumblr' => 'Share_Tumblr',
'pinterest' => 'Share_Pinterest',
'pocket' => 'Share_Pocket',
'telegram' => 'Share_Telegram',
'threads' => 'Share_Threads',
'jetpack-whatsapp' => 'Jetpack_Share_WhatsApp',
Expand Down
135 changes: 0 additions & 135 deletions projects/plugins/jetpack/modules/sharedaddy/sharing-sources.php
Original file line number Diff line number Diff line change
Expand Up @@ -2907,141 +2907,6 @@ function init() {
}
}

/**
* Pocket sharing service.
*/
class Share_Pocket extends Sharing_Source {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of deleting the class altogether, I would recommend leveraging our Deprecated_Sharing_Source class, which will allow you to remove the button for visitors, while still displaying an invitation for site admins to remove the now deprecated service.

/**
* Service short name.
*
* @var string
*/
public $shortname = 'pocket';

/**
* Service icon font code.
*
* @var string
*/
public $icon = '\f224';

/**
* Constructor.
*
* @param int $id Sharing source ID.
* @param array $settings Sharing settings.
*/
public function __construct( $id, array $settings ) {
parent::__construct( $id, $settings );

if ( 'official' === $this->button_style ) {
$this->smart = true;
} else {
$this->smart = false;
}
}

/**
* Service name.
*
* @return string
*/
public function get_name() {
return __( 'Pocket', 'jetpack' );
}

/**
* Process sharing request. Add actions that need to happen when sharing here.
*
* @param WP_Post $post Post object.
* @param array $post_data Array of information about the post we're sharing.
*
* @return void
*/
public function process_request( $post, array $post_data ) {
// Record stats
parent::process_request( $post, $post_data );

$pocket_url = esc_url_raw( 'https://getpocket.com/save/?url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&title=' . rawurlencode( $this->get_share_title( $post->ID ) ) );

parent::redirect_request( $pocket_url );
}

/**
* Get the markup of the sharing button.
*
* @param WP_Post $post Post object.
*
* @return string
*/
public function get_display( $post ) {
if ( $this->smart ) {
$post_count = 'horizontal';

$button = '';
$button .= '<div class="pocket_button">';
$button .= sprintf( '<a href="https://getpocket.com/save" class="pocket-btn" data-lang="%s" data-save-url="%s" data-pocket-count="%s" >%s</a>', 'en', esc_attr( $this->get_share_url( $post->ID ) ), $post_count, esc_attr__( 'Pocket', 'jetpack' ) );
$button .= '</div>';

return $button;
} else {
return $this->get_link( $this->get_process_request_url( $post->ID ), _x( 'Pocket', 'share to', 'jetpack' ), __( 'Click to share on Pocket', 'jetpack' ), 'share=pocket', 'sharing-pocket-' . $post->ID );
}
}

/**
* AMP display for Pocket.
*
* @param \WP_Post $post The current post being viewed.
*/
public function get_amp_display( $post ) {
$attrs = array(
'data-share-endpoint' => esc_url_raw( 'https://getpocket.com/save/?url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&title=' . rawurlencode( $this->get_share_title( $post->ID ) ) ),
);

return $this->build_amp_markup( $attrs );
}

/**
* Add content specific to a service in the footer.
*/
public function display_footer() {
if ( $this->smart ) :
?>
<script>
( function () {
var currentScript = document.currentScript;

// Don't use Pocket's default JS as it we need to force init new Pocket share buttons loaded via JS.
function jetpack_sharing_pocket_init() {
var script = document.createElement( 'script' );
var prev = currentScript || document.getElementsByTagName( 'script' )[ 0 ];
script.setAttribute( 'async', true );
script.setAttribute( 'src', 'https://widgets.getpocket.com/v1/j/btn.js?v=1' );
prev.parentNode.insertBefore( script, prev );
}

if ( document.readyState === 'loading' ) {
document.addEventListener( 'DOMContentLoaded', jetpack_sharing_pocket_init );
} else {
jetpack_sharing_pocket_init();
}
document.body.addEventListener( 'is.post-load', jetpack_sharing_pocket_init );
} )();
</script>
<?php
else :
$this->js_dialog(
$this->shortname,
array(
'width' => 450,
'height' => 450,
)
);
endif;
}
}

/**
* Telegram sharing service.
*/
Expand Down
Loading
Loading