plugin updates
This commit is contained in:
@@ -313,6 +313,9 @@ class WPSEO_Admin_Asset_Manager {
|
||||
self::PREFIX . 'externals-contexts',
|
||||
self::PREFIX . 'externals-redux',
|
||||
],
|
||||
'new-dashboard' => [
|
||||
self::PREFIX . 'api-client',
|
||||
],
|
||||
];
|
||||
|
||||
$plugin_scripts = $this->load_generated_asset_file(
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* @package WPSEO\Admin
|
||||
*/
|
||||
|
||||
use Yoast\WP\SEO\Conditionals\New_Dashboard_Ui_Conditional;
|
||||
use Yoast\WP\SEO\Integrations\Settings_Integration;
|
||||
|
||||
/**
|
||||
@@ -241,7 +242,8 @@ class WPSEO_Admin {
|
||||
$configuration_title = ( ! $first_time_configuration_notice_helper->should_show_alternate_message() ) ? 'first-time configuration' : 'SEO configuration';
|
||||
/* translators: CTA to finish the first time configuration. %s: Either first-time SEO configuration or SEO configuration. */
|
||||
$message = sprintf( __( 'Finish your %s', 'wordpress-seo' ), $configuration_title );
|
||||
$ftc_link = '<a href="' . esc_url( admin_url( 'admin.php?page=wpseo_dashboard#top#first-time-configuration' ) ) . '" target="_blank">' . $message . '</a>';
|
||||
$ftc_page = ( ( new New_Dashboard_Ui_Conditional() )->is_met() ) ? 'admin.php?page=wpseo_dashboard#/first-time-configuration' : 'admin.php?page=wpseo_dashboard#top#first-time-configuration';
|
||||
$ftc_link = '<a href="' . esc_url( admin_url( $ftc_page ) ) . '" target="_blank">' . $message . '</a>';
|
||||
array_unshift( $links, $ftc_link );
|
||||
}
|
||||
|
||||
|
||||
@@ -15,14 +15,14 @@ class WPSEO_Gutenberg_Compatibility {
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public const CURRENT_RELEASE = '19.3.0';
|
||||
public const CURRENT_RELEASE = '19.4.0';
|
||||
|
||||
/**
|
||||
* The minimally supported version of Gutenberg by the plugin.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public const MINIMUM_SUPPORTED = '19.3.0';
|
||||
public const MINIMUM_SUPPORTED = '19.4.0';
|
||||
|
||||
/**
|
||||
* Holds the current version.
|
||||
|
||||
@@ -600,6 +600,12 @@ class Yoast_Notification_Center {
|
||||
* @return void
|
||||
*/
|
||||
public function update_storage() {
|
||||
/**
|
||||
* Plugins might exit on the plugins_loaded hook.
|
||||
* This prevents the pluggable.php file from loading, as it's loaded after the plugins_loaded hook.
|
||||
* As we need functions defined in pluggable.php, make sure it's loaded.
|
||||
*/
|
||||
require_once ABSPATH . WPINC . '/pluggable.php';
|
||||
|
||||
$notifications = $this->notifications;
|
||||
|
||||
|
||||
@@ -355,6 +355,15 @@ class Yoast_Notification {
|
||||
return '<div ' . implode( ' ', $attributes ) . '>' . $message . '</div>' . PHP_EOL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the message for the notification.
|
||||
*
|
||||
* @return string The message.
|
||||
*/
|
||||
public function get_message() {
|
||||
return wpautop( $this->message );
|
||||
}
|
||||
|
||||
/**
|
||||
* Wraps the message with a Yoast SEO icon.
|
||||
*
|
||||
|
||||
@@ -879,6 +879,10 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
'log_level' => WPSEO_Utils::get_analysis_worker_log_level(),
|
||||
];
|
||||
|
||||
$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 === (int) $post_id;
|
||||
|
||||
$script_data = [
|
||||
'metabox' => $this->get_metabox_script_data(),
|
||||
'isPost' => true,
|
||||
@@ -891,6 +895,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
'plugins' => $plugins_script_data,
|
||||
'worker' => $worker_script_data,
|
||||
],
|
||||
'isFrontPage' => $is_front_page,
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
* @package WPSEO\Admin\Views
|
||||
*/
|
||||
|
||||
use Yoast\WP\SEO\Conditionals\New_Dashboard_Ui_Conditional;
|
||||
|
||||
if ( ! defined( 'WPSEO_VERSION' ) ) {
|
||||
header( 'Status: 403 Forbidden' );
|
||||
header( 'HTTP/1.1 403 Forbidden' );
|
||||
@@ -100,10 +102,11 @@ function wpseo_import_external_select( $name, $plugins ) {
|
||||
<h3><?php esc_html_e( 'Step 4: Go through the first time configuration', 'wordpress-seo' ); ?></h3>
|
||||
<p>
|
||||
<?php
|
||||
$ftc_page = ( ( new New_Dashboard_Ui_Conditional() )->is_met() ) ? 'admin.php?page=wpseo_dashboard#/first-time-configuration' : 'admin.php?page=wpseo_dashboard#top#first-time-configuration';
|
||||
printf(
|
||||
/* translators: 1: Link start tag to the First time configuration tab in the General page, 2: Link closing tag. */
|
||||
esc_html__( 'You should finish the %1$sfirst time configuration%2$s to make sure your SEO data has been optimized and you’ve set the essential Yoast SEO settings for your site.', 'wordpress-seo' ),
|
||||
'<a href="' . esc_url( admin_url( 'admin.php?page=wpseo_dashboard#top#first-time-configuration' ) ) . '">',
|
||||
'<a href="' . esc_url( admin_url( $ftc_page ) ) . '">',
|
||||
'</a>'
|
||||
);
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user