Commit b89b6d7b authored by Simonas's avatar Simonas

release 1.4.4

parent 3288b6de
......@@ -20,9 +20,9 @@
## Production
- build CSS & JS assets - `C:\web\dev.biuro\ npm run build`
- build new image `docker build -t biuro/web:1.4.2 .` (update version number)
- build new image `docker build -t biuro/web:1.4.4 .` (update version number)
- login to biuro docker account `docker login --username=biuro --password=9Ndtjd2vKsLvGuFOeFq1KdJs`
- push image to docker repository - `docker push biuro/web:1.4.2`
- push image to docker repository - `docker push biuro/web:1.4.4`
## Production
- update biuro/web image version in .env file (staging or www)
......
......@@ -180,9 +180,16 @@ services:
# wp option update time_format "H:i";
wp plugin install loco-translate --version=2.3.0 --activate-network;
# wp plugin update loco-translate --version=2.3.0;
wp plugin install pods --version=2.7.12 --activate-network;
# wp plugin update pods --version=2.7.12;
wp plugin install polylang --version=2.5.4;
wp plugin install wordpress-seo --version=11.3 --activate-network;
# wp plugin update polylang --version=2.5.4;
wp plugin install wordpress-seo --version=11.4 --activate-network;
# wp plugin update wordpress-seo --version=11.4;
wp plugin update akismet --version=4.1.2;
wp plugin uninstall hello;
......
{
"name": "biuro",
"version": "1.4.1",
"version": "1.4.4",
"description": "Biuro WP theme",
"scripts": {
"dev": "gulp --require @babel/register --gulpfile tasks",
......
......@@ -15,14 +15,14 @@ class WPSEO_Gutenberg_Compatibility {
*
* @var string
*/
const CURRENT_RELEASE = '5.7.0';
const CURRENT_RELEASE = '5.8.0';
/**
* The minimally supported version of Gutenberg by the plugin.
*
* @var string
*/
const MINIMUM_SUPPORTED = '5.7.0';
const MINIMUM_SUPPORTED = '5.8.0';
/**
* @var string
......
......@@ -81,45 +81,61 @@ class WPSEO_Metabox_Formatter {
'labels' => array(
'content' => array(
'na' => sprintf(
/* translators: %s expands to readability. */
__( 'Readability: %s', 'wordpress-seo' ),
/* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the readability score. */
__( '%1$sReadability%2$s: %3$s', 'wordpress-seo' ),
'<a href="#yoast-readability-analysis-collapsible-metabox">',
'</a>',
'<strong>' . __( 'Not available', 'wordpress-seo' ) . '</strong>'
),
'bad' => sprintf(
/* translators: %s expands to readability. */
__( 'Readability: %s', 'wordpress-seo' ),
/* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the readability score. */
__( '%1$sReadability%2$s: %3$s', 'wordpress-seo' ),
'<a href="#yoast-readability-analysis-collapsible-metabox">',
'</a>',
'<strong>' . __( 'Needs improvement', 'wordpress-seo' ) . '</strong>'
),
'ok' => sprintf(
/* translators: %s expands to readability. */
__( 'Readability: %s', 'wordpress-seo' ),
/* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the readability score. */
__( '%1$sReadability%2$s: %3$s', 'wordpress-seo' ),
'<a href="#yoast-readability-analysis-collapsible-metabox">',
'</a>',
'<strong>' . __( 'OK', 'wordpress-seo' ) . '</strong>'
),
'good' => sprintf(
/* translators: %s expands to readability. */
__( 'Readability: %s', 'wordpress-seo' ),
/* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the readability score. */
__( '%1$sReadability%2$s: %3$s', 'wordpress-seo' ),
'<a href="#yoast-readability-analysis-collapsible-metabox">',
'</a>',
'<strong>' . __( 'Good', 'wordpress-seo' ) . '</strong>'
),
),
'keyword' => array(
'na' => sprintf(
/* translators: %s expands to SEO. */
__( 'SEO: %s', 'wordpress-seo' ),
/* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the SEO score. */
__( '%1$sSEO%2$s: %3$s', 'wordpress-seo' ),
'<a href="#yoast-seo-analysis-collapsible-metabox">',
'</a>',
'<strong>' . __( 'Not available', 'wordpress-seo' ) . '</strong>'
),
'bad' => sprintf(
/* translators: %s expands to SEO. */
__( 'SEO: %s', 'wordpress-seo' ),
/* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the SEO score. */
__( '%1$sSEO%2$s: %3$s', 'wordpress-seo' ),
'<a href="#yoast-seo-analysis-collapsible-metabox">',
'</a>',
'<strong>' . __( 'Needs improvement', 'wordpress-seo' ) . '</strong>'
),
'ok' => sprintf(
/* translators: %s expands to SEO. */
__( 'SEO: %s', 'wordpress-seo' ),
/* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the SEO score. */
__( '%1$sSEO%2$s: %3$s', 'wordpress-seo' ),
'<a href="#yoast-seo-analysis-collapsible-metabox">',
'</a>',
'<strong>' . __( 'OK', 'wordpress-seo' ) . '</strong>'
),
'good' => sprintf(
/* translators: %s expands to SEO. */
__( 'SEO: %s', 'wordpress-seo' ),
/* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the SEO score. */
__( '%1$sSEO%2$s: %3$s', 'wordpress-seo' ),
'<a href="#yoast-seo-analysis-collapsible-metabox">',
'</a>',
'<strong>' . __( 'Good', 'wordpress-seo' ) . '</strong>'
),
),
......@@ -233,7 +249,7 @@ class WPSEO_Metabox_Formatter {
$active_modules = Jetpack::get_active_modules();
// First at all, check if Jetpack's markdown module is active.
$is_markdown = in_array( 'markdown', $active_modules, true );
$is_markdown = in_array( 'markdown', $active_modules, true );
}
/**
......
......@@ -62,8 +62,8 @@ function wpseo_import_external_select( $name, $plugins ) {
<h3><?php esc_html_e( 'Step 2: Import', 'wordpress-seo' ); ?></h3>
<p>
<?php
/* translators: %1$s expands to Yoast SEO */
printf(
/* translators: 1: expands to Yoast SEO */
esc_html__( 'This will import the post metadata like SEO titles and descriptions into your %1$s metadata. It will only do this when there is no existing %1$s metadata yet. The original data will remain in place.', 'wordpress-seo' ),
'Yoast SEO'
);
......
......@@ -19,7 +19,7 @@ class WPSEO_Schema_Article implements WPSEO_Graph_Piece {
private $context;
/**
* WPSEO_Schema_Breadcrumb constructor.
* WPSEO_Schema_Article constructor.
*
* @param WPSEO_Schema_Context $context A value object with context variables.
*/
......@@ -57,7 +57,7 @@ class WPSEO_Schema_Article implements WPSEO_Graph_Piece {
'datePublished' => mysql2date( DATE_W3C, $post->post_date_gmt, false ),
'dateModified' => mysql2date( DATE_W3C, $post->post_modified_gmt, false ),
'commentCount' => $comment_count['approved'],
'mainEntityOfPage' => $this->context->canonical . WPSEO_Schema_IDs::WEBPAGE_HASH,
'mainEntityOfPage' => array( '@id' => $this->context->canonical . WPSEO_Schema_IDs::WEBPAGE_HASH ),
);
if ( $this->context->site_represents_reference ) {
......@@ -105,7 +105,24 @@ class WPSEO_Schema_Article implements WPSEO_Graph_Piece {
return $this->context->site_url . WPSEO_Schema_IDs::PERSON_HASH;
}
return get_author_posts_url( $post->post_author ) . WPSEO_Schema_IDs::AUTHOR_HASH;
return $this->get_author_posts_url( $post->post_author ) . WPSEO_Schema_IDs::AUTHOR_HASH;
}
/**
* Retrieves the author post URL based on our author archives settings.
*
* @param int $user_id The author's user ID.
*
* @return string unsigned Author posts URL.
*/
private function get_author_posts_url( $user_id ) {
if ( WPSEO_Options::get( 'disable-author', false ) === false ) {
return get_author_posts_url( $user_id );
}
$user = get_userdata( $user_id );
$slug = sanitize_title( $user->display_name );
return $this->context->site_url . 'schema/person/' . $slug . '/';
}
/**
......
......@@ -28,7 +28,7 @@ class WPSEO_Schema_Author extends WPSEO_Schema_Person implements WPSEO_Graph_Pie
protected $type = array( 'Person' );
/**
* WPSEO_Schema_Breadcrumb constructor.
* WPSEO_Schema_Author constructor.
*
* @param WPSEO_Schema_Context $context A value object with context variables.
*/
......
......@@ -23,66 +23,77 @@
* @since 10.2
*/
class WPSEO_Schema_Context {
/**
* The current page's canonical.
*
* @var string
*/
public $canonical;
/**
* Holds the company name, if the site represents a company.
*
* @var string
*/
public $company_name;
/**
* The queried object ID, if there is one.
*
* @var int
*/
public $id;
/**
* Whether this site represents a `company` or a `person`.
*
* @var string
*/
public $site_represents;
/**
* The site's Name.
*
* @var string
*/
public $site_name;
/**
* The site's URL.
*
* @var string
*/
public $site_url;
/**
* Page title.
*
* @var string
*/
public $title;
/**
* User ID when the site represents a Person.
*
* @var int
*/
public $site_user_id;
/**
* Page description.
*
* @var string
*/
public $description;
/**
* Whether or not this site has breadcrumbs enabled.
*
* @var bool
*/
public $breadcrumbs_enabled;
/**
* A schema @id reference to the piece the site represents.
*
......@@ -103,7 +114,7 @@ class WPSEO_Schema_Context {
private function build_data() {
// Page level variables.
$front = WPSEO_Frontend::get_instance();
$this->canonical = $front->canonical( false );
$this->canonical = $front->canonical( false, false, true );
$this->title = $front->title( '' );
$this->description = $front->metadesc( false );
$this->id = get_queried_object_id();
......
<?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Frontend\Schema
*/
/**
* Returns a question object for each question in an FAQ block.
*
* @since 11.1
*
* @property array $data The Schema array.
* @property WP_Block_Parser_Block[] $blocks The block we're taking the questions out of.
* @property WPSEO_Schema_Context context A value object with context variables.
* @property array ids
* @property int count
*/
class WPSEO_Schema_FAQ_Question_List {
/**
* The Schema array.
*
* @var array
*/
private $data = array();
/**
* All the blocks of this block-type.
*
* @var WP_Block_Parser_Block
*/
private $blocks;
/**
* Number of questions on the page.
*
* @var int
*/
private $count;
/**
* IDs of the questions on the page.
*
* @var array
*/
private $ids;
/**
* WPSEO_Schema_FAQ_Question_List constructor.
*
* @param WP_Block_Parser_Block[] $blocks An array of the FAQ blocks on this page.
* @param WPSEO_Schema_Context $context A value object with context variables.
*/
public function __construct( $blocks, $context ) {
$this->blocks = $blocks;
$this->context = $context;
$this->count = 1;
}
/**
* Find an image based on its URL and generate a Schema object for it.
*
* @return array The Schema with a question list added.
*/
public function generate() {
$this->prepare_blocks();
$this->data[] = array(
'@type' => 'ItemList',
'mainEntityOfPage' => array( '@id' => $this->get_schema_id() ),
'numberOfItems' => $this->count,
'itemListElement' => $this->ids,
);
return $this->data;
}
/**
* Determine whether we're part of an article or a webpage.
*
* @return string A reference URL.
*/
private function get_schema_id() {
if ( WPSEO_Schema_Article::is_article_post_type() ) {
return $this->context->canonical . WPSEO_Schema_IDs::ARTICLE_HASH;
}
return $this->context->canonical . WPSEO_Schema_IDs::WEBPAGE_HASH;
}
/**
* Loop through the blocks of our type.
*/
private function prepare_blocks() {
foreach ( $this->blocks as $block ) {
$this->prepare_questions( $block );
}
}
/**
* Prepare our data.
*
* @param WP_Block_Parser_Block[] $block The block to prepare the questions for.
*/
private function prepare_questions( $block ) {
foreach ( $block['attrs']['questions'] as $question ) {
if ( ! isset( $question['jsonAnswer'] ) || empty( $question['jsonAnswer'] ) ) {
continue;
}
$this->count ++;
$this->ids[] = array( '@id' => $this->context->canonical . '#' . $question['id'] );
}
}
}
<?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Frontend\Schema
*/
/**
* Returns a question object for each question in an FAQ block.
*
* @since 11.1
*
* @property array $data The Schema array.
* @property WP_Block_Parser_Block $block The block we're taking the questions out of.
* @property WPSEO_Schema_Context $context A value object with context variables.
* @property int $position The position in the list.
*/
class WPSEO_Schema_FAQ_Questions {
/**
* The Schema array.
*
* @var array
*/
private $data;
/**
* All the blocks of this block-type.
*
* @var WP_Block_Parser_Block
*/
private $block;
/**
* Position in the list.
*
* @var int
*/
private $position;
/**
* WPSEO_Schema_FAQ_Questions constructor.
*
* @param array $data Our schema graph.
* @param WP_Block_Parser_Block $block The FAQ block of this type.
* @param WPSEO_Schema_Context $context A value object with context variables.
*/
public function __construct( $data, $block, $context ) {
$this->data = $data;
$this->block = $block;
$this->context = $context;
$this->position = 0;
}
/**
* Find an image based on its URL and generate a Schema object for it.
*
* @return array The Schema with Questions added.
*/
public function generate() {
foreach ( $this->block['attrs']['questions'] as $question ) {
if ( ! isset( $question['jsonAnswer'] ) || empty( $question['jsonAnswer'] ) ) {
continue;
}
$this->data[] = $this->generate_question_block( $question );
}
return $this->data;
}
/**
* Generate a Question piece.
*
* @param array $question The question to generate schema for.
*
* @return array unsigned Schema.org Question piece.
*/
private function generate_question_block( $question ) {
return array(
'@type' => 'Question',
'@id' => $this->context->canonical . '#' . $question['id'],
'position' => $this->position ++,
'url' => $this->context->canonical . '#' . $question['id'],
'name' => $question['jsonQuestion'],
'answerCount' => 1,
'acceptedAnswer' => array(
'@type' => 'Answer',
'text' => $question['jsonAnswer'],
),
);
}
}
<?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Frontend\Schema
*/
/**
* Returns schema FAQ data.
*
* @since 11.3
*/
class WPSEO_Schema_FAQ implements WPSEO_Graph_Piece {
/**
* Determine whether this graph piece is needed or not.
*
* @var bool
*/
private $is_needed = false;
/**
* The FAQ blocks on the current page.
*
* @var array
*/
private $blocks;
/**
* A value object with context variables.
*
* @var WPSEO_Schema_Context
*/
private $context;
/**
* WPSEO_Schema_FAQ constructor.
*
* @param WPSEO_Schema_Context $context A value object with context variables.
*/
public function __construct( WPSEO_Schema_Context $context ) {
$this->context = $context;
add_action( 'wpseo_pre_schema_block_type_yoast/faq-block', array( $this, 'prepare_schema' ), 10, 1 );
add_filter( 'wpseo_schema_block_yoast/faq-block', array( $this, 'render_schema_questions' ), 10, 3 );
}
/**
* If this fires, we know there's an FAQ block ont he page, so filter the page type.
*
* @param array $blocks The blocks of this type on the current page.
*/
public function prepare_schema( $blocks ) {
$this->blocks = $blocks;
$this->is_needed = true;
add_filter( 'wpseo_schema_webpage_type', array( $this, 'change_schema_page_type' ) );
}
/**
* Change the page type to an array if it isn't one, include FAQPage.
*
* @param array|string $page_type The page type.
*
* @return array $page_type The page type that's now an array.
*/
public function change_schema_page_type( $page_type ) {
if ( ! is_array( $page_type ) ) {
$page_type = array( $page_type );
}
$page_type[] = 'FAQPage';
return $page_type;
}
/**
* Render a list of questions, referencing them by ID.
*
* @return array $data Our Schema graph.
*/
public function generate() {
$question_list = new WPSEO_Schema_FAQ_Question_List( $this->blocks, $this->context );
$graph = $question_list->generate();
return $graph;
}
/**
* Add the Questions in our FAQ blocks as separate pieces to the graph.
*
* @param array $graph Schema data for the current page.
* @param WP_Block_Parser_Block $block The block data array.
* @param WPSEO_Schema_Context $context A value object with context variables.
*
* @return array $data Our Schema graph.
*/
public function render_schema_questions( $graph, $block, $context ) {
$questions = new WPSEO_Schema_FAQ_Questions( $graph, $block, $context );
$graph = $questions->generate();
return $graph;
}
/**
* Determines whether or not a piece should be added to the graph.
*
* @return bool
*/
public function is_needed() {
return $this->is_needed;
}
}
......@@ -38,7 +38,7 @@ class WPSEO_Schema_Image {
private $attachment_id;
/**
* WPSEO_Schema_Breadcrumb constructor.
* WPSEO_Schema_Image constructor.
*
* @param string $schema_id The string to use in an image's `@id`.
*/
......
......@@ -19,7 +19,7 @@ class WPSEO_Schema_Organization implements WPSEO_Graph_Piece {
private $context;
/**
* WPSEO_Schema_Breadcrumb constructor.
* WPSEO_Schema_Organization constructor.
*
* @param WPSEO_Schema_Context $context A value object with context variables.
*/
......
......@@ -20,7 +20,7 @@ class WPSEO_Schema_WebPage implements WPSEO_Graph_Piece {
private $context;
/**
* WPSEO_Schema_Breadcrumb constructor.
* WPSEO_Schema_WebPage constructor.
*
* @param WPSEO_Schema_Context $context A value object with context variables.
*/
......
......@@ -19,7 +19,7 @@ class WPSEO_Schema_Website implements WPSEO_Graph_Piece {
private $context;
/**
* WPSEO_Schema_Breadcrumb constructor.
* WPSEO_Schema_Website constructor.
*
* @param WPSEO_Schema_Context $context A value object with context variables.
*/
......
......@@ -13,6 +13,19 @@
* @since 1.8
*/
class WPSEO_Schema implements WPSEO_WordPress_Integration {
/**
* Holds the parsed blocks for the current page.
*
* @var array
*/
private $parsed_blocks = array();
/**
* Holds context variables about the current page and site.
*
* @var WPSEO_Schema_Context
*/
private $context;
/**
* Registers the hooks.
......@@ -20,6 +33,9 @@ class WPSEO_Schema implements WPSEO_WordPress_Integration {
public function register_hooks() {
add_action( 'wpseo_head', array( $this, 'json_ld' ), 91 );
add_action( 'wpseo_json_ld', array( $this, 'generate' ), 1 );
// This AMP hook is only used in Reader (formerly Classic) mode.
add_action( 'amp_post_template_head', array( $this, 'json_ld' ), 9 );
}
/**
......@@ -42,6 +58,8 @@ class WPSEO_Schema implements WPSEO_WordPress_Integration {
return;
}
// Remove the AMP hook that also outputs Schema metadata on AMP pages.
remove_action( 'amp_post_template_head', 'amp_print_schemaorg_metadata' );
do_action( 'wpseo_json_ld' );
}
......@@ -55,7 +73,13 @@ class WPSEO_Schema implements WPSEO_WordPress_Integration {
public function generate() {
$graph = array();
foreach ( $this->get_graph_pieces() as $piece ) {
$this->context = new WPSEO_Schema_Context();
$pieces = $this->get_graph_pieces();
// Parse the Gutenberg blocks so we know whether to show pieces for those.
$this->parse_blocks();
foreach ( $pieces as $piece ) {
$class = str_replace( 'wpseo_schema_', '', strtolower( get_class( $piece ) ) );
/**
......@@ -81,6 +105,21 @@ class WPSEO_Schema implements WPSEO_WordPress_Integration {
}
}
foreach ( $this->parsed_blocks as $block_type => $blocks ) {
foreach ( $blocks as $block ) {
/**
* Filter: 'wpseo_schema_block_<block-type>' - Allows filtering graph output per block.
*
* @param WP_Block_Parser_Block $block The block.
* @param WPSEO_Schema_Context $context A value object with context variables.
*
* @api array $graph Our Schema output.
*/
$block_type = strtolower( $block['blockName'] );
$graph = apply_filters( 'wpseo_schema_block_' . $block_type, $graph, $block, $this->context );
}
}
WPSEO_Utils::schema_output( $graph, 'yoast-schema-graph yoast-schema-graph--main' );
}
......@@ -90,16 +129,15 @@ class WPSEO_Schema implements WPSEO_WordPress_Integration {
* @return array A filtered array of graph pieces.
*/
private function get_graph_pieces() {
$context = new WPSEO_Schema_Context();
$pieces = array(
new WPSEO_Schema_Organization( $context ),
new WPSEO_Schema_Person( $context ),
new WPSEO_Schema_Website( $context ),
new WPSEO_Schema_WebPage( $context ),
new WPSEO_Schema_Breadcrumb( $context ),
new WPSEO_Schema_Article( $context ),
new WPSEO_Schema_Author( $context ),
new WPSEO_Schema_Organization( $this->context ),
new WPSEO_Schema_Person( $this->context ),
new WPSEO_Schema_Website( $this->context ),
new WPSEO_Schema_WebPage( $this->context ),
new WPSEO_Schema_Breadcrumb( $this->context ),
new WPSEO_Schema_Article( $this->context ),
new WPSEO_Schema_Author( $this->context ),
new WPSEO_Schema_FAQ( $this->context ),
);
/**
......@@ -109,6 +147,46 @@ class WPSEO_Schema implements WPSEO_WordPress_Integration {
*
* @api array $pieces The schema pieces.
*/
return apply_filters( 'wpseo_schema_graph_pieces', $pieces, $context );
return apply_filters( 'wpseo_schema_graph_pieces', $pieces, $this->context );
}
/**
* Parse the blocks and pass them on to our head.
*/
private function parse_blocks() {
if ( ! function_exists( 'parse_blocks' ) ) {
return;
}
if ( ! is_singular() ) {
return;
}
$this->get_parsed_blocks();
foreach ( array_keys( $this->parsed_blocks ) as $block_type ) {
/**
* Filter: 'wpseo_pre_schema_block_type_<block-type>' - Allows hooking things to change graph output based on the blocks on the page.
*
* @param string $block_type The block type.
* @param array $blocks All the blocks of this block type.
* @param WPSEO_Schema_Context $context A value object with context variables.
*/
do_action( 'wpseo_pre_schema_block_type_' . $block_type, $this->parsed_blocks[ $block_type ], $this->context );
}
}
/**
* Parse the blocks and loop through them.
*/
private function get_parsed_blocks() {
$post = get_post();
$parsed_blocks = parse_blocks( $post->post_content );
foreach ( $parsed_blocks as $block ) {
if ( ! isset( $this->parsed_blocks[ $block['blockName'] ] ) || ! is_array( $this->parsed_blocks[ $block['blockName'] ] ) ) {
$this->parsed_blocks[ $block['blockName'] ] = array();
}
$this->parsed_blocks[ $block['blockName'] ][] = $block;
}
}
}
......@@ -31,7 +31,6 @@ class WPSEO_Structured_Data_Blocks implements WPSEO_WordPress_Integration {
$block_integrations = array(
new WPSEO_How_To_Block(),
new WPSEO_FAQ_Block(),
);
foreach ( $block_integrations as $block_integration ) {
......
......@@ -24,6 +24,11 @@ class WPSEO_Image_Utils {
*/
$url = preg_replace( '/(.*)-\d+x\d+\.(jpg|png|gif)$/', '$1.$2', $url );
// Don't try to do this for external URLs.
if ( strpos( $url, get_site_url() ) !== 0 ) {
return 0;
}
if ( function_exists( 'wpcom_vip_attachment_url_to_postid' ) ) {
// @codeCoverageIgnoreStart -- We can't test this properly.
return (int) wpcom_vip_attachment_url_to_postid( $url );
......
......@@ -57,6 +57,6 @@ class WPSEO_Statistics {
$posts = new WP_Query( $posts );
return $posts->found_posts;
return (int) $posts->found_posts;
}
}
......@@ -946,9 +946,9 @@ class WPSEO_Utils {
<ellipse fill="#C8C8C8" cx="15" cy="36.1" rx="5.7" ry="5.6"/>
</g>
<g class="traffic-light-color traffic-light-init">
<ellipse fill="#5B2942" cx="15" cy="23.5" rx="5.7" ry="5.6"/>
<ellipse fill="#5B2942" cx="15" cy="10.9" rx="5.7" ry="5.6"/>
<ellipse fill="#5B2942" cx="15" cy="36.1" rx="5.7" ry="5.6"/>
<ellipse fill="#C8C8C8" cx="15" cy="23.5" rx="5.7" ry="5.6"/>
<ellipse fill="#C8C8C8" cx="15" cy="10.9" rx="5.7" ry="5.6"/>
<ellipse fill="#C8C8C8" cx="15" cy="36.1" rx="5.7" ry="5.6"/>
</g>
</g>
</g>
......
......@@ -97,6 +97,13 @@ class WPSEO_Option_Titles extends WPSEO_Option {
*/
);
/**
* Used for "caching" during pageload.
*
* @var array
*/
protected $enriched_defaults = null;
/**
* Array of variable option name patterns for the option.
*
......@@ -233,10 +240,8 @@ class WPSEO_Option_Titles extends WPSEO_Option {
* @return void
*/
public function enrich_defaults() {
$cache_key = 'yoast_titles_rich_defaults_' . $this->option_name;
$enriched_defaults = wp_cache_get( $cache_key );
if ( false !== $enriched_defaults ) {
$enriched_defaults = $this->enriched_defaults;
if ( null !== $enriched_defaults ) {
$this->defaults += $enriched_defaults;
return;
}
......@@ -291,7 +296,7 @@ class WPSEO_Option_Titles extends WPSEO_Option {
}
}
wp_cache_set( $cache_key, $enriched_defaults );
$this->enriched_defaults = $enriched_defaults;
$this->defaults += $enriched_defaults;
}
......@@ -305,7 +310,7 @@ class WPSEO_Option_Titles extends WPSEO_Option {
* @return void
*/
public function invalidate_enrich_defaults_cache() {
wp_cache_delete( 'yoast_titles_rich_defaults_' . $this->option_name );
$this->enriched_defaults = null;
}
/**
......
<?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Structured_Data_Blocks
*/
/**
* Class WPSEO_FAQ_Block.
*/
class WPSEO_FAQ_Block implements WPSEO_WordPress_Integration {
/**
* Registers the how-to block as a server-side rendered block.
*
* @return void
*/
public function register_hooks() {
if ( ! function_exists( 'register_block_type' ) ) {
return;
}
register_block_type(
'yoast/faq-block',
array( 'render_callback' => array( $this, 'render' ) )
);
}
/**
* Renders the block.
*
* Because we can't save script tags in Gutenberg without sufficient user permissions,
* we render these server-side.
*
* @param array $attributes The attributes of the block.
* @param string $content The HTML content of the block.
*
* @return string The block preceded by its JSON-LD script.
*/
public function render( $attributes, $content ) {
if ( ! is_array( $attributes ) || ! is_singular() ) {
return $content;
}
$json_ld = $this->get_json_ld( $attributes );
$schema = array(
'@context' => 'https://schema.org',
'@graph' => array( $json_ld ),
);
return WPSEO_Utils::schema_tag( $schema ) . $content;
}
/**
* Returns the JSON-LD for a FAQ block in array form.
*
* @param array $attributes The attributes of the FAQ block.
*
* @return array The JSON-LD representation of the FAQ block in array form.
*/
protected function get_json_ld( array $attributes ) {
$hash = WPSEO_Schema_IDs::WEBPAGE_HASH;
if ( WPSEO_Schema_Article::is_article_post_type() ) {
$hash = WPSEO_Schema_IDs::ARTICLE_HASH;
}
$json_ld = array(
'@type' => 'FAQPage',
'mainEntityOfPage' => array( '@id' => WPSEO_Frontend::get_instance()->canonical( false ) . $hash ),
);
$post_title = get_the_title();
if ( ! empty( $post_title ) ) {
$json_ld['name'] = $post_title;
}
if ( ! array_key_exists( 'questions', $attributes ) || ! is_array( $attributes['questions'] ) ) {
return $json_ld;
}
$main_entity = array();
$questions = array_filter( $attributes['questions'], 'is_array' );
foreach ( $questions as $question ) {
$main_entity[] = $this->get_question_json_ld( $question );
}
$json_ld['mainEntity'] = $main_entity;
return $json_ld;
}
/**
* Returns the JSON-LD for a question in a FAQ block in array form.
*
* @param array $question The attributes of a question in the FAQ block.
*
* @return array The JSON-LD representation of the question in a FAQ block in array form.
*/
protected function get_question_json_ld( array $question ) {
$json_ld = array(
'@type' => 'Question',
);
if ( ! empty( $question['jsonQuestion'] ) ) {
$json_ld['name'] = $question['jsonQuestion'];
}
if ( ! empty( $question['jsonAnswer'] ) ) {
$json_ld['answerCount'] = 1;
$json_ld['acceptedAnswer'] = array(
'@type' => 'Answer',
'text' => $question['jsonAnswer'],
);
if ( ! empty( $question['jsonImageSrc'] ) ) {
$json_ld['acceptedAnswer']['image'] = array(
'@type' => 'ImageObject',
'contentUrl' => $question['jsonImageSrc'],
);
}
}
return $json_ld;
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[11],{865:function(o,a,s){"use strict";!function(o){function a(){o("#wp-admin-bar-root-default > li").off("mouseenter.yoastalertpopup mouseleave.yoastalertpopup"),o(".yoast-issue-added").fadeOut(200)}function s(a,s){if(o(".yoast-alert-holder").off("click",".restore").off("click",".dismiss"),void 0!==s.html){s.html&&(a.closest(".yoast-container").html(s.html),t());var e=o("#wp-admin-bar-wpseo-menu"),n=e.find(".yoast-issue-counter");n.length||(e.find("> a:first-child").append('<div class="yoast-issue-counter"/>'),n=e.find(".yoast-issue-counter")),n.html(s.total),0===s.total?n.hide():n.show(),o("#toplevel_page_wpseo_dashboard .update-plugins").removeClass().addClass("update-plugins count-"+s.total),o("#toplevel_page_wpseo_dashboard .plugin-count").html(s.total)}}function t(){var a=o(".yoast-alert-holder");a.on("click",".dismiss",function(){var a=o(this),t=a.closest(".yoast-alert-holder");a.closest(".yoast-container").append('<div class="yoast-container-disabled"/>'),a.find("span").removeClass("dashicons-no-alt").addClass("dashicons-randomize"),o.post(ajaxurl,{action:"yoast_dismiss_alert",notification:t.attr("id"),nonce:t.data("nonce"),data:t.data("json")},s.bind(this,t),"json")}),a.on("click",".restore",function(){var a=o(this),t=a.closest(".yoast-alert-holder");a.closest(".yoast-container").append('<div class="yoast-container-disabled"/>'),a.find("span").removeClass("dashicons-arrow-up").addClass("dashicons-randomize"),o.post(ajaxurl,{action:"yoast_restore_alert",notification:t.attr("id"),nonce:t.data("nonce"),data:t.data("json")},s.bind(this,t),"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 n(){window.wpseoScrollableTables=o(".yoast-table-scrollable"),window.wpseoScrollableTables.length&&window.wpseoScrollableTables.each(function(){var a=o(this);if(!a.data("scrollContainer")){var s=o("<div />",{class:"yoast-table-scrollable__hintwrapper",html:"<span class='yoast-table-scrollable__hint' aria-hidden='true' />"}).insertBefore(a),t=o("<div />",{class:"yoast-table-scrollable__container",html:"<div class='yoast-table-scrollable__inner' />"}).insertBefore(a);s.find(".yoast-table-scrollable__hint").text(wpseoAdminGlobalL10n.scrollable_table_hint),a.data("scrollContainer",t),a.data("scrollHint",s),a.appendTo(t.find(".yoast-table-scrollable__inner")),e(a)}})}jQuery(document).ready(function(){if(void 0!==window.wpseoConsoleNotifications&&"undefined"!=typeof console)for(var o=0;o<wpseoConsoleNotifications.length;o++)console.warn(wpseoConsoleNotifications[o])}),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),a=jQuery("#"+o.attr("aria-controls")),s=a.is(":visible");jQuery(a).slideToggle(200,function(){o.attr("aria-expanded",!s)})})}),window.wpseoDismissTaglineNotice=function(o){jQuery.post(ajaxurl,{action:"wpseo_dismiss_tagline_notice",_wpnonce:o})},window.wpseoSetIgnore=function(o,a,s){jQuery.post(ajaxurl,{action:"wpseo_set_ignore",option:o,_wpnonce:s},function(s){s&&(jQuery("#"+a).hide(),jQuery("#hidden_ignore_"+o).val("ignore"))})},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(a){a.each(function(){e(o(this))})}(window.wpseoScrollableTables)}),o(window).on({"Yoast:YoastTabsMounted":function(){setTimeout(function(){n()},100)},"Yoast:YoastTabsSelected":function(){setTimeout(function(){n()},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),t(),function(){var o=jQuery(".wpseo-js-premium-indicator"),a=o.find("svg");if(o.hasClass("wpseo-premium-indicator--no")){var s=a.find("path"),t=o.css("backgroundColor");s.css("fill",t)}a.css("display","block"),o.css({backgroundColor:"transparent",width:"20px",height:"20px"})}(),n()})}(jQuery)}},[[865,0]]]);
\ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[11],{872:function(o,a,s){"use strict";!function(o){function a(){o("#wp-admin-bar-root-default > li").off("mouseenter.yoastalertpopup mouseleave.yoastalertpopup"),o(".yoast-issue-added").fadeOut(200)}function s(a,s){if(o(".yoast-alert-holder").off("click",".restore").off("click",".dismiss"),void 0!==s.html){s.html&&(a.closest(".yoast-container").html(s.html),t());var e=o("#wp-admin-bar-wpseo-menu"),n=e.find(".yoast-issue-counter");n.length||(e.find("> a:first-child").append('<div class="yoast-issue-counter"/>'),n=e.find(".yoast-issue-counter")),n.html(s.total),0===s.total?n.hide():n.show(),o("#toplevel_page_wpseo_dashboard .update-plugins").removeClass().addClass("update-plugins count-"+s.total),o("#toplevel_page_wpseo_dashboard .plugin-count").html(s.total)}}function t(){var a=o(".yoast-alert-holder");a.on("click",".dismiss",function(){var a=o(this),t=a.closest(".yoast-alert-holder");a.closest(".yoast-container").append('<div class="yoast-container-disabled"/>'),a.find("span").removeClass("dashicons-no-alt").addClass("dashicons-randomize"),o.post(ajaxurl,{action:"yoast_dismiss_alert",notification:t.attr("id"),nonce:t.data("nonce"),data:t.data("json")},s.bind(this,t),"json")}),a.on("click",".restore",function(){var a=o(this),t=a.closest(".yoast-alert-holder");a.closest(".yoast-container").append('<div class="yoast-container-disabled"/>'),a.find("span").removeClass("dashicons-arrow-up").addClass("dashicons-randomize"),o.post(ajaxurl,{action:"yoast_restore_alert",notification:t.attr("id"),nonce:t.data("nonce"),data:t.data("json")},s.bind(this,t),"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 n(){window.wpseoScrollableTables=o(".yoast-table-scrollable"),window.wpseoScrollableTables.length&&window.wpseoScrollableTables.each(function(){var a=o(this);if(!a.data("scrollContainer")){var s=o("<div />",{class:"yoast-table-scrollable__hintwrapper",html:"<span class='yoast-table-scrollable__hint' aria-hidden='true' />"}).insertBefore(a),t=o("<div />",{class:"yoast-table-scrollable__container",html:"<div class='yoast-table-scrollable__inner' />"}).insertBefore(a);s.find(".yoast-table-scrollable__hint").text(wpseoAdminGlobalL10n.scrollable_table_hint),a.data("scrollContainer",t),a.data("scrollHint",s),a.appendTo(t.find(".yoast-table-scrollable__inner")),e(a)}})}jQuery(document).ready(function(){if(void 0!==window.wpseoConsoleNotifications&&"undefined"!=typeof console)for(var o=0;o<wpseoConsoleNotifications.length;o++)console.warn(wpseoConsoleNotifications[o])}),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),a=jQuery("#"+o.attr("aria-controls")),s=a.is(":visible");jQuery(a).slideToggle(200,function(){o.attr("aria-expanded",!s)})})}),window.wpseoDismissTaglineNotice=function(o){jQuery.post(ajaxurl,{action:"wpseo_dismiss_tagline_notice",_wpnonce:o})},window.wpseoSetIgnore=function(o,a,s){jQuery.post(ajaxurl,{action:"wpseo_set_ignore",option:o,_wpnonce:s},function(s){s&&(jQuery("#"+a).hide(),jQuery("#hidden_ignore_"+o).val("ignore"))})},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(a){a.each(function(){e(o(this))})}(window.wpseoScrollableTables)}),o(window).on({"Yoast:YoastTabsMounted":function(){setTimeout(function(){n()},100)},"Yoast:YoastTabsSelected":function(){setTimeout(function(){n()},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),t(),function(){var o=jQuery(".wpseo-js-premium-indicator"),a=o.find("svg");if(o.hasClass("wpseo-premium-indicator--no")){var s=a.find("path"),t=o.css("backgroundColor");s.css("fill",t)}a.css("display","block"),o.css({backgroundColor:"transparent",width:"20px",height:"20px"})}(),n()})}(jQuery)}},[[872,0]]]);
\ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[13],{868:function(e,t,a){"use strict";jQuery(document).ready(function(e){void 0!==wp.media&&e(".wpseo_image_upload_button").each(function(t,a){var n=function(t){var a=(t=e(t)).data("target");return a&&""!==a||(a=e(t).attr("id").replace(/_button$/,"")),a}(a),o=function(t){return(t=e(t)).data("target-id")}(a),i=e("#"+n),u=e("#"+o),c=wp.media.frames.file_frame=wp.media({title:wpseoMediaL10n.choose_image,button:{text:wpseoMediaL10n.choose_image},multiple:!1});c.on("select",function(){var e=c.state().get("selection").first().toJSON();i.val(e.url),u.val(e.id)});var r=e(a);r.click(function(e){e.preventDefault(),c.open()}),r.siblings(".wpseo_image_remove_button").on("click",function(e){e.preventDefault(),i.val(""),u.val("")})})})}},[[868,0]]]);
\ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[13],{875:function(e,t,a){"use strict";jQuery(document).ready(function(e){void 0!==wp.media&&e(".wpseo_image_upload_button").each(function(t,a){var n=function(t){var a=(t=e(t)).data("target");return a&&""!==a||(a=e(t).attr("id").replace(/_button$/,"")),a}(a),o=function(t){return(t=e(t)).data("target-id")}(a),i=e("#"+n),u=e("#"+o),c=wp.media.frames.file_frame=wp.media({title:wpseoMediaL10n.choose_image,button:{text:wpseoMediaL10n.choose_image},multiple:!1});c.on("select",function(){var e=c.state().get("selection").first().toJSON();i.val(e.url),u.val(e.id)});var r=e(a);r.click(function(e){e.preventDefault(),c.open()}),r.siblings(".wpseo_image_remove_button").on("click",function(e){e.preventDefault(),i.val(""),u.val("")})})})}},[[875,0]]]);
\ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[22],{887: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)}},[[887,0]]]);
\ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[22],{894: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)}},[[894,0]]]);
\ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[15],{870: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()})})}()}},[[870,0]]]);
\ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[15],{877: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()})})}()}},[[877,0]]]);
\ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[26],{0:function(e,t){e.exports=React},14:function(e,t){e.exports=window.yoast.styledComponents},21:function(e,t){e.exports=window.yoast.componentsNew},22:function(e,t){e.exports=window.yoast.helpers},47:function(e,t){e.exports=ReactDOM},6:function(e,t){e.exports=window.wp.i18n},891: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=n(14),i=p(r),a=n(21),u=n(22),s=p(n(0)),l=p(n(47)),c=n(6);function p(e){return e&&e.__esModule?e:{default:e}}var f=i.default.ul.withConfig({displayName:"courses-overview__CoursesList",componentId:"sc-9fie45-0"})(["display:flex;flex-wrap:wrap;list-style-type:none;padding:0;max-width:1520px;"]),d=i.default.li.withConfig({displayName:"courses-overview__CourseListItem",componentId:"sc-9fie45-1"})(["&&{flex:0 0 288px;margin:",";}"],(0,u.getDirectionalStyle)("0 16px 16px 0","0 0 16px 16px")),m=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=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,e));return n.state={courses:null},n.getFeed(),n}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.default.Component),o(t,[{key:"getFeed",value:function(){var e=this;(0,u.getCourseFeed)("https://yoast.com/feed/courses/").then(function(t){t.items=t.items.map(function(e){return e}),e.setState({courses:t.items})}).catch(function(e){return console.log(e)})}},{key:"getHeaderData",value:function(e){return{image:e.image,title:e.title,link:e.link}}},{key:"getButtonData",value:function(e){return{ctaButtonCopy:e.ctaButtonCopy,ctaButtonType:e.ctaButtonType,ctaButtonUrl:e.ctaButtonUrl}}},{key:"render",value:function(){var e=this,t=this.state.courses;return null===t?null:wp.element.createElement(f,null,t.map(function(t){return wp.element.createElement(d,{key:t.id},wp.element.createElement(a.FullHeightCard,{className:"CourseCard",id:t.id,header:e.getHeaderData(t),banner:"true"===t.isFree?{text:(0,c.__)("Free","wordpress-seo")}:null},wp.element.createElement(a.CourseDetails,{description:t.content,courseUrl:t.link,isBundle:t.isBundle,readMoreLinkText:t.readMoreLinkText,ctaButtonData:e.getButtonData(t)})))}))}}]),t}(),w=document.getElementById("yoast-courses-overview");if(w){var y={isRtl:wpseoCoursesOverviewL10n.isRtl};l.default.render(wp.element.createElement(r.ThemeProvider,{theme:y},wp.element.createElement(m,null)),w)}}},[[891,0]]]);
\ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[26],{0:function(e,t){e.exports=React},11:function(e,t){e.exports=window.yoast.styledComponents},19:function(e,t){e.exports=window.yoast.componentsNew},22:function(e,t){e.exports=window.yoast.helpers},47:function(e,t){e.exports=ReactDOM},6:function(e,t){e.exports=window.wp.i18n},898: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=n(11),i=p(r),a=n(19),u=n(22),s=p(n(0)),l=p(n(47)),c=n(6);function p(e){return e&&e.__esModule?e:{default:e}}var f=i.default.ul.withConfig({displayName:"courses-overview__CoursesList",componentId:"sc-9fie45-0"})(["display:flex;flex-wrap:wrap;list-style-type:none;padding:0;max-width:1520px;"]),d=i.default.li.withConfig({displayName:"courses-overview__CourseListItem",componentId:"sc-9fie45-1"})(["&&{flex:0 0 288px;margin:",";}"],(0,u.getDirectionalStyle)("0 16px 16px 0","0 0 16px 16px")),m=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=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,e));return n.state={courses:null},n.getFeed(),n}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.default.Component),o(t,[{key:"getFeed",value:function(){var e=this;(0,u.getCourseFeed)("https://yoast.com/feed/courses/").then(function(t){t.items=t.items.map(function(e){return e}),e.setState({courses:t.items})}).catch(function(e){return console.log(e)})}},{key:"getHeaderData",value:function(e){return{image:e.image,title:e.title,link:e.link}}},{key:"getButtonData",value:function(e){return{ctaButtonCopy:e.ctaButtonCopy,ctaButtonType:e.ctaButtonType,ctaButtonUrl:e.ctaButtonUrl}}},{key:"render",value:function(){var e=this,t=this.state.courses;return null===t?null:wp.element.createElement(f,null,t.map(function(t){return wp.element.createElement(d,{key:t.id},wp.element.createElement(a.FullHeightCard,{className:"CourseCard",id:t.id,header:e.getHeaderData(t),banner:"true"===t.isFree?{text:(0,c.__)("Free","wordpress-seo")}:null},wp.element.createElement(a.CourseDetails,{description:t.content,courseUrl:t.link,isBundle:t.isBundle,readMoreLinkText:t.readMoreLinkText,ctaButtonData:e.getButtonData(t)})))}))}}]),t}(),w=document.getElementById("yoast-courses-overview");if(w){var y={isRtl:wpseoCoursesOverviewL10n.isRtl};l.default.render(wp.element.createElement(r.ThemeProvider,{theme:y},wp.element.createElement(m,null)),w)}}},[[898,0]]]);
\ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[16],{871: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)}},[[871,0]]]);
\ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[16],{878: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)}},[[878,0]]]);
\ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[23],{888: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>")}},[[888,0]]]);
\ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[23],{895: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>")}},[[895,0]]]);
\ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[5],{798:function(e,t,s){"use strict";!function(e){function t(){var e=jQuery("#wpseo-meta-section-addons .wpseo_tablink");1===e.length&&e.replaceWith("<span class='"+e[0].className+"'>"+e.text()+"</span>"),jQuery(".wpseo-metabox-tabs-div").length>0&&jQuery(".wpseo-metabox-tabs").on("click","a.wpseo_tablink",function(e){e.preventDefault(),jQuery(".wpseo-meta-section.active .wpseo-metabox-tabs li").removeClass("active"),jQuery(".wpseo-meta-section.active .wpseotab").removeClass("active"),jQuery(this).addClass("yoast-tooltip-hidden");var t=jQuery(jQuery(this).attr("href"));t.addClass("active"),jQuery(this).parent("li").addClass("active"),jQuery(this).hasClass("scroll")&&jQuery("html, body").animate({scrollTop:jQuery(t).offset().top},500)}).on("mouseleave","a.wpseo_tablink",function(){jQuery(this).addClass("yoast-tooltip-hidden")}).on("blur mouseenter","a.wpseo_tablink",function(){jQuery(this).removeClass("yoast-tooltip-hidden")}),jQuery(".wpseo-meta-section").length>0&&(jQuery("#wpseo-meta-section-content, .wpseo-meta-section-react").addClass("active"),jQuery(".wpseo-metabox-sidebar li").filter(function(){return"#wpseo-meta-section-content"===jQuery(this).find(".wpseo-meta-section-link").attr("href")}).addClass("active"),jQuery("a.wpseo-meta-section-link").on("click",function(e){var t=jQuery(this).attr("href"),s=jQuery(t);e.preventDefault(),jQuery(".wpseo-metabox-sidebar li").removeClass("active"),jQuery(".wpseo-meta-section").removeClass("active"),jQuery(".wpseo-meta-section-react.active").removeClass("active"),jQuery(this).addClass("yoast-tooltip-hidden"),"#wpseo-meta-section-content"===t&&jQuery(".wpseo-meta-section-react").addClass("active"),s.addClass("active"),jQuery(this).parent("li").addClass("active")}).on("mouseleave",function(){jQuery(this).addClass("yoast-tooltip-hidden")}).on("blur mouseenter",function(){jQuery(this).removeClass("yoast-tooltip-hidden")})),jQuery(".wpseo-metabox-tabs").show()}window.wpseoInitTabs=t,window.wpseo_init_tabs=t,jQuery(document).ready(function(){jQuery(".wpseo-meta-section").each(function(e,t){jQuery(t).find(".wpseo-metabox-tabs li:first").addClass("active"),jQuery(t).find(".wpseotab:first").addClass("active")}),window.wpseo_init_tabs(),e("#yoast_wpseo_meta-robots-noindex").select2({width:"100%",language:wpseoSelect2Locale}),e("#yoast_wpseo_meta-robots-adv").select2({width:"100%",language:wpseoSelect2Locale})})}(jQuery)}},[[798,0]]]);
\ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[5],{805:function(e,t,s){"use strict";!function(e){function t(){var e=jQuery("#wpseo-meta-section-addons .wpseo_tablink");1===e.length&&e.replaceWith("<span class='"+e[0].className+"'>"+e.text()+"</span>"),jQuery(".wpseo-metabox-tabs-div").length>0&&jQuery(".wpseo-metabox-tabs").on("click","a.wpseo_tablink",function(e){e.preventDefault(),jQuery(".wpseo-meta-section.active .wpseo-metabox-tabs li").removeClass("active"),jQuery(".wpseo-meta-section.active .wpseotab").removeClass("active"),jQuery(this).addClass("yoast-tooltip-hidden");var t=jQuery(jQuery(this).attr("href"));t.addClass("active"),jQuery(this).parent("li").addClass("active"),jQuery(this).hasClass("scroll")&&jQuery("html, body").animate({scrollTop:jQuery(t).offset().top},500)}).on("mouseleave","a.wpseo_tablink",function(){jQuery(this).addClass("yoast-tooltip-hidden")}).on("blur mouseenter","a.wpseo_tablink",function(){jQuery(this).removeClass("yoast-tooltip-hidden")}),jQuery(".wpseo-meta-section").length>0&&(jQuery("#wpseo-meta-section-content, .wpseo-meta-section-react").addClass("active"),jQuery(".wpseo-metabox-sidebar li").filter(function(){return"#wpseo-meta-section-content"===jQuery(this).find(".wpseo-meta-section-link").attr("href")}).addClass("active"),jQuery("a.wpseo-meta-section-link").on("click",function(e){var t=jQuery(this).attr("href"),s=jQuery(t);e.preventDefault(),jQuery(".wpseo-metabox-sidebar li").removeClass("active"),jQuery(".wpseo-meta-section").removeClass("active"),jQuery(".wpseo-meta-section-react.active").removeClass("active"),jQuery(this).addClass("yoast-tooltip-hidden"),"#wpseo-meta-section-content"===t&&jQuery(".wpseo-meta-section-react").addClass("active"),s.addClass("active"),jQuery(this).parent("li").addClass("active")}).on("mouseleave",function(){jQuery(this).addClass("yoast-tooltip-hidden")}).on("blur mouseenter",function(){jQuery(this).removeClass("yoast-tooltip-hidden")})),jQuery(".wpseo-metabox-tabs").show()}window.wpseoInitTabs=t,window.wpseo_init_tabs=t,jQuery(document).ready(function(){jQuery(".wpseo-meta-section").each(function(e,t){jQuery(t).find(".wpseo-metabox-tabs li:first").addClass("active"),jQuery(t).find(".wpseotab:first").addClass("active")}),window.wpseo_init_tabs(),e("#yoast_wpseo_meta-robots-noindex").select2({width:"100%",language:wpseoSelect2Locale}),e("#yoast_wpseo_meta-robots-adv").select2({width:"100%",language:wpseoSelect2Locale})})}(jQuery)}},[[805,0]]]);
\ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[25],{260: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)}},890:function(e,t,n){"use strict";var a=function(e){return e&&e.__esModule?e:{default:e}}(n(260));!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)}},[[890,0]]]);
\ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[25],{261: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)}},897:function(e,t,n){"use strict";var a=function(e){return e&&e.__esModule?e:{default:e}}(n(261));!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)}},[[897,0]]]);
\ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[24],{889: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))}},[[889,0]]]);
\ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[24],{896: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))}},[[896,0]]]);
\ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[20],{260: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)}},885: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(260));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)})}},[[885,0]]]);
\ No newline at end of file
(window.yoastWebpackJsonp=window.yoastWebpackJsonp||[]).push([[20],{261: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)}},892: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(261));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)})}},[[892,0]]]);
\ 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.
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