| @@ -23,9 +23,8 @@ | ||
| 23 | 23 | * Initialize the class, registering WordPress hooks. |
| 24 | 24 | */ |
| 25 | 25 | public static function init() { |
| 26 | 26 | if ( ! \defined( 'IS_WPCOM' ) ) { |
| 27 | - \add_filter( 'jetpack_sync_options_whitelist', array( self::class, 'add_sync_options' ) ); | |
| 28 | 27 | \add_filter( 'jetpack_sync_post_meta_whitelist', array( self::class, 'add_sync_meta' ) ); |
| 29 | 28 | \add_filter( 'jetpack_sync_comment_meta_whitelist', array( self::class, 'add_sync_comment_meta' ) ); |
| 30 | 29 | \add_filter( 'jetpack_sync_whitelisted_comment_types', array( self::class, 'add_comment_types' ) ); |
| 31 | 30 | \add_filter( 'jetpack_json_api_comment_types', array( self::class, 'add_comment_types' ) ); |
| @@ -43,26 +42,8 @@ | ||
| 43 | 42 | \add_action( 'load-post-new.php', array( self::class, 'adapt_post_share' ) ); |
| 44 | 43 | } |
| 45 | 44 | |
| 46 | 45 | /** |
| 47 | - * Add ActivityPub options to the Jetpack sync allow list. | |
| 48 | - * | |
| 49 | - * @since 8.1.0 | |
| 50 | - * | |
| 51 | - * @param array $allow_list The Jetpack sync options allow list. | |
| 52 | - * | |
| 53 | - * @return array The allow list with ActivityPub options. | |
| 54 | - */ | |
| 55 | - public static function add_sync_options( $allow_list ) { | |
| 56 | - $allow_list[] = 'activitypub_blog_identifier'; | |
| 57 | - $allow_list[] = 'activitypub_blog_description'; | |
| 58 | - $allow_list[] = 'activitypub_header_image'; | |
| 59 | - $allow_list[] = 'activitypub_actor_mode'; | |
| 60 | - | |
| 61 | - return $allow_list; | |
| 62 | - } | |
| 63 | - | |
| 64 | - /** | |
| 65 | 46 | * Add ActivityPub meta keys to the Jetpack sync allow list. |
| 66 | 47 | * |
| 67 | 48 | * @param array $allow_list The Jetpack sync allow list. |
| 68 | 49 | * |
| @@ -99,9 +80,9 @@ | ||
| 99 | 80 | $comment_types[] = 'like'; |
| 100 | 81 | $comment_types[] = 'quote'; |
| 101 | 82 | $comment_types[] = 'repost'; |
| 102 | 83 | |
| 103 | - return \array_unique( $comment_types ); | |
| 84 | + return array_unique( $comment_types ); | |
| 104 | 85 | } |
| 105 | 86 | |
| 106 | 87 | /** |
| 107 | 88 | * Add a "Reader" link to the bulk actions dropdown on the following list screen. |
| @@ -123,21 +104,21 @@ | ||
| 123 | 104 | if ( \defined( 'IS_WPCOM' ) && IS_WPCOM ) { |
| 124 | 105 | if ( empty( $feed['feed_id'] ) ) { |
| 125 | 106 | return $actions; // No feed_id available on WPCOM. |
| 126 | 107 | } |
| 127 | - $url = \sprintf( 'https://wordpress.com/reader/feeds/%d', (int) $feed['feed_id'] ); | |
| 108 | + $url = sprintf( 'https://wordpress.com/reader/feeds/%d', (int) $feed['feed_id'] ); | |
| 128 | 109 | } else { |
| 129 | - $url = \sprintf( 'https://wordpress.com/reader/feeds/lookup/%s', \rawurlencode( $item['identifier'] ) ); | |
| 110 | + $url = sprintf( 'https://wordpress.com/reader/feeds/lookup/%s', rawurlencode( $item['identifier'] ) ); | |
| 130 | 111 | } |
| 131 | 112 | |
| 132 | - return \array_merge( | |
| 113 | + return array_merge( | |
| 133 | 114 | array( |
| 134 | - 'reader' => \sprintf( | |
| 115 | + 'reader' => sprintf( | |
| 135 | 116 | '<a href="%1$s" target="_blank">%2$s<span class="screen-reader-text"> %3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>', |
| 136 | - \esc_url( $url ), | |
| 137 | - \esc_html__( 'View Feed', 'activitypub' ), | |
| 117 | + esc_url( $url ), | |
| 118 | + esc_html__( 'View Feed', 'activitypub' ), | |
| 138 | 119 | /* translators: Hidden accessibility text. */ |
| 139 | - \esc_html__( '(opens in a new tab)', 'activitypub' ) | |
| 120 | + esc_html__( '(opens in a new tab)', 'activitypub' ) | |
| 140 | 121 | ), |
| 141 | 122 | ), |
| 142 | 123 | $actions |
| 143 | 124 | ); |