Merged in feature/MAW-855-import-code-into-aws (pull request #2)
code import from pantheon * code import from pantheon
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
* @package WPSEO\Inc
|
||||
*/
|
||||
|
||||
use Yoast\WP\SEO\Promotions\Application\Promotion_Manager;
|
||||
|
||||
/**
|
||||
* Represents the addon manager.
|
||||
*/
|
||||
@@ -399,6 +401,15 @@ class WPSEO_Addon_Manager {
|
||||
$subscription = $this->get_subscription( $plugin_data['slug'] );
|
||||
if ( $subscription && $this->has_subscription_expired( $subscription ) ) {
|
||||
$addon_link = ( isset( $this->addon_details[ $plugin_data['slug'] ] ) ) ? $this->addon_details[ $plugin_data['slug'] ]['short_link_renewal'] : $this->addon_details[ self::PREMIUM_SLUG ]['short_link_renewal'];
|
||||
|
||||
$sale_copy = '';
|
||||
if ( YoastSEO()->classes->get( Promotion_Manager::class )->is( 'black-friday-2023-promotion' ) ) {
|
||||
$sale_copy = sprintf(
|
||||
/* translators: %1$s is a <br> tag. */
|
||||
esc_html__( '%1$s Now with 30%% Black Friday Discount!', 'wordpress-seo' ),
|
||||
'<br>'
|
||||
);
|
||||
}
|
||||
echo '<br><br>';
|
||||
echo '<strong><span class="yoast-dashicons-notice warning dashicons dashicons-warning"></span> ' .
|
||||
sprintf(
|
||||
@@ -407,7 +418,10 @@ class WPSEO_Addon_Manager {
|
||||
esc_html( $plugin_data['name'] ),
|
||||
'<a href="' . esc_url( WPSEO_Shortlinker::get( $addon_link ) ) . '">',
|
||||
'</a>'
|
||||
) . '</strong>';
|
||||
) .
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Output is escaped above.
|
||||
$sale_copy
|
||||
. '</strong>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ use Yoast\WP\SEO\Helpers\Score_Icon_Helper;
|
||||
use Yoast\WP\SEO\Integrations\Support_Integration;
|
||||
use Yoast\WP\SEO\Models\Indexable;
|
||||
use Yoast\WP\SEO\Presenters\Admin\Premium_Badge_Presenter;
|
||||
use Yoast\WP\SEO\Promotions\Application\Promotion_Manager;
|
||||
use Yoast\WP\SEO\Repositories\Indexable_Repository;
|
||||
|
||||
/**
|
||||
@@ -156,6 +157,7 @@ class WPSEO_Admin_Bar_Menu implements WPSEO_WordPress_Integration {
|
||||
if ( is_null( $this->is_seo_enabled ) ) {
|
||||
$this->is_seo_enabled = ( new WPSEO_Metabox_Analysis_SEO() )->is_enabled();
|
||||
}
|
||||
|
||||
return $this->is_seo_enabled;
|
||||
}
|
||||
|
||||
@@ -168,6 +170,7 @@ class WPSEO_Admin_Bar_Menu implements WPSEO_WordPress_Integration {
|
||||
if ( is_null( $this->is_readability_enabled ) ) {
|
||||
$this->is_readability_enabled = ( new WPSEO_Metabox_Analysis_Readability() )->is_enabled();
|
||||
}
|
||||
|
||||
return $this->is_readability_enabled;
|
||||
}
|
||||
|
||||
@@ -180,6 +183,7 @@ class WPSEO_Admin_Bar_Menu implements WPSEO_WordPress_Integration {
|
||||
if ( is_null( $this->current_indexable ) ) {
|
||||
$this->current_indexable = $this->indexable_repository->for_current_page();
|
||||
}
|
||||
|
||||
return $this->current_indexable;
|
||||
}
|
||||
|
||||
@@ -237,7 +241,8 @@ class WPSEO_Admin_Bar_Menu implements WPSEO_WordPress_Integration {
|
||||
[
|
||||
'parent' => self::MENU_IDENTIFIER,
|
||||
'id' => 'wpseo-seo-score',
|
||||
'title' => __( 'SEO score', 'wordpress-seo' ) . ': ' . $this->score_icon_helper->for_seo( $indexable, 'adminbar-sub-menu-score' )->present(),
|
||||
'title' => __( 'SEO score', 'wordpress-seo' ) . ': ' . $this->score_icon_helper->for_seo( $indexable, 'adminbar-sub-menu-score' )
|
||||
->present(),
|
||||
'meta' => [ 'tabindex' => '0' ],
|
||||
]
|
||||
);
|
||||
@@ -248,7 +253,8 @@ class WPSEO_Admin_Bar_Menu implements WPSEO_WordPress_Integration {
|
||||
[
|
||||
'parent' => self::MENU_IDENTIFIER,
|
||||
'id' => 'wpseo-readability-score',
|
||||
'title' => __( 'Readability', 'wordpress-seo' ) . ': ' . $this->score_icon_helper->for_readability( $indexable->readability_score, 'adminbar-sub-menu-score' )->present(),
|
||||
'title' => __( 'Readability', 'wordpress-seo' ) . ': ' . $this->score_icon_helper->for_readability( $indexable->readability_score, 'adminbar-sub-menu-score' )
|
||||
->present(),
|
||||
'meta' => [ 'tabindex' => '0' ],
|
||||
]
|
||||
);
|
||||
@@ -585,15 +591,23 @@ class WPSEO_Admin_Bar_Menu implements WPSEO_WordPress_Integration {
|
||||
* @return void
|
||||
*/
|
||||
protected function add_premium_link( WP_Admin_Bar $wp_admin_bar ) {
|
||||
$sale_percentage = '';
|
||||
if ( YoastSEO()->classes->get( Promotion_Manager::class )->is( 'black-friday-2023-promotion' ) ) {
|
||||
$sale_percentage = sprintf(
|
||||
'<span class="admin-bar-premium-promotion">%1$s</span>',
|
||||
__( '-30%', 'wordpress-seo' )
|
||||
);
|
||||
}
|
||||
$wp_admin_bar->add_menu(
|
||||
[
|
||||
'parent' => self::MENU_IDENTIFIER,
|
||||
'id' => 'wpseo-get-premium',
|
||||
// Circumvent an issue in the WP admin bar API in order to pass `data` attributes. See https://core.trac.wordpress.org/ticket/38636.
|
||||
'title' => sprintf(
|
||||
'<a href="%1$s" target="_blank" data-action="load-nfd-ctb" data-ctb-id="f6a84663-465f-4cb5-8ba5-f7a6d72224b2" style="padding:0;">%2$s »</a>',
|
||||
'<a href="%1$s" target="_blank" data-action="load-nfd-ctb" data-ctb-id="f6a84663-465f-4cb5-8ba5-f7a6d72224b2" style="padding:0;">%2$s » %3$s</a>',
|
||||
$this->shortlinker->build_shortlink( 'https://yoa.st/admin-bar-get-premium' ),
|
||||
__( 'Get Yoast SEO Premium', 'wordpress-seo' )
|
||||
__( 'Get Yoast SEO Premium', 'wordpress-seo' ),
|
||||
$sale_percentage
|
||||
),
|
||||
'meta' => [
|
||||
'tabindex' => '0',
|
||||
@@ -850,7 +864,7 @@ class WPSEO_Admin_Bar_Menu implements WPSEO_WordPress_Integration {
|
||||
return '';
|
||||
}
|
||||
|
||||
/* translators: %s: number of notifications */
|
||||
/* translators: Hidden accessibility text; %s: number of notifications. */
|
||||
$counter_screen_reader_text = sprintf( _n( '%s notification', '%s notifications', $notification_count, 'wordpress-seo' ), number_format_i18n( $notification_count ) );
|
||||
|
||||
return sprintf( ' <div class="wp-core-ui wp-ui-notification yoast-issue-counter"><span class="yoast-issues-count" aria-hidden="true">%d</span><span class="screen-reader-text">%s</span></div>', $notification_count, $counter_screen_reader_text );
|
||||
|
||||
@@ -496,14 +496,20 @@ class WPSEO_Image_Utils {
|
||||
*/
|
||||
public static function get_attachment_id_from_settings( $setting ) {
|
||||
$image_id = WPSEO_Options::get( $setting . '_id', false );
|
||||
if ( ! $image_id ) {
|
||||
$image = WPSEO_Options::get( $setting, false );
|
||||
if ( $image ) {
|
||||
// There is not an option to put a URL in an image field in the settings anymore, only to upload it through the media manager.
|
||||
// This means an attachment always exists, so doing this is only needed once.
|
||||
$image_id = self::get_attachment_by_url( $image );
|
||||
WPSEO_Options::set( $setting . '_id', $image_id );
|
||||
}
|
||||
if ( $image_id ) {
|
||||
return $image_id;
|
||||
}
|
||||
|
||||
$image = WPSEO_Options::get( $setting, false );
|
||||
if ( $image ) {
|
||||
// There is not an option to put a URL in an image field in the settings anymore, only to upload it through the media manager.
|
||||
// This means an attachment always exists, so doing this is only needed once.
|
||||
$image_id = self::get_attachment_by_url( $image );
|
||||
}
|
||||
|
||||
// Only store a new ID if it is not 0, to prevent an update loop.
|
||||
if ( $image_id ) {
|
||||
WPSEO_Options::set( $setting . '_id', $image_id );
|
||||
}
|
||||
|
||||
return $image_id;
|
||||
|
||||
@@ -43,6 +43,10 @@ class WPSEO_Primary_Term {
|
||||
public function get_primary_term() {
|
||||
$primary_term = get_post_meta( $this->post_ID, WPSEO_Meta::$meta_prefix . 'primary_' . $this->taxonomy_name, true );
|
||||
|
||||
if ( ! $primary_term ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$terms = $this->get_terms();
|
||||
|
||||
if ( ! in_array( (int) $primary_term, wp_list_pluck( $terms, 'term_id' ), true ) ) {
|
||||
|
||||
@@ -106,6 +106,7 @@ class WPSEO_Option_MS extends WPSEO_Option {
|
||||
"{$allow_prefix}remove_feed_global_comments" => true,
|
||||
"{$allow_prefix}remove_feed_post_comments" => true,
|
||||
"{$allow_prefix}enable_index_now" => true,
|
||||
"{$allow_prefix}enable_ai_generator" => true,
|
||||
"{$allow_prefix}remove_feed_authors" => true,
|
||||
"{$allow_prefix}remove_feed_categories" => true,
|
||||
"{$allow_prefix}remove_feed_tags" => true,
|
||||
|
||||
@@ -964,11 +964,11 @@ class WPSEO_Option_Titles extends WPSEO_Option {
|
||||
'label' => __( 'Dash', 'wordpress-seo' ),
|
||||
],
|
||||
'sc-ndash' => [
|
||||
'option' => '–',
|
||||
'option' => '–',
|
||||
'label' => __( 'En dash', 'wordpress-seo' ),
|
||||
],
|
||||
'sc-mdash' => [
|
||||
'option' => '—',
|
||||
'option' => '—',
|
||||
'label' => __( 'Em dash', 'wordpress-seo' ),
|
||||
],
|
||||
'sc-colon' => [
|
||||
@@ -976,11 +976,11 @@ class WPSEO_Option_Titles extends WPSEO_Option {
|
||||
'label' => __( 'Colon', 'wordpress-seo' ),
|
||||
],
|
||||
'sc-middot' => [
|
||||
'option' => '·',
|
||||
'option' => '·',
|
||||
'label' => __( 'Middle dot', 'wordpress-seo' ),
|
||||
],
|
||||
'sc-bull' => [
|
||||
'option' => '•',
|
||||
'option' => '•',
|
||||
'label' => __( 'Bullet', 'wordpress-seo' ),
|
||||
],
|
||||
'sc-star' => [
|
||||
@@ -1000,19 +1000,19 @@ class WPSEO_Option_Titles extends WPSEO_Option {
|
||||
'label' => __( 'Small tilde', 'wordpress-seo' ),
|
||||
],
|
||||
'sc-laquo' => [
|
||||
'option' => '«',
|
||||
'option' => '«',
|
||||
'label' => __( 'Left angle quotation mark', 'wordpress-seo' ),
|
||||
],
|
||||
'sc-raquo' => [
|
||||
'option' => '»',
|
||||
'option' => '»',
|
||||
'label' => __( 'Right angle quotation mark', 'wordpress-seo' ),
|
||||
],
|
||||
'sc-lt' => [
|
||||
'option' => '<',
|
||||
'option' => '>',
|
||||
'label' => __( 'Less than sign', 'wordpress-seo' ),
|
||||
],
|
||||
'sc-gt' => [
|
||||
'option' => '>',
|
||||
'option' => '<',
|
||||
'label' => __( 'Greater than sign', 'wordpress-seo' ),
|
||||
],
|
||||
];
|
||||
|
||||
@@ -58,6 +58,7 @@ class WPSEO_Option_Wpseo extends WPSEO_Option {
|
||||
'enable_xml_sitemap' => true,
|
||||
'enable_text_link_counter' => true,
|
||||
'enable_index_now' => true,
|
||||
'enable_ai_generator' => false,
|
||||
'show_onboarding_notice' => false,
|
||||
'first_activated_on' => false,
|
||||
'myyoast-oauth' => [
|
||||
@@ -126,6 +127,9 @@ class WPSEO_Option_Wpseo extends WPSEO_Option {
|
||||
'deny_search_crawling' => false,
|
||||
'deny_wp_json_crawling' => false,
|
||||
'deny_adsbot_crawling' => false,
|
||||
'deny_ccbot_crawling' => false,
|
||||
'deny_google_extended_crawling' => false,
|
||||
'deny_gptbot_crawling' => false,
|
||||
'redirect_search_pretty_urls' => false,
|
||||
'least_readability_ignore_list' => [],
|
||||
'least_seo_score_ignore_list' => [],
|
||||
@@ -510,6 +514,9 @@ class WPSEO_Option_Wpseo extends WPSEO_Option {
|
||||
* 'search_cleanup_patterns'
|
||||
* 'deny_wp_json_crawling'
|
||||
* 'deny_adsbot_crawling'
|
||||
* 'deny_ccbot_crawling'
|
||||
* 'deny_google_extended_crawling'
|
||||
* 'deny_gptbot_crawling'
|
||||
* 'redirect_search_pretty_urls'
|
||||
* 'should_redirect_after_install_free'
|
||||
* 'show_new_content_type_notification'
|
||||
@@ -559,6 +566,7 @@ class WPSEO_Option_Wpseo extends WPSEO_Option {
|
||||
'remove_feed_global_comments' => false,
|
||||
'remove_feed_post_comments' => false,
|
||||
'enable_index_now' => false,
|
||||
'enable_ai_generator' => false,
|
||||
'remove_feed_authors' => false,
|
||||
'remove_feed_categories' => false,
|
||||
'remove_feed_tags' => false,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* This abstract class and it's concrete classes implement defaults and value validation for
|
||||
* This abstract class and its concrete classes implement defaults and value validation for
|
||||
* all WPSEO options and subkeys within options.
|
||||
*
|
||||
* Some guidelines:
|
||||
@@ -22,9 +22,9 @@
|
||||
*
|
||||
* [Updating/Adding options]
|
||||
* - For multisite site_options, please use the WPSEO_Options::update_site_option() method.
|
||||
* - For normal options, use the normal add/update_option() functions. As long a the classes here
|
||||
* - For normal options, use the normal add/update_option() functions. As long as the classes here
|
||||
* are instantiated, validation for all options and their subkeys will be automatic.
|
||||
* - On (succesfull) update of a couple of options, certain related actions will be run automatically.
|
||||
* - On (successful) update of a couple of options, certain related actions will be run automatically.
|
||||
* Some examples:
|
||||
* - on change of wpseo[yoast_tracking], the cron schedule will be adjusted accordingly
|
||||
* - on change of wpseo and wpseo_title, some caches will be cleared
|
||||
@@ -41,7 +41,7 @@
|
||||
* translate_defaults() method.
|
||||
* - When you remove an array key from an option: if it's important that the option is really removed,
|
||||
* add the WPSEO_Option::clean_up( $option_name ) method to the upgrade run.
|
||||
* This will re-save the option and automatically remove the array key no longer in existance.
|
||||
* This will re-save the option and automatically remove the array key no longer in existence.
|
||||
* - When you rename a sub-option: add it to the clean_option() routine and run that in the upgrade run.
|
||||
* - When you change the default for an option sub-key, make sure you verify that the validation routine will
|
||||
* still work the way it should.
|
||||
@@ -74,8 +74,8 @@ abstract class WPSEO_Option {
|
||||
* Option group name for use in settings forms.
|
||||
*
|
||||
* Will be set automagically if not set in concrete class (i.e.
|
||||
* if it confirm to the normal pattern 'yoast' . $option_name . 'options',
|
||||
* only set in conrete class if it doesn't).
|
||||
* if it conforms to the normal pattern 'yoast' . $option_name . 'options',
|
||||
* only set in concrete class if it doesn't).
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
@@ -107,7 +107,7 @@ abstract class WPSEO_Option {
|
||||
protected $defaults;
|
||||
|
||||
/**
|
||||
* Array of variable option name patterns for the option - if any -.
|
||||
* Array of variable option name patterns for the option - if any.
|
||||
*
|
||||
* Set this when the option contains array keys which vary based on post_type
|
||||
* or taxonomy.
|
||||
@@ -230,7 +230,7 @@ abstract class WPSEO_Option {
|
||||
* ```
|
||||
* ---------------
|
||||
*
|
||||
* Concrete classes *may* contain a enrich_defaults method to add additional defaults once
|
||||
* Concrete classes *may* contain an enrich_defaults method to add additional defaults once
|
||||
* all post_types and taxonomies have been registered.
|
||||
*
|
||||
* ```
|
||||
@@ -497,7 +497,7 @@ abstract class WPSEO_Option {
|
||||
return $filtered;
|
||||
}
|
||||
|
||||
/* *********** METHODS influencing add_uption(), update_option() and saving from admin pages. *********** */
|
||||
/* *********** METHODS influencing add_option(), update_option() and saving from admin pages. *********** */
|
||||
|
||||
/**
|
||||
* Register (whitelist) the option for the configuration pages.
|
||||
@@ -523,7 +523,7 @@ abstract class WPSEO_Option {
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate the option
|
||||
* Validate the option.
|
||||
*
|
||||
* @param mixed $option_value The unvalidated new value for the option.
|
||||
*
|
||||
@@ -645,7 +645,7 @@ abstract class WPSEO_Option {
|
||||
*
|
||||
* @param mixed $value The new value for the option.
|
||||
*
|
||||
* @return bool Whether the update was succesfull.
|
||||
* @return bool Whether the update was successful.
|
||||
*/
|
||||
public function update_site_option( $value ) {
|
||||
if ( $this->multisite_only === true && is_multisite() ) {
|
||||
@@ -667,7 +667,7 @@ abstract class WPSEO_Option {
|
||||
* @uses WPSEO_Option::import()
|
||||
*
|
||||
* @param string|null $current_version Optional. Version from which to upgrade, if not set,
|
||||
* version specific upgrades will be disregarded.
|
||||
* version-specific upgrades will be disregarded.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -692,7 +692,7 @@ abstract class WPSEO_Option {
|
||||
*
|
||||
* @param array $option_value Option value to be imported.
|
||||
* @param string|null $current_version Optional. Version from which to upgrade, if not set,
|
||||
* version specific upgrades will be disregarded.
|
||||
* version-specific upgrades will be disregarded.
|
||||
* @param array|null $all_old_option_values Optional. Only used when importing old options to
|
||||
* have access to the real old values, in contrast to
|
||||
* the saved ones.
|
||||
|
||||
@@ -94,7 +94,6 @@ class WPSEO_Post_Type_Sitemap_Provider implements WPSEO_Sitemap_Provider {
|
||||
*/
|
||||
public function get_index_links( $max_entries ) {
|
||||
global $wpdb;
|
||||
|
||||
$post_types = WPSEO_Post_Type::get_accessible_post_types();
|
||||
$post_types = array_filter( $post_types, [ $this, 'is_valid_post_type' ] );
|
||||
$last_modified_times = WPSEO_Sitemaps::get_last_modified_gmt( $post_types, true );
|
||||
@@ -118,7 +117,19 @@ class WPSEO_Post_Type_Sitemap_Provider implements WPSEO_Sitemap_Provider {
|
||||
if ( $max_pages > 1 ) {
|
||||
$post_statuses = array_map( 'esc_sql', WPSEO_Sitemaps::get_post_statuses( $post_type ) );
|
||||
|
||||
$sql = "
|
||||
if ( version_compare( $wpdb->db_version(), '8.0', '>=' ) ) {
|
||||
$sql = "
|
||||
WITH ordering AS (SELECT ROW_NUMBER() OVER (ORDER BY post_modified_gmt) AS n, post_modified_gmt
|
||||
FROM {$wpdb->posts} USE INDEX ( type_status_date )
|
||||
WHERE post_status IN ('" . implode( "','", $post_statuses ) . "')
|
||||
AND post_type = %s
|
||||
ORDER BY post_modified_gmt)
|
||||
SELECT post_modified_gmt
|
||||
FROM ordering
|
||||
WHERE MOD(n, %d) = 0;";
|
||||
}
|
||||
else {
|
||||
$sql = "
|
||||
SELECT post_modified_gmt
|
||||
FROM ( SELECT @rownum:=0 ) init
|
||||
JOIN {$wpdb->posts} USE INDEX( type_status_date )
|
||||
@@ -127,6 +138,7 @@ class WPSEO_Post_Type_Sitemap_Provider implements WPSEO_Sitemap_Provider {
|
||||
AND ( @rownum:=@rownum+1 ) %% %d = 0
|
||||
ORDER BY post_modified_gmt ASC
|
||||
";
|
||||
}
|
||||
|
||||
$all_dates = $wpdb->get_col( $wpdb->prepare( $sql, $post_type, $max_entries ) );
|
||||
}
|
||||
@@ -163,9 +175,8 @@ class WPSEO_Post_Type_Sitemap_Provider implements WPSEO_Sitemap_Provider {
|
||||
* @param int $max_entries Entries per sitemap.
|
||||
* @param int $current_page Current page of the sitemap.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @throws OutOfBoundsException When an invalid page is requested.
|
||||
* @return array
|
||||
*/
|
||||
public function get_sitemap_links( $type, $max_entries, $current_page ) {
|
||||
|
||||
@@ -421,7 +432,7 @@ class WPSEO_Post_Type_Sitemap_Provider implements WPSEO_Sitemap_Provider {
|
||||
/**
|
||||
* Filters the first post type links.
|
||||
*
|
||||
* @param array $links The first post type links.
|
||||
* @param array $links The first post type links.
|
||||
* @param string $post_type The post type this archive is for.
|
||||
*/
|
||||
return apply_filters( 'wpseo_sitemap_post_type_first_links', $links, $post_type );
|
||||
|
||||
@@ -540,26 +540,6 @@ class WPSEO_Sitemaps {
|
||||
return YoastSEO()->helpers->date->format( self::get_last_modified_gmt( $post_types ) );
|
||||
}
|
||||
|
||||
// phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.Found -- Argument is kept for documentation purposes.
|
||||
|
||||
/**
|
||||
* Notify search engines of the updated sitemap.
|
||||
*
|
||||
* @deprecated 19.2
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string|null $url Optional URL to make the ping for.
|
||||
*/
|
||||
public static function ping_search_engines( $url = null ) {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 19.2', 'WPSEO_Sitemaps_Admin::ping_search_engines' );
|
||||
|
||||
$admin = new WPSEO_Sitemaps_Admin();
|
||||
$admin->ping_search_engines();
|
||||
}
|
||||
|
||||
// phpcs:enable
|
||||
|
||||
/**
|
||||
* Get the maximum number of entries per XML sitemap.
|
||||
*
|
||||
|
||||
@@ -287,7 +287,7 @@ class WPSEO_Taxonomy_Sitemap_Provider implements WPSEO_Sitemap_Provider {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( in_array( $taxonomy_name, [ 'link_category', 'nav_menu' ], true ) ) {
|
||||
if ( in_array( $taxonomy_name, [ 'link_category', 'nav_menu', 'wp_pattern_category' ], true ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,17 +5,3 @@
|
||||
* @package WPSEO\Deprecated
|
||||
*/
|
||||
|
||||
if ( ! function_exists( 'wpseo_cli_init' ) ) {
|
||||
|
||||
/**
|
||||
* Initialize the WP-CLI integration.
|
||||
*
|
||||
* @deprecated 19.6.1
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound
|
||||
*/
|
||||
function wpseo_cli_init() {
|
||||
_deprecated_function( __FUNCTION__, 'Yoast SEO 19.6.1' );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user