Merged in feature/314-dev-dev01 (pull request #24)

auto-patch  314-dev-dev01-2024-01-25T04_09_02

* auto-patch  314-dev-dev01-2024-01-25T04_09_02
This commit is contained in:
Tony Volpe
2024-01-25 04:11:47 +00:00
parent 6b67473553
commit 68dbe860e9
540 changed files with 3445 additions and 2131 deletions

View File

@@ -238,7 +238,7 @@ class Yoast_Feature_Toggles {
$out = '<div id="yoast-seo-sitemaps-disabled-warning" style="display:none;">';
$alert = new Alert_Presenter(
/* translators: %1$s: expands to an opening anchor tag, %2$s: expands to a closing anchor tag */
\sprintf( esc_html__( 'Disabling Yoast SEO\'s XML sitemaps will not disable WordPress\' core sitemaps. In some cases, this %1$s may result in SEO errors on your site%2$s. These may be reported in Google Search Console and other tools.', 'wordpress-seo' ), '<a target="_blank" href="' . WPSEO_Shortlinker::get( 'https://yoa.st/44z' ) . '">', '</a>' ),
sprintf( esc_html__( 'Disabling Yoast SEO\'s XML sitemaps will not disable WordPress\' core sitemaps. In some cases, this %1$s may result in SEO errors on your site%2$s. These may be reported in Google Search Console and other tools.', 'wordpress-seo' ), '<a target="_blank" href="' . WPSEO_Shortlinker::get( 'https://yoa.st/44z' ) . '">', '</a>' ),
'warning'
);
$out .= $alert->present();

View File

@@ -62,6 +62,8 @@ class Yoast_Input_Select {
/**
* Print the rendered view.
*
* @return void
*/
public function output_html() {
// Extract it, because we want each value accessible via a variable instead of accessing it as an array.
@@ -91,6 +93,8 @@ class Yoast_Input_Select {
*
* @param string $attribute The name of the attribute to add.
* @param string $value The value of the attribute.
*
* @return void
*/
public function add_attribute( $attribute, $value ) {
$this->select_attributes[ $attribute ] = $value;
@@ -133,6 +137,8 @@ class Yoast_Input_Select {
*
* @param string $value The value of the attribute.
* @param string $attribute The attribute to look for.
*
* @return void
*/
private function parse_attribute( &$value, $attribute ) {
$value = sprintf( '%s="%s"', sanitize_key( $attribute ), esc_attr( $value ) );

View File

@@ -75,12 +75,12 @@ class Yoast_Integration_Toggles {
],
(object) [
/* translators: %s: Algolia. */
'name' => \sprintf( \esc_html__( '%s integration', 'wordpress-seo' ), 'Algolia' ),
'name' => sprintf( esc_html__( '%s integration', 'wordpress-seo' ), 'Algolia' ),
'premium' => true,
'setting' => 'algolia_integration_active',
'label' => __( 'Improve the quality of your site search! Automatically helps your users find your cornerstone and most important content in your internal search results. It also removes noindexed posts & pages from your sites search results.', 'wordpress-seo' ),
/* translators: %s: Algolia. */
'read_more_label' => \sprintf( \__( 'Find out more about our %s integration.', 'wordpress-seo' ), 'Algolia' ),
'read_more_label' => sprintf( __( 'Find out more about our %s integration.', 'wordpress-seo' ), 'Algolia' ),
'read_more_url' => 'https://yoa.st/4eu',
'premium_url' => 'https://yoa.st/4ex',
'premium_upsell_url' => 'https://yoa.st/get-algolia-integration',

View File

@@ -140,7 +140,6 @@ if ( YoastSEO()->classes->get( Promotion_Manager::class )->is( 'black-friday-202
$sale_badge = '<div class="yoast-seo-premium-extension-sale-badge">' . $sale_badge_span . '</div>';
$premium_sale_badge = ( $has_valid_premium_subscription ) ? '' : $sale_badge;
}
?>

View File

@@ -14,12 +14,12 @@ if ( ! defined( 'WPSEO_VERSION' ) ) {
?>
<div class="wrap yoast wpseo-admin-page page-wpseo_redirects">
<h1 id="wpseo-title"><?php echo \esc_html( \get_admin_page_title() ); ?></h1>
<h1 id="wpseo-title"><?php echo esc_html( get_admin_page_title() ); ?></h1>
<div class="wpseo_content_wrapper" style="position: relative;">
<div style="position: absolute;top: 0;bottom: 0;left: 0;right: 0;z-index: 100; display: flex;justify-content: center;align-items: center;background: radial-gradient(#ffffffcf 20%, #ffffff00 50%);">
<a class="yoast-button-upsell" data-action="load-nfd-ctb" data-ctb-id="f6a84663-465f-4cb5-8ba5-f7a6d72224b2" href="<?php echo \esc_url( WPSEO_Shortlinker::get( 'https://yoa.st/redirect-manager-upsell' ) ); ?>" target="_blank">
<a class="yoast-button-upsell" data-action="load-nfd-ctb" data-ctb-id="f6a84663-465f-4cb5-8ba5-f7a6d72224b2" href="<?php echo esc_url( WPSEO_Shortlinker::get( 'https://yoa.st/redirect-manager-upsell' ) ); ?>" target="_blank">
<?php
echo \esc_html__( 'Unlock with Premium', 'wordpress-seo' )
echo esc_html__( 'Unlock with Premium', 'wordpress-seo' )
// phpcs:ignore WordPress.Security.EscapeOutput -- Already escapes correctly.
. WPSEO_Admin_Utils::get_new_tab_message();
?>
@@ -29,17 +29,17 @@ if ( ! defined( 'WPSEO_VERSION' ) ) {
<h2 class="nav-tab-wrapper" id="wpseo-tabs">
<a class="nav-tab nav-tab-active" id="tab-url-tab" href="#" tabindex="-1">
<?php
\esc_html_e( 'Redirects', 'wordpress-seo' )
esc_html_e( 'Redirects', 'wordpress-seo' )
?>
</a>
<a class="nav-tab" id="tab-url-tab" href="" tabindex="-1">
<?php
\esc_html_e( 'Regex Redirects', 'wordpress-seo' )
esc_html_e( 'Regex Redirects', 'wordpress-seo' )
?>
</a>
<a class="nav-tab" id="tab-url-tab" href="#" tabindex="-1">
<?php
\esc_html_e( 'Settings', 'wordpress-seo' )
esc_html_e( 'Settings', 'wordpress-seo' )
?>
</a>
</h2>
@@ -47,7 +47,7 @@ if ( ! defined( 'WPSEO_VERSION' ) ) {
<div id="table-plain" class="tab-url redirect-table-tab">
<h2>
<?php
\esc_html_e( 'Plain redirects', 'wordpress-seo' )
esc_html_e( 'Plain redirects', 'wordpress-seo' )
?>
</h2>
<form class="wpseo-new-redirect-form" method="post">
@@ -56,14 +56,14 @@ if ( ! defined( 'WPSEO_VERSION' ) ) {
<label class="textinput" for="wpseo_redirects_type">
<span class="title">
<?php
\esc_html_e( 'Type', 'wordpress-seo' )
esc_html_e( 'Type', 'wordpress-seo' )
?>
</span>
</label>
<select name="wpseo_redirects_type" id="wpseo_redirects_type" class="select select2-hidden-accessible" data-select2-id="wpseo_redirects_type" tabindex="-1" aria-hidden="true">
<option value="301" data-select2-id="2">
<?php
\esc_html_e( '301 Moved Permanently', 'wordpress-seo' )
esc_html_e( '301 Moved Permanently', 'wordpress-seo' )
?>
</option>
</select>
@@ -72,7 +72,7 @@ if ( ! defined( 'WPSEO_VERSION' ) ) {
<span class="select2-selection select2-selection--single" role="combobox" aria-haspopup="true" aria-expanded="false" tabindex="-1" aria-disabled="false" aria-labelledby="select2-wpseo_redirects_type-container">
<span class="select2-selection__rendered" id="select2-wpseo_redirects_type-container" role="textbox" aria-readonly="true" title="301 Moved Permanently">
<?php
\esc_html_e( '301 Moved Permanently', 'wordpress-seo' )
esc_html_e( '301 Moved Permanently', 'wordpress-seo' )
?>
</span>
<span class="select2-selection__arrow" role="presentation">
@@ -97,7 +97,7 @@ if ( ! defined( 'WPSEO_VERSION' ) ) {
<label class="textinput" for="wpseo_redirects_origin">
<span class="title">
<?php
\esc_html_e( 'Old URL', 'wordpress-seo' )
esc_html_e( 'Old URL', 'wordpress-seo' )
?>
</span>
</label>
@@ -109,7 +109,7 @@ if ( ! defined( 'WPSEO_VERSION' ) ) {
<label class="textinput" for="wpseo_redirects_target">
<span class="title">
<?php
\esc_html_e( 'URL', 'wordpress-seo' )
esc_html_e( 'URL', 'wordpress-seo' )
?>
</span>
</label>
@@ -119,7 +119,7 @@ if ( ! defined( 'WPSEO_VERSION' ) ) {
<button type="button" class="button button-primary" tabindex="-1">
<?php
\esc_html_e( 'Add Redirect', 'wordpress-seo' )
esc_html_e( 'Add Redirect', 'wordpress-seo' )
?>
</button>
</div>
@@ -134,11 +134,11 @@ if ( ! defined( 'WPSEO_VERSION' ) ) {
<select name="redirect-type" id="filter-by-redirect" tabindex="-1">
<option selected="selected" value="0">
<?php
\esc_html_e( 'All redirect types', 'wordpress-seo' )
esc_html_e( 'All redirect types', 'wordpress-seo' )
?>
</option>
</select>
<input type="button" name="filter_action" id="post-query-submit" class="button" value="<?php \esc_attr_e( 'Filter', 'wordpress-seo' ); ?>" tabindex="-1">
<input type="button" name="filter_action" id="post-query-submit" class="button" value="<?php esc_attr_e( 'Filter', 'wordpress-seo' ); ?>" tabindex="-1">
</div>
<br class="clear">
</div>
@@ -152,7 +152,7 @@ if ( ! defined( 'WPSEO_VERSION' ) ) {
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'Type', 'wordpress-seo' )
esc_html_e( 'Type', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span>
@@ -162,7 +162,7 @@ if ( ! defined( 'WPSEO_VERSION' ) ) {
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'Old URL', 'wordpress-seo' )
esc_html_e( 'Old URL', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span>
@@ -172,7 +172,7 @@ if ( ! defined( 'WPSEO_VERSION' ) ) {
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'New URL', 'wordpress-seo' )
esc_html_e( 'New URL', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span>
@@ -185,7 +185,7 @@ if ( ! defined( 'WPSEO_VERSION' ) ) {
<tr class="no-items">
<td class="colspanchange" colspan="4">
<?php
\esc_html_e( 'No items found.', 'wordpress-seo' )
esc_html_e( 'No items found.', 'wordpress-seo' )
?>
</td>
</tr>
@@ -200,7 +200,7 @@ if ( ! defined( 'WPSEO_VERSION' ) ) {
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'Type', 'wordpress-seo' )
esc_html_e( 'Type', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span></a>
@@ -209,7 +209,7 @@ if ( ! defined( 'WPSEO_VERSION' ) ) {
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'Old URL', 'wordpress-seo' )
esc_html_e( 'Old URL', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span>
@@ -219,7 +219,7 @@ if ( ! defined( 'WPSEO_VERSION' ) ) {
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'New URL', 'wordpress-seo' )
esc_html_e( 'New URL', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span></a>

View File

@@ -18,18 +18,3 @@ if ( ! defined( 'WPSEO_VERSION' ) ) {
* Don't use it in your code as it will be removed shortly.
*/
do_action( 'wpseo_settings_tab_site_analysis_internal', $yform );
/**
* Fires when displaying the site wide analysis tab.
*
* @deprecated 19.10 No replacement available.
*
* @param Yoast_Form $yform The yoast form object.
*/
do_action_deprecated(
'wpseo_settings_tab_site_analysis',
[ $yform ],
'19.10',
'',
'This action is going away with no replacement. If you want to add settings that interact with Yoast SEO, please create your own settings page.'
);

View File

@@ -19,14 +19,14 @@ $feature_toggles = Yoast_Feature_Toggles::instance()->get_all();
<h2><?php esc_html_e( 'Crawl settings', 'wordpress-seo' ); ?></h2>
<div class="yoast-measure">
<?php
echo sprintf(
printf(
/* translators: %s expands to Yoast SEO */
esc_html__( 'This tab allows you to selectively disable %s features for all sites in the network. By default all features are enabled, which allows site admins to choose for themselves if they want to toggle a feature on or off for their site. When you disable a feature here, site admins will not be able to use that feature at all.', 'wordpress-seo' ),
'Yoast SEO'
);
echo '<p style="margin: 0.5em 0 1em;">';
echo sprintf(
printf(
/* translators: %1$s opens the link to the Yoast.com article about Crawl settings, %2$s closes the link, */
esc_html__( '%1$sLearn more about crawl settings.%2$s', 'wordpress-seo' ),
'<a href="' . esc_url( WPSEO_Shortlinker::get( 'https://yoa.st/crawl-settings' ) ) . '" target="_blank" rel="noopener noreferrer">',

View File

@@ -22,7 +22,7 @@ $feature_toggles = Yoast_Feature_Toggles::instance()->get_all();
<h2><?php esc_html_e( 'Features', 'wordpress-seo' ); ?></h2>
<div class="yoast-measure">
<?php
echo sprintf(
printf(
/* translators: %s expands to Yoast SEO */
esc_html__( 'This tab allows you to selectively disable %s features for all sites in the network. By default all features are enabled, which allows site admins to choose for themselves if they want to toggle a feature on or off for their site. When you disable a feature here, site admins will not be able to use that feature at all.', 'wordpress-seo' ),
'Yoast SEO'
@@ -33,7 +33,7 @@ $feature_toggles = Yoast_Feature_Toggles::instance()->get_all();
$premium_version = YoastSEO()->helpers->product->get_premium_version();
if ( $feature->premium && $feature->premium_version ) {
$not_supported_in_current_premium_version = $is_premium && \version_compare( $premium_version, $feature->premium_version, '<' );
$not_supported_in_current_premium_version = $is_premium && version_compare( $premium_version, $feature->premium_version, '<' );
if ( $not_supported_in_current_premium_version ) {
continue;

View File

@@ -22,7 +22,7 @@ $integration_toggles = Yoast_Integration_Toggles::instance()->get_all();
<h2><?php esc_html_e( 'Integrations', 'wordpress-seo' ); ?></h2>
<div class="yoast-measure">
<?php
echo sprintf(
printf(
/* translators: %1$s expands to Yoast SEO */
esc_html__( 'This tab allows you to selectively disable %1$s integrations with third-party products for all sites in the network. By default all integrations are enabled, which allows site admins to choose for themselves if they want to toggle an integration on or off for their site. When you disable an integration here, site admins will not be able to use that integration at all.', 'wordpress-seo' ),
'Yoast SEO'

View File

@@ -83,18 +83,6 @@ function wpseo_import_external_select( $name, $plugins ) {
*/
do_action( 'wpseo_import_other_plugins_internal' );
/**
* Hook used to import other plugins.
*
* @deprecated 19.10 No replacement available.
*/
do_action_deprecated(
'wpseo_import_other_plugins',
[],
'19.10',
'',
'This action is going away with no replacement. If you want to add settings that interact with Yoast SEO, please create your own settings page.'
);
?>
<input type="submit" class="button button-primary" name="import_external"
value="<?php esc_attr_e( 'Import', 'wordpress-seo' ); ?>"/>

View File

@@ -14,7 +14,7 @@ if ( ! defined( 'WPSEO_VERSION' ) ) {
/* translators: %1$s expands to Yoast SEO */
$submit_button_value = sprintf( __( 'Export your %1$s settings', 'wordpress-seo' ), 'Yoast SEO' );
// phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: The nonce will be verified in WPSEO_Export below, We are only strictly comparing with '1'.
// phpcs:ignore WordPress.Security.NonceVerification.Missing,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: The nonce will be verified in WPSEO_Export below, We are only strictly comparing with '1'.
if ( isset( $_POST['do_export'] ) && wp_unslash( $_POST['do_export'] ) === '1' ) {
$export = new WPSEO_Export();
$export->export();

View File

@@ -81,6 +81,8 @@ if ( ! empty( $_REQUEST['_wp_http_referer'] ) && isset( $_SERVER['REQUEST_URI']
*
* @param WPSEO_Bulk_List_Table $table The table to render.
* @param string $id The id for the tab.
*
* @return void
*/
function wpseo_get_rendered_tab( $table, $id ) {
?>

View File

@@ -51,7 +51,7 @@ elseif ( isset( $_POST['settings_import'] ) && wp_unslash( $_POST['settings_impo
/**
* Allow custom import actions.
*
* @api WPSEO_Import_Status $yoast_seo_import Contains info about the handled import.
* @param WPSEO_Import_Status $yoast_seo_import Contains info about the handled import.
*/
$yoast_seo_import = apply_filters( 'wpseo_handle_import', $yoast_seo_import );
@@ -65,7 +65,7 @@ if ( $yoast_seo_import ) {
/**
* Allow customization of import/export message.
*
* @api string $yoast_seo_msg The message.
* @param string $yoast_seo_msg The message.
*/
$yoast_seo_msg = apply_filters( 'wpseo_import_message', $yoast_seo_message );