| @@ -3,8 +3,9 @@ | ||
| 3 | 3 | * Theme Tools: functions for Featured Content enhancements. |
| 4 | 4 | * |
| 5 | 5 | * @package automattic/jetpack |
| 6 | 6 | */ |
| 7 | +use Automattic\Jetpack\Status\Host; | |
| 7 | 8 | |
| 8 | 9 | if ( ! class_exists( 'Featured_Content' ) && isset( $GLOBALS['pagenow'] ) && 'plugins.php' !== $GLOBALS['pagenow'] ) { |
| 9 | 10 | |
| 10 | 11 | /** |
| @@ -237,12 +238,12 @@ | ||
| 237 | 238 | * |
| 238 | 239 | * @deprecated 13.6 Moved to Classic Theme Helper package. |
| 239 | 240 | * @uses Featured_Content::get_setting() |
| 240 | 241 | * |
| 241 | - * @param array $terms A list of term objects. This is the return value of get_the_terms(). | |
| 242 | - * @param int $id The ID field for the post object that terms are associated with. | |
| 243 | - * @param array $taxonomy An array of taxonomy slugs. | |
| 244 | - * @return array $terms | |
| 242 | + * @param \WP_Term[]|\WP_Error $terms A list of term objects. This is the return value of get_the_terms(). | |
| 243 | + * @param int $id The ID field for the post object that terms are associated with. | |
| 244 | + * @param string $taxonomy The slug of the taxonomy. | |
| 245 | + * @return \WP_Term[]|\WP_Error $terms | |
| 245 | 246 | */ |
| 246 | 247 | public static function hide_the_featured_term( $terms, $id, $taxonomy ) { |
| 247 | 248 | _deprecated_function( __METHOD__, 'jetpack-13.6', 'Automattic\\Jetpack\\Classic_Theme_Helper\\Featured_Content\\hide_the_featured_term' ); |
| 248 | 249 | |
| @@ -356,6 +357,8 @@ | ||
| 356 | 357 | Automattic\Jetpack\Classic_Theme_Helper\Featured_Content::jetpack_update_featured_content_for_split_terms( $old_term_id, $new_term_id, $term_taxonomy_id, $taxonomy ); |
| 357 | 358 | } |
| 358 | 359 | } |
| 359 | 360 | |
| 360 | - Automattic\Jetpack\Classic_Theme_Helper\Featured_Content::setup(); | |
| 361 | + if ( ! ( new Host() )->is_wpcom_platform() ) { | |
| 362 | + Automattic\Jetpack\Classic_Theme_Helper\Featured_Content::setup(); | |
| 363 | + } | |
| 361 | 364 | } |