plugin updates
This commit is contained in:
@@ -51,7 +51,7 @@ class SEMrush_Phrases_Action {
|
||||
$transient_key = \sprintf( static::TRANSIENT_CACHE_KEY, $keyphrase, $database );
|
||||
$transient = \get_transient( $transient_key );
|
||||
|
||||
if ( $transient !== false ) {
|
||||
if ( $transient !== false && isset( $transient['data']['columnNames'] ) && \count( $transient['data']['columnNames'] ) === 5 ) {
|
||||
return $this->to_result_object( $transient );
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ class SEMrush_Phrases_Action {
|
||||
'params' => [
|
||||
'phrase' => $keyphrase,
|
||||
'database' => $database,
|
||||
'export_columns' => 'Ph,Nq,Td',
|
||||
'export_columns' => 'Ph,Nq,Td,In,Kd',
|
||||
'display_limit' => 10,
|
||||
'display_offset' => 0,
|
||||
'display_sort' => 'nq_desc',
|
||||
|
||||
@@ -1 +1 @@
|
||||
<?php return array('reduxJsToolkit.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-redux-package'), 'version' => '425acbd30b98c737df6e'), 'analysisReport.js' => array('dependencies' => array('lodash', 'react', 'wp-i18n', 'wp-polyfill', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => 'a0f12a824e5689dd0faf'), 'componentsNew.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-i18n', 'wp-polyfill', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-react-select', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '898e7a63226507fb9afc'), 'featureFlag.js' => array('dependencies' => array('wp-polyfill'), 'version' => '91e54e3dd01f59a724ae'), 'helpers.js' => array('dependencies' => array('lodash', 'react', 'wp-i18n', 'wp-polyfill', 'yoast-seo-prop-types-package', 'yoast-seo-styled-components-package'), 'version' => 'f38a5f8b9a9ba801e722'), 'replacementVariableEditor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-components', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'yoast-seo-components-new-package', 'yoast-seo-draft-js-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '3ef02d0813043f65de66'), 'searchMetadataPreviews.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-i18n', 'wp-polyfill', 'yoast-seo-analysis-package', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-replacement-variable-editor-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '732af9131c98940bc630'), 'socialMetadataForms.js' => array('dependencies' => array('lodash', 'react', 'wp-i18n', 'wp-polyfill', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-redux-package', 'yoast-seo-replacement-variable-editor-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '6c538797b828b87a5419'), 'styleGuide.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-helpers-package', 'yoast-seo-styled-components-package'), 'version' => 'a65ddb8de826da5fea4d'), 'uiLibrary.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-polyfill', 'yoast-seo-prop-types-package', 'yoast-seo-redux-js-toolkit-package'), 'version' => '52e146a897258f0e0a1c'), 'chart.js.js' => array('dependencies' => array('wp-polyfill'), 'version' => '196fb6740f0ef8ce192a'), 'draftJs.js' => array('dependencies' => array('react', 'react-dom', 'wp-polyfill'), 'version' => 'f03ff0ae2ee1cf6bbc54'), 'jed.js' => array('dependencies' => array('wp-polyfill'), 'version' => '28697086e82ae1cd0e88'), 'propTypes.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4c546a0c9e97b70d3fe0'), 'reactHelmet.js' => array('dependencies' => array('react', 'wp-polyfill', 'yoast-seo-prop-types-package'), 'version' => 'b7d9f84f1dc499388f58'), 'redux.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e83451c8529be91b4af7'), 'styledComponents.js' => array('dependencies' => array('react', 'wp-polyfill'), 'version' => 'f030a78c47ee9be46c07'), 'analysis.js' => array('dependencies' => array('lodash', 'wp-i18n', 'wp-polyfill', 'yoast-seo-feature-flag-package'), 'version' => '7256aca134305c4604bb'));
|
||||
<?php return array('reduxJsToolkit.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-redux-package'), 'version' => '425acbd30b98c737df6e'), 'analysisReport.js' => array('dependencies' => array('lodash', 'react', 'wp-i18n', 'wp-polyfill', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => 'e8b88d5e061686ebc3cb'), 'componentsNew.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-i18n', 'wp-polyfill', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-react-select', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '898e7a63226507fb9afc'), 'featureFlag.js' => array('dependencies' => array('wp-polyfill'), 'version' => '91e54e3dd01f59a724ae'), 'helpers.js' => array('dependencies' => array('lodash', 'react', 'wp-i18n', 'wp-polyfill', 'yoast-seo-prop-types-package', 'yoast-seo-styled-components-package'), 'version' => 'f38a5f8b9a9ba801e722'), 'relatedKeyphraseSuggestions.js' => array('dependencies' => array('lodash', 'react', 'wp-i18n', 'wp-polyfill', 'yoast-seo-prop-types-package', 'yoast-seo-ui-library-package'), 'version' => '6b14b591d9b325d0e9b2'), 'replacementVariableEditor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-components', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'yoast-seo-components-new-package', 'yoast-seo-draft-js-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '3ef02d0813043f65de66'), 'searchMetadataPreviews.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-i18n', 'wp-polyfill', 'yoast-seo-analysis-package', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-replacement-variable-editor-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '732af9131c98940bc630'), 'socialMetadataForms.js' => array('dependencies' => array('lodash', 'react', 'wp-i18n', 'wp-polyfill', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-redux-package', 'yoast-seo-replacement-variable-editor-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '6c538797b828b87a5419'), 'styleGuide.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-helpers-package', 'yoast-seo-styled-components-package'), 'version' => 'a65ddb8de826da5fea4d'), 'uiLibrary.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-polyfill', 'yoast-seo-prop-types-package', 'yoast-seo-redux-js-toolkit-package'), 'version' => '10d91e84649f91e0f22c'), 'chart.js.js' => array('dependencies' => array('wp-polyfill'), 'version' => '196fb6740f0ef8ce192a'), 'draftJs.js' => array('dependencies' => array('react', 'react-dom', 'wp-polyfill'), 'version' => 'f03ff0ae2ee1cf6bbc54'), 'jed.js' => array('dependencies' => array('wp-polyfill'), 'version' => '28697086e82ae1cd0e88'), 'propTypes.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4c546a0c9e97b70d3fe0'), 'reactHelmet.js' => array('dependencies' => array('react', 'wp-polyfill', 'yoast-seo-prop-types-package'), 'version' => 'b7d9f84f1dc499388f58'), 'redux.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e83451c8529be91b4af7'), 'styledComponents.js' => array('dependencies' => array('react', 'wp-polyfill'), 'version' => 'f030a78c47ee9be46c07'), 'analysis.js' => array('dependencies' => array('lodash', 'wp-i18n', 'wp-polyfill', 'yoast-seo-feature-flag-package'), 'version' => 'a46d1a15d754cfb2d13e'));
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -28,13 +28,14 @@ class Options_Helper {
|
||||
/**
|
||||
* Sets a single field to the options.
|
||||
*
|
||||
* @param string $key The key to set.
|
||||
* @param mixed $value The value to set.
|
||||
* @param string $key The key to set.
|
||||
* @param mixed $value The value to set.
|
||||
* @param string $option_group The lookup table which represents the option_group where the key is stored.
|
||||
*
|
||||
* @return mixed|null Returns value if found.
|
||||
*/
|
||||
public function set( $key, $value ) {
|
||||
return WPSEO_Options::set( $key, $value );
|
||||
public function set( $key, $value, $option_group = '' ) {
|
||||
return WPSEO_Options::set( $key, $value, $option_group );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -75,4 +75,23 @@ abstract class Dynamic_Block_V3 implements Integration_Interface {
|
||||
* @return string The block output.
|
||||
*/
|
||||
abstract public function present( $attributes );
|
||||
|
||||
/**
|
||||
* Checks whether the links in the block should have target="blank".
|
||||
*
|
||||
* This is needed because when the editor is loaded in an Iframe the link needs to open in a different browser window.
|
||||
* We don't want this behaviour in the front-end and the way to check this is to check if the block is rendered in a REST request with the `context` set as 'edit'. Thus being in the editor.
|
||||
*
|
||||
* @return bool returns if the block should be opened in another window.
|
||||
*/
|
||||
protected function should_link_target_blank(): bool {
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information.
|
||||
if ( isset( $_GET['context'] ) && \is_string( $_GET['context'] ) ) {
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form information, We are only strictly comparing.
|
||||
if ( \wp_unslash( $_GET['context'] ) === 'edit' ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,8 +137,13 @@ class Breadcrumbs_Presenter extends Abstract_Indexable_Presenter {
|
||||
// If it's not the last element and we have a url.
|
||||
$link .= '<' . $this->get_element() . '>';
|
||||
$title_attr = isset( $breadcrumb['title'] ) ? ' title="' . \esc_attr( $breadcrumb['title'] ) . '"' : '';
|
||||
$link .= '<a href="' . \esc_url( $breadcrumb['url'] ) . '"' . $title_attr . '>' . $text . '</a>';
|
||||
$link .= '</' . $this->get_element() . '>';
|
||||
$link .= '<a';
|
||||
|
||||
if ( $this->should_link_target_blank() ) {
|
||||
$link .= ' target="_blank"';
|
||||
}
|
||||
$link .= ' href="' . \esc_url( $breadcrumb['url'] ) . '"' . $title_attr . '>' . $text . '</a>';
|
||||
$link .= '</' . $this->get_element() . '>';
|
||||
}
|
||||
elseif ( $index === ( $total - 1 ) ) {
|
||||
// If it's the last element.
|
||||
@@ -256,4 +261,21 @@ class Breadcrumbs_Presenter extends Abstract_Indexable_Presenter {
|
||||
|
||||
return $this->element;
|
||||
}
|
||||
|
||||
/**
|
||||
* This is needed because when the editor is loaded in an Iframe the link needs to open in a different browser window.
|
||||
* We don't want this behaviour in the front-end and the way to check this is to check if the block is rendered in a REST request with the `context` set as 'edit'. Thus being in the editor.
|
||||
*
|
||||
* @return bool returns if the breadcrumb should be opened in another window.
|
||||
*/
|
||||
private function should_link_target_blank(): bool {
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information.
|
||||
if ( isset( $_GET['context'] ) && \is_string( $_GET['context'] ) ) {
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form information, We are only strictly comparing.
|
||||
if ( \wp_unslash( $_GET['context'] ) === 'edit' ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,13 @@ namespace Yoast\WP\SEO\Presenters;
|
||||
*/
|
||||
class Url_List_Presenter extends Abstract_Presenter {
|
||||
|
||||
/**
|
||||
* If the url should be target blank.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
private $target_blank;
|
||||
|
||||
/**
|
||||
* A list of arrays containing titles and URLs.
|
||||
*
|
||||
@@ -24,12 +31,14 @@ class Url_List_Presenter extends Abstract_Presenter {
|
||||
/**
|
||||
* Url_List_Presenter constructor.
|
||||
*
|
||||
* @param array $links A list of arrays containing titles and urls.
|
||||
* @param string $class_name Classname for the url list.
|
||||
* @param array $links A list of arrays containing titles and urls.
|
||||
* @param string $class_name Classname for the url list.
|
||||
* @param bool $target_blank If the url should be target blank.
|
||||
*/
|
||||
public function __construct( $links, $class_name = 'yoast-url-list' ) {
|
||||
$this->links = $links;
|
||||
$this->class_name = $class_name;
|
||||
public function __construct( $links, $class_name = 'yoast-url-list', $target_blank = false ) {
|
||||
$this->links = $links;
|
||||
$this->class_name = $class_name;
|
||||
$this->target_blank = $target_blank;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -40,7 +49,12 @@ class Url_List_Presenter extends Abstract_Presenter {
|
||||
public function present() {
|
||||
$output = '<ul class="' . $this->class_name . '">';
|
||||
foreach ( $this->links as $link ) {
|
||||
$output .= '<li><a href="' . $link['permalink'] . '">' . $link['title'] . '</a></li>';
|
||||
$output .= '<li><a';
|
||||
if ( $this->target_blank ) {
|
||||
$output .= ' target = "_blank"';
|
||||
}
|
||||
$output .= ' href="' . $link['permalink'] . '">' . $link['title'] . '</a></li>';
|
||||
|
||||
}
|
||||
$output .= '</ul>';
|
||||
return $output;
|
||||
|
||||
@@ -51,7 +51,7 @@ class Additional_Contactmethods_Integration implements Integration_Interface {
|
||||
public function update_contactmethods( $contactmethods ) {
|
||||
$additional_contactmethods = $this->additional_contactmethods_collector->get_additional_contactmethods_objects();
|
||||
|
||||
return \array_merge( $contactmethods, $additional_contactmethods );
|
||||
return \array_merge( ( $contactmethods ?? [] ), $additional_contactmethods );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user