This commit is contained in:
Hanson.xyz Dev
2026-01-04 17:50:08 -06:00
parent 7e45ce0756
commit acc8ac87a0
4131 changed files with 232562 additions and 250244 deletions
@@ -249,6 +249,27 @@ class WPSEO_Admin_Asset_Manager {
return wp_script_is( $this->prefix . $script );
}
/**
* Gets the list of Elementor dependencies.
*
* @return array<string> The array of elementor dependencies.
*/
protected function get_elementor_dependencies() {
$dependencies = [
'backbone-marionette',
'elementor-common-modules',
self::PREFIX . 'api-client',
self::PREFIX . 'externals-components',
self::PREFIX . 'externals-contexts',
self::PREFIX . 'externals-redux',
];
// Conditionally add Elementor v2 dependency if available.
if ( wp_script_is( 'elementor-v2-editor-app-bar', 'registered' ) ) {
$dependencies[] = 'elementor-v2-editor-app-bar';
}
return $dependencies;
}
/**
* Returns the scripts that need to be registered.
*
@@ -265,6 +286,7 @@ class WPSEO_Admin_Asset_Manager {
'help-scout-beacon',
'redirect-old-features-tab',
];
$elementor_dependencies = $this->get_elementor_dependencies();
$additional_dependencies = [
'analysis-worker' => [ self::PREFIX . 'analysis-package' ],
'api-client' => [ 'wp-api' ],
@@ -272,12 +294,7 @@ class WPSEO_Admin_Asset_Manager {
'dashboard-widget' => [ self::PREFIX . 'api-client' ],
'wincher-dashboard-widget' => [ self::PREFIX . 'api-client' ],
'editor-modules' => [ 'jquery' ],
'elementor' => [
self::PREFIX . 'api-client',
self::PREFIX . 'externals-components',
self::PREFIX . 'externals-contexts',
self::PREFIX . 'externals-redux',
],
'elementor' => $elementor_dependencies,
'indexation' => [
'jquery-ui-core',
'jquery-ui-progressbar',
@@ -36,7 +36,7 @@ class WPSEO_Admin_Utils {
* @return string The activation URL. Empty string if the current user doesn't have the proper capabilities.
*/
public static function get_activation_url( $slug ) {
if ( ! current_user_can( 'install_plugins' ) ) {
if ( ! current_user_can( 'activate_plugins' ) ) {
return '';
}
@@ -15,14 +15,14 @@ class WPSEO_Gutenberg_Compatibility {
*
* @var string
*/
public const CURRENT_RELEASE = '22.0.0';
public const CURRENT_RELEASE = '22.2.0';
/**
* The minimally supported version of Gutenberg by the plugin.
*
* @var string
*/
public const MINIMUM_SUPPORTED = '22.0.0';
public const MINIMUM_SUPPORTED = '22.2.0';
/**
* Holds the current version.
@@ -59,6 +59,8 @@ class Yoast_Notification {
* - capabilities: Capabilities that a user must have for this Notification to show.
* - capability_check: How to check capability pass: all or any.
* - wpseo_page_only: Only display on wpseo page or on every page.
* - yoast_branding: Whether to show the Yoast SEO branding in the notification.
* - resolve_nonce: Security nonce to use in case of resolving the notification.
*
* @var array
*/
@@ -80,6 +82,7 @@ class Yoast_Notification {
'capabilities' => [],
'capability_check' => self::MATCH_ALL,
'yoast_branding' => false,
'resolve_nonce' => '',
];
/**
@@ -177,6 +180,15 @@ class Yoast_Notification {
return $this->options['priority'];
}
/**
* Get the nonce to resolve the alert.
*
* @return string
*/
public function get_resolve_nonce() {
return $this->options['resolve_nonce'];
}
/**
* Get the User Meta key to check for dismissal of notification.
*
@@ -244,6 +244,7 @@ class WPSEO_Tracking_Settings_Data implements WPSEO_Collection {
'enable_llms_txt',
'llms_txt_selection_mode',
'configuration_finished_steps',
'enable_task_list',
];
/**