plugin updates

This commit is contained in:
Tony Volpe
2024-11-15 13:53:04 -05:00
parent 1293d604ca
commit 0238f0c4ca
2009 changed files with 163492 additions and 89543 deletions

View File

@@ -1,18 +0,0 @@
<?php
namespace Yoast\WP\SEO\Conditionals;
/**
* Feature flag conditional for the new dashboard UI.
*/
class New_Dashboard_Ui_Conditional extends Feature_Flag_Conditional {
/**
* Returns the name of the feature flag.
*
* @return string The name of the feature flag.
*/
protected function get_feature_flag() {
return 'NEW_DASHBOARD_UI';
}
}

View File

@@ -1,11 +1,11 @@
<?php
namespace Yoast\WP\SEO\Dashboard\User_Interface;
namespace Yoast\WP\SEO\General\User_Interface;
use WPSEO_Admin_Asset_Manager;
use Yoast\WP\SEO\Actions\Alert_Dismissal_Action;
use Yoast\WP\SEO\Conditionals\Admin\Non_Network_Admin_Conditional;
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
use Yoast\WP\SEO\Conditionals\New_Dashboard_Ui_Conditional;
use Yoast\WP\SEO\Helpers\Current_Page_Helper;
use Yoast\WP\SEO\Helpers\Notification_Helper;
use Yoast\WP\SEO\Helpers\Product_Helper;
@@ -14,9 +14,9 @@ use Yoast\WP\SEO\Integrations\Integration_Interface;
use Yoast\WP\SEO\Promotions\Application\Promotion_Manager;
/**
* Class New_Dashboard_Page_Integration.
* Class General_Page_Integration.
*/
class New_Dashboard_Page_Integration implements Integration_Interface {
class General_Page_Integration implements Integration_Interface {
/**
* The page name.
@@ -107,7 +107,7 @@ class New_Dashboard_Page_Integration implements Integration_Interface {
* @return array<string>
*/
public static function get_conditionals() {
return [ Admin_Conditional::class, New_Dashboard_Ui_Conditional::class ];
return [ Admin_Conditional::class, Non_Network_Admin_Conditional::class ];
}
/**
@@ -118,6 +118,7 @@ class New_Dashboard_Page_Integration implements Integration_Interface {
* @return void
*/
public function register_hooks() {
// Add page.
\add_filter( 'wpseo_submenu_pages', [ $this, 'add_page' ] );
@@ -160,7 +161,7 @@ class New_Dashboard_Page_Integration implements Integration_Interface {
* @return void
*/
public function display_page() {
echo '<div id="yoast-seo-dashboard"></div>';
echo '<div id="yoast-seo-general"></div>';
}
/**
@@ -172,9 +173,12 @@ class New_Dashboard_Page_Integration implements Integration_Interface {
// Remove the emoji script as it is incompatible with both React and any contenteditable fields.
\remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
\wp_enqueue_media();
$this->asset_manager->enqueue_script( 'new-dashboard' );
$this->asset_manager->enqueue_style( 'new-dashboard' );
$this->asset_manager->localize_script( 'new-dashboard', 'wpseoScriptData', $this->get_script_data() );
$this->asset_manager->enqueue_script( 'general-page' );
$this->asset_manager->enqueue_style( 'general-page' );
if ( $this->promotion_manager->is( 'black-friday-2024-promotion' ) ) {
$this->asset_manager->enqueue_style( 'black-friday-banner' );
}
$this->asset_manager->localize_script( 'general-page', 'wpseoScriptData', $this->get_script_data() );
}
/**

View File

@@ -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' => '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'));
<?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' => '7256aca134305c4604bb'));

File diff suppressed because one or more lines are too long

View File

@@ -98,7 +98,6 @@ class Cached_Container extends Container
'yoast\\wp\\seo\\conditionals\\import_tool_selected_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Import_Tool_Selected_Conditional',
'yoast\\wp\\seo\\conditionals\\jetpack_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Jetpack_Conditional',
'yoast\\wp\\seo\\conditionals\\migrations_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Migrations_Conditional',
'yoast\\wp\\seo\\conditionals\\new_dashboard_ui_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\New_Dashboard_Ui_Conditional',
'yoast\\wp\\seo\\conditionals\\new_settings_ui_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\New_Settings_Ui_Conditional',
'yoast\\wp\\seo\\conditionals\\news_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\News_Conditional',
'yoast\\wp\\seo\\conditionals\\no_tool_selected_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\No_Tool_Selected_Conditional',
@@ -178,12 +177,12 @@ class Cached_Container extends Container
'yoast\\wp\\seo\\content_type_visibility\\application\\content_type_visibility_watcher_actions' => 'Yoast\\WP\\SEO\\Content_Type_Visibility\\Application\\Content_Type_Visibility_Watcher_Actions',
'yoast\\wp\\seo\\content_type_visibility\\user_interface\\content_type_visibility_dismiss_new_route' => 'Yoast\\WP\\SEO\\Content_Type_Visibility\\User_Interface\\Content_Type_Visibility_Dismiss_New_Route',
'yoast\\wp\\seo\\context\\meta_tags_context' => 'Yoast\\WP\\SEO\\Context\\Meta_Tags_Context',
'yoast\\wp\\seo\\dashboard\\user_interface\\new_dashboard_page_integration' => 'Yoast\\WP\\SEO\\Dashboard\\User_Interface\\New_Dashboard_Page_Integration',
'yoast\\wp\\seo\\editors\\application\\analysis_features\\enabled_analysis_features_repository' => 'Yoast\\WP\\SEO\\Editors\\Application\\Analysis_Features\\Enabled_Analysis_Features_Repository',
'yoast\\wp\\seo\\editors\\application\\integrations\\integration_information_repository' => 'Yoast\\WP\\SEO\\Editors\\Application\\Integrations\\Integration_Information_Repository',
'yoast\\wp\\seo\\editors\\application\\seo\\post_seo_information_repository' => 'Yoast\\WP\\SEO\\Editors\\Application\\Seo\\Post_Seo_Information_Repository',
'yoast\\wp\\seo\\editors\\application\\seo\\term_seo_information_repository' => 'Yoast\\WP\\SEO\\Editors\\Application\\Seo\\Term_Seo_Information_Repository',
'yoast\\wp\\seo\\editors\\application\\site\\website_information_repository' => 'Yoast\\WP\\SEO\\Editors\\Application\\Site\\Website_Information_Repository',
'yoast\\wp\\seo\\general\\user_interface\\general_page_integration' => 'Yoast\\WP\\SEO\\General\\User_Interface\\General_Page_Integration',
'yoast\\wp\\seo\\generators\\breadcrumbs_generator' => 'Yoast\\WP\\SEO\\Generators\\Breadcrumbs_Generator',
'yoast\\wp\\seo\\generators\\open_graph_image_generator' => 'Yoast\\WP\\SEO\\Generators\\Open_Graph_Image_Generator',
'yoast\\wp\\seo\\generators\\open_graph_locale_generator' => 'Yoast\\WP\\SEO\\Generators\\Open_Graph_Locale_Generator',
@@ -530,7 +529,6 @@ class Cached_Container extends Container
'Yoast\\WP\\SEO\\Conditionals\\Import_Tool_Selected_Conditional' => 'getImportToolSelectedConditionalService',
'Yoast\\WP\\SEO\\Conditionals\\Jetpack_Conditional' => 'getJetpackConditionalService',
'Yoast\\WP\\SEO\\Conditionals\\Migrations_Conditional' => 'getMigrationsConditionalService',
'Yoast\\WP\\SEO\\Conditionals\\New_Dashboard_Ui_Conditional' => 'getNewDashboardUiConditionalService',
'Yoast\\WP\\SEO\\Conditionals\\New_Settings_Ui_Conditional' => 'getNewSettingsUiConditionalService',
'Yoast\\WP\\SEO\\Conditionals\\News_Conditional' => 'getNewsConditionalService',
'Yoast\\WP\\SEO\\Conditionals\\No_Tool_Selected_Conditional' => 'getNoToolSelectedConditionalService',
@@ -610,12 +608,12 @@ class Cached_Container extends Container
'Yoast\\WP\\SEO\\Content_Type_Visibility\\Application\\Content_Type_Visibility_Watcher_Actions' => 'getContentTypeVisibilityWatcherActionsService',
'Yoast\\WP\\SEO\\Content_Type_Visibility\\User_Interface\\Content_Type_Visibility_Dismiss_New_Route' => 'getContentTypeVisibilityDismissNewRouteService',
'Yoast\\WP\\SEO\\Context\\Meta_Tags_Context' => 'getMetaTagsContextService',
'Yoast\\WP\\SEO\\Dashboard\\User_Interface\\New_Dashboard_Page_Integration' => 'getNewDashboardPageIntegrationService',
'Yoast\\WP\\SEO\\Editors\\Application\\Analysis_Features\\Enabled_Analysis_Features_Repository' => 'getEnabledAnalysisFeaturesRepositoryService',
'Yoast\\WP\\SEO\\Editors\\Application\\Integrations\\Integration_Information_Repository' => 'getIntegrationInformationRepositoryService',
'Yoast\\WP\\SEO\\Editors\\Application\\Seo\\Post_Seo_Information_Repository' => 'getPostSeoInformationRepositoryService',
'Yoast\\WP\\SEO\\Editors\\Application\\Seo\\Term_Seo_Information_Repository' => 'getTermSeoInformationRepositoryService',
'Yoast\\WP\\SEO\\Editors\\Application\\Site\\Website_Information_Repository' => 'getWebsiteInformationRepositoryService',
'Yoast\\WP\\SEO\\General\\User_Interface\\General_Page_Integration' => 'getGeneralPageIntegrationService',
'Yoast\\WP\\SEO\\Generators\\Breadcrumbs_Generator' => 'getBreadcrumbsGeneratorService',
'Yoast\\WP\\SEO\\Generators\\Open_Graph_Image_Generator' => 'getOpenGraphImageGeneratorService',
'Yoast\\WP\\SEO\\Generators\\Open_Graph_Locale_Generator' => 'getOpenGraphLocaleGeneratorService',
@@ -1973,16 +1971,6 @@ class Cached_Container extends Container
return $this->services['Yoast\\WP\\SEO\\Conditionals\\Migrations_Conditional'] = new \Yoast\WP\SEO\Conditionals\Migrations_Conditional(${($_ = isset($this->services['Yoast\\WP\\SEO\\Config\\Migration_Status']) ? $this->services['Yoast\\WP\\SEO\\Config\\Migration_Status'] : ($this->services['Yoast\\WP\\SEO\\Config\\Migration_Status'] = new \Yoast\WP\SEO\Config\Migration_Status())) && false ?: '_'});
}
/**
* Gets the public 'Yoast\WP\SEO\Conditionals\New_Dashboard_Ui_Conditional' shared autowired service.
*
* @return \Yoast\WP\SEO\Conditionals\New_Dashboard_Ui_Conditional
*/
protected function getNewDashboardUiConditionalService()
{
return $this->services['Yoast\\WP\\SEO\\Conditionals\\New_Dashboard_Ui_Conditional'] = new \Yoast\WP\SEO\Conditionals\New_Dashboard_Ui_Conditional();
}
/**
* Gets the public 'Yoast\WP\SEO\Conditionals\New_Settings_Ui_Conditional' shared autowired service.
*
@@ -2779,16 +2767,6 @@ class Cached_Container extends Container
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 ?: '_'});
}
/**
* Gets the public 'Yoast\WP\SEO\Dashboard\User_Interface\New_Dashboard_Page_Integration' shared autowired service.
*
* @return \Yoast\WP\SEO\Dashboard\User_Interface\New_Dashboard_Page_Integration
*/
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 ?: '_'}, ${($_ = 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 ?: '_'});
}
/**
* Gets the public 'Yoast\WP\SEO\Editors\Application\Analysis_Features\Enabled_Analysis_Features_Repository' shared autowired service.
*
@@ -2854,6 +2832,16 @@ class Cached_Container extends Container
return $this->services['Yoast\\WP\\SEO\\Editors\\Application\\Site\\Website_Information_Repository'] = new \Yoast\WP\SEO\Editors\Application\Site\Website_Information_Repository(new \Yoast\WP\SEO\Editors\Framework\Site\Post_Site_Information($a, $b, $c, $d, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Alert_Dismissal_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Alert_Dismissal_Action'] : $this->getAlertDismissalActionService()) && false ?: '_'}, $e, $f), new \Yoast\WP\SEO\Editors\Framework\Site\Term_Site_Information($a, $b, $c, $d, $e, $f));
}
/**
* Gets the public 'Yoast\WP\SEO\General\User_Interface\General_Page_Integration' shared autowired service.
*
* @return \Yoast\WP\SEO\General\User_Interface\General_Page_Integration
*/
protected function getGeneralPageIntegrationService()
{
return $this->services['Yoast\\WP\\SEO\\General\\User_Interface\\General_Page_Integration'] = new \Yoast\WP\SEO\General\User_Interface\General_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 ?: '_'});
}
/**
* Gets the public 'Yoast\WP\SEO\Generators\Breadcrumbs_Generator' shared autowired service.
*
@@ -3800,7 +3788,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 ?: '_'}, ${($_ = 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 ?: '_'});
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 ?: '_'});
}
/**
@@ -3880,7 +3868,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 ?: '_'}, ${($_ = 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 ?: '_'});
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 ?: '_'});
}
/**
@@ -3984,7 +3972,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 ?: '_'}, ${($_ = 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 ?: '_'});
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 ?: '_'});
}
/**
@@ -4138,7 +4126,7 @@ class Cached_Container extends Container
*/
protected function getFeatureFlagIntegrationService()
{
return $this->services['Yoast\\WP\\SEO\\Integrations\\Feature_Flag_Integration'] = new \Yoast\WP\SEO\Integrations\Feature_Flag_Integration(${($_ = isset($this->services['WPSEO_Admin_Asset_Manager']) ? $this->services['WPSEO_Admin_Asset_Manager'] : $this->getWPSEOAdminAssetManagerService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Addon_Installation_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Addon_Installation_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Addon_Installation_Conditional'] = new \Yoast\WP\SEO\Conditionals\Addon_Installation_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Check_Required_Version_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Check_Required_Version_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Check_Required_Version_Conditional'] = new \Yoast\WP\SEO\Conditionals\Check_Required_Version_Conditional())) && 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 ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\New_Settings_Ui_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\New_Settings_Ui_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\New_Settings_Ui_Conditional'] = new \Yoast\WP\SEO\Conditionals\New_Settings_Ui_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Text_Formality_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Text_Formality_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Text_Formality_Conditional'] = new \Yoast\WP\SEO\Conditionals\Text_Formality_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Updated_Importer_Framework_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Updated_Importer_Framework_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Updated_Importer_Framework_Conditional'] = new \Yoast\WP\SEO\Conditionals\Updated_Importer_Framework_Conditional())) && false ?: '_'});
return $this->services['Yoast\\WP\\SEO\\Integrations\\Feature_Flag_Integration'] = new \Yoast\WP\SEO\Integrations\Feature_Flag_Integration(${($_ = isset($this->services['WPSEO_Admin_Asset_Manager']) ? $this->services['WPSEO_Admin_Asset_Manager'] : $this->getWPSEOAdminAssetManagerService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Addon_Installation_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Addon_Installation_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Addon_Installation_Conditional'] = new \Yoast\WP\SEO\Conditionals\Addon_Installation_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Check_Required_Version_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Check_Required_Version_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Check_Required_Version_Conditional'] = new \Yoast\WP\SEO\Conditionals\Check_Required_Version_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\New_Settings_Ui_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\New_Settings_Ui_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\New_Settings_Ui_Conditional'] = new \Yoast\WP\SEO\Conditionals\New_Settings_Ui_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Text_Formality_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Text_Formality_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Text_Formality_Conditional'] = new \Yoast\WP\SEO\Conditionals\Text_Formality_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Updated_Importer_Framework_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Updated_Importer_Framework_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Updated_Importer_Framework_Conditional'] = new \Yoast\WP\SEO\Conditionals\Updated_Importer_Framework_Conditional())) && false ?: '_'});
}
/**
@@ -4899,7 +4887,7 @@ class Cached_Container extends Container
$instance->register_migration('free', '20230417083836', 'Yoast\\WP\\SEO\\Config\\Migrations\\AddInclusiveLanguageScore');
$instance->register_integration('Yoast\\WP\\SEO\\Content_Type_Visibility\\Application\\Content_Type_Visibility_Watcher_Actions');
$instance->register_route('Yoast\\WP\\SEO\\Content_Type_Visibility\\User_Interface\\Content_Type_Visibility_Dismiss_New_Route');
$instance->register_integration('Yoast\\WP\\SEO\\Dashboard\\User_Interface\\New_Dashboard_Page_Integration');
$instance->register_integration('Yoast\\WP\\SEO\\General\\User_Interface\\General_Page_Integration');
$instance->register_initializer('Yoast\\WP\\SEO\\Initializers\\Crawl_Cleanup_Permalinks');
$instance->register_initializer('Yoast\\WP\\SEO\\Initializers\\Disable_Core_Sitemaps');
$instance->register_initializer('Yoast\\WP\\SEO\\Initializers\\Migration_Runner');

View File

@@ -9,7 +9,7 @@ use WPSEO_Option_Tab;
use WPSEO_Shortlinker;
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
use Yoast\WP\SEO\Context\Meta_Tags_Context;
use Yoast\WP\SEO\Dashboard\User_Interface\New_Dashboard_Page_Integration;
use Yoast\WP\SEO\General\User_Interface\General_Page_Integration;
use Yoast\WP\SEO\Helpers\Options_Helper;
use Yoast\WP\SEO\Helpers\Product_Helper;
use Yoast\WP\SEO\Helpers\Social_Profiles_Helper;
@@ -138,7 +138,7 @@ class First_Time_Configuration_Integration implements Integration_Interface {
*/
public function enqueue_assets() {
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Date is not processed or saved.
if ( ! isset( $_GET['page'] ) || ( $_GET['page'] !== 'wpseo_dashboard' && $_GET['page'] !== New_Dashboard_Page_Integration::PAGE ) || \is_network_admin() ) {
if ( ! isset( $_GET['page'] ) || ( $_GET['page'] !== 'wpseo_dashboard' && $_GET['page'] !== General_Page_Integration::PAGE ) || \is_network_admin() ) {
return;
}

View File

@@ -4,7 +4,6 @@ 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;
@@ -36,13 +35,6 @@ 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}
*/
@@ -56,18 +48,15 @@ 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,
New_Dashboard_Ui_Conditional $new_dashboard_ui_conditional
WPSEO_Admin_Asset_Manager $admin_asset_manager
) {
$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;
}
/**
@@ -113,7 +102,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 = ( $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' ) );
$link_url = \esc_url( \self_admin_url( 'admin.php?page=wpseo_dashboard#/first-time-configuration' ) );
if ( ! $this->first_time_configuration_notice_helper->should_show_alternate_message() ) {
$content = \sprintf(

View File

@@ -4,7 +4,6 @@ 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;
@@ -28,13 +27,6 @@ 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}
*/
@@ -45,18 +37,15 @@ 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 New_Dashboard_Ui_Conditional $new_dashboard_ui_conditional The new dashboard UI conditional.
* @param Options_Helper $options_helper The options helper.
* @param Product_Helper $product_helper The product helper.
*/
public function __construct(
Options_Helper $options_helper,
Product_Helper $product_helper,
New_Dashboard_Ui_Conditional $new_dashboard_ui_conditional
Product_Helper $product_helper
) {
$this->options_helper = $options_helper;
$this->product_helper = $product_helper;
$this->new_dashboard_ui_conditional = $new_dashboard_ui_conditional;
$this->options_helper = $options_helper;
$this->product_helper = $product_helper;
}
/**
@@ -141,7 +130,7 @@ 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' ) );
$ftc_url = \esc_url( \admin_url( 'admin.php?page=wpseo_dashboard#/first-time-configuration' ) );
$asset_manager->localize_script(
'installation-success',

View File

@@ -3,7 +3,6 @@
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;
/**
@@ -65,7 +64,7 @@ class Old_Configuration_Integration implements Integration_Interface {
if ( ! isset( $_GET['page'] ) || $_GET['page'] !== 'wpseo_configurator' ) {
return;
}
$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';
$redirect_url = 'admin.php?page=wpseo_dashboard#/first-time-configuration';
\wp_safe_redirect( \admin_url( $redirect_url ), 302, 'Yoast SEO' );
exit;
}

View File

@@ -5,7 +5,6 @@ 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;
@@ -44,13 +43,6 @@ 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}
*/
@@ -61,24 +53,21 @@ 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 New_Dashboard_Ui_Conditional $new_dashboard_ui_conditional The new dashboard UI conditional.
* @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.
*/
public function __construct(
WPSEO_Addon_Manager $addon_manager,
WPSEO_Admin_Asset_Manager $admin_asset_manager,
Options_Helper $options_helper,
Product_Helper $product_helper,
New_Dashboard_Ui_Conditional $new_dashboard_ui_conditional
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;
$this->addon_manager = $addon_manager;
$this->admin_asset_manager = $admin_asset_manager;
$this->options_helper = $options_helper;
$this->product_helper = $product_helper;
}
/**
@@ -155,7 +144,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' ) );
$ftc_url = \esc_url( \admin_url( 'admin.php?page=wpseo_dashboard#/first-time-configuration' ) );
$this->admin_asset_manager->enqueue_script( 'workouts' );
$this->admin_asset_manager->localize_script(

View File

@@ -445,6 +445,7 @@ class Settings_Integration implements Integration_Interface {
'taxonomies' => $transformed_taxonomies,
'fallbacks' => $this->get_fallbacks(),
'showNewContentTypeNotification' => $show_new_content_type_notification,
'currentPromotions' => \YoastSEO()->classes->get( Promotion_Manager::class )->get_current_promotions(),
];
}
@@ -488,7 +489,6 @@ class Settings_Integration implements Integration_Interface {
'isLocalSeoActive' => \defined( 'WPSEO_LOCAL_FILE' ),
'isNewsSeoActive' => \defined( 'WPSEO_NEWS_FILE' ),
'isWooCommerceSEOActive' => $woocommerce_seo_active,
'promotions' => \YoastSEO()->classes->get( Promotion_Manager::class )->get_current_promotions(),
'siteUrl' => \get_bloginfo( 'url' ),
'siteTitle' => \get_bloginfo( 'name' ),
'sitemapUrl' => WPSEO_Sitemaps_Router::get_base_url( 'sitemap_index.xml' ),

View File

@@ -158,17 +158,17 @@ class Support_Integration implements Integration_Interface {
*/
public function get_script_data() {
return [
'preferences' => [
'preferences' => [
'isPremium' => $this->product_helper->is_premium(),
'isRtl' => \is_rtl(),
'promotions' => \YoastSEO()->classes->get( Promotion_Manager::class )->get_current_promotions(),
'pluginUrl' => \plugins_url( '', \WPSEO_FILE ),
'upsellSettings' => [
'actionId' => 'load-nfd-ctb',
'premiumCtbId' => 'f6a84663-465f-4cb5-8ba5-f7a6d72224b2',
],
],
'linkParams' => $this->shortlink_helper->get_query_params(),
'linkParams' => $this->shortlink_helper->get_query_params(),
'currentPromotions' => \YoastSEO()->classes->get( Promotion_Manager::class )->get_current_promotions(),
];
}
}

