Commit 24ee767f authored by Simon's avatar Simon

Teams and manager complete

parent ac5488bd
...@@ -51,6 +51,7 @@ class JsonDataCollector ...@@ -51,6 +51,7 @@ class JsonDataCollector
'member' => [ 'member' => [
'slug' => 'manager_id', 'slug' => 'manager_id',
'name' => 'manager_name', 'name' => 'manager_name',
'position' => 'manager_position',
'__primary' => true, '__primary' => true,
], ],
]; ];
......
...@@ -125,7 +125,8 @@ function getSource($env) ...@@ -125,7 +125,8 @@ function getSource($env)
if ($env === 'dev') { if ($env === 'dev') {
// $inputFile = plugin_dir_path(__FILE__) . "source_data/wp_biuro.php.xml"; // $inputFile = plugin_dir_path(__FILE__) . "source_data/wp_biuro.php.xml";
// $inputFile = "https://base.biuro.lt/_export/wp_biuro.php"; // $inputFile = "https://base.biuro.lt/_export/wp_biuro.php";
$inputFile = "https://base.biuro.lt/_export/{$script}"; $inputFile = "https://base.biuro.lt/_devSkirmantas/lt/jobs/AdvertExport/Biuro.php";
// $inputFile = "https://base.biuro.lt/_export/{$script}";
} elseif ($env === 'prod') { } elseif ($env === 'prod') {
// $inputFile = "http://export.biuro.lt/wp_biuro.php"; // $inputFile = "http://export.biuro.lt/wp_biuro.php";
$inputFile = "http://export.biuro.lt/{$script}"; $inputFile = "http://export.biuro.lt/{$script}";
......
...@@ -439,6 +439,7 @@ class WPSEO_Admin_Asset_Manager { ...@@ -439,6 +439,7 @@ class WPSEO_Admin_Asset_Manager {
self::PREFIX . 'helpers', self::PREFIX . 'helpers',
self::PREFIX . 'legacy-components', self::PREFIX . 'legacy-components',
self::PREFIX . 'commons', self::PREFIX . 'commons',
self::PREFIX . 'configuration-wizard-package',
], ],
], ],
[ [
...@@ -586,7 +587,6 @@ class WPSEO_Admin_Asset_Manager { ...@@ -586,7 +587,6 @@ class WPSEO_Admin_Asset_Manager {
self::PREFIX . 'helpers', self::PREFIX . 'helpers',
self::PREFIX . 'yoast-components', self::PREFIX . 'yoast-components',
self::PREFIX . 'analysis-report', self::PREFIX . 'analysis-report',
self::PREFIX . 'configuration-wizard-package',
self::PREFIX . 'search-metadata-previews', self::PREFIX . 'search-metadata-previews',
self::PREFIX . 'replacement-variable-editor', self::PREFIX . 'replacement-variable-editor',
self::PREFIX . 'jed', self::PREFIX . 'jed',
......
...@@ -42,6 +42,7 @@ class WPSEO_Admin_Init { ...@@ -42,6 +42,7 @@ class WPSEO_Admin_Init {
add_action( 'admin_init', [ $this, 'show_hook_deprecation_warnings' ] ); add_action( 'admin_init', [ $this, 'show_hook_deprecation_warnings' ] );
add_action( 'admin_init', [ 'WPSEO_Plugin_Conflict', 'hook_check_for_plugin_conflicts' ] ); add_action( 'admin_init', [ 'WPSEO_Plugin_Conflict', 'hook_check_for_plugin_conflicts' ] );
add_action( 'admin_notices', [ $this, 'permalink_settings_notice' ] ); add_action( 'admin_notices', [ $this, 'permalink_settings_notice' ] );
add_action( 'post_submitbox_misc_actions', [ $this, 'add_publish_box_section' ] );
/* /*
* The `admin_notices` hook fires on single site admin pages vs. * The `admin_notices` hook fires on single site admin pages vs.
...@@ -554,6 +555,27 @@ class WPSEO_Admin_Init { ...@@ -554,6 +555,27 @@ class WPSEO_Admin_Init {
); );
} }
/**
* Adds a custom Yoast section within the Classic Editor publish box.
*
* @param \WP_Post $post The current post object.
*
* @return void
*/
public function add_publish_box_section( $post ) {
if ( in_array( $this->pagenow, [ 'post.php', 'post-new.php' ], true ) ) {
?>
<div id="yoast-seo-publishbox-section"></div>
<?php
/**
* Fires after the post time/date setting in the Publish meta box.
*
* @api \WP_Post The current post object.
*/
do_action( 'wpseo_publishbox_misc_actions', $post );
}
}
/* ********************* DEPRECATED METHODS ********************* */ /* ********************* DEPRECATED METHODS ********************* */
/** /**
......
...@@ -97,7 +97,6 @@ class WPSEO_Admin { ...@@ -97,7 +97,6 @@ class WPSEO_Admin {
} }
$integrations[] = new WPSEO_Yoast_Columns(); $integrations[] = new WPSEO_Yoast_Columns();
$integrations[] = new WPSEO_License_Page_Manager();
$integrations[] = new WPSEO_Statistic_Integration(); $integrations[] = new WPSEO_Statistic_Integration();
$integrations[] = new WPSEO_Capability_Manager_Integration( WPSEO_Capability_Manager_Factory::get() ); $integrations[] = new WPSEO_Capability_Manager_Integration( WPSEO_Capability_Manager_Factory::get() );
$integrations[] = new WPSEO_Admin_Media_Purge_Notification(); $integrations[] = new WPSEO_Admin_Media_Purge_Notification();
......
<?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin
*/
/**
* Represents the class that contains the list of possible extensions for Yoast SEO.
*/
class WPSEO_Extensions {
/**
* Array with the Yoast extensions.
*
* @var array
*/
protected $extensions = [
'Yoast SEO Premium' => [
'slug' => 'yoast-seo-premium',
'identifier' => 'wordpress-seo-premium',
'classname' => 'WPSEO_Premium',
'my-yoast-slug' => WPSEO_Addon_Manager::PREMIUM_SLUG,
],
'News SEO' => [
'slug' => 'news-seo',
'identifier' => 'wpseo-news',
'classname' => 'WPSEO_News',
'my-yoast-slug' => WPSEO_Addon_Manager::NEWS_SLUG,
],
'Yoast WooCommerce SEO' => [
'slug' => 'woocommerce-yoast-seo',
'identifier' => 'wpseo-woocommerce',
'classname' => 'Yoast_WooCommerce_SEO',
'my-yoast-slug' => WPSEO_Addon_Manager::WOOCOMMERCE_SLUG,
],
'Video SEO' => [
'slug' => 'video-seo-for-wordpress',
'identifier' => 'wpseo-video',
'classname' => 'WPSEO_Video_Sitemap',
'my-yoast-slug' => WPSEO_Addon_Manager::VIDEO_SLUG,
],
'Local SEO' => [
'slug' => 'local-seo-for-wordpress',
'identifier' => 'wpseo-local',
'classname' => 'WPSEO_Local_Core',
'my-yoast-slug' => WPSEO_Addon_Manager::LOCAL_SLUG,
],
];
/**
* Returns the set extensions.
*
* @return array All the extension names.
*/
public function get() {
return array_keys( $this->extensions );
}
/**
* Checks if the extension is valid.
*
* @param string $extension The extension to get the name for.
*
* @return bool Returns true when valid.
*/
public function is_valid( $extension ) {
$addon_manager = new WPSEO_Addon_Manager();
return $addon_manager->has_valid_subscription( $this->extensions[ $extension ]['my-yoast-slug'] );
}
/**
* Invalidates the extension by removing its option.
*
* @param string $extension The extension to invalidate.
*/
public function invalidate( $extension ) {
/*
* Make sure we clear the current site and multisite options.
*
* Because plugins can be site-activated or multi-site activated we need to clear
* all possible options.
*
* If we knew here that the extension in question was network activated
* we could do this a lot more easily.
*/
delete_option( $this->get_option_name( $extension ) );
delete_site_option( $this->get_option_name( $extension ) );
}
/**
* Checks if the plugin has been installed.
*
* @param string $extension The name of the plugin to check.
*
* @return bool Returns true when installed.
*/
public function is_installed( $extension ) {
return class_exists( $this->extensions[ $extension ]['classname'] );
}
/**
* Converts the extension to the required option name.
*
* @param string $extension The extension name to convert.
*
* @return string Returns the option name.
*/
protected function get_option_name( $extension ) {
return sanitize_title_with_dashes( $this->extensions[ $extension ]['slug'] . '_', null, 'save' ) . 'license';
}
}
...@@ -15,14 +15,14 @@ class WPSEO_Gutenberg_Compatibility { ...@@ -15,14 +15,14 @@ class WPSEO_Gutenberg_Compatibility {
* *
* @var string * @var string
*/ */
const CURRENT_RELEASE = '9.2.0'; const CURRENT_RELEASE = '9.3.0';
/** /**
* The minimally supported version of Gutenberg by the plugin. * The minimally supported version of Gutenberg by the plugin.
* *
* @var string * @var string
*/ */
const MINIMUM_SUPPORTED = '9.2.0'; const MINIMUM_SUPPORTED = '9.3.0';
/** /**
* Holds the current version. * Holds the current version.
......
<?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin
*/
/**
* Represents the values for a single Yoast Premium extension plugin.
*/
class WPSEO_License_Page_Manager implements WPSEO_WordPress_Integration {
/**
* Version number for License Page Manager.
*
* @var string
*/
const VERSION_BACKWARDS_COMPATIBILITY = '2';
/**
* Registers all hooks to WordPress.
*/
public function register_hooks() {
add_filter( 'http_response', [ $this, 'handle_response' ], 10, 3 );
if ( $this->get_version() === self::VERSION_BACKWARDS_COMPATIBILITY ) {
add_filter( 'yoast-license-valid', '__return_true' );
add_filter( 'yoast-show-license-notice', '__return_false' );
add_action( 'admin_init', [ $this, 'validate_extensions' ], 15 );
}
else {
add_action( 'admin_init', [ $this, 'remove_faulty_notifications' ], 15 );
}
}
/**
* Validates the extensions and show a notice for the invalid extensions.
*/
public function validate_extensions() {
if ( filter_input( INPUT_GET, 'page' ) === WPSEO_Admin::PAGE_IDENTIFIER ) {
/**
* Filter: 'yoast-active-extensions' - Collects all active extensions. This hook is implemented in the
* license manager.
*
* @api array $extensions The array with extensions.
*/
apply_filters( 'yoast-active-extensions', [] );
}
$extension_list = new WPSEO_Extensions();
$extensions = $extension_list->get();
$notification_center = Yoast_Notification_Center::get();
foreach ( $extensions as $product_name ) {
$notification = $this->create_notification( $product_name );
// Add a notification when the installed plugin isn't activated in My Yoast.
if ( $extension_list->is_installed( $product_name ) && ! $extension_list->is_valid( $product_name ) ) {
$notification_center->add_notification( $notification );
continue;
}
$notification_center->remove_notification( $notification );
}
}
/**
* Removes the faulty set notifications.
*/
public function remove_faulty_notifications() {
$extension_list = new WPSEO_Extensions();
$extensions = $extension_list->get();
$notification_center = Yoast_Notification_Center::get();
foreach ( $extensions as $product_name ) {
$notification = $this->create_notification( $product_name );
$notification_center->remove_notification( $notification );
}
}
/**
* Handles the response.
*
* @param array $response HTTP response.
* @param array $request_arguments HTTP request arguments. Unused.
* @param string $url The request URL.
*
* @return array The response array.
*/
public function handle_response( array $response, $request_arguments, $url ) {
$response_code = wp_remote_retrieve_response_code( $response );
if ( $response_code === 200 && $this->is_expected_endpoint( $url ) ) {
$response_data = $this->parse_response( $response );
$this->detect_version( $response_data );
}
return $response;
}
/**
* Returns the license page to use based on the version number.
*
* @return string The page to use.
*/
public function get_license_page() {
return 'licenses';
}
/**
* Returns the version number of the license server.
*
* @return int The version number
*/
protected function get_version() {
return WPSEO_Options::get( $this->get_option_name(), self::VERSION_BACKWARDS_COMPATIBILITY );
}
/**
* Returns the option name.
*
* @return string The option name.
*/
protected function get_option_name() {
return 'license_server_version';
}
/**
* Sets the version when there is a value in the response.
*
* @param array $response The response to extract the version from.
*/
protected function detect_version( $response ) {
if ( ! empty( $response['serverVersion'] ) ) {
$this->set_version( $response['serverVersion'] );
}
}
/**
* Sets the version.
*
* @param string $server_version The version number to save.
*/
protected function set_version( $server_version ) {
WPSEO_Options::set( $this->get_option_name(), $server_version );
}
/**
* Parses the response by getting its body and do a unserialize of it.
*
* @param array $response The response to parse.
*
* @return mixed|string|false The parsed response.
*/
protected function parse_response( $response ) {
$response = json_decode( wp_remote_retrieve_body( $response ), true );
$response = maybe_unserialize( $response );
return $response;
}
/**
* Checks if the given url matches the expected endpoint.
*
* @param string $url The url to check.
*
* @return bool True when url matches the endpoint.
*/
protected function is_expected_endpoint( $url ) {
$url_parts = wp_parse_url( $url );
$is_yoast_com = ( in_array( $url_parts['host'], [ 'yoast.com', 'my.yoast.com' ], true ) );
$is_edd_api = ( isset( $url_parts['path'] ) && $url_parts['path'] === '/edd-sl-api' );
return $is_yoast_com && $is_edd_api;
}
/**
* Creates an instance of Yoast_Notification.
*
* @param string $product_name The product to create the notification for.
*
* @return Yoast_Notification The created notification.
*/
protected function create_notification( $product_name ) {
$notification_options = [
'type' => Yoast_Notification::ERROR,
'id' => 'wpseo-dismiss-' . sanitize_title_with_dashes( $product_name, null, 'save' ),
'capabilities' => 'wpseo_manage_options',
];
return new Yoast_Notification(
sprintf(
/* translators: %1$s expands to the product name. %2$s expands to a link to My Yoast */
__( 'You are not receiving updates or support! Fix this problem by adding this site and enabling %1$s for it in %2$s.', 'wordpress-seo' ),
$product_name,
'<a href="' . WPSEO_Shortlinker::get( 'https://yoa.st/13j' ) . '" target="_blank">My Yoast</a>'
),
$notification_options
);
}
}
...@@ -51,7 +51,7 @@ class WPSEO_Yoast_Columns implements WPSEO_WordPress_Integration { ...@@ -51,7 +51,7 @@ class WPSEO_Yoast_Columns implements WPSEO_WordPress_Integration {
'<em>', '<em>',
'</em>' '</em>'
); );
}; }
$screen = get_current_screen(); $screen = get_current_screen();
$screen->add_help_tab( $screen->add_help_tab(
......
...@@ -167,6 +167,8 @@ class WPSEO_Metabox_Formatter { ...@@ -167,6 +167,8 @@ class WPSEO_Metabox_Formatter {
], ],
'markdownEnabled' => $this->is_markdown_enabled(), 'markdownEnabled' => $this->is_markdown_enabled(),
'analysisHeadingTitle' => __( 'Analysis', 'wordpress-seo' ), 'analysisHeadingTitle' => __( 'Analysis', 'wordpress-seo' ),
'zapierIntegrationActive' => WPSEO_Options::get( 'zapier_integration_active', false ) ? 1 : 0,
'zapierConnectedStatus' => ! empty( WPSEO_Options::get( 'zapier_subscription', [] ) ) ? 1 : 0,
]; ];
} }
......
...@@ -12,6 +12,4 @@ if ( ! defined( 'WPSEO_VERSION' ) ) { ...@@ -12,6 +12,4 @@ if ( ! defined( 'WPSEO_VERSION' ) ) {
exit(); exit();
} }
$license_page_manager = new WPSEO_License_Page_Manager(); require WPSEO_PATH . 'admin/views/licenses.php';
$licenses_page = $license_page_manager->get_license_page();
require WPSEO_PATH . 'admin/views/' . $licenses_page . '.php';
...@@ -242,23 +242,13 @@ class WPSEO_Taxonomy { ...@@ -242,23 +242,13 @@ class WPSEO_Taxonomy {
} }
/** /**
* Allows HTML in descriptions. * Allows post-kses-filtered HTML in term descriptions.
*/ */
public function custom_category_descriptions_allow_html() { public function custom_category_descriptions_allow_html() {
$filters = [
'pre_term_description',
'pre_link_description',
'pre_link_notes',
'pre_user_description',
];
foreach ( $filters as $filter ) {
remove_filter( $filter, 'wp_filter_kses' );
if ( ! current_user_can( 'unfiltered_html' ) ) {
add_filter( $filter, 'wp_filter_post_kses' );
}
}
remove_filter( 'term_description', 'wp_kses_data' ); remove_filter( 'term_description', 'wp_kses_data' );
remove_filter( 'pre_term_description', 'wp_filter_kses' );
add_filter( 'term_description', 'wp_kses_post' );
add_filter( 'pre_term_description', 'wp_filter_post_kses' );
} }
/** /**
......
...@@ -47,6 +47,7 @@ class WPSEO_Tracking_Settings_Data implements WPSEO_Collection { ...@@ -47,6 +47,7 @@ class WPSEO_Tracking_Settings_Data implements WPSEO_Collection {
'wikipedia_url', 'wikipedia_url',
'fbadminapp', 'fbadminapp',
'semrush_tokens', 'semrush_tokens',
'zapier_api_key',
]; ];
/** /**
...@@ -157,12 +158,13 @@ class WPSEO_Tracking_Settings_Data implements WPSEO_Collection { ...@@ -157,12 +158,13 @@ class WPSEO_Tracking_Settings_Data implements WPSEO_Collection {
'youtube_url', 'youtube_url',
'wikipedia_url', 'wikipedia_url',
'fbadminapp', 'fbadminapp',
'indexables_indexation_completed', 'indexables_indexing_completed',
'semrush_integration_active', 'semrush_integration_active',
'semrush_tokens', 'semrush_tokens',
'semrush_country_code', 'semrush_country_code',
'enable_enhanced_slack_sharing', 'enable_enhanced_slack_sharing',
'zapier_integration_active', 'zapier_integration_active',
'zapier_api_key',
]; ];
/** /**
......
...@@ -19,7 +19,7 @@ echo '<h3>' . esc_html( sprintf( __( 'Settings for single %s URLs', 'wordpress-s ...@@ -19,7 +19,7 @@ echo '<h3>' . esc_html( sprintf( __( 'Settings for single %s URLs', 'wordpress-s
require __DIR__ . '/post_type/post-type.php'; require __DIR__ . '/post_type/post-type.php';
if ( $wpseo_post_type->name === 'product' && WPSEO_Utils::is_woocommerce_active() ) { if ( $wpseo_post_type->name === 'product' && YoastSEO()->helpers->woocommerce->is_active() ) {
require __DIR__ . '/post_type/woocommerce-shop-page.php'; require __DIR__ . '/post_type/woocommerce-shop-page.php';
return; return;
......
...@@ -403,7 +403,6 @@ ...@@ -403,7 +403,6 @@
margin-bottom: 0; margin-bottom: 0;
} }
/* Set overflow-y to scroll and hide the scrollbar on FireFox. */
.yoast-post-settings-modal .yoast-content-container { .yoast-post-settings-modal .yoast-content-container {
overflow-y: auto; overflow-y: auto;
flex-grow: 1; flex-grow: 1;
...@@ -429,109 +428,6 @@ ...@@ -429,109 +428,6 @@
align-self: center; align-self: center;
} }
/* Responsive CSS for the mobile PostSettingsModal */
@media only screen and (max-width: 600px){
/* Make the modal fullscreen. */
.yoast-post-settings-modal {
max-height: 100%;
max-width: 100%;
}
/* Align the button and notice so that they have the spacing between them. */
.yoast-post-settings-modal .yoast-button-container {
padding: 16px 16px 16px;
justify-content: space-between;
}
/* Unset the padding for the p on mobile devices */
.yoast-post-settings-modal .yoast-button-container p {
padding-right: 0;
}
}
/* Specific styling for the PostSettingsModal */
.yoast-post-settings-modal {
width: 880px;
height: 100%;
max-width: calc(100% - 48px - 48px);
max-height: calc(100% - 48px - 48px);
overflow: hidden;
}
.yoast-post-settings-modal__button-container {
padding: 16px;
display: flex;
flex-direction: column;
border-bottom: 1px solid rgba( 0,0,0,0.2 );
}
.yoast-post-settings-modal .yoast-collapsible-content {
padding: 16px;
border-top: var(--yoast-border-default);
}
.yoast-post-settings-modal .components-modal__content {
padding: 0;
display: flex;
flex-direction: column;
}
.yoast-post-settings-modal .components-modal__header {
margin: 0;
flex-shrink: 0;
border-bottom: var(--yoast-border-default);
}
.yoast-post-settings-modal .yoast-notice-container {
z-index: 1;
position: sticky;
bottom: 0;
left: 0;
width: 100%;
margin-top: auto;
}
/**
* Add a negative margin so that the hr will overlap with the border of the content above.
*
* As this is only needed when the content overflows, it is hard to make a good CSS rule for this case.
* Adding a negative margin solves the problem and has no noticeable effect when the margin was not really needed.
*/
.yoast-post-settings-modal .yoast-notice-container > hr {
margin-top: -1px;
margin-bottom: 0;
}
/* Set overflow-y to scroll and hide the scrollbar on FireFox. */
.yoast-post-settings-modal .yoast-content-container {
overflow-y: auto;
border-bottom: var(--yoast-border-default);
}
/* Remove the border-top from the first collapsible. This created a double border. */
.yoast-post-settings-modal .yoast-content-container > div:first-child {
border-top: none !important;
}
.yoast-post-settings-modal .yoast-button-container {
display: flex;
flex-direction: row;
justify-content: flex-end;
padding: 24px 24px 24px;
margin: 0;
}
.yoast-post-settings-modal .yoast-button-container p {
color: var(--yoast-color-label-help);
padding-right: 24px;
align-self: center;
}
.yoast-post-settings-modal .yoast-button-container button {
flex-shrink: 0;
max-height: 45px;
align-self: center;
}
/* Responsive CSS for the mobile PostSettingsModal */ /* Responsive CSS for the mobile PostSettingsModal */
@media only screen and (max-width: 600px){ @media only screen and (max-width: 600px){
/* Make the modal fullscreen. */ /* Make the modal fullscreen. */
...@@ -552,6 +448,7 @@ ...@@ -552,6 +448,7 @@
} }
} }
/* Specific styling for the SEMrushRelatedKeyphrasesModal */
.yoast-related-keyphrases-modal { .yoast-related-keyphrases-modal {
max-width: 712px; max-width: 712px;
} }
...@@ -566,10 +463,10 @@ ...@@ -566,10 +463,10 @@
position: relative; position: relative;
} }
#yoast-semrush-country-selector { #yoast-semrush-country-selector {
position: relative; position: relative;
border: none; border: none;
} }
.yoast-related-keyphrases-modal__chart { .yoast-related-keyphrases-modal__chart {
display: block; display: block;
......
...@@ -94,6 +94,7 @@ class WPSEO_Addon_Manager { ...@@ -94,6 +94,7 @@ class WPSEO_Addon_Manager {
* @return void * @return void
*/ */
public function register_hooks() { public function register_hooks() {
add_action( 'admin_init', [ $this, 'validate_addons' ], 15 );
add_filter( 'pre_set_site_transient_update_plugins', [ $this, 'check_for_updates' ] ); add_filter( 'pre_set_site_transient_update_plugins', [ $this, 'check_for_updates' ] );
add_filter( 'plugins_api', [ $this, 'get_plugin_information' ], 10, 3 ); add_filter( 'plugins_api', [ $this, 'get_plugin_information' ], 10, 3 );
} }
...@@ -237,6 +238,86 @@ class WPSEO_Addon_Manager { ...@@ -237,6 +238,86 @@ class WPSEO_Addon_Manager {
return ! empty( $installed_addons ); return ! empty( $installed_addons );
} }
/**
* Checks if the plugin is installed and activated in WordPress.
*
* @param string $slug The class' slug.
*
* @return bool True when installed and activated.
*/
public function is_installed( $slug ) {
$slug_to_class_map = [
static::PREMIUM_SLUG => 'WPSEO_Premium',
static::NEWS_SLUG => 'WPSEO_News',
static::WOOCOMMERCE_SLUG => 'Yoast_WooCommerce_SEO',
static::VIDEO_SLUG => 'WPSEO_Video_Sitemap',
static::LOCAL_SLUG => 'WPSEO_Local_Core',
];
if ( ! isset( $slug_to_class_map[ $slug ] ) ) {
return false;
}
return class_exists( $slug_to_class_map[ $slug ] );
}
/**
* Validates the addons and show a notice for the ones that are invalid.
*/
public function validate_addons() {
$notification_center = Yoast_Notification_Center::get();
if ( $notification_center === null ) {
return;
}
$addons = [
'Yoast SEO Premium' => static::PREMIUM_SLUG,
'News SEO' => static::NEWS_SLUG,
'Yoast WooCommerce SEO' => static::WOOCOMMERCE_SLUG,
'Video SEO' => static::VIDEO_SLUG,
'Local SEO' => static::LOCAL_SLUG,
];
foreach ( $addons as $product_name => $slug ) {
$notification = $this->create_notification( $product_name );
// Add a notification when the installed plugin isn't activated in My Yoast.
if ( $this->is_installed( $slug ) && ! $this->has_valid_subscription( $slug ) ) {
$notification_center->add_notification( $notification );
continue;
}
$notification_center->remove_notification( $notification );
}
}
/**
* Creates an instance of Yoast_Notification.
*
* @param string $product_name The product to create the notification for.
*
* @return Yoast_Notification The created notification.
*/
protected function create_notification( $product_name ) {
$notification_options = [
'type' => Yoast_Notification::ERROR,
'id' => 'wpseo-dismiss-' . sanitize_title_with_dashes( $product_name, null, 'save' ),
'capabilities' => 'wpseo_manage_options',
];
return new Yoast_Notification(
sprintf(
/* translators: %1$s expands to the product name. %2$s expands to a link to My Yoast */
__( 'You are not receiving updates or support! Fix this problem by adding this site and enabling %1$s for it in %2$s.', 'wordpress-seo' ),
$product_name,
'<a href="' . WPSEO_Shortlinker::get( 'https://yoa.st/13j' ) . '" target="_blank">My Yoast</a>'
),
$notification_options
);
}
/** /**
* Checks whether a plugin expiry date has been passed. * Checks whether a plugin expiry date has been passed.
* *
...@@ -583,8 +664,10 @@ class WPSEO_Addon_Manager { ...@@ -583,8 +664,10 @@ class WPSEO_Addon_Manager {
protected function get_support_section() { protected function get_support_section() {
return '<h4>' . __( 'Need support?', 'wordpress-seo' ) . '</h4>' return '<h4>' . __( 'Need support?', 'wordpress-seo' ) . '</h4>'
. '<p>' . '<p>'
/* translators: 1: expands to <a> that refers to the help page, 2: </a> closing tag. */
. sprintf( __( 'You can probably find an answer to your question in our %1$shelp center%2$s.', 'wordpress-seo' ), '<a href="https://yoast.com/help/">', '</a>' ) . sprintf( __( 'You can probably find an answer to your question in our %1$shelp center%2$s.', 'wordpress-seo' ), '<a href="https://yoast.com/help/">', '</a>' )
. ' ' . ' '
/* translators: %s expands to a mailto support link. */
. sprintf( __( 'If you still need support and have an active subscription for this product, please email %s.', 'wordpress-seo' ), '<a href="mailto:support@yoast.com">support@yoast.com</a>' ) . sprintf( __( 'If you still need support and have an active subscription for this product, please email %s.', 'wordpress-seo' ), '<a href="mailto:support@yoast.com">support@yoast.com</a>' )
. '</p>'; . '</p>';
} }
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
*/ */
use Yoast\WP\Lib\Model; use Yoast\WP\Lib\Model;
use Yoast\WP\SEO\Integrations\Admin\Indexing_Tool_Integration;
/** /**
* This code handles the option upgrades. * This code handles the option upgrades.
...@@ -14,6 +13,8 @@ use Yoast\WP\SEO\Integrations\Admin\Indexing_Tool_Integration; ...@@ -14,6 +13,8 @@ use Yoast\WP\SEO\Integrations\Admin\Indexing_Tool_Integration;
class WPSEO_Upgrade { class WPSEO_Upgrade {
/** /**
* The taxonomy helper.
*
* @var \Yoast\WP\SEO\Helpers\Taxonomy_Helper * @var \Yoast\WP\SEO\Helpers\Taxonomy_Helper
*/ */
private $taxonomy_helper; private $taxonomy_helper;
...@@ -66,6 +67,7 @@ class WPSEO_Upgrade { ...@@ -66,6 +67,7 @@ class WPSEO_Upgrade {
'14.5-RC0' => 'upgrade_145', '14.5-RC0' => 'upgrade_145',
'14.9-RC0' => 'upgrade_149', '14.9-RC0' => 'upgrade_149',
'15.1-RC0' => 'upgrade_151', '15.1-RC0' => 'upgrade_151',
'15.3-RC0' => 'upgrade_153',
]; ];
array_walk( $routines, [ $this, 'run_upgrade_routine' ], $version ); array_walk( $routines, [ $this, 'run_upgrade_routine' ], $version );
...@@ -548,7 +550,7 @@ class WPSEO_Upgrade { ...@@ -548,7 +550,7 @@ class WPSEO_Upgrade {
* @return void * @return void
*/ */
private function upgrade_772() { private function upgrade_772() {
if ( WPSEO_Utils::is_woocommerce_active() ) { if ( YoastSEO()->helpers->woocommerce->is_active() ) {
$this->migrate_woocommerce_archive_setting_to_shop_page(); $this->migrate_woocommerce_archive_setting_to_shop_page();
} }
} }
...@@ -733,7 +735,7 @@ class WPSEO_Upgrade { ...@@ -733,7 +735,7 @@ class WPSEO_Upgrade {
* Performs the 14.9 upgrade. * Performs the 14.9 upgrade.
*/ */
private function upgrade_149() { private function upgrade_149() {
$version = get_option( 'wpseo_license_server_version', WPSEO_License_Page_Manager::VERSION_BACKWARDS_COMPATIBILITY ); $version = get_option( 'wpseo_license_server_version', 2 );
WPSEO_Options::set( 'license_server_version', $version ); WPSEO_Options::set( 'license_server_version', $version );
delete_option( 'wpseo_license_server_version' ); delete_option( 'wpseo_license_server_version' );
} }
...@@ -751,6 +753,23 @@ class WPSEO_Upgrade { ...@@ -751,6 +753,23 @@ class WPSEO_Upgrade {
add_action( 'init', [ $this, 'store_custom_taxonomy_slugs_for_151' ] ); add_action( 'init', [ $this, 'store_custom_taxonomy_slugs_for_151' ] );
} }
/**
* Performs the 15.3 upgrade.
*
* @return void
*/
private function upgrade_153() {
WPSEO_Options::set( 'category_base_url', get_option( 'category_base' ) );
WPSEO_Options::set( 'tag_base_url', get_option( 'tag_base' ) );
// Rename a couple of options.
$indexation_started_value = WPSEO_Options::get( 'indexation_started' );
WPSEO_Options::set( 'indexing_started', $indexation_started_value );
$indexables_indexing_completed_value = WPSEO_Options::get( 'indexables_indexation_completed' );
WPSEO_Options::set( 'indexables_indexing_completed', $indexables_indexing_completed_value);
}
/** /**
* Sets the home_url option for the 15.1 upgrade routine. * Sets the home_url option for the 15.1 upgrade routine.
* *
...@@ -781,14 +800,7 @@ class WPSEO_Upgrade { ...@@ -781,14 +800,7 @@ class WPSEO_Upgrade {
* else to `false`. * else to `false`.
*/ */
public function set_indexation_completed_option_for_145() { public function set_indexation_completed_option_for_145() {
/** WPSEO_Options::set( 'indexables_indexation_completed', YoastSEO()->helpers->indexing->get_unindexed_count() === 0 );
* Holds the indexation integration instance.
*
* @var Indexing_Tool_Integration $indexing_integration
*/
$indexing_integration = YoastSEO()->classes->get( Indexing_Tool_Integration::class );
WPSEO_Options::set( 'indexables_indexation_completed', $indexing_integration->get_unindexed_indexables_count() === 0 );
} }
/** /**
...@@ -797,7 +809,7 @@ class WPSEO_Upgrade { ...@@ -797,7 +809,7 @@ class WPSEO_Upgrade {
public function clean_up_private_taxonomies_for_141() { public function clean_up_private_taxonomies_for_141() {
global $wpdb; global $wpdb;
// If migrations haven't been completed succesfully the following may give false errors. So suppress them. // If migrations haven't been completed successfully the following may give false errors. So suppress them.
$show_errors = $wpdb->show_errors; $show_errors = $wpdb->show_errors;
$wpdb->show_errors = false; $wpdb->show_errors = false;
...@@ -809,15 +821,18 @@ class WPSEO_Upgrade { ...@@ -809,15 +821,18 @@ class WPSEO_Upgrade {
} }
$indexable_table = Model::get_table_name( 'Indexable' ); $indexable_table = Model::get_table_name( 'Indexable' );
$query = $wpdb->prepare(
"DELETE FROM $indexable_table // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Reason: Is it prepared already.
$query = $wpdb->prepare(
// phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- Reason: Too hard to fix.
"DELETE FROM $indexable_table
WHERE object_type = 'term' WHERE object_type = 'term'
AND object_sub_type IN (" AND object_sub_type IN ("
. \implode( ', ', \array_fill( 0, \count( $private_taxonomies ), '%s' ) ) . \implode( ', ', \array_fill( 0, \count( $private_taxonomies ), '%s' ) )
. ')', . ')',
$private_taxonomies $private_taxonomies
); );
$wpdb->query( $query ); $wpdb->query( $query ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Reason: Is it prepared already.
$wpdb->show_errors = $show_errors; $wpdb->show_errors = $show_errors;
} }
...@@ -835,7 +850,7 @@ class WPSEO_Upgrade { ...@@ -835,7 +850,7 @@ class WPSEO_Upgrade {
// Reset the permalinks of the attachments in the indexable table. // Reset the permalinks of the attachments in the indexable table.
$indexable_table = Model::get_table_name( 'Indexable' ); $indexable_table = Model::get_table_name( 'Indexable' );
$query = "UPDATE $indexable_table SET permalink = NULL WHERE object_type = 'post' AND object_sub_type = 'attachment'"; $query = "UPDATE $indexable_table SET permalink = NULL WHERE object_type = 'post' AND object_sub_type = 'attachment'";
$wpdb->query( $query ); $wpdb->query( $query ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Reason: There is no user input.
$wpdb->show_errors = $show_errors; $wpdb->show_errors = $show_errors;
} }
...@@ -913,7 +928,7 @@ class WPSEO_Upgrade { ...@@ -913,7 +928,7 @@ class WPSEO_Upgrade {
// Load option directly from the database, to avoid filtering and sanitization. // Load option directly from the database, to avoid filtering and sanitization.
$sql = $wpdb->prepare( 'SELECT option_value FROM ' . $wpdb->options . ' WHERE option_name = %s', $option_name ); $sql = $wpdb->prepare( 'SELECT option_value FROM ' . $wpdb->options . ' WHERE option_name = %s', $option_name );
$results = $wpdb->get_results( $sql, ARRAY_A ); $results = $wpdb->get_results( $sql, ARRAY_A ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Reason: Is is already prepared.
if ( ! empty( $results ) ) { if ( ! empty( $results ) ) {
return maybe_unserialize( $results[0]['option_value'] ); return maybe_unserialize( $results[0]['option_value'] );
} }
......
...@@ -214,6 +214,10 @@ class WPSEO_Meta { ...@@ -214,6 +214,10 @@ class WPSEO_Meta {
'type' => null, 'type' => null,
'default_value' => '0', 'default_value' => '0',
], ],
'zapier_trigger_sent' => [
'type' => null,
'default_value' => '0',
],
], ],
]; ];
......
...@@ -481,17 +481,6 @@ class WPSEO_Utils { ...@@ -481,17 +481,6 @@ class WPSEO_Utils {
} }
} }
/**
* Flush W3TC cache after succesfull update/add of taxonomy meta option.
*
* @since 1.8.0
*/
public static function flush_w3tc_cache() {
if ( defined( 'W3TC_DIR' ) && function_exists( 'w3tc_objectcache_flush' ) ) {
w3tc_objectcache_flush();
}
}
/** /**
* Clear rewrite rules. * Clear rewrite rules.
* *
...@@ -965,15 +954,6 @@ SVG; ...@@ -965,15 +954,6 @@ SVG;
return false; return false;
} }
/**
* Determines whether or not WooCommerce is active.
*
* @return bool Whether or not WooCommerce is active.
*/
public static function is_woocommerce_active() {
return class_exists( 'Woocommerce' );
}
/** /**
* Determines whether the plugin is active for the entire network. * Determines whether the plugin is active for the entire network.
* *
...@@ -1441,4 +1421,30 @@ SVG; ...@@ -1441,4 +1421,30 @@ SVG;
*/ */
return apply_filters( 'wpseo_replacements_filter_sep', $replacement ); return apply_filters( 'wpseo_replacements_filter_sep', $replacement );
} }
/**
* Flush W3TC cache after successful update/add of taxonomy meta option.
*
* @deprecated 15.3
* @codeCoverageIgnore
*
* @since 1.8.0
*/
public static function flush_w3tc_cache() {
_deprecated_function( __METHOD__, 'WPSEO 15.3' );
}
/**
* Determines whether or not WooCommerce is active.
*
* @deprecated 15.3
* @codeCoverageIgnore
*
* @return bool Whether or not WooCommerce is active.
*/
public static function is_woocommerce_active() {
_deprecated_function( __METHOD__, 'WPSEO 15.3' );
return YoastSEO()->helpers->woocommerce->is_active();
}
} }
...@@ -31,9 +31,9 @@ class WPSEO_Option_Wpseo extends WPSEO_Option { ...@@ -31,9 +31,9 @@ class WPSEO_Option_Wpseo extends WPSEO_Option {
'ms_defaults_set' => false, 'ms_defaults_set' => false,
'ignore_search_engines_discouraged_notice' => false, 'ignore_search_engines_discouraged_notice' => false,
'indexing_first_time' => true, 'indexing_first_time' => true,
'indexation_started' => null, 'indexing_started' => null,
'indexing_reason' => '', 'indexing_reason' => '',
'indexables_indexation_completed' => false, 'indexables_indexing_completed' => false,
// Non-form field, should only be set via validation routine. // Non-form field, should only be set via validation routine.
'version' => '', // Leave default as empty to ensure activation/upgrade works. 'version' => '', // Leave default as empty to ensure activation/upgrade works.
'previous_version' => '', 'previous_version' => '',
...@@ -69,9 +69,13 @@ class WPSEO_Option_Wpseo extends WPSEO_Option { ...@@ -69,9 +69,13 @@ class WPSEO_Option_Wpseo extends WPSEO_Option {
'permalink_structure' => '', 'permalink_structure' => '',
'home_url' => '', 'home_url' => '',
'dynamic_permalinks' => false, 'dynamic_permalinks' => false,
'category_base_url' => '',
'tag_base_url' => '',
'custom_taxonomy_slugs' => [], 'custom_taxonomy_slugs' => [],
'enable_enhanced_slack_sharing' => true, 'enable_enhanced_slack_sharing' => true,
'zapier_integration_active' => true, 'zapier_integration_active' => false,
'zapier_subscription' => [],
'zapier_api_key' => '',
]; ];
/** /**
...@@ -256,6 +260,7 @@ class WPSEO_Option_Wpseo extends WPSEO_Option { ...@@ -256,6 +260,7 @@ class WPSEO_Option_Wpseo extends WPSEO_Option {
case 'semrush_country_code': case 'semrush_country_code':
case 'license_server_version': case 'license_server_version':
case 'home_url': case 'home_url':
case 'zapier_api_key':
if ( isset( $dirty[ $key ] ) ) { if ( isset( $dirty[ $key ] ) ) {
$clean[ $key ] = $dirty[ $key ]; $clean[ $key ] = $dirty[ $key ];
} }
...@@ -311,7 +316,7 @@ class WPSEO_Option_Wpseo extends WPSEO_Option { ...@@ -311,7 +316,7 @@ class WPSEO_Option_Wpseo extends WPSEO_Option {
break; break;
case 'first_activated_on': case 'first_activated_on':
case 'indexation_started': case 'indexing_started':
$clean[ $key ] = false; $clean[ $key ] = false;
if ( isset( $dirty[ $key ] ) ) { if ( isset( $dirty[ $key ] ) ) {
if ( $dirty[ $key ] === false || WPSEO_Utils::validate_int( $dirty[ $key ] ) ) { if ( $dirty[ $key ] === false || WPSEO_Utils::validate_int( $dirty[ $key ] ) ) {
...@@ -327,6 +332,7 @@ class WPSEO_Option_Wpseo extends WPSEO_Option { ...@@ -327,6 +332,7 @@ class WPSEO_Option_Wpseo extends WPSEO_Option {
case 'myyoast_oauth': case 'myyoast_oauth':
case 'semrush_tokens': case 'semrush_tokens':
case 'custom_taxonomy_slugs': case 'custom_taxonomy_slugs':
case 'zapier_subscription':
$clean[ $key ] = $old[ $key ]; $clean[ $key ] = $old[ $key ];
if ( isset( $dirty[ $key ] ) ) { if ( isset( $dirty[ $key ] ) ) {
...@@ -343,8 +349,10 @@ class WPSEO_Option_Wpseo extends WPSEO_Option { ...@@ -343,8 +349,10 @@ class WPSEO_Option_Wpseo extends WPSEO_Option {
break; break;
case 'permalink_structure': case 'permalink_structure':
case 'category_base_url':
case 'tag_base_url':
if ( isset( $dirty[ $key ] ) ) { if ( isset( $dirty[ $key ] ) ) {
$clean[ $key ] = sanitize_option( 'permalink_structure', $dirty[ $key ] ); $clean[ $key ] = sanitize_option( $key, $dirty[ $key ] );
} }
break; break;
......
...@@ -100,10 +100,6 @@ class WPSEO_Taxonomy_Meta extends WPSEO_Option { ...@@ -100,10 +100,6 @@ class WPSEO_Taxonomy_Meta extends WPSEO_Option {
parent::__construct(); parent::__construct();
self::$name = $this->option_name; self::$name = $this->option_name;
/* On succesfull update/add of the option, flush the W3TC cache. */
add_action( 'add_option_' . $this->option_name, [ 'WPSEO_Utils', 'flush_w3tc_cache' ] );
add_action( 'update_option_' . $this->option_name, [ 'WPSEO_Utils', 'flush_w3tc_cache' ] );
} }
/** /**
......
...@@ -197,7 +197,7 @@ function wpseo_shortcode_yoast_breadcrumb() { ...@@ -197,7 +197,7 @@ function wpseo_shortcode_yoast_breadcrumb() {
return ''; return '';
} }
if ( ! extension_loaded( 'ctype' ) || ! function_exists( 'ctype_digit' ) ) { if ( ! function_exists( 'ctype_digit' ) ) {
/** /**
* Emulate PHP native ctype_digit() function for when the ctype extension would be disabled *sigh*. * Emulate PHP native ctype_digit() function for when the ctype extension would be disabled *sigh*.
* Only emulates the behaviour for when the input is a string, does not handle integer input as ascii value. * Only emulates the behaviour for when the input is a string, does not handle integer input as ascii value.
......
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[1],{339:function(o,t,a){"use strict";!function(o){function t(o,t,a){jQuery.post(ajaxurl,{action:"wpseo_set_ignore",option:o,_wpnonce:a},function(a){a&&(jQuery("#"+t).hide(),jQuery("#hidden_ignore_"+o).val("ignore"))})}function a(){o("#wp-admin-bar-root-default > li").off("mouseenter.yoastalertpopup mouseleave.yoastalertpopup"),o(".yoast-issue-added").fadeOut(200)}function s(t,a){if(o(".yoast-notification-holder").off("click",".restore").off("click",".dismiss"),void 0!==a.html){a.html&&(t.closest(".yoast-container").html(a.html),n());var s=o("#wp-admin-bar-wpseo-menu"),e=s.find(".yoast-issue-counter");e.length||(s.find("> a:first-child").append('<div class="yoast-issue-counter"/>'),e=s.find(".yoast-issue-counter")),e.html(a.total),0===a.total?e.hide():e.show(),o("#toplevel_page_wpseo_dashboard .update-plugins").removeClass().addClass("update-plugins count-"+a.total),o("#toplevel_page_wpseo_dashboard .plugin-count").html(a.total)}}function n(){var t=o(".yoast-notification-holder");t.on("click",".dismiss",function(){var t=o(this),a=t.closest(".yoast-notification-holder");t.closest(".yoast-container").append('<div class="yoast-container-disabled"/>'),o.post(ajaxurl,{action:"yoast_dismiss_notification",notification:a.attr("id"),nonce:a.data("nonce"),data:t.data("json")||a.data("json")},s.bind(this,a),"json")}),t.on("click",".restore",function(){var t=o(this),a=t.closest(".yoast-notification-holder");t.closest(".yoast-container").append('<div class="yoast-container-disabled"/>'),o.post(ajaxurl,{action:"yoast_restore_notification",notification:a.attr("id"),nonce:a.data("nonce"),data:a.data("json")},s.bind(this,a),"json")})}function e(o){o.is(":hidden")||(o.outerWidth()>o.parent().outerWidth()?(o.data("scrollHint").addClass("yoast-has-scroll"),o.data("scrollContainer").addClass("yoast-has-scroll")):(o.data("scrollHint").removeClass("yoast-has-scroll"),o.data("scrollContainer").removeClass("yoast-has-scroll")))}function i(){window.wpseoScrollableTables=o(".yoast-table-scrollable"),window.wpseoScrollableTables.length&&window.wpseoScrollableTables.each(function(){var t=o(this);if(!t.data("scrollContainer")){var a=o("<div />",{class:"yoast-table-scrollable__hintwrapper",html:"<span class='yoast-table-scrollable__hint' aria-hidden='true' />"}).insertBefore(t),s=o("<div />",{class:"yoast-table-scrollable__container",html:"<div class='yoast-table-scrollable__inner' />"}).insertBefore(t);a.find(".yoast-table-scrollable__hint").text(wpseoAdminGlobalL10n.scrollable_table_hint),t.data("scrollContainer",s),t.data("scrollHint",a),t.appendTo(s.find(".yoast-table-scrollable__inner")),e(t)}})}jQuery(document).ready(function(){jQuery(".yoast-dismissible").on("click",".yoast-notice-dismiss",function(){var o=jQuery(this).parent();return jQuery.post(ajaxurl,{action:o.attr("id").replace(/-/g,"_"),_wpnonce:o.data("nonce"),data:o.data("json")}),jQuery.post(ajaxurl,{action:"yoast_dismiss_notification",notification:o.attr("id"),nonce:o.data("nonce"),data:o.data("json")}),o.fadeTo(100,0,function(){o.slideUp(100,function(){o.remove()})}),!1}),jQuery(".yoast-help-button").on("click",function(){var o=jQuery(this),t=jQuery("#"+o.attr("aria-controls")),a=t.is(":visible");jQuery(t).slideToggle(200,function(){o.attr("aria-expanded",!a)})}),jQuery("#robotsmessage button").on("click",function(){t("search_engines_discouraged_notice","robotsmessage",jQuery(this).data("nonce"))})}),window.wpseoSetIgnore=t,window.wpseoDismissLink=function(o){return jQuery('<a href="'+o+'" type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></a>')},o(window).on("wp-window-resized orientationchange",function(){window.wpseoScrollableTables&&window.wpseoScrollableTables.length&&function(t){t.each(function(){e(o(this))})}(window.wpseoScrollableTables)}),o(window).on({"Yoast:YoastTabsMounted":function(){setTimeout(function(){i()},100)},"Yoast:YoastTabsSelected":function(){setTimeout(function(){i()},100)}}),o(document).ready(function(){o(".yoast-issue-added").on("mouseenter mouseleave",function(o){o.stopPropagation(),a()}).fadeIn(),o("#wp-admin-bar-root-default > li").on("mouseenter.yoastalertpopup mouseleave.yoastalertpopup",a),setTimeout(a,3e3),n(),function(){var o=jQuery(".wpseo-js-premium-indicator"),t=o.find("svg");if(o.hasClass("wpseo-premium-indicator--no")){var a=t.find("path"),s=o.css("backgroundColor");a.css("fill",s)}t.css("display","block"),o.css({backgroundColor:"transparent",width:"20px",height:"20px"})}(),i()})}(jQuery)}},[[339,0]]]); (window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[1],{341:function(o,t,a){"use strict";!function(o){function t(o,t,a){jQuery.post(ajaxurl,{action:"wpseo_set_ignore",option:o,_wpnonce:a},function(a){a&&(jQuery("#"+t).hide(),jQuery("#hidden_ignore_"+o).val("ignore"))})}function a(){o("#wp-admin-bar-root-default > li").off("mouseenter.yoastalertpopup mouseleave.yoastalertpopup"),o(".yoast-issue-added").fadeOut(200)}function s(t,a){if(o(".yoast-notification-holder").off("click",".restore").off("click",".dismiss"),void 0!==a.html){a.html&&(t.closest(".yoast-container").html(a.html),n());var s=o("#wp-admin-bar-wpseo-menu"),e=s.find(".yoast-issue-counter");e.length||(s.find("> a:first-child").append('<div class="yoast-issue-counter"/>'),e=s.find(".yoast-issue-counter")),e.html(a.total),0===a.total?e.hide():e.show(),o("#toplevel_page_wpseo_dashboard .update-plugins").removeClass().addClass("update-plugins count-"+a.total),o("#toplevel_page_wpseo_dashboard .plugin-count").html(a.total)}}function n(){var t=o(".yoast-notification-holder");t.on("click",".dismiss",function(){var t=o(this),a=t.closest(".yoast-notification-holder");t.closest(".yoast-container").append('<div class="yoast-container-disabled"/>'),o.post(ajaxurl,{action:"yoast_dismiss_notification",notification:a.attr("id"),nonce:a.data("nonce"),data:t.data("json")||a.data("json")},s.bind(this,a),"json")}),t.on("click",".restore",function(){var t=o(this),a=t.closest(".yoast-notification-holder");t.closest(".yoast-container").append('<div class="yoast-container-disabled"/>'),o.post(ajaxurl,{action:"yoast_restore_notification",notification:a.attr("id"),nonce:a.data("nonce"),data:a.data("json")},s.bind(this,a),"json")})}function e(o){o.is(":hidden")||(o.outerWidth()>o.parent().outerWidth()?(o.data("scrollHint").addClass("yoast-has-scroll"),o.data("scrollContainer").addClass("yoast-has-scroll")):(o.data("scrollHint").removeClass("yoast-has-scroll"),o.data("scrollContainer").removeClass("yoast-has-scroll")))}function i(){window.wpseoScrollableTables=o(".yoast-table-scrollable"),window.wpseoScrollableTables.length&&window.wpseoScrollableTables.each(function(){var t=o(this);if(!t.data("scrollContainer")){var a=o("<div />",{class:"yoast-table-scrollable__hintwrapper",html:"<span class='yoast-table-scrollable__hint' aria-hidden='true' />"}).insertBefore(t),s=o("<div />",{class:"yoast-table-scrollable__container",html:"<div class='yoast-table-scrollable__inner' />"}).insertBefore(t);a.find(".yoast-table-scrollable__hint").text(wpseoAdminGlobalL10n.scrollable_table_hint),t.data("scrollContainer",s),t.data("scrollHint",a),t.appendTo(s.find(".yoast-table-scrollable__inner")),e(t)}})}jQuery(document).ready(function(){jQuery(".yoast-dismissible").on("click",".yoast-notice-dismiss",function(){var o=jQuery(this).parent();return jQuery.post(ajaxurl,{action:o.attr("id").replace(/-/g,"_"),_wpnonce:o.data("nonce"),data:o.data("json")}),jQuery.post(ajaxurl,{action:"yoast_dismiss_notification",notification:o.attr("id"),nonce:o.data("nonce"),data:o.data("json")}),o.fadeTo(100,0,function(){o.slideUp(100,function(){o.remove()})}),!1}),jQuery(".yoast-help-button").on("click",function(){var o=jQuery(this),t=jQuery("#"+o.attr("aria-controls")),a=t.is(":visible");jQuery(t).slideToggle(200,function(){o.attr("aria-expanded",!a)})}),jQuery("#robotsmessage button").on("click",function(){t("search_engines_discouraged_notice","robotsmessage",jQuery(this).data("nonce"))})}),window.wpseoSetIgnore=t,window.wpseoDismissLink=function(o){return jQuery('<a href="'+o+'" type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></a>')},o(window).on("wp-window-resized orientationchange",function(){window.wpseoScrollableTables&&window.wpseoScrollableTables.length&&function(t){t.each(function(){e(o(this))})}(window.wpseoScrollableTables)}),o(window).on({"Yoast:YoastTabsMounted":function(){setTimeout(function(){i()},100)},"Yoast:YoastTabsSelected":function(){setTimeout(function(){i()},100)}}),o(document).ready(function(){o(".yoast-issue-added").on("mouseenter mouseleave",function(o){o.stopPropagation(),a()}).fadeIn(),o("#wp-admin-bar-root-default > li").on("mouseenter.yoastalertpopup mouseleave.yoastalertpopup",a),setTimeout(a,3e3),n(),function(){var o=jQuery(".wpseo-js-premium-indicator"),t=o.find("svg");if(o.hasClass("wpseo-premium-indicator--no")){var a=t.find("path"),s=o.css("backgroundColor");a.css("fill",s)}t.css("display","block"),o.css({backgroundColor:"transparent",width:"20px",height:"20px"})}(),i()})}(jQuery)}},[[341,0]]]);
\ No newline at end of file \ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[2],{340:function(t,e,n){"use strict";!function(t,e){window.wpseoApi={get:function(t,e,n,o){this.request("GET",t,e,n,o)},post:function(t,e,n,o){this.request("POST",t,e,n,o)},put:function(t,e,n,o){this.request("PUT",t,e,n,o)},patch:function(t,e,n,o){this.request("PATCH",t,e,n,o)},delete:function(t,e,n,o){this.request("DELETE",t,e,n,o)},request:function(n,o,i,s,u){t.isFunction(i)&&void 0===u&&(u=s,s=i,i={}),"POST"!==n&&"GET"!==n&&(i._method=n,n="POST"),t.ajax({url:e.root+"yoast/v1/"+o,method:n,beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",e.nonce)},data:i}).done(s).fail(u)}}}(jQuery,wpApiSettings)}},[[340,0]]]); (window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[2],{342:function(t,e,n){"use strict";!function(t,e){window.wpseoApi={get:function(t,e,n,o){this.request("GET",t,e,n,o)},post:function(t,e,n,o){this.request("POST",t,e,n,o)},put:function(t,e,n,o){this.request("PUT",t,e,n,o)},patch:function(t,e,n,o){this.request("PATCH",t,e,n,o)},delete:function(t,e,n,o){this.request("DELETE",t,e,n,o)},request:function(n,o,i,s,u){t.isFunction(i)&&void 0===u&&(u=s,s=i,i={}),"POST"!==n&&"GET"!==n&&(i._method=n,n="POST"),t.ajax({url:e.root+"yoast/v1/"+o,method:n,beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",e.nonce)},data:i}).done(s).fail(u)}}}(jQuery,wpApiSettings)}},[[342,0]]]);
\ No newline at end of file \ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[4],{368:function(e,s,n){"use strict";!function(){var e=function(e){var s=e.find("[class^=wpseo-new]").first().attr("class"),n="#"+s+"-",t=n.replace("new","existing"),i=e.find("th[id^=col_existing_yoast]").first().text().replace("Existing ",""),a=s.replace("-new-","_save_"),o="wpseo_save_all_"+e.attr("class").split("wpseo_bulk_")[1],u=a.replace("wpseo_save_",""),r={newClass:"."+s,newId:n,existingId:t},l={submit_new:function(e){l.submitNew(e)},submitNew:function(e){var s,n=r.newId+e,t=r.existingId+e;s="select-one"===jQuery(r.newId+e).prop("type")?jQuery(n).find(":selected").text():jQuery(n).val();var o=jQuery(t).html();if(s===o)jQuery(n).val("");else{if(""===s&&!window.confirm("Are you sure you want to remove the existing "+i+"?"))return void jQuery(n).val("");var u={action:a,_ajax_nonce:wpseoBulkEditorNonce,wpseo_post_id:e,new_value:s,existing_value:o};jQuery.post(ajaxurl,u,l.handleResponse)}},submit_all:function(e){l.submitAll(e)},submitAll:function(e){e.preventDefault();var s={action:o,_ajax_nonce:wpseoBulkEditorNonce,send:!1,items:{},existingItems:{}};jQuery(r.newClass).each(function(){var e=jQuery(this).data("id"),n=jQuery(this).val(),t=jQuery(r.existingId+e).html();""!==n&&(n===t?jQuery(r.newId+e).val(""):(s.send=!0,s.items[e]=n,s.existingItems[e]=t))}),s.send&&jQuery.post(ajaxurl,s,l.handleResponses)},handle_response:function(e,s){l.handleResponse(e,s)},handleResponse:function(e,s){if("success"===s){var n=e;if("string"==typeof n&&(n=JSON.parse(n)),n instanceof Array)jQuery.each(n,function(){l.handleResponse(this,s)});else if("success"===n.status){var t=n["new_"+u];jQuery(r.existingId+n.post_id).html(t.replace(/\\(?!\\)/g,"")),jQuery(r.newId+n.post_id).val("")}}},handle_responses:function(e,s){l.handleResponses(e,s)},handleResponses:function(e,s){var n=jQuery.parseJSON(e);jQuery.each(n,function(){l.handleResponse(this,s)})},set_events:function(){l.setEvents()},setEvents:function(){e.find(".wpseo-save").click(function(e){var s=jQuery(this).data("id");e.preventDefault(),l.submitNew(s,this)}),e.find(".wpseo-save-all").click(l.submitAll),e.find(r.newClass).keydown(function(e){if(13===e.which){e.preventDefault();var s=jQuery(this).data("id");l.submitNew(s,this)}})}};return l};window.bulk_editor=e,window.bulkEditor=e,jQuery(document).ready(function(){jQuery('table[class*="wpseo_bulk"]').each(function(s,n){var t=jQuery(n);e(t).setEvents()})})}()}},[[368,0]]]); (window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[4],{370:function(e,s,n){"use strict";!function(){var e=function(e){var s=e.find("[class^=wpseo-new]").first().attr("class"),n="#"+s+"-",t=n.replace("new","existing"),i=e.find("th[id^=col_existing_yoast]").first().text().replace("Existing ",""),a=s.replace("-new-","_save_"),o="wpseo_save_all_"+e.attr("class").split("wpseo_bulk_")[1],u=a.replace("wpseo_save_",""),r={newClass:"."+s,newId:n,existingId:t},l={submit_new:function(e){l.submitNew(e)},submitNew:function(e){var s,n=r.newId+e,t=r.existingId+e;s="select-one"===jQuery(r.newId+e).prop("type")?jQuery(n).find(":selected").text():jQuery(n).val();var o=jQuery(t).html();if(s===o)jQuery(n).val("");else{if(""===s&&!window.confirm("Are you sure you want to remove the existing "+i+"?"))return void jQuery(n).val("");var u={action:a,_ajax_nonce:wpseoBulkEditorNonce,wpseo_post_id:e,new_value:s,existing_value:o};jQuery.post(ajaxurl,u,l.handleResponse)}},submit_all:function(e){l.submitAll(e)},submitAll:function(e){e.preventDefault();var s={action:o,_ajax_nonce:wpseoBulkEditorNonce,send:!1,items:{},existingItems:{}};jQuery(r.newClass).each(function(){var e=jQuery(this).data("id"),n=jQuery(this).val(),t=jQuery(r.existingId+e).html();""!==n&&(n===t?jQuery(r.newId+e).val(""):(s.send=!0,s.items[e]=n,s.existingItems[e]=t))}),s.send&&jQuery.post(ajaxurl,s,l.handleResponses)},handle_response:function(e,s){l.handleResponse(e,s)},handleResponse:function(e,s){if("success"===s){var n=e;if("string"==typeof n&&(n=JSON.parse(n)),n instanceof Array)jQuery.each(n,function(){l.handleResponse(this,s)});else if("success"===n.status){var t=n["new_"+u];jQuery(r.existingId+n.post_id).html(t.replace(/\\(?!\\)/g,"")),jQuery(r.newId+n.post_id).val("")}}},handle_responses:function(e,s){l.handleResponses(e,s)},handleResponses:function(e,s){var n=jQuery.parseJSON(e);jQuery.each(n,function(){l.handleResponse(this,s)})},set_events:function(){l.setEvents()},setEvents:function(){e.find(".wpseo-save").click(function(e){var s=jQuery(this).data("id");e.preventDefault(),l.submitNew(s,this)}),e.find(".wpseo-save-all").click(l.submitAll),e.find(r.newClass).keydown(function(e){if(13===e.which){e.preventDefault();var s=jQuery(this).data("id");l.submitNew(s,this)}})}};return l};window.bulk_editor=e,window.bulkEditor=e,jQuery(document).ready(function(){jQuery('table[class*="wpseo_bulk"]').each(function(s,n){var t=jQuery(n);e(t).setEvents()})})}()}},[[370,0]]]);
\ No newline at end of file \ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[7],{109:function(e,t){e.exports=window.yoast.analysisReport},2:function(e,t){e.exports=window.lodash},23:function(e,t){e.exports=window.yoast.styleGuide},3:function(e,t){e.exports=window.wp.i18n},4:function(e,t){e.exports=window.wp.element},459:function(e,t,o){"use strict";var n=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),s=o(4),r=o(5),i=o(23),a=o(109),c=o(6),l=o(59);var u=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.state={statistics:null,feed:null},e.getStatistics(),e.getFeed(),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.Component),n(t,[{key:"getStatistics",value:function(){var e=this;wpseoApi.get("statistics",function(o){var n={};o&&o.seo_scores&&(n.seoScores=o.seo_scores.map(function(e){return{value:parseInt(e.count,10),color:t.getColorFromScore(e.seo_rank),html:'<a href="'+e.link+'">'+e.label+"</a>"}}),n.header=jQuery("<div>"+o.header+"</div>").text(),e.setState({statistics:n}))})}},{key:"getFeed",value:function(){var e=this;(0,c.getPostFeed)("https://yoast.com/feed/widget/?wp_version="+wpseoDashboardWidgetL10n.wp_version+"&php_version="+wpseoDashboardWidgetL10n.php_version,2).then(function(t){t.items=t.items.map(function(e){return e.description=jQuery("<div>"+e.description+"</div>").text(),e.description=e.description.replace("The post "+e.title+" appeared first on Yoast.","").trim(),e}),e.setState({feed:t})}).catch(function(e){return console.log(e)})}},{key:"getSeoAssessment",value:function(){return null===this.state.statistics?null:wp.element.createElement(a.SiteSEOReport,{key:"yoast-seo-posts-assessment",seoAssessmentText:this.state.statistics.header,seoAssessmentItems:this.state.statistics.seoScores})}},{key:"getYoastFeed",value:function(){return null===this.state.feed?null:wp.element.createElement(r.ArticleList,{className:"wordpress-feed",key:"yoast-seo-blog-feed",title:wpseoDashboardWidgetL10n.feed_header,feed:this.state.feed,footerLinkText:wpseoDashboardWidgetL10n.feed_footer})}},{key:"render",value:function(){var e=[this.getSeoAssessment(),this.getYoastFeed()].filter(function(e){return null!==e});return 0===e.length?null:wp.element.createElement("div",null,e)}}],[{key:"getColorFromScore",value:function(e){return i.colors["$color_"+e]||i.colors.$color_grey}}]),t}(),p=document.getElementById("yoast-seo-dashboard-widget");p&&((0,l.setYoastComponentsL10n)(),(0,s.render)(wp.element.createElement(u,null),p))},5:function(e,t){e.exports=window.yoast.componentsNew},59:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setTextdomainL10n=r,t.setYoastComponentsL10n=function(){r("yoast-components")},t.setWordPressSeoL10n=function(){r("wordpress-seo")};var n=o(3),s=o(2);function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"wpseoYoastJSL10n",o=(0,s.get)(window,[t,e,"locale_data",e],!1);!1===o?(0,n.setLocaleData)({"":{}},e):(0,n.setLocaleData)(o,e)}},6:function(e,t){e.exports=window.yoast.helpers}},[[459,0]]]); (window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[7],{109:function(e,t){e.exports=window.yoast.analysisReport},2:function(e,t){e.exports=window.lodash},23:function(e,t){e.exports=window.yoast.styleGuide},3:function(e,t){e.exports=window.wp.i18n},4:function(e,t){e.exports=window.wp.element},461:function(e,t,o){"use strict";var n=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),s=o(4),r=o(5),i=o(23),a=o(109),c=o(6),l=o(59);var u=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.state={statistics:null,feed:null},e.getStatistics(),e.getFeed(),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s.Component),n(t,[{key:"getStatistics",value:function(){var e=this;wpseoApi.get("statistics",function(o){var n={};o&&o.seo_scores&&(n.seoScores=o.seo_scores.map(function(e){return{value:parseInt(e.count,10),color:t.getColorFromScore(e.seo_rank),html:'<a href="'+e.link+'">'+e.label+"</a>"}}),n.header=jQuery("<div>"+o.header+"</div>").text(),e.setState({statistics:n}))})}},{key:"getFeed",value:function(){var e=this;(0,c.getPostFeed)("https://yoast.com/feed/widget/?wp_version="+wpseoDashboardWidgetL10n.wp_version+"&php_version="+wpseoDashboardWidgetL10n.php_version,2).then(function(t){t.items=t.items.map(function(e){return e.description=jQuery("<div>"+e.description+"</div>").text(),e.description=e.description.replace("The post "+e.title+" appeared first on Yoast.","").trim(),e}),e.setState({feed:t})}).catch(function(e){return console.log(e)})}},{key:"getSeoAssessment",value:function(){return null===this.state.statistics?null:wp.element.createElement(a.SiteSEOReport,{key:"yoast-seo-posts-assessment",seoAssessmentText:this.state.statistics.header,seoAssessmentItems:this.state.statistics.seoScores})}},{key:"getYoastFeed",value:function(){return null===this.state.feed?null:wp.element.createElement(r.ArticleList,{className:"wordpress-feed",key:"yoast-seo-blog-feed",title:wpseoDashboardWidgetL10n.feed_header,feed:this.state.feed,footerLinkText:wpseoDashboardWidgetL10n.feed_footer})}},{key:"render",value:function(){var e=[this.getSeoAssessment(),this.getYoastFeed()].filter(function(e){return null!==e});return 0===e.length?null:wp.element.createElement("div",null,e)}}],[{key:"getColorFromScore",value:function(e){return i.colors["$color_"+e]||i.colors.$color_grey}}]),t}(),p=document.getElementById("yoast-seo-dashboard-widget");p&&((0,l.setYoastComponentsL10n)(),(0,s.render)(wp.element.createElement(u,null),p))},5:function(e,t){e.exports=window.yoast.componentsNew},59:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setTextdomainL10n=r,t.setYoastComponentsL10n=function(){r("yoast-components")},t.setWordPressSeoL10n=function(){r("wordpress-seo")};var n=o(3),s=o(2);function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"wpseoYoastJSL10n",o=(0,s.get)(window,[t,e,"locale_data",e],!1);!1===o?(0,n.setLocaleData)({"":{}},e):(0,n.setLocaleData)(o,e)}},6:function(e,t){e.exports=window.yoast.helpers}},[[461,0]]]);
\ No newline at end of file \ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[8],{460:function(t,o,a){"use strict";!function(t){t(".yoast-column-header-has-tooltip").each(function(){t(this).closest("th").find("a").addClass("yoast-tooltip yoast-tooltip-alt yoast-tooltip-n yoast-tooltip-multiline").attr("data-label",t(this).data("tooltip-text")).attr("aria-label",t(this).text())})}(jQuery)}},[[460,0]]]); (window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[8],{462:function(t,o,a){"use strict";!function(t){t(".yoast-column-header-has-tooltip").each(function(){t(this).closest("th").find("a").addClass("yoast-tooltip yoast-tooltip-alt yoast-tooltip-n yoast-tooltip-multiline").attr("data-label",t(this).data("tooltip-text")).attr("aria-label",t(this).text())})}(jQuery)}},[[462,0]]]);
\ No newline at end of file \ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[9],{461:function(t,i,o){"use strict";jQuery("#posts-filter .tablenav.top").after('<div class="notice notice-info inline wpseo-filter-explanation"><p class="dashicons-before dashicons-lightbulb">'+yoastFilterExplanation.text+"</p></div>")}},[[461,0]]]); (window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[9],{463:function(t,i,o){"use strict";jQuery("#posts-filter .tablenav.top").after('<div class="notice notice-info inline wpseo-filter-explanation"><p class="dashicons-before dashicons-lightbulb">'+yoastFilterExplanation.text+"</p></div>")}},[[463,0]]]);
\ No newline at end of file \ No newline at end of file
This diff is collapsed.
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[12],{38:function(e,t){var n,a,o="",r=function(e){e=e||"polite";var t=document.createElement("div");t.id="a11y-speak-"+e,t.className="a11y-speak-region";return t.setAttribute("style","clip: rect(1px, 1px, 1px, 1px); position: absolute; height: 1px; width: 1px; overflow: hidden; word-wrap: normal;"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true"),document.querySelector("body").appendChild(t),t};!function(e){if("complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll)return e();document.addEventListener("DOMContentLoaded",e)}(function(){n=document.getElementById("a11y-speak-polite"),a=document.getElementById("a11y-speak-assertive"),null===n&&(n=r("polite")),null===a&&(a=r("assertive"))});e.exports=function(e,t){!function(){for(var e=document.querySelectorAll(".a11y-speak-region"),t=0;t<e.length;t++)e[t].textContent=""}(),e=e.replace(/<[^<>]+>/g," "),o===e&&(e+=" "),o=e,a&&"assertive"===t?a.textContent=e:n&&(n.textContent=e)}},465:function(e,t,n){"use strict";var a=function(e){return e&&e.__esModule?e:{default:e}}(n(38));!function(e){function t(t){var n,o,r=e(".wrap > h1");t.length&&(n=t.map(function(e){return"<div class='"+e.type+" notice'><p>"+e.message+"</p></div>"}),r.after(n.join("")),o=wpseoNetworkAdminGlobalL10n.error_prefix,"updated"===t[0].type&&(o=wpseoNetworkAdminGlobalL10n.success_prefix),(0,a.default)(o.replace("%s",t[0].message),"assertive"))}function n(n){var a=e(this),o=a.find("[type='submit']:focus"),r=a.serialize();return n.preventDefault(),e(".wrap > .notice").remove(),o.length||(o=e(".wpseotab.active [type='submit']")),"action"===o.attr("name")&&(r=r.replace(/action=([a-zA-Z0-9_]+)/,"action="+o.val())),e.ajax({type:"POST",url:ajaxurl,data:r}).done(function(e){e.data&&t(e.data)}).fail(function(e){var n=e.responseJSON;n&&n.data&&t(n.data)}),!1}e(document).ready(function(){var t=e("#wpseo-conf");t.length&&t.on("submit",n)})}(jQuery)}},[[465,0]]]); (window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[12],{38:function(e,t){var n,a,o="",r=function(e){e=e||"polite";var t=document.createElement("div");t.id="a11y-speak-"+e,t.className="a11y-speak-region";return t.setAttribute("style","clip: rect(1px, 1px, 1px, 1px); position: absolute; height: 1px; width: 1px; overflow: hidden; word-wrap: normal;"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true"),document.querySelector("body").appendChild(t),t};!function(e){if("complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll)return e();document.addEventListener("DOMContentLoaded",e)}(function(){n=document.getElementById("a11y-speak-polite"),a=document.getElementById("a11y-speak-assertive"),null===n&&(n=r("polite")),null===a&&(a=r("assertive"))});e.exports=function(e,t){!function(){for(var e=document.querySelectorAll(".a11y-speak-region"),t=0;t<e.length;t++)e[t].textContent=""}(),e=e.replace(/<[^<>]+>/g," "),o===e&&(e+=" "),o=e,a&&"assertive"===t?a.textContent=e:n&&(n.textContent=e)}},468:function(e,t,n){"use strict";var a=function(e){return e&&e.__esModule?e:{default:e}}(n(38));!function(e){function t(t){var n,o,r=e(".wrap > h1");t.length&&(n=t.map(function(e){return"<div class='"+e.type+" notice'><p>"+e.message+"</p></div>"}),r.after(n.join("")),o=wpseoNetworkAdminGlobalL10n.error_prefix,"updated"===t[0].type&&(o=wpseoNetworkAdminGlobalL10n.success_prefix),(0,a.default)(o.replace("%s",t[0].message),"assertive"))}function n(n){var a=e(this),o=a.find("[type='submit']:focus"),r=a.serialize();return n.preventDefault(),e(".wrap > .notice").remove(),o.length||(o=e(".wpseotab.active [type='submit']")),"action"===o.attr("name")&&(r=r.replace(/action=([a-zA-Z0-9_]+)/,"action="+o.val())),e.ajax({type:"POST",url:ajaxurl,data:r}).done(function(e){e.data&&t(e.data)}).fail(function(e){var n=e.responseJSON;n&&n.data&&t(n.data)}),!1}e(document).ready(function(){var t=e("#wpseo-conf");t.length&&t.on("submit",n)})}(jQuery)}},[[468,0]]]);
\ No newline at end of file \ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[14],{480:function(t,n,i){"use strict";jQuery(function(t){var n=t(location).attr("pathname").split("/").pop(),i="edit-tags.php"===n?"slug":"post_name",e=t(".wrap").children().eq(0),o=0,a=[];function r(n){a.includes(n)||(a.push(n),t(n).insertAfter(e))}function p(){t.post(ajaxurl,{action:"yoast_get_notifications",version:2},function(t){""!==t&&(o=0,JSON.parse(t).map(r));o<20&&""===t&&(o++,setTimeout(p,500))})}function u(){var n=t("tr.inline-editor");return function(n){return t("#inline_"+n).find("."+i).html()}(function(t){return 0===t.length||""===t?"":t.attr("id").replace("edit-","")}(n))!==n.find("input[name="+i+"]").val()}["edit.php","edit-tags.php"].includes(n)&&(t("#inline-edit input").on("keydown",function(t){13===t.which&&u()&&p()}),t(".button-primary").click(function(n){"save-order"!==t(n.target).attr("id")&&u()&&p()})),"edit-tags.php"===n&&t(document).on("ajaxComplete",function(t,n,i){i.data.indexOf("action=delete-tag")>-1&&p()})}(jQuery))}},[[480,0]]]); (window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[14],{483:function(t,n,i){"use strict";jQuery(function(t){var n=t(location).attr("pathname").split("/").pop(),i="edit-tags.php"===n?"slug":"post_name",e=t(".wrap").children().eq(0),o=0,a=[];function r(n){a.includes(n)||(a.push(n),t(n).insertAfter(e))}function p(){t.post(ajaxurl,{action:"yoast_get_notifications",version:2},function(t){""!==t&&(o=0,JSON.parse(t).map(r));o<20&&""===t&&(o++,setTimeout(p,500))})}function u(){var n=t("tr.inline-editor");return function(n){return t("#inline_"+n).find("."+i).html()}(function(t){return 0===t.length||""===t?"":t.attr("id").replace("edit-","")}(n))!==n.find("input[name="+i+"]").val()}["edit.php","edit-tags.php"].includes(n)&&(t("#inline-edit input").on("keydown",function(t){13===t.which&&u()&&p()}),t(".button-primary").click(function(n){"save-order"!==t(n.target).attr("id")&&u()&&p()})),"edit-tags.php"===n&&t(document).on("ajaxComplete",function(t,n,i){i.data.indexOf("action=delete-tag")>-1&&p()})}(jQuery))}},[[483,0]]]);
\ No newline at end of file \ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[15],{38:function(e,t){var n,o,r="",a=function(e){e=e||"polite";var t=document.createElement("div");t.id="a11y-speak-"+e,t.className="a11y-speak-region";return t.setAttribute("style","clip: rect(1px, 1px, 1px, 1px); position: absolute; height: 1px; width: 1px; overflow: hidden; word-wrap: normal;"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true"),document.querySelector("body").appendChild(t),t};!function(e){if("complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll)return e();document.addEventListener("DOMContentLoaded",e)}(function(){n=document.getElementById("a11y-speak-polite"),o=document.getElementById("a11y-speak-assertive"),null===n&&(n=a("polite")),null===o&&(o=a("assertive"))});e.exports=function(e,t){!function(){for(var e=document.querySelectorAll(".a11y-speak-region"),t=0;t<e.length;t++)e[t].textContent=""}(),e=e.replace(/<[^<>]+>/g," "),r===e&&(e+=" "),r=e,o&&"assertive"===t?o.textContent=e:n&&(n.textContent=e)}},481:function(e,t,n){"use strict";var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function(e){return e&&e.__esModule?e:{default:e}}(n(38));var a=yoastReindexLinksData.data,i=!1,s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.element=jQuery("#wpseo_count_index_links"),this.progressbarTarget=jQuery("#wpseo_index_links_progressbar").progressbar({value:0}),this.total=parseInt(t,10),this.totalProcessed=0}return o(e,[{key:"update",value:function(e){this.totalProcessed+=e;var t=this.totalProcessed*(100/this.total);this.progressbarTarget.progressbar("value",Math.round(t)),this.element.html(this.totalProcessed)}},{key:"complete",value:function(){this.progressbarTarget.progressbar("value",100)}}]),e}();function u(){return new Promise(function(e){!function e(t,n){jQuery.ajax({type:"GET",url:a.restApi.root+a.restApi.endpoint,beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",a.restApi.nonce)},success:function(o){var r=parseInt(o,10);if(0!==r)return t.update(r),void e(t,n);t.complete(),n()}})}(new s(a.amount),e)})}function l(){i=!0,(0,r.default)(a.l10n.calculationCompleted),jQuery("#reindexLinks").html(a.message.indexingCompleted),tb_remove()}function c(){jQuery("#general-tab").click(),!1===i&&jQuery("#openLinkIndexing").click()}jQuery(function(){var e=!1;jQuery(".yoast-js-calculate-index-links--all ").on("click",function(){!1===e&&(function(){(0,r.default)(a.l10n.calculationInProgress);var e=[];e.push(u()),Promise.all(e).then(l)}(),e=!0)}),jQuery("#noticeRunLinkIndex").click(c),-1!==window.location.href.indexOf("&reIndexLinks=1")&&jQuery(c)})}},[[481,0]]]); (window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[15],{38:function(e,t){var n,o,r="",a=function(e){e=e||"polite";var t=document.createElement("div");t.id="a11y-speak-"+e,t.className="a11y-speak-region";return t.setAttribute("style","clip: rect(1px, 1px, 1px, 1px); position: absolute; height: 1px; width: 1px; overflow: hidden; word-wrap: normal;"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true"),document.querySelector("body").appendChild(t),t};!function(e){if("complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll)return e();document.addEventListener("DOMContentLoaded",e)}(function(){n=document.getElementById("a11y-speak-polite"),o=document.getElementById("a11y-speak-assertive"),null===n&&(n=a("polite")),null===o&&(o=a("assertive"))});e.exports=function(e,t){!function(){for(var e=document.querySelectorAll(".a11y-speak-region"),t=0;t<e.length;t++)e[t].textContent=""}(),e=e.replace(/<[^<>]+>/g," "),r===e&&(e+=" "),r=e,o&&"assertive"===t?o.textContent=e:n&&(n.textContent=e)}},484:function(e,t,n){"use strict";var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function(e){return e&&e.__esModule?e:{default:e}}(n(38));var a=yoastReindexLinksData.data,i=!1,s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.element=jQuery("#wpseo_count_index_links"),this.progressbarTarget=jQuery("#wpseo_index_links_progressbar").progressbar({value:0}),this.total=parseInt(t,10),this.totalProcessed=0}return o(e,[{key:"update",value:function(e){this.totalProcessed+=e;var t=this.totalProcessed*(100/this.total);this.progressbarTarget.progressbar("value",Math.round(t)),this.element.html(this.totalProcessed)}},{key:"complete",value:function(){this.progressbarTarget.progressbar("value",100)}}]),e}();function u(){return new Promise(function(e){!function e(t,n){jQuery.ajax({type:"GET",url:a.restApi.root+a.restApi.endpoint,beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",a.restApi.nonce)},success:function(o){var r=parseInt(o,10);if(0!==r)return t.update(r),void e(t,n);t.complete(),n()}})}(new s(a.amount),e)})}function l(){i=!0,(0,r.default)(a.l10n.calculationCompleted),jQuery("#reindexLinks").html(a.message.indexingCompleted),tb_remove()}function c(){jQuery("#general-tab").click(),!1===i&&jQuery("#openLinkIndexing").click()}jQuery(function(){var e=!1;jQuery(".yoast-js-calculate-index-links--all ").on("click",function(){!1===e&&(function(){(0,r.default)(a.l10n.calculationInProgress);var e=[];e.push(u()),Promise.all(e).then(l)}(),e=!0)}),jQuery("#noticeRunLinkIndex").click(c),-1!==window.location.href.indexOf("&reIndexLinks=1")&&jQuery(c)})}},[[484,0]]]);
\ No newline at end of file \ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment