plugin updates
This commit is contained in:
@@ -57,7 +57,7 @@ abstract class Abstract_Indexing_Action implements Indexation_Action_Interface,
|
||||
$query = $this->get_select_query( $limit );
|
||||
|
||||
// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Function get_count_query returns a prepared query.
|
||||
$unindexed_object_ids = $this->wpdb->get_col( $query );
|
||||
$unindexed_object_ids = ( $query === '' ) ? [] : $this->wpdb->get_col( $query );
|
||||
$count = (int) \count( $unindexed_object_ids );
|
||||
|
||||
\set_transient( static::UNINDEXED_LIMITED_COUNT_TRANSIENT, $count, ( \MINUTE_IN_SECONDS * 15 ) );
|
||||
@@ -83,7 +83,7 @@ abstract class Abstract_Indexing_Action implements Indexation_Action_Interface,
|
||||
$query = $this->get_count_query();
|
||||
|
||||
// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Function get_count_query returns a prepared query.
|
||||
$count = $this->wpdb->get_var( $query );
|
||||
$count = ( $query === '' ) ? 0 : $this->wpdb->get_var( $query );
|
||||
|
||||
if ( \is_null( $count ) ) {
|
||||
return false;
|
||||
|
||||
@@ -83,7 +83,7 @@ class Indexable_Term_Indexation_Action extends Abstract_Indexing_Action {
|
||||
$query = $this->get_select_query( $this->get_limit() );
|
||||
|
||||
// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Function get_select_query returns a prepared query.
|
||||
$term_ids = $this->wpdb->get_col( $query );
|
||||
$term_ids = ( $query === '' ) ? [] : $this->wpdb->get_col( $query );
|
||||
|
||||
$indexables = [];
|
||||
foreach ( $term_ids as $term_id ) {
|
||||
@@ -128,6 +128,10 @@ class Indexable_Term_Indexation_Action extends Abstract_Indexing_Action {
|
||||
$taxonomy_table = $this->wpdb->term_taxonomy;
|
||||
$public_taxonomies = $this->taxonomy->get_indexable_taxonomies();
|
||||
|
||||
if ( empty( $public_taxonomies ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$taxonomies_placeholders = \implode( ', ', \array_fill( 0, \count( $public_taxonomies ), '%s' ) );
|
||||
|
||||
$replacements = [ $this->version ];
|
||||
@@ -159,7 +163,12 @@ class Indexable_Term_Indexation_Action extends Abstract_Indexing_Action {
|
||||
$indexable_table = Model::get_table_name( 'Indexable' );
|
||||
$taxonomy_table = $this->wpdb->term_taxonomy;
|
||||
$public_taxonomies = $this->taxonomy->get_indexable_taxonomies();
|
||||
$placeholders = \implode( ', ', \array_fill( 0, \count( $public_taxonomies ), '%s' ) );
|
||||
|
||||
if ( empty( $public_taxonomies ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$placeholders = \implode( ', ', \array_fill( 0, \count( $public_taxonomies ), '%s' ) );
|
||||
|
||||
$replacements = [ $this->version ];
|
||||
\array_push( $replacements, ...$public_taxonomies );
|
||||
|
||||
@@ -52,6 +52,10 @@ class Term_Link_Indexing_Action extends Abstract_Link_Indexing_Action {
|
||||
protected function get_objects() {
|
||||
$query = $this->get_select_query( $this->get_limit() );
|
||||
|
||||
if ( $query === '' ) {
|
||||
return [];
|
||||
}
|
||||
|
||||
// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Function get_select_query returns a prepared query.
|
||||
$terms = $this->wpdb->get_results( $query );
|
||||
|
||||
@@ -74,8 +78,13 @@ class Term_Link_Indexing_Action extends Abstract_Link_Indexing_Action {
|
||||
*/
|
||||
protected function get_count_query() {
|
||||
$public_taxonomies = $this->taxonomy_helper->get_indexable_taxonomies();
|
||||
$placeholders = \implode( ', ', \array_fill( 0, \count( $public_taxonomies ), '%s' ) );
|
||||
$indexable_table = Model::get_table_name( 'Indexable' );
|
||||
|
||||
if ( empty( $public_taxonomies ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$placeholders = \implode( ', ', \array_fill( 0, \count( $public_taxonomies ), '%s' ) );
|
||||
$indexable_table = Model::get_table_name( 'Indexable' );
|
||||
|
||||
// Warning: If this query is changed, makes sure to update the query in get_select_query as well.
|
||||
return $this->wpdb->prepare(
|
||||
@@ -102,6 +111,10 @@ class Term_Link_Indexing_Action extends Abstract_Link_Indexing_Action {
|
||||
protected function get_select_query( $limit = false ) {
|
||||
$public_taxonomies = $this->taxonomy_helper->get_indexable_taxonomies();
|
||||
|
||||
if ( empty( $public_taxonomies ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$indexable_table = Model::get_table_name( 'Indexable' );
|
||||
$replacements = $public_taxonomies;
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ use Yoast\WP\SEO\Helpers\Image_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Indexable_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Permalink_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Request_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Schema\ID_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Site_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Url_Helper;
|
||||
@@ -122,13 +121,6 @@ class Meta_Tags_Context extends Abstract_Presentation {
|
||||
*/
|
||||
private $id_helper;
|
||||
|
||||
/**
|
||||
* The request helper.
|
||||
*
|
||||
* @var Request_Helper
|
||||
*/
|
||||
private $request_helper;
|
||||
|
||||
/**
|
||||
* The WPSEO Replace Vars object.
|
||||
*
|
||||
@@ -184,7 +176,6 @@ class Meta_Tags_Context extends Abstract_Presentation {
|
||||
* @param Permalink_Helper $permalink_helper The permalink helper.
|
||||
* @param Indexable_Helper $indexable_helper The indexable helper.
|
||||
* @param Indexable_Repository $indexable_repository The indexable repository.
|
||||
* @param Request_Helper $request_helper The request helper.
|
||||
*/
|
||||
public function __construct(
|
||||
Options_Helper $options,
|
||||
@@ -196,8 +187,7 @@ class Meta_Tags_Context extends Abstract_Presentation {
|
||||
User_Helper $user,
|
||||
Permalink_Helper $permalink_helper,
|
||||
Indexable_Helper $indexable_helper,
|
||||
Indexable_Repository $indexable_repository,
|
||||
Request_Helper $request_helper
|
||||
Indexable_Repository $indexable_repository
|
||||
) {
|
||||
$this->options = $options;
|
||||
$this->url = $url;
|
||||
@@ -209,7 +199,6 @@ class Meta_Tags_Context extends Abstract_Presentation {
|
||||
$this->permalink_helper = $permalink_helper;
|
||||
$this->indexable_helper = $indexable_helper;
|
||||
$this->indexable_repository = $indexable_repository;
|
||||
$this->request_helper = $request_helper;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -625,7 +614,7 @@ class Meta_Tags_Context extends Abstract_Presentation {
|
||||
return $this->image->get_attachment_image_url( $this->main_image_id, 'full' );
|
||||
}
|
||||
|
||||
if ( $this->request_helper->is_rest_request() ) {
|
||||
if ( \wp_is_serving_rest_request() ) {
|
||||
return $this->get_main_image_url_for_rest_request();
|
||||
}
|
||||
|
||||
@@ -647,7 +636,7 @@ class Meta_Tags_Context extends Abstract_Presentation {
|
||||
* @return int|null The main image ID.
|
||||
*/
|
||||
public function generate_main_image_id() {
|
||||
if ( $this->request_helper->is_rest_request() ) {
|
||||
if ( \wp_is_serving_rest_request() ) {
|
||||
return $this->get_main_image_id_for_rest_request();
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace Yoast\WP\SEO\Dashboard\User_Interface;
|
||||
|
||||
use WPSEO_Admin_Asset_Manager;
|
||||
use Yoast\WP\SEO\Actions\Alert_Dismissal_Action;
|
||||
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
|
||||
use Yoast\WP\SEO\Conditionals\New_Dashboard_Ui_Conditional;
|
||||
use Yoast\WP\SEO\Helpers\Current_Page_Helper;
|
||||
@@ -10,6 +11,7 @@ use Yoast\WP\SEO\Helpers\Notification_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Product_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Short_Link_Helper;
|
||||
use Yoast\WP\SEO\Integrations\Integration_Interface;
|
||||
use Yoast\WP\SEO\Promotions\Application\Promotion_Manager;
|
||||
|
||||
/**
|
||||
* Class New_Dashboard_Page_Integration.
|
||||
@@ -56,27 +58,47 @@ class New_Dashboard_Page_Integration implements Integration_Interface {
|
||||
*/
|
||||
private $shortlink_helper;
|
||||
|
||||
/**
|
||||
* The promotion manager.
|
||||
*
|
||||
* @var Promotion_Manager $promotion_manager
|
||||
*/
|
||||
private $promotion_manager;
|
||||
|
||||
/**
|
||||
* The alert dismissal action.
|
||||
*
|
||||
* @var Alert_Dismissal_Action $alert_dismissal_action
|
||||
*/
|
||||
private $alert_dismissal_action;
|
||||
|
||||
/**
|
||||
* Constructs Academy_Integration.
|
||||
*
|
||||
* @param WPSEO_Admin_Asset_Manager $asset_manager The WPSEO_Admin_Asset_Manager.
|
||||
* @param Current_Page_Helper $current_page_helper The Current_Page_Helper.
|
||||
* @param Product_Helper $product_helper The Product_Helper.
|
||||
* @param Short_Link_Helper $shortlink_helper The Short_Link_Helper.
|
||||
* @param Notification_Helper $notification_helper The Notification_Helper.
|
||||
* @param WPSEO_Admin_Asset_Manager $asset_manager The WPSEO_Admin_Asset_Manager.
|
||||
* @param Current_Page_Helper $current_page_helper The Current_Page_Helper.
|
||||
* @param Product_Helper $product_helper The Product_Helper.
|
||||
* @param Short_Link_Helper $shortlink_helper The Short_Link_Helper.
|
||||
* @param Notification_Helper $notification_helper The Notification_Helper.
|
||||
* @param Alert_Dismissal_Action $alert_dismissal_action The alert dismissal action.
|
||||
* @param Promotion_Manager $promotion_manager The promotion manager.
|
||||
*/
|
||||
public function __construct(
|
||||
WPSEO_Admin_Asset_Manager $asset_manager,
|
||||
Current_Page_Helper $current_page_helper,
|
||||
Product_Helper $product_helper,
|
||||
Short_Link_Helper $shortlink_helper,
|
||||
Notification_Helper $notification_helper
|
||||
Notification_Helper $notification_helper,
|
||||
Alert_Dismissal_Action $alert_dismissal_action,
|
||||
Promotion_Manager $promotion_manager
|
||||
) {
|
||||
$this->asset_manager = $asset_manager;
|
||||
$this->current_page_helper = $current_page_helper;
|
||||
$this->product_helper = $product_helper;
|
||||
$this->shortlink_helper = $shortlink_helper;
|
||||
$this->notification_helper = $notification_helper;
|
||||
$this->asset_manager = $asset_manager;
|
||||
$this->current_page_helper = $current_page_helper;
|
||||
$this->product_helper = $product_helper;
|
||||
$this->shortlink_helper = $shortlink_helper;
|
||||
$this->notification_helper = $notification_helper;
|
||||
$this->alert_dismissal_action = $alert_dismissal_action;
|
||||
$this->promotion_manager = $promotion_manager;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -162,7 +184,7 @@ class New_Dashboard_Page_Integration implements Integration_Interface {
|
||||
*/
|
||||
private function get_script_data() {
|
||||
return [
|
||||
'preferences' => [
|
||||
'preferences' => [
|
||||
'isPremium' => $this->product_helper->is_premium(),
|
||||
'isRtl' => \is_rtl(),
|
||||
'pluginUrl' => \plugins_url( '', \WPSEO_FILE ),
|
||||
@@ -171,10 +193,11 @@ class New_Dashboard_Page_Integration implements Integration_Interface {
|
||||
'premiumCtbId' => 'f6a84663-465f-4cb5-8ba5-f7a6d72224b2',
|
||||
],
|
||||
],
|
||||
'linkParams' => $this->shortlink_helper->get_query_params(),
|
||||
'userEditUrl' => \add_query_arg( 'user_id', '{user_id}', \admin_url( 'user-edit.php' ) ),
|
||||
'problems' => $this->notification_helper->get_problems(),
|
||||
'notifications' => $this->notification_helper->get_notifications(),
|
||||
'linkParams' => $this->shortlink_helper->get_query_params(),
|
||||
'userEditUrl' => \add_query_arg( 'user_id', '{user_id}', \admin_url( 'user-edit.php' ) ),
|
||||
'alerts' => $this->notification_helper->get_alerts(),
|
||||
'currentPromotions' => $this->promotion_manager->get_current_promotions(),
|
||||
'dismissedAlerts' => $this->alert_dismissal_action->all_dismissed(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ namespace Yoast\WP\SEO\Helpers;
|
||||
|
||||
/**
|
||||
* A helper object for the request state.
|
||||
*
|
||||
* @codeCoverageIgnore Because of deprecation.
|
||||
*/
|
||||
class Request_Helper {
|
||||
|
||||
@@ -11,8 +13,13 @@ class Request_Helper {
|
||||
* Checks if the current request is a REST request.
|
||||
*
|
||||
* @return bool True when the current request is a REST request.
|
||||
*
|
||||
* @deprecated 23.6
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function is_rest_request() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 23.6', 'wp_is_serving_rest_request' );
|
||||
|
||||
return \defined( 'REST_REQUEST' ) && \REST_REQUEST === true;
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
<?php return array('reduxJsToolkit.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-redux-package'), 'version' => '425acbd30b98c737df6e'), 'analysisReport.js' => array('dependencies' => array('lodash', 'react', 'wp-i18n', 'wp-polyfill', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => 'a0f12a824e5689dd0faf'), 'componentsNew.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-i18n', 'wp-polyfill', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-react-select', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '898e7a63226507fb9afc'), 'featureFlag.js' => array('dependencies' => array('wp-polyfill'), 'version' => '91e54e3dd01f59a724ae'), 'helpers.js' => array('dependencies' => array('lodash', 'react', 'wp-i18n', 'wp-polyfill', 'yoast-seo-prop-types-package', 'yoast-seo-styled-components-package'), 'version' => 'f38a5f8b9a9ba801e722'), 'replacementVariableEditor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-components', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'yoast-seo-components-new-package', 'yoast-seo-draft-js-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '3ef02d0813043f65de66'), 'searchMetadataPreviews.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-i18n', 'wp-polyfill', 'yoast-seo-analysis-package', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-replacement-variable-editor-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '732af9131c98940bc630'), 'socialMetadataForms.js' => array('dependencies' => array('lodash', 'react', 'wp-i18n', 'wp-polyfill', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-redux-package', 'yoast-seo-replacement-variable-editor-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '6c538797b828b87a5419'), 'styleGuide.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-helpers-package', 'yoast-seo-styled-components-package'), 'version' => 'a65ddb8de826da5fea4d'), 'uiLibrary.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-polyfill', 'yoast-seo-prop-types-package', 'yoast-seo-redux-js-toolkit-package'), 'version' => '99e8468b00214a533091'), 'chart.js.js' => array('dependencies' => array('wp-polyfill'), 'version' => '196fb6740f0ef8ce192a'), 'draftJs.js' => array('dependencies' => array('react', 'react-dom', 'wp-polyfill'), 'version' => 'f03ff0ae2ee1cf6bbc54'), 'jed.js' => array('dependencies' => array('wp-polyfill'), 'version' => '28697086e82ae1cd0e88'), 'propTypes.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4c546a0c9e97b70d3fe0'), 'reactHelmet.js' => array('dependencies' => array('react', 'wp-polyfill', 'yoast-seo-prop-types-package'), 'version' => 'b7d9f84f1dc499388f58'), 'redux.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e83451c8529be91b4af7'), 'styledComponents.js' => array('dependencies' => array('react', 'wp-polyfill'), 'version' => 'f030a78c47ee9be46c07'), 'analysis.js' => array('dependencies' => array('lodash', 'wp-i18n', 'wp-polyfill', 'yoast-seo-feature-flag-package'), 'version' => 'ac0e34c89d7739b10963'));
|
||||
<?php return array('reduxJsToolkit.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-redux-package'), 'version' => '425acbd30b98c737df6e'), 'analysisReport.js' => array('dependencies' => array('lodash', 'react', 'wp-i18n', 'wp-polyfill', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => 'a0f12a824e5689dd0faf'), 'componentsNew.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-i18n', 'wp-polyfill', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-react-select', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '898e7a63226507fb9afc'), 'featureFlag.js' => array('dependencies' => array('wp-polyfill'), 'version' => '91e54e3dd01f59a724ae'), 'helpers.js' => array('dependencies' => array('lodash', 'react', 'wp-i18n', 'wp-polyfill', 'yoast-seo-prop-types-package', 'yoast-seo-styled-components-package'), 'version' => 'f38a5f8b9a9ba801e722'), 'replacementVariableEditor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-components', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'yoast-seo-components-new-package', 'yoast-seo-draft-js-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '3ef02d0813043f65de66'), 'searchMetadataPreviews.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-i18n', 'wp-polyfill', 'yoast-seo-analysis-package', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-replacement-variable-editor-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '732af9131c98940bc630'), 'socialMetadataForms.js' => array('dependencies' => array('lodash', 'react', 'wp-i18n', 'wp-polyfill', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-redux-package', 'yoast-seo-replacement-variable-editor-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '6c538797b828b87a5419'), 'styleGuide.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-helpers-package', 'yoast-seo-styled-components-package'), 'version' => 'a65ddb8de826da5fea4d'), 'uiLibrary.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-polyfill', 'yoast-seo-prop-types-package', 'yoast-seo-redux-js-toolkit-package'), 'version' => '52e146a897258f0e0a1c'), 'chart.js.js' => array('dependencies' => array('wp-polyfill'), 'version' => '196fb6740f0ef8ce192a'), 'draftJs.js' => array('dependencies' => array('react', 'react-dom', 'wp-polyfill'), 'version' => 'f03ff0ae2ee1cf6bbc54'), 'jed.js' => array('dependencies' => array('wp-polyfill'), 'version' => '28697086e82ae1cd0e88'), 'propTypes.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4c546a0c9e97b70d3fe0'), 'reactHelmet.js' => array('dependencies' => array('react', 'wp-polyfill', 'yoast-seo-prop-types-package'), 'version' => 'b7d9f84f1dc499388f58'), 'redux.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e83451c8529be91b4af7'), 'styledComponents.js' => array('dependencies' => array('react', 'wp-polyfill'), 'version' => 'f030a78c47ee9be46c07'), 'analysis.js' => array('dependencies' => array('lodash', 'wp-i18n', 'wp-polyfill', 'yoast-seo-feature-flag-package'), 'version' => '44675fbce24d2834e8b0'));
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2776,7 +2776,7 @@ class Cached_Container extends Container
|
||||
*/
|
||||
protected function getMetaTagsContextService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Context\\Meta_Tags_Context'] = new \Yoast\WP\SEO\Context\Meta_Tags_Context(${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] = new \Yoast\WP\SEO\Helpers\Options_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Url_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Url_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Url_Helper'] = new \Yoast\WP\SEO\Helpers\Url_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Image_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Image_Helper'] : $this->getImageHelperService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Schema\\ID_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Schema\\ID_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Schema\\ID_Helper'] = new \Yoast\WP\SEO\Helpers\Schema\ID_Helper())) && false ?: '_'}, ${($_ = isset($this->services['WPSEO_Replace_Vars']) ? $this->services['WPSEO_Replace_Vars'] : $this->getWPSEOReplaceVarsService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Site_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Site_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Site_Helper'] = new \Yoast\WP\SEO\Helpers\Site_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\User_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\User_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\User_Helper'] = new \Yoast\WP\SEO\Helpers\User_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Permalink_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Permalink_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Permalink_Helper'] = new \Yoast\WP\SEO\Helpers\Permalink_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Indexable_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Indexable_Helper'] : $this->getIndexableHelperService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Repositories\\Indexable_Repository']) ? $this->services['Yoast\\WP\\SEO\\Repositories\\Indexable_Repository'] : $this->getIndexableRepositoryService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Request_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Request_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Request_Helper'] = new \Yoast\WP\SEO\Helpers\Request_Helper())) && false ?: '_'});
|
||||
return $this->services['Yoast\\WP\\SEO\\Context\\Meta_Tags_Context'] = new \Yoast\WP\SEO\Context\Meta_Tags_Context(${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] = new \Yoast\WP\SEO\Helpers\Options_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Url_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Url_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Url_Helper'] = new \Yoast\WP\SEO\Helpers\Url_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Image_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Image_Helper'] : $this->getImageHelperService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Schema\\ID_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Schema\\ID_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Schema\\ID_Helper'] = new \Yoast\WP\SEO\Helpers\Schema\ID_Helper())) && false ?: '_'}, ${($_ = isset($this->services['WPSEO_Replace_Vars']) ? $this->services['WPSEO_Replace_Vars'] : $this->getWPSEOReplaceVarsService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Site_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Site_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Site_Helper'] = new \Yoast\WP\SEO\Helpers\Site_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\User_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\User_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\User_Helper'] = new \Yoast\WP\SEO\Helpers\User_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Permalink_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Permalink_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Permalink_Helper'] = new \Yoast\WP\SEO\Helpers\Permalink_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Indexable_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Indexable_Helper'] : $this->getIndexableHelperService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Repositories\\Indexable_Repository']) ? $this->services['Yoast\\WP\\SEO\\Repositories\\Indexable_Repository'] : $this->getIndexableRepositoryService()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2786,7 +2786,7 @@ class Cached_Container extends Container
|
||||
*/
|
||||
protected function getNewDashboardPageIntegrationService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Dashboard\\User_Interface\\New_Dashboard_Page_Integration'] = new \Yoast\WP\SEO\Dashboard\User_Interface\New_Dashboard_Page_Integration(${($_ = isset($this->services['WPSEO_Admin_Asset_Manager']) ? $this->services['WPSEO_Admin_Asset_Manager'] : $this->getWPSEOAdminAssetManagerService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Current_Page_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Current_Page_Helper'] : $this->getCurrentPageHelperService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper'] = new \Yoast\WP\SEO\Helpers\Product_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Short_Link_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Short_Link_Helper'] : $this->getShortLinkHelperService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Notification_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Notification_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Notification_Helper'] = new \Yoast\WP\SEO\Helpers\Notification_Helper())) && false ?: '_'});
|
||||
return $this->services['Yoast\\WP\\SEO\\Dashboard\\User_Interface\\New_Dashboard_Page_Integration'] = new \Yoast\WP\SEO\Dashboard\User_Interface\New_Dashboard_Page_Integration(${($_ = isset($this->services['WPSEO_Admin_Asset_Manager']) ? $this->services['WPSEO_Admin_Asset_Manager'] : $this->getWPSEOAdminAssetManagerService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Current_Page_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Current_Page_Helper'] : $this->getCurrentPageHelperService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper'] = new \Yoast\WP\SEO\Helpers\Product_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Short_Link_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Short_Link_Helper'] : $this->getShortLinkHelperService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Notification_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Notification_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Notification_Helper'] = new \Yoast\WP\SEO\Helpers\Notification_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Alert_Dismissal_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Alert_Dismissal_Action'] : $this->getAlertDismissalActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Promotions\\Application\\Promotion_Manager']) ? $this->services['Yoast\\WP\\SEO\\Promotions\\Application\\Promotion_Manager'] : $this->getPromotionManagerService()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3359,9 +3359,13 @@ class Cached_Container extends Container
|
||||
* Gets the public 'Yoast\WP\SEO\Helpers\Request_Helper' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Helpers\Request_Helper
|
||||
*
|
||||
* @deprecated Yoast\WP\SEO\Helpers\Request_Helper is deprecated since version 23.6!
|
||||
*/
|
||||
protected function getRequestHelperService()
|
||||
{
|
||||
@trigger_error('Yoast\\WP\\SEO\\Helpers\\Request_Helper is deprecated since version 23.6!', E_USER_DEPRECATED);
|
||||
|
||||
return $this->services['Yoast\\WP\\SEO\\Helpers\\Request_Helper'] = new \Yoast\WP\SEO\Helpers\Request_Helper();
|
||||
}
|
||||
|
||||
@@ -3796,7 +3800,7 @@ class Cached_Container extends Container
|
||||
*/
|
||||
protected function getFirstTimeConfigurationNoticeIntegrationService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Admin\\First_Time_Configuration_Notice_Integration'] = new \Yoast\WP\SEO\Integrations\Admin\First_Time_Configuration_Notice_Integration(${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] = new \Yoast\WP\SEO\Helpers\Options_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\First_Time_Configuration_Notice_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\First_Time_Configuration_Notice_Helper'] : $this->getFirstTimeConfigurationNoticeHelperService()) && false ?: '_'}, ${($_ = isset($this->services['WPSEO_Admin_Asset_Manager']) ? $this->services['WPSEO_Admin_Asset_Manager'] : $this->getWPSEOAdminAssetManagerService()) && false ?: '_'});
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Admin\\First_Time_Configuration_Notice_Integration'] = new \Yoast\WP\SEO\Integrations\Admin\First_Time_Configuration_Notice_Integration(${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] = new \Yoast\WP\SEO\Helpers\Options_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\First_Time_Configuration_Notice_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\First_Time_Configuration_Notice_Helper'] : $this->getFirstTimeConfigurationNoticeHelperService()) && false ?: '_'}, ${($_ = isset($this->services['WPSEO_Admin_Asset_Manager']) ? $this->services['WPSEO_Admin_Asset_Manager'] : $this->getWPSEOAdminAssetManagerService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\New_Dashboard_Ui_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\New_Dashboard_Ui_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\New_Dashboard_Ui_Conditional'] = new \Yoast\WP\SEO\Conditionals\New_Dashboard_Ui_Conditional())) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3876,7 +3880,7 @@ class Cached_Container extends Container
|
||||
*/
|
||||
protected function getInstallationSuccessIntegrationService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Admin\\Installation_Success_Integration'] = new \Yoast\WP\SEO\Integrations\Admin\Installation_Success_Integration(${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] = new \Yoast\WP\SEO\Helpers\Options_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper'] = new \Yoast\WP\SEO\Helpers\Product_Helper())) && false ?: '_'});
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Admin\\Installation_Success_Integration'] = new \Yoast\WP\SEO\Integrations\Admin\Installation_Success_Integration(${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] = new \Yoast\WP\SEO\Helpers\Options_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper'] = new \Yoast\WP\SEO\Helpers\Product_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\New_Dashboard_Ui_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\New_Dashboard_Ui_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\New_Dashboard_Ui_Conditional'] = new \Yoast\WP\SEO\Conditionals\New_Dashboard_Ui_Conditional())) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3980,7 +3984,7 @@ class Cached_Container extends Container
|
||||
*/
|
||||
protected function getWorkoutsIntegrationService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Admin\\Workouts_Integration'] = new \Yoast\WP\SEO\Integrations\Admin\Workouts_Integration(${($_ = isset($this->services['WPSEO_Addon_Manager']) ? $this->services['WPSEO_Addon_Manager'] : $this->getWPSEOAddonManagerService()) && false ?: '_'}, ${($_ = isset($this->services['WPSEO_Admin_Asset_Manager']) ? $this->services['WPSEO_Admin_Asset_Manager'] : $this->getWPSEOAdminAssetManagerService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] = new \Yoast\WP\SEO\Helpers\Options_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper'] = new \Yoast\WP\SEO\Helpers\Product_Helper())) && false ?: '_'});
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Admin\\Workouts_Integration'] = new \Yoast\WP\SEO\Integrations\Admin\Workouts_Integration(${($_ = isset($this->services['WPSEO_Addon_Manager']) ? $this->services['WPSEO_Addon_Manager'] : $this->getWPSEOAddonManagerService()) && false ?: '_'}, ${($_ = isset($this->services['WPSEO_Admin_Asset_Manager']) ? $this->services['WPSEO_Admin_Asset_Manager'] : $this->getWPSEOAdminAssetManagerService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] = new \Yoast\WP\SEO\Helpers\Options_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper'] = new \Yoast\WP\SEO\Helpers\Product_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\New_Dashboard_Ui_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\New_Dashboard_Ui_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\New_Dashboard_Ui_Conditional'] = new \Yoast\WP\SEO\Conditionals\New_Dashboard_Ui_Conditional())) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4040,7 +4044,7 @@ class Cached_Container extends Container
|
||||
*/
|
||||
protected function getBreadcrumbsBlockService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Blocks\\Breadcrumbs_Block'] = new \Yoast\WP\SEO\Integrations\Blocks\Breadcrumbs_Block(${($_ = isset($this->services['Yoast\\WP\\SEO\\Memoizers\\Meta_Tags_Context_Memoizer']) ? $this->services['Yoast\\WP\\SEO\\Memoizers\\Meta_Tags_Context_Memoizer'] : $this->getMetaTagsContextMemoizerService()) && false ?: '_'}, ${($_ = isset($this->services['WPSEO_Replace_Vars']) ? $this->services['WPSEO_Replace_Vars'] : $this->getWPSEOReplaceVarsService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Surfaces\\Helpers_Surface']) ? $this->services['Yoast\\WP\\SEO\\Surfaces\\Helpers_Surface'] : $this->getHelpersSurfaceService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Repositories\\Indexable_Repository']) ? $this->services['Yoast\\WP\\SEO\\Repositories\\Indexable_Repository'] : $this->getIndexableRepositoryService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Request_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Request_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Request_Helper'] = new \Yoast\WP\SEO\Helpers\Request_Helper())) && false ?: '_'});
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Blocks\\Breadcrumbs_Block'] = new \Yoast\WP\SEO\Integrations\Blocks\Breadcrumbs_Block(${($_ = isset($this->services['Yoast\\WP\\SEO\\Memoizers\\Meta_Tags_Context_Memoizer']) ? $this->services['Yoast\\WP\\SEO\\Memoizers\\Meta_Tags_Context_Memoizer'] : $this->getMetaTagsContextMemoizerService()) && false ?: '_'}, ${($_ = isset($this->services['WPSEO_Replace_Vars']) ? $this->services['WPSEO_Replace_Vars'] : $this->getWPSEOReplaceVarsService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Surfaces\\Helpers_Surface']) ? $this->services['Yoast\\WP\\SEO\\Surfaces\\Helpers_Surface'] : $this->getHelpersSurfaceService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Repositories\\Indexable_Repository']) ? $this->services['Yoast\\WP\\SEO\\Repositories\\Indexable_Repository'] : $this->getIndexableRepositoryService()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4306,7 +4310,7 @@ class Cached_Container extends Container
|
||||
*/
|
||||
protected function getFrontEndIntegrationService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Front_End_Integration'] = new \Yoast\WP\SEO\Integrations\Front_End_Integration(${($_ = isset($this->services['Yoast\\WP\\SEO\\Memoizers\\Meta_Tags_Context_Memoizer']) ? $this->services['Yoast\\WP\\SEO\\Memoizers\\Meta_Tags_Context_Memoizer'] : $this->getMetaTagsContextMemoizerService()) && false ?: '_'}, $this, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] = new \Yoast\WP\SEO\Helpers\Options_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Request_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Request_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Request_Helper'] = new \Yoast\WP\SEO\Helpers\Request_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Surfaces\\Helpers_Surface']) ? $this->services['Yoast\\WP\\SEO\\Surfaces\\Helpers_Surface'] : $this->getHelpersSurfaceService()) && false ?: '_'}, ${($_ = isset($this->services['WPSEO_Replace_Vars']) ? $this->services['WPSEO_Replace_Vars'] : $this->getWPSEOReplaceVarsService()) && false ?: '_'});
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Front_End_Integration'] = new \Yoast\WP\SEO\Integrations\Front_End_Integration(${($_ = isset($this->services['Yoast\\WP\\SEO\\Memoizers\\Meta_Tags_Context_Memoizer']) ? $this->services['Yoast\\WP\\SEO\\Memoizers\\Meta_Tags_Context_Memoizer'] : $this->getMetaTagsContextMemoizerService()) && false ?: '_'}, $this, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] = new \Yoast\WP\SEO\Helpers\Options_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Surfaces\\Helpers_Surface']) ? $this->services['Yoast\\WP\\SEO\\Surfaces\\Helpers_Surface'] : $this->getHelpersSurfaceService()) && false ?: '_'}, ${($_ = isset($this->services['WPSEO_Replace_Vars']) ? $this->services['WPSEO_Replace_Vars'] : $this->getWPSEOReplaceVarsService()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -51,78 +51,24 @@ class Notification_Helper {
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses all the notifications to an array with just warnings notifications, and splitting them between dismissed
|
||||
* and active.
|
||||
* Parses all the notifications to an array with just id, message, nonce, type and dismissed.
|
||||
*
|
||||
* @return array<Yoast_Notification>
|
||||
* @return array<string,string|bool>
|
||||
*/
|
||||
public function get_notifications(): array {
|
||||
$all_notifications = $this->get_sorted_notifications();
|
||||
$notifications = \array_filter(
|
||||
$all_notifications,
|
||||
static function ( $notification ) {
|
||||
return $notification->get_type() !== 'error';
|
||||
}
|
||||
);
|
||||
$dismissed_notifications = \array_filter(
|
||||
$notifications,
|
||||
public function get_alerts(): array {
|
||||
$all_notifications = $this->get_sorted_notifications();
|
||||
|
||||
return \array_map(
|
||||
function ( $notification ) {
|
||||
return $this->is_notification_dismissed( $notification );
|
||||
}
|
||||
return [
|
||||
'id' => $notification->get_id(),
|
||||
'message' => $notification->get_message(),
|
||||
'nonce' => $notification->get_nonce(),
|
||||
'type' => $notification->get_type(),
|
||||
'dismissed' => $this->is_notification_dismissed( $notification ),
|
||||
];
|
||||
},
|
||||
$all_notifications
|
||||
);
|
||||
$active_notifications = \array_diff( $notifications, $dismissed_notifications );
|
||||
|
||||
return [
|
||||
'dismissed' => \array_map(
|
||||
static function ( $notification ) {
|
||||
return $notification->to_array();
|
||||
},
|
||||
$dismissed_notifications
|
||||
),
|
||||
'active' => \array_map(
|
||||
static function ( $notification ) {
|
||||
return $notification->to_array();
|
||||
},
|
||||
$active_notifications
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses all the notifications to an array with just error notifications, and splitting them between dismissed and
|
||||
* active.
|
||||
*
|
||||
* @return array<Yoast_Notification>
|
||||
*/
|
||||
public function get_problems(): array {
|
||||
$all_notifications = $this->get_sorted_notifications();
|
||||
$problems = \array_filter(
|
||||
$all_notifications,
|
||||
static function ( $notification ) {
|
||||
return $notification->get_type() === 'error';
|
||||
}
|
||||
);
|
||||
$dismissed_problems = \array_filter(
|
||||
$problems,
|
||||
function ( $notification ) {
|
||||
return $this->is_notification_dismissed( $notification );
|
||||
}
|
||||
);
|
||||
$active_problems = \array_diff( $problems, $dismissed_problems );
|
||||
|
||||
return [
|
||||
'dismissed' => \array_map(
|
||||
static function ( $notification ) {
|
||||
return $notification->to_array();
|
||||
},
|
||||
$dismissed_problems
|
||||
),
|
||||
'active' => \array_map(
|
||||
static function ( $notification ) {
|
||||
return $notification->to_array();
|
||||
},
|
||||
$active_problems
|
||||
),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,9 +112,8 @@ class Deactivated_Premium_Integration implements Integration_Interface {
|
||||
'action': 'dismiss_premium_deactivated_notice',
|
||||
};
|
||||
|
||||
jQuery.post( ajaxurl, data, function( response ) {
|
||||
jQuery( '#yoast-premium-deactivated-notice' ).hide();
|
||||
});
|
||||
jQuery( '#yoast-premium-deactivated-notice' ).hide();
|
||||
jQuery.post( ajaxurl, data, function( response ) {});
|
||||
}
|
||||
|
||||
jQuery( document ).ready( function() {
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace Yoast\WP\SEO\Integrations\Admin;
|
||||
|
||||
use WPSEO_Admin_Asset_Manager;
|
||||
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
|
||||
use Yoast\WP\SEO\Conditionals\New_Dashboard_Ui_Conditional;
|
||||
use Yoast\WP\SEO\Helpers\First_Time_Configuration_Notice_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
use Yoast\WP\SEO\Integrations\Integration_Interface;
|
||||
@@ -35,6 +36,13 @@ class First_Time_Configuration_Notice_Integration implements Integration_Interfa
|
||||
*/
|
||||
private $first_time_configuration_notice_helper;
|
||||
|
||||
/**
|
||||
* The New Dashboard UI conditional.
|
||||
*
|
||||
* @var New_Dashboard_Ui_Conditional
|
||||
*/
|
||||
private $new_dashboard_ui_conditional;
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@@ -48,15 +56,18 @@ class First_Time_Configuration_Notice_Integration implements Integration_Interfa
|
||||
* @param Options_Helper $options_helper The options helper.
|
||||
* @param First_Time_Configuration_Notice_Helper $first_time_configuration_notice_helper The first time configuration notice helper.
|
||||
* @param WPSEO_Admin_Asset_Manager $admin_asset_manager The admin asset manager.
|
||||
* @param New_Dashboard_Ui_Conditional $new_dashboard_ui_conditional The new dashboard UI conditional.
|
||||
*/
|
||||
public function __construct(
|
||||
Options_Helper $options_helper,
|
||||
First_Time_Configuration_Notice_Helper $first_time_configuration_notice_helper,
|
||||
WPSEO_Admin_Asset_Manager $admin_asset_manager
|
||||
WPSEO_Admin_Asset_Manager $admin_asset_manager,
|
||||
New_Dashboard_Ui_Conditional $new_dashboard_ui_conditional
|
||||
) {
|
||||
$this->options_helper = $options_helper;
|
||||
$this->admin_asset_manager = $admin_asset_manager;
|
||||
$this->first_time_configuration_notice_helper = $first_time_configuration_notice_helper;
|
||||
$this->new_dashboard_ui_conditional = $new_dashboard_ui_conditional;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -102,7 +113,7 @@ class First_Time_Configuration_Notice_Integration implements Integration_Interfa
|
||||
$this->admin_asset_manager->enqueue_style( 'monorepo' );
|
||||
|
||||
$title = $this->first_time_configuration_notice_helper->get_first_time_configuration_title();
|
||||
$link_url = \esc_url( \self_admin_url( 'admin.php?page=wpseo_dashboard#top#first-time-configuration' ) );
|
||||
$link_url = ( $this->new_dashboard_ui_conditional->is_met() ) ? \esc_url( \self_admin_url( 'admin.php?page=wpseo_dashboard#/first-time-configuration' ) ) : \esc_url( \self_admin_url( 'admin.php?page=wpseo_dashboard#top#first-time-configuration' ) );
|
||||
|
||||
if ( ! $this->first_time_configuration_notice_helper->should_show_alternate_message() ) {
|
||||
$content = \sprintf(
|
||||
@@ -138,13 +149,12 @@ class First_Time_Configuration_Notice_Integration implements Integration_Interfa
|
||||
echo '<script>
|
||||
jQuery( document ).ready( function() {
|
||||
jQuery( "body" ).on( "click", "#yoast-first-time-configuration-notice .notice-dismiss", function() {
|
||||
jQuery( "#yoast-first-time-configuration-notice" ).hide();
|
||||
const data = {
|
||||
"action": "dismiss_first_time_configuration_notice",
|
||||
"nonce": "' . \esc_js( \wp_create_nonce( 'wpseo-dismiss-first-time-configuration-notice' ) ) . '"
|
||||
};
|
||||
jQuery.post( ajaxurl, data, function( response ) {
|
||||
jQuery( this ).parent( "#yoast-first-time-configuration-notice" ).hide();
|
||||
});
|
||||
jQuery.post( ajaxurl, data, function( response ) {});
|
||||
} );
|
||||
} );
|
||||
</script>';
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace Yoast\WP\SEO\Integrations\Admin;
|
||||
|
||||
use WPSEO_Admin_Asset_Manager;
|
||||
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
|
||||
use Yoast\WP\SEO\Conditionals\New_Dashboard_Ui_Conditional;
|
||||
use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Product_Helper;
|
||||
use Yoast\WP\SEO\Integrations\Integration_Interface;
|
||||
@@ -27,6 +28,13 @@ class Installation_Success_Integration implements Integration_Interface {
|
||||
*/
|
||||
protected $product_helper;
|
||||
|
||||
/**
|
||||
* The New Dashboard UI conditional.
|
||||
*
|
||||
* @var New_Dashboard_Ui_Conditional
|
||||
*/
|
||||
private $new_dashboard_ui_conditional;
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@@ -37,12 +45,18 @@ class Installation_Success_Integration implements Integration_Interface {
|
||||
/**
|
||||
* Installation_Success_Integration constructor.
|
||||
*
|
||||
* @param Options_Helper $options_helper The options helper.
|
||||
* @param Product_Helper $product_helper The product helper.
|
||||
* @param Options_Helper $options_helper The options helper.
|
||||
* @param Product_Helper $product_helper The product helper.
|
||||
* @param New_Dashboard_Ui_Conditional $new_dashboard_ui_conditional The new dashboard UI conditional.
|
||||
*/
|
||||
public function __construct( Options_Helper $options_helper, Product_Helper $product_helper ) {
|
||||
$this->options_helper = $options_helper;
|
||||
$this->product_helper = $product_helper;
|
||||
public function __construct(
|
||||
Options_Helper $options_helper,
|
||||
Product_Helper $product_helper,
|
||||
New_Dashboard_Ui_Conditional $new_dashboard_ui_conditional
|
||||
) {
|
||||
$this->options_helper = $options_helper;
|
||||
$this->product_helper = $product_helper;
|
||||
$this->new_dashboard_ui_conditional = $new_dashboard_ui_conditional;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -127,12 +141,14 @@ class Installation_Success_Integration implements Integration_Interface {
|
||||
$asset_manager->enqueue_style( 'tailwind' );
|
||||
$asset_manager->enqueue_style( 'monorepo' );
|
||||
|
||||
$ftc_url = ( $this->new_dashboard_ui_conditional->is_met() ) ? \esc_url( \admin_url( 'admin.php?page=wpseo_dashboard#/first-time-configuration' ) ) : \esc_url( \admin_url( 'admin.php?page=wpseo_dashboard#top#first-time-configuration' ) );
|
||||
|
||||
$asset_manager->localize_script(
|
||||
'installation-success',
|
||||
'wpseoInstallationSuccess',
|
||||
[
|
||||
'pluginUrl' => \esc_url( \plugins_url( '', \WPSEO_FILE ) ),
|
||||
'firstTimeConfigurationUrl' => \esc_url( \admin_url( 'admin.php?page=wpseo_dashboard#top#first-time-configuration' ) ),
|
||||
'firstTimeConfigurationUrl' => $ftc_url,
|
||||
'dashboardUrl' => \esc_url( \admin_url( 'admin.php?page=wpseo_dashboard' ) ),
|
||||
]
|
||||
);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace Yoast\WP\SEO\Integrations\Admin;
|
||||
|
||||
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
|
||||
use Yoast\WP\SEO\Conditionals\New_Dashboard_Ui_Conditional;
|
||||
use Yoast\WP\SEO\Integrations\Integration_Interface;
|
||||
|
||||
/**
|
||||
@@ -64,7 +65,8 @@ class Old_Configuration_Integration implements Integration_Interface {
|
||||
if ( ! isset( $_GET['page'] ) || $_GET['page'] !== 'wpseo_configurator' ) {
|
||||
return;
|
||||
}
|
||||
\wp_safe_redirect( \admin_url( 'admin.php?page=wpseo_dashboard#top#first-time-configuration' ), 302, 'Yoast SEO' );
|
||||
$redirect_url = ( ( new New_Dashboard_Ui_Conditional() )->is_met() ) ? 'admin.php?page=wpseo_dashboard#/first-time-configuration' : 'admin.php?page=wpseo_dashboard#top#first-time-configuration';
|
||||
\wp_safe_redirect( \admin_url( $redirect_url ), 302, 'Yoast SEO' );
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace Yoast\WP\SEO\Integrations\Admin;
|
||||
use WPSEO_Addon_Manager;
|
||||
use WPSEO_Admin_Asset_Manager;
|
||||
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
|
||||
use Yoast\WP\SEO\Conditionals\New_Dashboard_Ui_Conditional;
|
||||
use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Product_Helper;
|
||||
use Yoast\WP\SEO\Integrations\Integration_Interface;
|
||||
@@ -43,6 +44,13 @@ class Workouts_Integration implements Integration_Interface {
|
||||
*/
|
||||
private $product_helper;
|
||||
|
||||
/**
|
||||
* The New Dashboard UI conditional.
|
||||
*
|
||||
* @var New_Dashboard_Ui_Conditional
|
||||
*/
|
||||
private $new_dashboard_ui_conditional;
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@@ -53,21 +61,24 @@ class Workouts_Integration implements Integration_Interface {
|
||||
/**
|
||||
* Workouts_Integration constructor.
|
||||
*
|
||||
* @param WPSEO_Addon_Manager $addon_manager The addon manager.
|
||||
* @param WPSEO_Admin_Asset_Manager $admin_asset_manager The admin asset manager.
|
||||
* @param Options_Helper $options_helper The options helper.
|
||||
* @param Product_Helper $product_helper The product helper.
|
||||
* @param WPSEO_Addon_Manager $addon_manager The addon manager.
|
||||
* @param WPSEO_Admin_Asset_Manager $admin_asset_manager The admin asset manager.
|
||||
* @param Options_Helper $options_helper The options helper.
|
||||
* @param Product_Helper $product_helper The product helper.
|
||||
* @param New_Dashboard_Ui_Conditional $new_dashboard_ui_conditional The new dashboard UI conditional.
|
||||
*/
|
||||
public function __construct(
|
||||
WPSEO_Addon_Manager $addon_manager,
|
||||
WPSEO_Admin_Asset_Manager $admin_asset_manager,
|
||||
Options_Helper $options_helper,
|
||||
Product_Helper $product_helper
|
||||
Product_Helper $product_helper,
|
||||
New_Dashboard_Ui_Conditional $new_dashboard_ui_conditional
|
||||
) {
|
||||
$this->addon_manager = $addon_manager;
|
||||
$this->admin_asset_manager = $admin_asset_manager;
|
||||
$this->options_helper = $options_helper;
|
||||
$this->product_helper = $product_helper;
|
||||
$this->addon_manager = $addon_manager;
|
||||
$this->admin_asset_manager = $admin_asset_manager;
|
||||
$this->options_helper = $options_helper;
|
||||
$this->product_helper = $product_helper;
|
||||
$this->new_dashboard_ui_conditional = $new_dashboard_ui_conditional;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -144,6 +155,7 @@ class Workouts_Integration implements Integration_Interface {
|
||||
$this->admin_asset_manager->enqueue_style( 'workouts' );
|
||||
|
||||
$workouts_option = $this->get_workouts_option();
|
||||
$ftc_url = ( $this->new_dashboard_ui_conditional->is_met() ) ? \esc_url( \admin_url( 'admin.php?page=wpseo_dashboard#/first-time-configuration' ) ) : \esc_url( \admin_url( 'admin.php?page=wpseo_dashboard#top#first-time-configuration' ) );
|
||||
|
||||
$this->admin_asset_manager->enqueue_script( 'workouts' );
|
||||
$this->admin_asset_manager->localize_script(
|
||||
@@ -155,7 +167,7 @@ class Workouts_Integration implements Integration_Interface {
|
||||
'pluginUrl' => \esc_url( \plugins_url( '', \WPSEO_FILE ) ),
|
||||
'toolsPageUrl' => \esc_url( \admin_url( 'admin.php?page=wpseo_tools' ) ),
|
||||
'usersPageUrl' => \esc_url( \admin_url( 'users.php' ) ),
|
||||
'firstTimeConfigurationUrl' => \esc_url( \admin_url( 'admin.php?page=wpseo_dashboard#top#first-time-configuration' ) ),
|
||||
'firstTimeConfigurationUrl' => $ftc_url,
|
||||
'isPremium' => $this->product_helper->is_premium(),
|
||||
'upsellText' => $this->get_upsell_text(),
|
||||
'upsellLink' => $this->get_upsell_link(),
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace Yoast\WP\SEO\Integrations\Blocks;
|
||||
|
||||
use WPSEO_Replace_Vars;
|
||||
use Yoast\WP\SEO\Helpers\Request_Helper;
|
||||
use Yoast\WP\SEO\Memoizers\Meta_Tags_Context_Memoizer;
|
||||
use Yoast\WP\SEO\Presenters\Breadcrumbs_Presenter;
|
||||
use Yoast\WP\SEO\Repositories\Indexable_Repository;
|
||||
@@ -56,13 +55,6 @@ class Breadcrumbs_Block extends Dynamic_Block_V3 {
|
||||
*/
|
||||
private $indexable_repository;
|
||||
|
||||
/**
|
||||
* The request helper.
|
||||
*
|
||||
* @var Request_Helper
|
||||
*/
|
||||
private $request_helper;
|
||||
|
||||
/**
|
||||
* Siblings_Block constructor.
|
||||
*
|
||||
@@ -70,20 +62,17 @@ class Breadcrumbs_Block extends Dynamic_Block_V3 {
|
||||
* @param WPSEO_Replace_Vars $replace_vars The replace variable helper.
|
||||
* @param Helpers_Surface $helpers The Helpers surface.
|
||||
* @param Indexable_Repository $indexable_repository The indexable repository.
|
||||
* @param Request_Helper $request_helper The request helper.
|
||||
*/
|
||||
public function __construct(
|
||||
Meta_Tags_Context_Memoizer $context_memoizer,
|
||||
WPSEO_Replace_Vars $replace_vars,
|
||||
Helpers_Surface $helpers,
|
||||
Indexable_Repository $indexable_repository,
|
||||
Request_Helper $request_helper
|
||||
Indexable_Repository $indexable_repository
|
||||
) {
|
||||
$this->context_memoizer = $context_memoizer;
|
||||
$this->replace_vars = $replace_vars;
|
||||
$this->helpers = $helpers;
|
||||
$this->indexable_repository = $indexable_repository;
|
||||
$this->request_helper = $request_helper;
|
||||
|
||||
$this->base_path = \WPSEO_PATH . 'blocks/dynamic-blocks/';
|
||||
}
|
||||
@@ -99,7 +88,7 @@ class Breadcrumbs_Block extends Dynamic_Block_V3 {
|
||||
$presenter = new Breadcrumbs_Presenter();
|
||||
// $this->context_memoizer->for_current_page only works on the frontend. To render the right breadcrumb in the
|
||||
// editor, we need the repository.
|
||||
if ( $this->request_helper->is_rest_request() || \is_admin() ) {
|
||||
if ( \wp_is_serving_rest_request() || \is_admin() ) {
|
||||
$post_id = \get_the_ID();
|
||||
if ( $post_id ) {
|
||||
$indexable = $this->indexable_repository->find_by_id_and_type( $post_id, 'post' );
|
||||
|
||||
@@ -7,7 +7,6 @@ use WPSEO_Replace_Vars;
|
||||
use Yoast\WP\SEO\Conditionals\Front_End_Conditional;
|
||||
use Yoast\WP\SEO\Context\Meta_Tags_Context;
|
||||
use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Request_Helper;
|
||||
use Yoast\WP\SEO\Memoizers\Meta_Tags_Context_Memoizer;
|
||||
use Yoast\WP\SEO\Presenters\Abstract_Indexable_Presenter;
|
||||
use Yoast\WP\SEO\Presenters\Debug\Marker_Close_Presenter;
|
||||
@@ -42,13 +41,6 @@ class Front_End_Integration implements Integration_Interface {
|
||||
*/
|
||||
protected $options;
|
||||
|
||||
/**
|
||||
* Represents the request helper.
|
||||
*
|
||||
* @var Request_Helper
|
||||
*/
|
||||
protected $request;
|
||||
|
||||
/**
|
||||
* The helpers surface.
|
||||
*
|
||||
@@ -207,7 +199,6 @@ class Front_End_Integration implements Integration_Interface {
|
||||
* @param Meta_Tags_Context_Memoizer $context_memoizer The meta tags context memoizer.
|
||||
* @param ContainerInterface $service_container The DI container.
|
||||
* @param Options_Helper $options The options helper.
|
||||
* @param Request_Helper $request The request helper.
|
||||
* @param Helpers_Surface $helpers The helpers surface.
|
||||
* @param WPSEO_Replace_Vars $replace_vars The replace vars helper.
|
||||
*/
|
||||
@@ -215,14 +206,12 @@ class Front_End_Integration implements Integration_Interface {
|
||||
Meta_Tags_Context_Memoizer $context_memoizer,
|
||||
ContainerInterface $service_container,
|
||||
Options_Helper $options,
|
||||
Request_Helper $request,
|
||||
Helpers_Surface $helpers,
|
||||
WPSEO_Replace_Vars $replace_vars
|
||||
) {
|
||||
$this->container = $service_container;
|
||||
$this->context_memoizer = $context_memoizer;
|
||||
$this->options = $options;
|
||||
$this->request = $request;
|
||||
$this->helpers = $helpers;
|
||||
$this->replace_vars = $replace_vars;
|
||||
}
|
||||
@@ -353,7 +342,7 @@ class Front_End_Integration implements Integration_Interface {
|
||||
return $presenters;
|
||||
}
|
||||
|
||||
if ( $this->request->is_rest_request() ) {
|
||||
if ( \wp_is_serving_rest_request() ) {
|
||||
return $presenters;
|
||||
}
|
||||
|
||||
@@ -559,7 +548,7 @@ class Front_End_Integration implements Integration_Interface {
|
||||
*/
|
||||
private function maybe_remove_title_presenter( $presenters ) {
|
||||
// Do not remove the title if we're on a REST request.
|
||||
if ( $this->request->is_rest_request() ) {
|
||||
if ( \wp_is_serving_rest_request() ) {
|
||||
return $presenters;
|
||||
}
|
||||
|
||||
|
||||
@@ -406,7 +406,10 @@ class Elementor implements Integration_Interface {
|
||||
'enabled_features' => WPSEO_Utils::retrieve_enabled_features(),
|
||||
];
|
||||
|
||||
$permalink = $this->get_permalink();
|
||||
$permalink = $this->get_permalink();
|
||||
$page_on_front = (int) \get_option( 'page_on_front' );
|
||||
$homepage_is_page = \get_option( 'show_on_front' ) === 'page';
|
||||
$is_front_page = $homepage_is_page && $page_on_front === $post_id;
|
||||
|
||||
$script_data = [
|
||||
'metabox' => $this->get_metabox_script_data( $permalink ),
|
||||
@@ -420,6 +423,7 @@ class Elementor implements Integration_Interface {
|
||||
'worker' => $worker_script_data,
|
||||
],
|
||||
'usedKeywordsNonce' => \wp_create_nonce( 'wpseo-keyword-usage-and-post-types' ),
|
||||
'isFrontPage' => $is_front_page,
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -105,8 +105,12 @@ class Wincher_Publish implements Integration_Interface {
|
||||
* Determines whether the current request is a REST request.
|
||||
*
|
||||
* @return bool Whether the request is a REST request.
|
||||
*
|
||||
* @deprecated 23.6
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function is_rest_request() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 23.6', 'wp_is_serving_rest_request' );
|
||||
return \defined( 'REST_REQUEST' ) && \REST_REQUEST;
|
||||
}
|
||||
|
||||
@@ -153,7 +157,7 @@ class Wincher_Publish implements Integration_Interface {
|
||||
* @return void
|
||||
*/
|
||||
public function track_after_post_request( $post_id, $post ) {
|
||||
if ( $this->is_rest_request() ) {
|
||||
if ( \wp_is_serving_rest_request() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -101,6 +101,8 @@ class Search_Engines_Discouraged_Watcher implements Integration_Interface {
|
||||
public function register_hooks() {
|
||||
\add_action( 'admin_init', [ $this, 'manage_search_engines_discouraged_notification' ] );
|
||||
|
||||
\add_action( 'update_option_blog_public', [ $this, 'restore_ignore_option' ] );
|
||||
|
||||
/*
|
||||
* The `admin_notices` hook fires on single site admin pages vs.
|
||||
* `network_admin_notices` which fires on multisite admin pages and
|
||||
@@ -230,4 +232,15 @@ class Search_Engines_Discouraged_Watcher implements Integration_Interface {
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Should restore the ignore option for the search engines discouraged notice.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function restore_ignore_option() {
|
||||
if ( ! $this->search_engines_are_discouraged() ) {
|
||||
$this->options_helper->set( 'ignore_search_engines_discouraged_notice', false );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,8 +53,8 @@ class Indexing_Notification_Presenter extends Abstract_Presenter {
|
||||
* @return string The HTML string representation of the notification.
|
||||
*/
|
||||
public function present() {
|
||||
$notification_text = '<p>' . $this->get_message( $this->reason ) . '</p>';
|
||||
$notification_text .= '<p>' . $this->get_time_estimate( $this->total_unindexed ) . '</p>';
|
||||
$notification_text = '<p>' . $this->get_message( $this->reason );
|
||||
$notification_text .= $this->get_time_estimate( $this->total_unindexed ) . '</p>';
|
||||
$notification_text .= '<a class="button" href="' . \get_admin_url( null, 'admin.php?page=wpseo_tools&start-indexation=true' ) . '">';
|
||||
$notification_text .= \esc_html__( 'Start SEO data optimization', 'wordpress-seo' );
|
||||
$notification_text .= '</a>';
|
||||
@@ -84,16 +84,16 @@ class Indexing_Notification_Presenter extends Abstract_Presenter {
|
||||
$text = \esc_html__( 'Because of a change in your tag base setting, some of your SEO data needs to be reprocessed.', 'wordpress-seo' );
|
||||
break;
|
||||
case Indexing_Reasons::REASON_POST_TYPE_MADE_PUBLIC:
|
||||
$text = \esc_html__( 'We need to re-analyze some of your SEO data because of a change in the visibility of your post types. Please help us do that by running the SEO data optimization. ', 'wordpress-seo' );
|
||||
$text = \esc_html__( 'We need to re-analyze some of your SEO data because of a change in the visibility of your post types. Please help us do that by running the SEO data optimization.', 'wordpress-seo' );
|
||||
break;
|
||||
case Indexing_Reasons::REASON_TAXONOMY_MADE_PUBLIC:
|
||||
$text = \esc_html__( 'We need to re-analyze some of your SEO data because of a change in the visibility of your taxonomies. Please help us do that by running the SEO data optimization. ', 'wordpress-seo' );
|
||||
$text = \esc_html__( 'We need to re-analyze some of your SEO data because of a change in the visibility of your taxonomies. Please help us do that by running the SEO data optimization.', 'wordpress-seo' );
|
||||
break;
|
||||
case Indexing_Reasons::REASON_ATTACHMENTS_MADE_ENABLED:
|
||||
$text = \esc_html__( 'It looks like you\'ve enabled media pages. We recommend that you help us to re-analyze your site by running the SEO data optimization. ', 'wordpress-seo' );
|
||||
$text = \esc_html__( 'It looks like you\'ve enabled media pages. We recommend that you help us to re-analyze your site by running the SEO data optimization.', 'wordpress-seo' );
|
||||
break;
|
||||
default:
|
||||
$text = \esc_html__( 'You can speed up your site and get insight into your internal linking structure by letting us perform a few optimizations to the way SEO data is stored. ', 'wordpress-seo' );
|
||||
$text = \esc_html__( 'You can speed up your site and get insight into your internal linking structure by letting us perform a few optimizations to the way SEO data is stored.', 'wordpress-seo' );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -114,14 +114,14 @@ class Indexing_Notification_Presenter extends Abstract_Presenter {
|
||||
*/
|
||||
protected function get_time_estimate( $total_unindexed ) {
|
||||
if ( $total_unindexed < 400 ) {
|
||||
return \esc_html__( 'We estimate this will take less than a minute.', 'wordpress-seo' );
|
||||
return \esc_html__( ' We estimate this will take less than a minute.', 'wordpress-seo' );
|
||||
}
|
||||
|
||||
if ( $total_unindexed < 2500 ) {
|
||||
return \esc_html__( 'We estimate this will take a couple of minutes.', 'wordpress-seo' );
|
||||
return \esc_html__( ' We estimate this will take a couple of minutes.', 'wordpress-seo' );
|
||||
}
|
||||
|
||||
$estimate = \esc_html__( 'We estimate this could take a long time, due to the size of your site. As an alternative to waiting, you could:', 'wordpress-seo' );
|
||||
$estimate = \esc_html__( ' We estimate this could take a long time, due to the size of your site. As an alternative to waiting, you could:', 'wordpress-seo' );
|
||||
$estimate .= '<ul class="ul-disc">';
|
||||
$estimate .= '<li>';
|
||||
$estimate .= \sprintf(
|
||||
|
||||
@@ -37,6 +37,11 @@ class Migration_Error_Presenter extends Abstract_Presenter {
|
||||
* @return string The error HTML.
|
||||
*/
|
||||
public function present() {
|
||||
$header = \sprintf(
|
||||
/* translators: %s: Yoast SEO. */
|
||||
\esc_html__( '%s is unable to create database tables', 'wordpress-seo' ),
|
||||
'Yoast SEO'
|
||||
);
|
||||
$message = \sprintf(
|
||||
/* translators: %s: Yoast SEO. */
|
||||
\esc_html__( '%s had problems creating the database tables needed to speed up your site.', 'wordpress-seo' ),
|
||||
@@ -61,7 +66,8 @@ class Migration_Error_Presenter extends Abstract_Presenter {
|
||||
);
|
||||
|
||||
return \sprintf(
|
||||
'<div class="notice notice-error"><p>%1$s</p><p>%2$s</p><p>%3$s</p>%4$s</div>',
|
||||
'<div class="notice notice-error yoast-migrated-notice"><h4 class="yoast-notice-migrated-header">%1$s</h4><div class="notice-yoast-content"><p>%2$s</p><p>%3$s</p><p>%4$s</p>%5$s</div></div>',
|
||||
$header,
|
||||
$message,
|
||||
$support,
|
||||
$reassurance,
|
||||
|
||||
@@ -104,15 +104,17 @@ class Notice_Presenter extends Abstract_Presenter {
|
||||
$out .= '<div class="notice-yoast__header">';
|
||||
$out .= '<span class="yoast-icon"></span>';
|
||||
$out .= \sprintf(
|
||||
'<h2 class="notice-yoast__header-heading">%s</h2>',
|
||||
'<h2 class="notice-yoast__header-heading yoast-notice-migrated-header">%s</h2>',
|
||||
\esc_html( $this->title )
|
||||
);
|
||||
$out .= '</div>';
|
||||
$out .= '<div class="notice-yoast-content">';
|
||||
$out .= '<p>' . $this->content . '</p>';
|
||||
if ( ! \is_null( $this->button ) ) {
|
||||
$out .= '<p>' . $this->button . '</p>';
|
||||
}
|
||||
$out .= '</div>';
|
||||
$out .= '</div>';
|
||||
|
||||
if ( ! \is_null( $this->image_filename ) ) {
|
||||
$out .= '<img src="' . \esc_url( \plugin_dir_url( \WPSEO_FILE ) . 'images/' . $this->image_filename ) . '" alt="" height="60" width="75"/>';
|
||||
|
||||
@@ -35,7 +35,6 @@ use YoastSEO_Vendor\Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
* @property Helpers\Primary_Term_Helper $primary_term
|
||||
* @property Helpers\Product_Helper $product
|
||||
* @property Helpers\Redirect_Helper $redirect
|
||||
* @property Helpers\Request_Helper $request
|
||||
* @property Helpers\Require_File_Helper $require_file
|
||||
* @property Helpers\Robots_Helper $robots
|
||||
* @property Helpers\Short_Link_Helper $short_link
|
||||
|
||||
Reference in New Issue
Block a user