View File

@@ -473,7 +473,12 @@ class Elementor implements Integration_Interface {
\printf(
'<input type="hidden" id="%1$s" name="%1$s" value="%2$s" />',
\esc_attr( WPSEO_Meta::$form_prefix . 'slug' ),
\esc_attr( $this->get_post_slug() )
/**
* It is important that this slug value is the same as in the database.
* If the DB value is empty we can auto-generate a slug.
* But if not empty, we should not touch it anymore.
*/
\esc_attr( $this->get_metabox_post()->post_name )
);
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Output should be escaped in the filter.
@@ -482,33 +487,6 @@ class Elementor implements Integration_Interface {
echo '</form>';
}
/**
* Returns the slug for the post being edited.
*
* @return string
*/
protected function get_post_slug() {
$post = $this->get_metabox_post();
// In case get_metabox_post returns null for whatever reason.
if ( ! $post instanceof WP_Post ) {
return '';
}
// Drafts might not have a post_name unless the slug has been manually changed.
// In this case we get it using get_sample_permalink.
if ( ! $post->post_name ) {
$sample = \get_sample_permalink( $post );
// Since get_sample_permalink runs through filters, ensure that it has the expected return value.
if ( \is_array( $sample ) && \count( $sample ) === 2 && \is_string( $sample[1] ) ) {
return $sample[1];
}
}
return $post->post_name;
}
/**
* Returns post in metabox context.
*