used as a filter callback. As a rule, there * is no need to invoke it directly. * * @since 4.5.0 * @deprecated 6.3.0 Use WP_Metadata_Lazyloader::lazyload_meta_callback() instead. * * @param mixed $check The `$check` param passed from the 'get_term_metadata' hook. * @return mixed In order not to short-circuit `get_metadata()`. Generally, this is `null`, but it could be * another value if filtered by a plugin. */ public function lazyload_term_meta( $check ) { _deprecated_function( __METHOD__, '6.3.0', 'WP_Metadata_Lazyloader::lazyload_meta_callback' ); return $this->lazyload_meta_callback( $check, 0, '', false, 'term' ); } /** * Lazy-loads comment meta for queued comments. * * This method is public so that it can be used as a filter callback. As a rule, there is no need to invoke it * directly, from either inside or outside the `WP_Query` object. * * @since 4.5.0 * @deprecated 6.3.0 Use WP_Metadata_Lazyloader::lazyload_meta_callback() instead. * * @param mixed $check The `$check` param passed from the {@see 'get_comment_metadata'} hook. * @return mixed The original value of `$check`, so as not to short-circuit `get_comment_metadata()`. */ public function lazyload_comment_meta( $check ) { _deprecated_function( __METHOD__, '6.3.0', 'WP_Metadata_Lazyloader::lazyload_meta_callback' ); return $this->lazyload_meta_callback( $check, 0, '', false, 'comment' ); } /** * Lazy-loads meta for queued objects. * * This method is public so that it can be used as a filter callback. As a rule, there * is no need to invoke it directly. * * @since 6.3.0 * * @param mixed $check The `$check` param passed from the 'get_*_metadata' hook. * @param int $object_id ID of the object metadata is for. * @param string $meta_key Unused. * @param bool $single Unused. * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user', * or any other object type with an associated meta table. * @return mixed In order not to short-circuit `get_metadata()`. Generally, this is `null`, but it could be * another value if filtered by a plugin. */ public function lazyload_meta_callback( $check, $object_id, $meta_key, $single, $meta_type ) { if ( empty( $this->pending_objects[ $meta_type ] ) ) { return $check; } $object_ids = array_keys( $this->pending_objects[ $meta_type ] ); if ( $object_id && ! in_array( $object_id, $object_ids, true ) ) { $object_ids[] = $object_id; } update_meta_cache( $meta_type, $object_ids ); // No need to run again for this set of objects. $this->reset_queue( $meta_type ); return $check; } } d 13.9 Moved to Classic Theme Helper package. */ public function new_project_stat_bump() { _deprecated_function( __FUNCTION__, 'jetpack-13.9' ); $this->new_instance->new_project_stat_bump(); } /** * Flush permalinks when CPT option is turned on/off * * @deprecated 13.9 Moved to Classic Theme Helper package. */ public function flush_rules_on_enable() { _deprecated_function( __FUNCTION__, 'jetpack-13.9' ); $this->new_instance->flush_rules_on_enable(); } /** * Count published projects and flush permalinks when first projects is published * * @deprecated 13.9 Moved to Classic Theme Helper package. */ public function flush_rules_on_first_project() { _deprecated_function( __FUNCTION__, 'jetpack-13.9' ); $this->new_instance->flush_rules_on_first_project(); } /** * Flush permalinks when CPT supported theme is activated * * @deprecated 13.9 Moved to Classic Theme Helper package. */ public function flush_rules_on_switch() { _deprecated_function( __FUNCTION__, 'jetpack-13.9' ); $this->new_instance->flush_rules_on_switch(); } /** * On plugin/theme activation, check if current theme supports CPT * * @deprecated 13.9 Moved to Classic Theme Helper package. */ public static function activation_post_type_support() { _deprecated_function( __FUNCTION__, 'jetpack-13.9' ); Automattic\Jetpack\Classic_Theme_Helper\Jetpack_Portfolio::activation_post_type_support(); } /** * On theme switch, check if CPT item exists and disable if not * * @deprecated 13.9 Moved to Classic Theme Helper package. */ public function deactivation_post_type_support() { _deprecated_function( __FUNCTION__, 'jetpack-13.9' ); $this->new_instance->deactivation_post_type_support(); } /** * Register Post Type * * @deprecated 13.9 Moved to Classic Theme Helper package. */ public function register_post_types() { _deprecated_function( __FUNCTION__, 'jetpack-13.9' ); $this->new_instance->register_post_types(); } /** * Update messages for the Portfolio admin. * * @deprecated 13.9 Moved to Classic Theme Helper package. * @param array $messages Existing post update messages. */ public function updated_messages( $messages ) { _deprecated_function( __FUNCTION__, 'jetpack-13.9' ); $this->new_instance->updated_messages( $messages ); } /** * Change ‘Title’ column label * Add Featured Image column * * @deprecated 13.9 Moved to Classic Theme Helper package. * * @param array $columns An array of column names. */ public function edit_admin_columns( $columns ) { _deprecated_function( __FUNCTION__, 'jetpack-13.9' ); $this->new_instance->edit_admin_columns( $columns ); } /** * Add featured image to column * * @deprecated 13.9 Moved to Classic Theme Helper package. * * @param string $column The name of the column to display. * @param int $post_id The current post ID. */ public function image_column( $column, $post_id ) { _deprecated_function( __FUNCTION__, 'jetpack-13.9' ); $this->new_instance->image_column( $column, $post_id ); } /** * Adjust image column width * * @deprecated 13.9 Moved to Classic Theme Helper package. * * @param string $hook Page hook. */ public function enqueue_admin_styles( $hook ) { _deprecated_function( __FUNCTION__, 'jetpack-13.9' ); $this->new_instance->enqueue_admin_styles( $hook ); } /** * Adds portfolio section to the Customizer. * * @deprecated 13.9 Moved to Classic Theme Helper package. * * @param WP_Customize_Manager $wp_customize Customizer instance. */ public function customize_register( $wp_customize ) { _deprecated_function( __FUNCTION__, 'jetpack-13.9' ); $this->new_instance->customize_register( $wp_customize ); } /** * Follow CPT reading setting on CPT archive and taxonomy pages * * @deprecated 13.9 Moved to Classic Theme Helper package. * @param WP_Query $query A WP_Query instance. */ public function query_reading_setting( $query ) { _deprecated_function( __FUNCTION__, 'jetpack-13.9' ); $this->new_instance->query_reading_setting( $query ); } /** * If Infinite Scroll is set to 'click', use our custom reading setting instead of core's `posts_per_page`. * * @deprecated 13.9 Moved to Classic Theme Helper package. * @param array $settings Array of Infinite Scroll settings. */ public function infinite_scroll_click_posts_per_page( $settings ) { _deprecated_function( __FUNCTION__, 'jetpack-13.9' ); $this->new_instance->infinite_scroll_click_posts_per_page( $settings ); } /** * Filter the results of infinite scroll to make sure we get `lastbatch` right. * * @deprecated 13.9 Moved to Classic Theme Helper package. * @param array $results Array of Infinite Scroll results. * @param array $query_args Array of main query arguments. * @param WP_Query $query WP Query. */ public function infinite_scroll_results( $results, $query_args, $query ) { _deprecated_function( __FUNCTION__, 'jetpack-13.9' ); $this->new_instance->infinite_scroll_results( $results, $query_args, $query ); } /** * Add CPT to Dotcom sitemap * * @deprecated 13.9 Moved to Classic Theme Helper package. * @param array $post_types Array of post types included in sitemap. */ public function add_to_sitemap( $post_types ) { _deprecated_function( __FUNCTION__, 'jetpack-13.9' ); $this->new_instance->add_to_sitemap( $post_types ); } /** * Add to REST API post type allowed list. * * @deprecated 13.9 Moved to Classic Theme Helper package. * @param array $post_types Array of post types to add to the allowed list. Default to `array( 'post', 'page', 'revision' )`. */ public function allow_portfolio_rest_api_type( $post_types ) { _deprecated_function( __FUNCTION__, 'jetpack-13.9' ); $this->new_instance->allow_portfolio_rest_api_type( $post_types ); } /** * Our [portfolio] shortcode. * Prints Portfolio data styled to look good on *any* theme. * * @deprecated 13.9 Moved to Classic Theme Helper package. * @param array $atts Shortcode attributes. * * @return string html */ public static function portfolio_shortcode( $atts ) { _deprecated_function( __FUNCTION__, 'jetpack-13.9' ); return Automattic\Jetpack\Classic_Theme_Helper\Jetpack_Portfolio::portfolio_shortcode( $atts ); } } }