| @@ -4,10 +4,8 @@ | ||
| 4 | 4 | * |
| 5 | 5 | * @package automattic/jetpack |
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | -use Automattic\Jetpack\Current_Plan as Jetpack_Plan; | |
| 9 | - | |
| 10 | 8 | /** |
| 11 | 9 | * Class containing utility static methods that other SEO tools are relying on. |
| 12 | 10 | */ |
| 13 | 11 | class Jetpack_SEO_Utils { |
| @@ -40,9 +38,13 @@ | ||
| 40 | 38 | if ( apply_filters( 'jetpack_disable_seo_tools', false ) ) { |
| 41 | 39 | return false; |
| 42 | 40 | } |
| 43 | 41 | |
| 44 | - return Jetpack_Plan::supports( 'advanced-seo' ); | |
| 42 | + if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { | |
| 43 | + return wpcom_site_has_feature( 'advanced-seo', get_current_blog_id() ); | |
| 44 | + } | |
| 45 | + | |
| 46 | + return true; | |
| 45 | 47 | } |
| 46 | 48 | |
| 47 | 49 | /** |
| 48 | 50 | * Checks if this option was set while it was freely available to all WPcom simple sites. |
| @@ -122,6 +124,25 @@ | ||
| 122 | 124 | return $front_page_description; |
| 123 | 125 | } |
| 124 | 126 | |
| 125 | 127 | return ''; |
| 128 | + } | |
| 129 | + | |
| 130 | + /** | |
| 131 | + * Remove content within wp:query blocks. | |
| 132 | + * | |
| 133 | + * @uses jetpack_og_remove_query_blocks | |
| 134 | + * | |
| 135 | + * @since 14.9 | |
| 136 | + * | |
| 137 | + * @param string $content Post content. | |
| 138 | + * | |
| 139 | + * @return string Post content stripped from wp:query blocks. | |
| 140 | + */ | |
| 141 | + public static function remove_query_blocks( $content ) { | |
| 142 | + if ( ! function_exists( 'jetpack_og_remove_query_blocks' ) ) { | |
| 143 | + return $content; | |
| 144 | + } | |
| 145 | + | |
| 146 | + return jetpack_og_remove_query_blocks( $content ); | |
| 126 | 147 | } |
| 127 | 148 | } |