Merged in feature/81-dev-dev01 (pull request #5)
auto-patch 81-dev-dev01-2023-12-05T22_45_26 * auto-patch 81-dev-dev01-2023-12-05T22_45_26
This commit is contained in:
@@ -48,14 +48,16 @@ class Wincher_Account_Action {
|
||||
try {
|
||||
$results = $this->client->get( self::ACCOUNT_URL );
|
||||
|
||||
$usage = $results['limits']['keywords']['usage'];
|
||||
$limit = $results['limits']['keywords']['limit'];
|
||||
$usage = $results['limits']['keywords']['usage'];
|
||||
$limit = $results['limits']['keywords']['limit'];
|
||||
$history = $results['limits']['history_days'];
|
||||
|
||||
return (object) [
|
||||
'canTrack' => \is_null( $limit ) || $usage < $limit,
|
||||
'limit' => $limit,
|
||||
'usage' => $usage,
|
||||
'status' => 200,
|
||||
'canTrack' => \is_null( $limit ) || $usage < $limit,
|
||||
'limit' => $limit,
|
||||
'usage' => $usage,
|
||||
'historyDays' => $history,
|
||||
'status' => 200,
|
||||
];
|
||||
} catch ( \Exception $e ) {
|
||||
return (object) [
|
||||
@@ -72,13 +74,13 @@ class Wincher_Account_Action {
|
||||
*/
|
||||
public function get_upgrade_campaign() {
|
||||
try {
|
||||
$result = $this->client->get( self::UPGRADE_CAMPAIGN_URL );
|
||||
$type = $result['type'];
|
||||
$months = $result['months'];
|
||||
$result = $this->client->get( self::UPGRADE_CAMPAIGN_URL );
|
||||
$type = isset( $result['type'] ) ? $result['type'] : null;
|
||||
$months = isset( $result['months'] ) ? $result['months'] : null;
|
||||
$discount = isset( $result['value'] ) ? $result['value'] : null;
|
||||
|
||||
// We display upgrade discount only if it's a rate discount and positive months.
|
||||
if ( $type === 'RATE' && $months && $months > 0 ) {
|
||||
$discount = $result['value'];
|
||||
// We display upgrade discount only if it's a rate discount and positive months/discount.
|
||||
if ( $type === 'RATE' && $months && $discount ) {
|
||||
|
||||
return (object) [
|
||||
'discount' => $discount,
|
||||
|
||||
@@ -182,10 +182,11 @@ class Wincher_Keyphrases_Action {
|
||||
*
|
||||
* @param array|null $used_keyphrases The currently used keyphrases. Optional.
|
||||
* @param string|null $permalink The current permalink. Optional.
|
||||
* @param string|null $start_at The position start date. Optional.
|
||||
*
|
||||
* @return object The keyphrase chart data.
|
||||
*/
|
||||
public function get_tracked_keyphrases( $used_keyphrases = null, $permalink = null ) {
|
||||
public function get_tracked_keyphrases( $used_keyphrases = null, $permalink = null, $start_at = null ) {
|
||||
try {
|
||||
if ( $used_keyphrases === null ) {
|
||||
$used_keyphrases = $this->collect_all_keyphrases();
|
||||
@@ -213,6 +214,7 @@ class Wincher_Keyphrases_Action {
|
||||
[
|
||||
'keywords' => $used_keyphrases,
|
||||
'url' => $permalink,
|
||||
'start_at' => $start_at,
|
||||
]
|
||||
),
|
||||
[
|
||||
|
||||
100
wp/wp-content/plugins/wordpress-seo/src/deprecated/src/integrations/third-party/wincher.php
vendored
Normal file
100
wp/wp-content/plugins/wordpress-seo/src/deprecated/src/integrations/third-party/wincher.php
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Integrations\Third_Party;
|
||||
|
||||
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
|
||||
use Yoast\WP\SEO\Helpers\Wincher_Helper;
|
||||
use Yoast\WP\SEO\Integrations\Integration_Interface;
|
||||
use Yoast_Feature_Toggle;
|
||||
|
||||
/**
|
||||
* Adds the Wincher integration.
|
||||
*
|
||||
* @deprecated 21.6
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class Wincher implements Integration_Interface {
|
||||
|
||||
/**
|
||||
* The Wincher helper instance.
|
||||
*
|
||||
* @var Wincher_Helper
|
||||
*/
|
||||
protected $wincher;
|
||||
|
||||
/**
|
||||
* The Wincher integration toggle constructor.
|
||||
*
|
||||
* @deprecated 21.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param Wincher_Helper $wincher The Wincher helper instance.
|
||||
*/
|
||||
public function __construct( Wincher_Helper $wincher ) {
|
||||
$this->wincher = $wincher;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the integration.
|
||||
*
|
||||
* @deprecated 21.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register_hooks() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 21.6' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the conditionals based in which this loadable should be active.
|
||||
*
|
||||
* @deprecated 21.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return array The conditionals.
|
||||
*/
|
||||
public static function get_conditionals() {
|
||||
return [ Admin_Conditional::class ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the Wincher integration toggle to the $integration_toggles array.
|
||||
*
|
||||
* @deprecated 21.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param array $integration_toggles The integration toggles array.
|
||||
*
|
||||
* @return array The updated integration toggles array.
|
||||
*/
|
||||
public function add_integration_toggle( $integration_toggles ) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 21.6' );
|
||||
|
||||
return $integration_toggles;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the disabled note when the integration toggle is disabled.
|
||||
*
|
||||
* @deprecated 21.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param Yoast_Feature_Toggle $integration The integration toggle class.
|
||||
*/
|
||||
public function after_integration_toggle( $integration ) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 21.6' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the disabled note to the network integration toggle.
|
||||
*
|
||||
* @deprecated 21.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param Yoast_Feature_Toggle $integration The integration toggle class.
|
||||
*/
|
||||
public function after_network_integration_toggle( $integration ) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 21.6' );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Integrations\Third_Party;
|
||||
|
||||
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
|
||||
use Yoast\WP\SEO\Helpers\Wordproof_Helper;
|
||||
use Yoast\WP\SEO\Integrations\Integration_Interface;
|
||||
use Yoast_Feature_Toggle;
|
||||
|
||||
/**
|
||||
* Class WordProofIntegrationToggle.
|
||||
*
|
||||
* @deprecated 21.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @package Yoast\WP\SEO\Integrations\Third_Party
|
||||
*/
|
||||
class Wordproof_Integration_Toggle implements Integration_Interface {
|
||||
|
||||
/**
|
||||
* The WordProof helper instance.
|
||||
*
|
||||
* @var Wordproof_Helper
|
||||
*/
|
||||
protected $wordproof;
|
||||
|
||||
/**
|
||||
* The WordProof integration toggle constructor.
|
||||
*
|
||||
* @deprecated 21.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param Wordproof_Helper $wordproof The WordProof helper instance.
|
||||
*/
|
||||
public function __construct( Wordproof_Helper $wordproof ) {
|
||||
$this->wordproof = $wordproof;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the conditionals based in which this loadable should be active.
|
||||
*
|
||||
* @deprecated 21.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function get_conditionals() {
|
||||
return [ Admin_Conditional::class ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the integration.
|
||||
*
|
||||
* This is the place to register hooks and filters.
|
||||
*
|
||||
* @deprecated 21.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register_hooks() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 21.6' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the WordProof integration toggle to the array.
|
||||
*
|
||||
* @deprecated 21.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param array $integration_toggles The integration toggles array.
|
||||
*
|
||||
* @return array The updated integration toggles array.
|
||||
*/
|
||||
public function add_integration_toggle( $integration_toggles ) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 21.6' );
|
||||
|
||||
return $integration_toggles;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default WordProof integration option value depending if the integration is disabled or not.
|
||||
*
|
||||
* @param array $defaults Array containing default wpseo options.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function default_values( $defaults ) {
|
||||
if ( $this->wordproof->integration_is_disabled() ) {
|
||||
$defaults['wordproof_integration_active'] = false;
|
||||
}
|
||||
|
||||
return $defaults;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an explainer when the integration toggle is disabled.
|
||||
*
|
||||
* @deprecated 20.3
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param Yoast_Feature_Toggle $integration The integration toggle class.
|
||||
*/
|
||||
public function after_integration_toggle( $integration ) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 20.3' );
|
||||
if ( $integration->setting === 'wordproof_integration_active' ) {
|
||||
if ( $integration->disabled ) {
|
||||
|
||||
$conditional = $this->wordproof->integration_is_disabled( true );
|
||||
|
||||
if ( $conditional === 'Non_Multisite_Conditional' ) {
|
||||
echo '<p>' . \sprintf(
|
||||
/* translators: %s expands to WordProof */
|
||||
\esc_html__( 'Currently, the %s integration is not available for multisites.', 'wordpress-seo' ),
|
||||
'WordProof'
|
||||
) . '</p>';
|
||||
}
|
||||
|
||||
if ( $conditional === 'Wordproof_Plugin_Inactive_Conditional' ) {
|
||||
echo '<p>' . \esc_html__( 'The WordProof Timestamp plugin needs to be disabled before you can activate this integration.', 'wordpress-seo' ) . '</p>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an explainer when the network integration toggle is disabled.
|
||||
*
|
||||
* @param Yoast_Feature_Toggle $integration The integration toggle class.
|
||||
*/
|
||||
public function after_network_integration_toggle( $integration ) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 21.6' );
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
<?php return array('analysisReport.js' => array('dependencies' => array('lodash', 'react', 'wp-element', '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' => 'e95f437ae34ac15c6a553865448aff6c'), 'componentsNew.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-element', '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' => '8b519e8c9bdc485a5569664d977c43c6'), 'featureFlag.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e10bc9cc72a611812bfc07e62a49fc87'), 'helpers.js' => array('dependencies' => array('lodash', 'react', 'wp-element', 'wp-i18n', 'wp-polyfill', 'yoast-seo-prop-types-package', 'yoast-seo-styled-components-package'), 'version' => '6ff44363ca1168d073667ab2f06f91c3'), 'replacementVariableEditor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-components', 'wp-element', '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' => '0a5fcadf27d9de01c826a88c004ea8f5'), 'searchMetadataPreviews.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-element', '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' => 'd7b44377782fcf3113a7d890fe8527b7'), 'socialMetadataForms.js' => array('dependencies' => array('lodash', 'react', 'wp-element', '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' => '546bcd16f24f0a8af91ec1d987018c82'), 'styleGuide.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-helpers-package', 'yoast-seo-styled-components-package'), 'version' => '5fc06aa928153289521ef4fad66209f2'), 'uiLibrary.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-element', 'wp-polyfill', 'yoast-seo-prop-types-package', 'yoast-seo-redux-js-toolkit-package'), 'version' => '4d5682d33e592dfbbabe89537617a158'), 'draftJs.js' => array('dependencies' => array('react', 'react-dom', 'wp-polyfill'), 'version' => '884a06763ec66f3f2b98ae2228a2166b'), 'jed.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b5de44b7e6b35120d8ba97761f9b11b0'), 'propTypes.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e9441ac3feaba74c71d9793f44b9b676'), 'reactHelmet.js' => array('dependencies' => array('react', 'wp-polyfill', 'yoast-seo-prop-types-package'), 'version' => '23f47eadf3891c8ff5f8acb97ba6b4bc'), 'redux.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '2340e784d7d5751f1fa3189ba31b493f'), 'styledComponents.js' => array('dependencies' => array('react', 'wp-polyfill'), 'version' => 'e0a1a87f171b1b09fda15f788867e8eb'), 'components.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-element', 'wp-i18n', 'wp-polyfill', 'yoast-seo-analysis-report-package', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-jed-package', 'yoast-seo-prop-types-package', 'yoast-seo-redux-package', 'yoast-seo-replacement-variable-editor-package', 'yoast-seo-search-metadata-previews-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => 'e2d878e6411504189a4a41ac5e966b7e'), 'analysis.js' => array('dependencies' => array('lodash', 'wp-i18n', 'wp-polyfill', 'yoast-seo-feature-flag-package'), 'version' => '3374b713a9db5df4c15dc593557f1085'), 'reduxJsToolkit.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-redux-package'), 'version' => 'aae2438a60d27ad77ac35206db5f93bd'));
|
||||
<?php return array('reduxJsToolkit.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-redux-package'), 'version' => '7a02cd645c93ccc0d38e8aa3df9e7e6e'), 'analysisReport.js' => array('dependencies' => array('lodash', 'react', 'wp-element', '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' => '3e0dd0f403f0312666bca23bb3553d3f'), 'componentsNew.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-element', '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' => 'fa5f867dfe826d86ea053c23ff526a99'), 'featureFlag.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e31079ea733c63b5c6d6beb19648e8dd'), 'helpers.js' => array('dependencies' => array('lodash', 'react', 'wp-element', 'wp-i18n', 'wp-polyfill', 'yoast-seo-prop-types-package', 'yoast-seo-styled-components-package'), 'version' => '9419e6f0040a66a3a62429d7c2b89773'), 'replacementVariableEditor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-components', 'wp-element', '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' => '406107184945fa5359e470e658e88c02'), 'searchMetadataPreviews.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-element', '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' => 'efefc8318de5b14454bf87d9339b0fe7'), 'socialMetadataForms.js' => array('dependencies' => array('lodash', 'react', 'wp-element', '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' => 'fd9577d451151c11845c5389a5584646'), 'styleGuide.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-helpers-package', 'yoast-seo-styled-components-package'), 'version' => '5990e0e44726b9493b0e4e16d76f7e58'), 'uiLibrary.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-element', 'wp-polyfill', 'yoast-seo-prop-types-package', 'yoast-seo-redux-js-toolkit-package'), 'version' => '69a3938cf99bd9231f5ff73703244211'), 'chart.js.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f19164afd9b3f6267a7d0fe22ec28c17'), 'draftJs.js' => array('dependencies' => array('react', 'react-dom', 'wp-polyfill'), 'version' => 'd73315f32879dd39faa60448f109912e'), 'jed.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b9a5413d15ff8168fa70ddf19ee0c6ff'), 'propTypes.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b1e0d995706673946d80aa5c218c5a9b'), 'reactHelmet.js' => array('dependencies' => array('react', 'wp-polyfill', 'yoast-seo-prop-types-package'), 'version' => '1f1e314b2b6a9e4a288f725fd3e76f82'), 'redux.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'eeacc8273ca89b1b968d6bede4d6a2e7'), 'styledComponents.js' => array('dependencies' => array('react', 'wp-polyfill'), 'version' => '8cfaf0e68420af8843ddf32492814cd0'), 'components.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-element', 'wp-i18n', 'wp-polyfill', 'yoast-seo-analysis-report-package', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-jed-package', 'yoast-seo-prop-types-package', 'yoast-seo-redux-package', 'yoast-seo-replacement-variable-editor-package', 'yoast-seo-search-metadata-previews-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '268914521d9ef0412aefb5aa144e00df'), 'analysis.js' => array('dependencies' => array('lodash', 'wp-i18n', 'wp-polyfill', 'yoast-seo-feature-flag-package'), 'version' => '8b388c167a87083f6e58b17a7a9c4908'));
|
||||
@@ -1 +1 @@
|
||||
<?php return array('default.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '19f47693b2c982334cfdf4657aef980c'), 'ar.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '184af465610c9920b8439063afba0806'), 'ca.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '72f4605e103e80ba87bd6269b0f57fec'), 'cs.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '274ea62f5c1be36bce3ef760ca877ecd'), 'de.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '5a1c505485bf422b12687c5bde46a97c'), 'el.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '4c083eb4c20581f33b319e9bc7c72dbc'), 'en.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '5beddce01d83631142eaa55656abccbf'), 'es.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '0beaaaa19b672b8a3b0a4ee7998fa847'), 'fa.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '4cedf8e078aa69632e3b9957a0745e05'), 'fr.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '916c833dda390539909e6f610df77dae'), 'he.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '8850d42282de0a05d68a07c96368e373'), 'hu.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '5a0418f88c12384ff4d79032e13db605'), 'id.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '498f8b2f5a6f1a4af8f82272fa9d538f'), 'it.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '8685073818451759364380847fc0094f'), 'ja.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '07510a997e9435bb761102696bc82c29'), 'nb.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'c7e7389bf066aa53eedb070aa549922c'), 'nl.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'f145d75ea089dd090c10d9b7a0ba32d8'), 'pl.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '32db23299989a239215142772ee061ea'), 'pt.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'fca603a260ce67d957d4051a15b6686b'), 'ru.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '215cfdef2e9302bd54c1d44652331174'), 'sk.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '1c47902c41736502e8debb528c028276'), 'sv.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '69e32b16c1213beb73a33015cc8cdd80'), 'tr.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '98130c60f12ca63eedbcc0a7a824a69f'));
|
||||
<?php return array('default.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '65079526b2bd5af3d8bd5d09d6806cda'), 'ar.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '549764bd09cca9423a81aa06abdbffe4'), 'ca.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'a7ac27b6bf433cc0d2493756cac6968c'), 'cs.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '7c0cb8a9dd806edd9b13527aa26cc69a'), 'de.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '8211caa470d3182826d1817f894ebbdf'), 'el.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '00782d41ca1a893d277028eb1ff44b82'), 'en.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '1ef1e2e39236f908aad25ecea1a9292d'), 'es.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'f0d0c17c785c23f2d927d545e66b9ebb'), 'fa.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'dfb2f30e6c2971db4a58c7d8822697ef'), 'fr.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '7dbcb1da78c507bed374530594d3c753'), 'he.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '4417eb623239f76da23650e79564871f'), 'hu.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '7f56c3766fce72b1bc41e0a2e5b14044'), 'id.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '8f8d5a7da7c1c1e28e57cfe75f748c01'), 'it.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '7110a99dce1950e0f070eec0cb8ceb19'), 'ja.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '792f43492cc6e383b2b3568364260170'), 'nb.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '311d444ddc2e37dc013ce25ca4b33fbf'), 'nl.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'ec51dfdb8d63ad3fcccc207d30abffd0'), 'pl.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '71321f7580871ab56be755dd5a41e7e0'), 'pt.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '1d6e7d7a5d7e51830d913c0849c46b3b'), 'ru.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'efa5f2f74045cae2f2544bcfe0d51a2a'), 'sk.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '5c9a0ff3cb9cd03909c98ea16e0db621'), 'sv.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '01db404508180ecc349cae6f12038a73'), 'tr.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '745186a7d3bb1478b58df111e163c04a'));
|
||||
File diff suppressed because one or more lines are too long
@@ -373,11 +373,12 @@ class Cached_Container extends Container
|
||||
'yoast\\wp\\seo\\integrations\\watchers\\primary_category_quick_edit_watcher' => 'Yoast\\WP\\SEO\\Integrations\\Watchers\\Primary_Category_Quick_Edit_Watcher',
|
||||
'yoast\\wp\\seo\\integrations\\watchers\\primary_term_watcher' => 'Yoast\\WP\\SEO\\Integrations\\Watchers\\Primary_Term_Watcher',
|
||||
'yoast\\wp\\seo\\integrations\\watchers\\search_engines_discouraged_watcher' => 'Yoast\\WP\\SEO\\Integrations\\Watchers\\Search_Engines_Discouraged_Watcher',
|
||||
'yoast\\wp\\seo\\integrations\\watchers\\woocommerce_beta_editor_watcher' => 'Yoast\\WP\\SEO\\Integrations\\Watchers\\Woocommerce_Beta_Editor_Watcher',
|
||||
'yoast\\wp\\seo\\integrations\\xmlrpc' => 'Yoast\\WP\\SEO\\Integrations\\XMLRPC',
|
||||
'yoast\\wp\\seo\\introductions\\application\\ai_generate_titles_and_descriptions_introduction_upsell' => 'Yoast\\WP\\SEO\\Introductions\\Application\\Ai_Generate_Titles_And_Descriptions_Introduction_Upsell',
|
||||
'yoast\\wp\\seo\\introductions\\application\\introductions_collector' => 'Yoast\\WP\\SEO\\Introductions\\Application\\Introductions_Collector',
|
||||
'yoast\\wp\\seo\\introductions\\infrastructure\\wistia_embed_permission_repository' => 'Yoast\\WP\\SEO\\Introductions\\Infrastructure\\Wistia_Embed_Permission_Repository',
|
||||
'yoast\\wp\\seo\\introductions\\user_interface\\introductions_integration' => 'Yoast\\WP\\SEO\\Introductions\\User_Interface\\Introductions_Integration',
|
||||
'yoast\\wp\\seo\\introductions\\user_interface\\introductions_seen_route' => 'Yoast\\WP\\SEO\\Introductions\\User_Interface\\Introductions_Seen_Route',
|
||||
'yoast\\wp\\seo\\introductions\\user_interface\\wistia_embed_permission_route' => 'Yoast\\WP\\SEO\\Introductions\\User_Interface\\Wistia_Embed_Permission_Route',
|
||||
'yoast\\wp\\seo\\loader' => 'Yoast\\WP\\SEO\\Loader',
|
||||
'yoast\\wp\\seo\\loggers\\logger' => 'Yoast\\WP\\SEO\\Loggers\\Logger',
|
||||
@@ -396,8 +397,6 @@ class Cached_Container extends Container
|
||||
'yoast\\wp\\seo\\presentations\\indexable_static_posts_page_presentation' => 'Yoast\\WP\\SEO\\Presentations\\Indexable_Static_Posts_Page_Presentation',
|
||||
'yoast\\wp\\seo\\presentations\\indexable_term_archive_presentation' => 'Yoast\\WP\\SEO\\Presentations\\Indexable_Term_Archive_Presentation',
|
||||
'yoast\\wp\\seo\\promotions\\application\\promotion_manager' => 'Yoast\\WP\\SEO\\Promotions\\Application\\Promotion_Manager',
|
||||
'yoast\\wp\\seo\\promotions\\domain\\black_friday_checklist_promotion' => 'Yoast\\WP\\SEO\\Promotions\\Domain\\Black_Friday_Checklist_Promotion',
|
||||
'yoast\\wp\\seo\\promotions\\domain\\black_friday_promotion' => 'Yoast\\WP\\SEO\\Promotions\\Domain\\Black_Friday_Promotion',
|
||||
'yoast\\wp\\seo\\repositories\\indexable_cleanup_repository' => 'Yoast\\WP\\SEO\\Repositories\\Indexable_Cleanup_Repository',
|
||||
'yoast\\wp\\seo\\repositories\\indexable_hierarchy_repository' => 'Yoast\\WP\\SEO\\Repositories\\Indexable_Hierarchy_Repository',
|
||||
'yoast\\wp\\seo\\repositories\\indexable_repository' => 'Yoast\\WP\\SEO\\Repositories\\Indexable_Repository',
|
||||
@@ -804,11 +803,12 @@ class Cached_Container extends Container
|
||||
'Yoast\\WP\\SEO\\Integrations\\Watchers\\Primary_Category_Quick_Edit_Watcher' => 'getPrimaryCategoryQuickEditWatcherService',
|
||||
'Yoast\\WP\\SEO\\Integrations\\Watchers\\Primary_Term_Watcher' => 'getPrimaryTermWatcherService',
|
||||
'Yoast\\WP\\SEO\\Integrations\\Watchers\\Search_Engines_Discouraged_Watcher' => 'getSearchEnginesDiscouragedWatcherService',
|
||||
'Yoast\\WP\\SEO\\Integrations\\Watchers\\Woocommerce_Beta_Editor_Watcher' => 'getWoocommerceBetaEditorWatcherService',
|
||||
'Yoast\\WP\\SEO\\Integrations\\XMLRPC' => 'getXMLRPCService',
|
||||
'Yoast\\WP\\SEO\\Introductions\\Application\\Ai_Generate_Titles_And_Descriptions_Introduction_Upsell' => 'getAiGenerateTitlesAndDescriptionsIntroductionUpsellService',
|
||||
'Yoast\\WP\\SEO\\Introductions\\Application\\Introductions_Collector' => 'getIntroductionsCollectorService',
|
||||
'Yoast\\WP\\SEO\\Introductions\\Infrastructure\\Wistia_Embed_Permission_Repository' => 'getWistiaEmbedPermissionRepositoryService',
|
||||
'Yoast\\WP\\SEO\\Introductions\\User_Interface\\Introductions_Integration' => 'getIntroductionsIntegrationService',
|
||||
'Yoast\\WP\\SEO\\Introductions\\User_Interface\\Introductions_Seen_Route' => 'getIntroductionsSeenRouteService',
|
||||
'Yoast\\WP\\SEO\\Introductions\\User_Interface\\Wistia_Embed_Permission_Route' => 'getWistiaEmbedPermissionRouteService',
|
||||
'Yoast\\WP\\SEO\\Loader' => 'getLoaderService',
|
||||
'Yoast\\WP\\SEO\\Loggers\\Logger' => 'getLoggerService',
|
||||
@@ -827,8 +827,6 @@ class Cached_Container extends Container
|
||||
'Yoast\\WP\\SEO\\Presentations\\Indexable_Static_Posts_Page_Presentation' => 'getIndexableStaticPostsPagePresentationService',
|
||||
'Yoast\\WP\\SEO\\Presentations\\Indexable_Term_Archive_Presentation' => 'getIndexableTermArchivePresentationService',
|
||||
'Yoast\\WP\\SEO\\Promotions\\Application\\Promotion_Manager' => 'getPromotionManagerService',
|
||||
'Yoast\\WP\\SEO\\Promotions\\Domain\\Black_Friday_Checklist_Promotion' => 'getBlackFridayChecklistPromotionService',
|
||||
'Yoast\\WP\\SEO\\Promotions\\Domain\\Black_Friday_Promotion' => 'getBlackFridayPromotionService',
|
||||
'Yoast\\WP\\SEO\\Repositories\\Indexable_Cleanup_Repository' => 'getIndexableCleanupRepositoryService',
|
||||
'Yoast\\WP\\SEO\\Repositories\\Indexable_Hierarchy_Repository' => 'getIndexableHierarchyRepositoryService',
|
||||
'Yoast\\WP\\SEO\\Repositories\\Indexable_Repository' => 'getIndexableRepositoryService',
|
||||
@@ -889,6 +887,7 @@ class Cached_Container extends Container
|
||||
$this->privates = [
|
||||
'YoastSEO_Vendor\\YoastSEO_Vendor\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
'Yoast\\WP\\SEO\\Content_Type_Visibility\\Application\\Content_Type_Visibility_Dismiss_Notifications' => true,
|
||||
'Yoast\\WP\\SEO\\Introductions\\Application\\Introductions_Collector' => true,
|
||||
];
|
||||
$this->aliases = [
|
||||
'YoastSEO_Vendor\\YoastSEO_Vendor\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => 'service_container',
|
||||
@@ -906,11 +905,17 @@ class Cached_Container extends Container
|
||||
'Yoast\\WP\\SEO\\Analytics\\Domain\\To_Be_Cleaned_Indexable_Bucket' => true,
|
||||
'Yoast\\WP\\SEO\\Analytics\\Domain\\To_Be_Cleaned_Indexable_Count' => true,
|
||||
'Yoast\\WP\\SEO\\Content_Type_Visibility\\Application\\Content_Type_Visibility_Dismiss_Notifications' => true,
|
||||
'Yoast\\WP\\SEO\\Introductions\\Application\\Ai_Generate_Titles_And_Descriptions_Introduction_Upsell' => true,
|
||||
'Yoast\\WP\\SEO\\Introductions\\Application\\Introductions_Collector' => true,
|
||||
'Yoast\\WP\\SEO\\Introductions\\Domain\\Introduction_Interface' => true,
|
||||
'Yoast\\WP\\SEO\\Introductions\\Domain\\Introduction_Item' => true,
|
||||
'Yoast\\WP\\SEO\\Introductions\\Domain\\Introductions_Bucket' => true,
|
||||
'Yoast\\WP\\SEO\\Introductions\\Domain\\Invalid_User_Id_Exception' => true,
|
||||
'Yoast\\WP\\SEO\\Introductions\\Infrastructure\\Introductions_Seen_Repository' => true,
|
||||
'Yoast\\WP\\SEO\\Presenters\\Robots_Txt_Presenter' => true,
|
||||
'Yoast\\WP\\SEO\\Promotions\\Application\\Promotion_Manager_Interface' => true,
|
||||
'Yoast\\WP\\SEO\\Promotions\\Domain\\Black_Friday_Checklist_Promotion' => true,
|
||||
'Yoast\\WP\\SEO\\Promotions\\Domain\\Black_Friday_Promotion' => true,
|
||||
'Yoast\\WP\\SEO\\Promotions\\Domain\\Time_Interval' => true,
|
||||
];
|
||||
}
|
||||
@@ -4407,9 +4412,13 @@ class Cached_Container extends Container
|
||||
* Gets the public 'Yoast\WP\SEO\Integrations\Third_Party\Wincher' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Integrations\Third_Party\Wincher
|
||||
*
|
||||
* @deprecated Yoast\WP\SEO\Integrations\Third_Party\Wincher is deprecated since version 21.6!
|
||||
*/
|
||||
protected function getWincherService()
|
||||
{
|
||||
@trigger_error('Yoast\\WP\\SEO\\Integrations\\Third_Party\\Wincher is deprecated since version 21.6!', E_USER_DEPRECATED);
|
||||
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Third_Party\\Wincher'] = new \Yoast\WP\SEO\Integrations\Third_Party\Wincher(${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Wincher_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Wincher_Helper'] : $this->getWincherHelperService()) && false ?: '_'});
|
||||
}
|
||||
|
||||
@@ -4467,9 +4476,13 @@ class Cached_Container extends Container
|
||||
* Gets the public 'Yoast\WP\SEO\Integrations\Third_Party\Wordproof_Integration_Toggle' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Integrations\Third_Party\Wordproof_Integration_Toggle
|
||||
*
|
||||
* @deprecated Yoast\WP\SEO\Integrations\Third_Party\Wordproof_Integration_Toggle is deprecated since version 21.6!
|
||||
*/
|
||||
protected function getWordproofIntegrationToggleService()
|
||||
{
|
||||
@trigger_error('Yoast\\WP\\SEO\\Integrations\\Third_Party\\Wordproof_Integration_Toggle is deprecated since version 21.6!', E_USER_DEPRECATED);
|
||||
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Third_Party\\Wordproof_Integration_Toggle'] = new \Yoast\WP\SEO\Integrations\Third_Party\Wordproof_Integration_Toggle(${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Wordproof_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Wordproof_Helper'] : $this->getWordproofHelperService()) && false ?: '_'});
|
||||
}
|
||||
|
||||
@@ -4723,6 +4736,16 @@ class Cached_Container extends Container
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Watchers\\Search_Engines_Discouraged_Watcher'] = new \Yoast\WP\SEO\Integrations\Watchers\Search_Engines_Discouraged_Watcher(${($_ = isset($this->services['Yoast_Notification_Center']) ? $this->services['Yoast_Notification_Center'] : $this->getYoastNotificationCenterService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Notification_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Notification_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Notification_Helper'] = new \Yoast\WP\SEO\Helpers\Notification_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Current_Page_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Current_Page_Helper'] : $this->getCurrentPageHelperService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] = new \Yoast\WP\SEO\Helpers\Options_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Capability_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Capability_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Capability_Helper'] = new \Yoast\WP\SEO\Helpers\Capability_Helper())) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Integrations\Watchers\Woocommerce_Beta_Editor_Watcher' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Integrations\Watchers\Woocommerce_Beta_Editor_Watcher
|
||||
*/
|
||||
protected function getWoocommerceBetaEditorWatcherService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Watchers\\Woocommerce_Beta_Editor_Watcher'] = new \Yoast\WP\SEO\Integrations\Watchers\Woocommerce_Beta_Editor_Watcher(${($_ = isset($this->services['Yoast_Notification_Center']) ? $this->services['Yoast_Notification_Center'] : $this->getYoastNotificationCenterService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Notification_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Notification_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Notification_Helper'] = new \Yoast\WP\SEO\Helpers\Notification_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Short_Link_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Short_Link_Helper'] : $this->getShortLinkHelperService()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Integrations\XMLRPC' shared autowired service.
|
||||
*
|
||||
@@ -4733,26 +4756,6 @@ class Cached_Container extends Container
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\XMLRPC'] = new \Yoast\WP\SEO\Integrations\XMLRPC();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Introductions\Application\Ai_Generate_Titles_And_Descriptions_Introduction_Upsell' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Introductions\Application\Ai_Generate_Titles_And_Descriptions_Introduction_Upsell
|
||||
*/
|
||||
protected function getAiGenerateTitlesAndDescriptionsIntroductionUpsellService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Introductions\\Application\\Ai_Generate_Titles_And_Descriptions_Introduction_Upsell'] = new \Yoast\WP\SEO\Introductions\Application\Ai_Generate_Titles_And_Descriptions_Introduction_Upsell(${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper'] = new \Yoast\WP\SEO\Helpers\Product_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] = new \Yoast\WP\SEO\Helpers\Options_Helper())) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Introductions\Application\Introductions_Collector' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Introductions\Application\Introductions_Collector
|
||||
*/
|
||||
protected function getIntroductionsCollectorService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Introductions\\Application\\Introductions_Collector'] = new \Yoast\WP\SEO\Introductions\Application\Introductions_Collector(${($_ = isset($this->services['Yoast\\WP\\SEO\\Introductions\\Application\\Ai_Generate_Titles_And_Descriptions_Introduction_Upsell']) ? $this->services['Yoast\\WP\\SEO\\Introductions\\Application\\Ai_Generate_Titles_And_Descriptions_Introduction_Upsell'] : $this->getAiGenerateTitlesAndDescriptionsIntroductionUpsellService()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Introductions\Infrastructure\Wistia_Embed_Permission_Repository' shared autowired service.
|
||||
*
|
||||
@@ -4773,6 +4776,18 @@ class Cached_Container extends Container
|
||||
return $this->services['Yoast\\WP\\SEO\\Introductions\\User_Interface\\Introductions_Integration'] = new \Yoast\WP\SEO\Introductions\User_Interface\Introductions_Integration(${($_ = isset($this->services['WPSEO_Admin_Asset_Manager']) ? $this->services['WPSEO_Admin_Asset_Manager'] : $this->getWPSEOAdminAssetManagerService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Introductions\\Application\\Introductions_Collector']) ? $this->services['Yoast\\WP\\SEO\\Introductions\\Application\\Introductions_Collector'] : $this->getIntroductionsCollectorService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper'] = new \Yoast\WP\SEO\Helpers\Product_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\User_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\User_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\User_Helper'] = new \Yoast\WP\SEO\Helpers\User_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Short_Link_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Short_Link_Helper'] : $this->getShortLinkHelperService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Introductions\\Infrastructure\\Wistia_Embed_Permission_Repository']) ? $this->services['Yoast\\WP\\SEO\\Introductions\\Infrastructure\\Wistia_Embed_Permission_Repository'] : $this->getWistiaEmbedPermissionRepositoryService()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Introductions\User_Interface\Introductions_Seen_Route' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Introductions\User_Interface\Introductions_Seen_Route
|
||||
*/
|
||||
protected function getIntroductionsSeenRouteService()
|
||||
{
|
||||
$a = ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\User_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\User_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\User_Helper'] = new \Yoast\WP\SEO\Helpers\User_Helper())) && false ?: '_'};
|
||||
|
||||
return $this->services['Yoast\\WP\\SEO\\Introductions\\User_Interface\\Introductions_Seen_Route'] = new \Yoast\WP\SEO\Introductions\User_Interface\Introductions_Seen_Route(new \Yoast\WP\SEO\Introductions\Infrastructure\Introductions_Seen_Repository($a), $a, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Introductions\\Application\\Introductions_Collector']) ? $this->services['Yoast\\WP\\SEO\\Introductions\\Application\\Introductions_Collector'] : $this->getIntroductionsCollectorService()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Introductions\User_Interface\Wistia_Embed_Permission_Route' shared autowired service.
|
||||
*
|
||||
@@ -4898,11 +4913,9 @@ class Cached_Container extends Container
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Third_Party\\Web_Stories_Post_Edit');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Third_Party\\Web_Stories');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Third_Party\\Wincher_Publish');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Third_Party\\Wincher');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Third_Party\\Woocommerce_Permalinks');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Third_Party\\WooCommerce_Post_Edit');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Third_Party\\WooCommerce');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Third_Party\\Wordproof_Integration_Toggle');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Third_Party\\Wordproof');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Third_Party\\WPML_WPSEO_Notification');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Third_Party\\WPML');
|
||||
@@ -4931,8 +4944,10 @@ class Cached_Container extends Container
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Watchers\\Primary_Category_Quick_Edit_Watcher');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Watchers\\Primary_Term_Watcher');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Watchers\\Search_Engines_Discouraged_Watcher');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Watchers\\Woocommerce_Beta_Editor_Watcher');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\XMLRPC');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Introductions\\User_Interface\\Introductions_Integration');
|
||||
$instance->register_route('Yoast\\WP\\SEO\\Introductions\\User_Interface\\Introductions_Seen_Route');
|
||||
$instance->register_route('Yoast\\WP\\SEO\\Introductions\\User_Interface\\Wistia_Embed_Permission_Route');
|
||||
$instance->register_route('Yoast\\WP\\SEO\\Routes\\Alert_Dismissal_Route');
|
||||
$instance->register_route('Yoast\\WP\\SEO\\Routes\\First_Time_Configuration_Route');
|
||||
@@ -5170,27 +5185,7 @@ class Cached_Container extends Container
|
||||
*/
|
||||
protected function getPromotionManagerService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Promotions\\Application\\Promotion_Manager'] = new \Yoast\WP\SEO\Promotions\Application\Promotion_Manager(${($_ = isset($this->services['Yoast\\WP\\SEO\\Promotions\\Domain\\Black_Friday_Checklist_Promotion']) ? $this->services['Yoast\\WP\\SEO\\Promotions\\Domain\\Black_Friday_Checklist_Promotion'] : ($this->services['Yoast\\WP\\SEO\\Promotions\\Domain\\Black_Friday_Checklist_Promotion'] = new \Yoast\WP\SEO\Promotions\Domain\Black_Friday_Checklist_Promotion())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Promotions\\Domain\\Black_Friday_Promotion']) ? $this->services['Yoast\\WP\\SEO\\Promotions\\Domain\\Black_Friday_Promotion'] : ($this->services['Yoast\\WP\\SEO\\Promotions\\Domain\\Black_Friday_Promotion'] = new \Yoast\WP\SEO\Promotions\Domain\Black_Friday_Promotion())) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Promotions\Domain\Black_Friday_Checklist_Promotion' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Promotions\Domain\Black_Friday_Checklist_Promotion
|
||||
*/
|
||||
protected function getBlackFridayChecklistPromotionService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Promotions\\Domain\\Black_Friday_Checklist_Promotion'] = new \Yoast\WP\SEO\Promotions\Domain\Black_Friday_Checklist_Promotion();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Promotions\Domain\Black_Friday_Promotion' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Promotions\Domain\Black_Friday_Promotion
|
||||
*/
|
||||
protected function getBlackFridayPromotionService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Promotions\\Domain\\Black_Friday_Promotion'] = new \Yoast\WP\SEO\Promotions\Domain\Black_Friday_Promotion();
|
||||
return $this->services['Yoast\\WP\\SEO\\Promotions\\Application\\Promotion_Manager'] = new \Yoast\WP\SEO\Promotions\Application\Promotion_Manager(new \Yoast\WP\SEO\Promotions\Domain\Black_Friday_Checklist_Promotion(), new \Yoast\WP\SEO\Promotions\Domain\Black_Friday_Promotion());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5693,7 +5688,7 @@ class Cached_Container extends Container
|
||||
*/
|
||||
protected function getUserProfilesAdditionsUiService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\User_Profiles_Additions\\User_Interface\\User_Profiles_Additions_Ui'] = new \Yoast\WP\SEO\User_Profiles_Additions\User_Interface\User_Profiles_Additions_Ui();
|
||||
return $this->services['Yoast\\WP\\SEO\\User_Profiles_Additions\\User_Interface\\User_Profiles_Additions_Ui'] = new \Yoast\WP\SEO\User_Profiles_Additions\User_Interface\User_Profiles_Additions_Ui(${($_ = isset($this->services['WPSEO_Admin_Asset_Manager']) ? $this->services['WPSEO_Admin_Asset_Manager'] : $this->getWPSEOAdminAssetManagerService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper'] = new \Yoast\WP\SEO\Helpers\Product_Helper())) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5789,4 +5784,14 @@ class Cached_Container extends Container
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Content_Type_Visibility\\Application\\Content_Type_Visibility_Dismiss_Notifications'] = new \Yoast\WP\SEO\Content_Type_Visibility\Application\Content_Type_Visibility_Dismiss_Notifications(${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] = new \Yoast\WP\SEO\Helpers\Options_Helper())) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'Yoast\WP\SEO\Introductions\Application\Introductions_Collector' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Introductions\Application\Introductions_Collector
|
||||
*/
|
||||
protected function getIntroductionsCollectorService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Introductions\\Application\\Introductions_Collector'] = new \Yoast\WP\SEO\Introductions\Application\Introductions_Collector(new \Yoast\WP\SEO\Introductions\Application\Ai_Generate_Titles_And_Descriptions_Introduction_Upsell(${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper'] = new \Yoast\WP\SEO\Helpers\Product_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] = new \Yoast\WP\SEO\Helpers\Options_Helper())) && false ?: '_'}));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -482,10 +482,12 @@ class Current_Page_Helper {
|
||||
* @return int The amoumt of queried terms.
|
||||
*/
|
||||
protected function count_queried_terms() {
|
||||
$wp_query = $this->wp_query_wrapper->get_main_query();
|
||||
$term = $wp_query->get_queried_object();
|
||||
$wp_query = $this->wp_query_wrapper->get_main_query();
|
||||
$term = $wp_query->get_queried_object();
|
||||
|
||||
|
||||
$queried_terms = $wp_query->tax_query->queried_terms;
|
||||
if ( empty( $queried_terms[ $term->taxonomy ]['terms'] ) ) {
|
||||
if ( is_null( $term ) || empty( $queried_terms[ $term->taxonomy ]['terms'] ) ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Integrations\Watchers;
|
||||
|
||||
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
|
||||
use Yoast\WP\SEO\Conditionals\Not_Admin_Ajax_Conditional;
|
||||
use Yoast\WP\SEO\Helpers\Notification_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Short_Link_Helper;
|
||||
use Yoast\WP\SEO\Integrations\Integration_Interface;
|
||||
use Yoast\WP\SEO\Presenters\Admin\Woocommerce_Beta_Editor_Presenter;
|
||||
use Yoast_Notification;
|
||||
use Yoast_Notification_Center;
|
||||
|
||||
/**
|
||||
* Shows a notification for users who have Woocommerce product beta editor enabled.
|
||||
*
|
||||
* @class Woocommerce_Beta_Editor_Watcher
|
||||
*/
|
||||
class Woocommerce_Beta_Editor_Watcher implements Integration_Interface {
|
||||
|
||||
/**
|
||||
* The notification ID.
|
||||
*/
|
||||
const NOTIFICATION_ID = 'wpseo-woocommerce-beta-editor-warning';
|
||||
|
||||
/**
|
||||
* The short link helper.
|
||||
*
|
||||
* @var Short_Link_Helper
|
||||
*/
|
||||
protected $short_link_helper;
|
||||
|
||||
/**
|
||||
* The Yoast notification center.
|
||||
*
|
||||
* @var Yoast_Notification_Center
|
||||
*/
|
||||
protected $notification_center;
|
||||
|
||||
/**
|
||||
* The notification helper.
|
||||
*
|
||||
* @var Notification_Helper
|
||||
*/
|
||||
protected $notification_helper;
|
||||
|
||||
/**
|
||||
* The Woocommerce beta editor presenter.
|
||||
*
|
||||
* @var Woocommerce_Beta_Editor_Presenter
|
||||
*/
|
||||
protected $presenter;
|
||||
|
||||
/**
|
||||
* Woocommerce_Beta_Editor_Watcher constructor.
|
||||
*
|
||||
* @param Yoast_Notification_Center $notification_center The notification center.
|
||||
* @param Notification_Helper $notification_helper The notification helper.
|
||||
* @param Short_Link_Helper $short_link_helper The short link helper.
|
||||
*/
|
||||
public function __construct(
|
||||
Yoast_Notification_Center $notification_center,
|
||||
Notification_Helper $notification_helper,
|
||||
Short_Link_Helper $short_link_helper
|
||||
) {
|
||||
$this->notification_center = $notification_center;
|
||||
$this->notification_helper = $notification_helper;
|
||||
$this->short_link_helper = $short_link_helper;
|
||||
$this->presenter = new Woocommerce_Beta_Editor_Presenter( $this->short_link_helper );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the conditionals based on which this loadable should be active.
|
||||
*
|
||||
* @return string[] The conditionals.
|
||||
*/
|
||||
public static function get_conditionals() {
|
||||
return [ Admin_Conditional::class, Not_Admin_Ajax_Conditional::class ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the integration.
|
||||
*
|
||||
* On admin_init, it is checked whether the notification about Woocommerce product beta editor enabled should be shown.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register_hooks() {
|
||||
\add_action( 'admin_init', [ $this, 'manage_woocommerce_beta_editor_notification' ] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage the Woocommerce product beta editor notification.
|
||||
*
|
||||
* Shows the notification if needed and deletes it if needed.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function manage_woocommerce_beta_editor_notification() {
|
||||
if ( \get_option( 'woocommerce_feature_product_block_editor_enabled' ) === 'yes' ) {
|
||||
$this->maybe_add_woocommerce_beta_editor_notification();
|
||||
}
|
||||
else {
|
||||
$this->notification_center->remove_notification_by_id( self::NOTIFICATION_ID );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the Woocommerce product beta editor enabled notification if it does not exist yet.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function maybe_add_woocommerce_beta_editor_notification() {
|
||||
if ( ! $this->notification_center->get_notification_by_id( self::NOTIFICATION_ID ) ) {
|
||||
$notification = $this->notification();
|
||||
$this->notification_helper->restore_notification( $notification );
|
||||
$this->notification_center->add_notification( $notification );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an instance of the notification.
|
||||
*
|
||||
* @return Yoast_Notification The notification to show.
|
||||
*/
|
||||
protected function notification() {
|
||||
return new Yoast_Notification(
|
||||
$this->presenter->present(),
|
||||
[
|
||||
'type' => Yoast_Notification::ERROR,
|
||||
'id' => self::NOTIFICATION_ID,
|
||||
'capabilities' => 'wpseo_manage_options',
|
||||
'priority' => 1,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -10,8 +10,6 @@ use Yoast\WP\SEO\Introductions\Domain\Introduction_Interface;
|
||||
* Represents the introduction for the AI generate titles and introduction upsell.
|
||||
*
|
||||
* @phpcs:disable Yoast.NamingConventions.ObjectNameDepth.MaxExceeded
|
||||
*
|
||||
* @makePublic
|
||||
*/
|
||||
class Ai_Generate_Titles_And_Descriptions_Introduction_Upsell implements Introduction_Interface {
|
||||
|
||||
@@ -47,13 +45,27 @@ class Ai_Generate_Titles_And_Descriptions_Introduction_Upsell implements Introdu
|
||||
$this->options_helper = $options_helper;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the ID.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_id() {
|
||||
return 'ai-generate-titles-and-descriptions-upsell';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the unique name.
|
||||
*
|
||||
* @deprecated 21.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'ai-generate-titles-and-descriptions-upsell';
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 21.6', 'Please use get_id() instead' );
|
||||
|
||||
return $this->get_id();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -80,10 +92,6 @@ class Ai_Generate_Titles_And_Descriptions_Introduction_Upsell implements Introdu
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ! $this->is_version_between( $this->product_helper->get_version(), '20.11-RC4', '21.1-RC0' ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ! $this->is_user_allowed( [ 'edit_posts' ] ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -5,11 +5,10 @@ namespace Yoast\WP\SEO\Introductions\Application;
|
||||
use Yoast\WP\SEO\Introductions\Domain\Introduction_Interface;
|
||||
use Yoast\WP\SEO\Introductions\Domain\Introduction_Item;
|
||||
use Yoast\WP\SEO\Introductions\Domain\Introductions_Bucket;
|
||||
use Yoast\WP\SEO\Introductions\Infrastructure\Introductions_Seen_Repository;
|
||||
|
||||
/**
|
||||
* Manages the collection of introductions.
|
||||
*
|
||||
* @makePublic
|
||||
*/
|
||||
class Introductions_Collector {
|
||||
|
||||
@@ -44,11 +43,11 @@ class Introductions_Collector {
|
||||
if ( ! $introduction->should_show() ) {
|
||||
continue;
|
||||
}
|
||||
if ( $this->is_seen( $introduction->get_name(), $metadata ) ) {
|
||||
if ( $this->is_seen( $introduction->get_id(), $metadata ) ) {
|
||||
continue;
|
||||
}
|
||||
$bucket->add_introduction(
|
||||
new Introduction_Item( $introduction->get_name(), $introduction->get_priority() )
|
||||
new Introduction_Item( $introduction->get_id(), $introduction->get_priority() )
|
||||
);
|
||||
}
|
||||
|
||||
@@ -87,7 +86,7 @@ class Introductions_Collector {
|
||||
* @return array The introductions' metadata.
|
||||
*/
|
||||
private function get_metadata( $user_id ) {
|
||||
$metadata = \get_user_meta( $user_id, '_yoast_wpseo_introductions', true );
|
||||
$metadata = \get_user_meta( $user_id, Introductions_Seen_Repository::USER_META_KEY, true );
|
||||
if ( \is_array( $metadata ) ) {
|
||||
return $metadata;
|
||||
}
|
||||
@@ -110,4 +109,21 @@ class Introductions_Collector {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the given introduction ID is a known ID to the system.
|
||||
*
|
||||
* @param string $introduction_id The introduction ID to check.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function is_available_introduction( string $introduction_id ): bool {
|
||||
foreach ( $this->introductions as $introduction ) {
|
||||
if ( $introduction->get_id() === $introduction_id ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,9 +7,19 @@ namespace Yoast\WP\SEO\Introductions\Domain;
|
||||
*/
|
||||
interface Introduction_Interface {
|
||||
|
||||
/**
|
||||
* Returns the ID.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_id();
|
||||
|
||||
/**
|
||||
* Returns the unique name.
|
||||
*
|
||||
* @deprecated 21.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_name();
|
||||
|
||||
@@ -8,11 +8,11 @@ namespace Yoast\WP\SEO\Introductions\Domain;
|
||||
class Introduction_Item {
|
||||
|
||||
/**
|
||||
* The unique name.
|
||||
* The ID.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $name;
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* The priority.
|
||||
@@ -24,11 +24,11 @@ class Introduction_Item {
|
||||
/**
|
||||
* Constructs the instance.
|
||||
*
|
||||
* @param string $name The unique name.
|
||||
* @param string $id The ID.
|
||||
* @param int $priority The priority.
|
||||
*/
|
||||
public function __construct( $name, $priority ) {
|
||||
$this->name = $name;
|
||||
public function __construct( $id, $priority ) {
|
||||
$this->id = $id;
|
||||
$this->priority = $priority;
|
||||
}
|
||||
|
||||
@@ -39,18 +39,18 @@ class Introduction_Item {
|
||||
*/
|
||||
public function to_array() {
|
||||
return [
|
||||
'name' => $this->get_name(),
|
||||
'id' => $this->get_id(),
|
||||
'priority' => $this->get_priority(),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the unique name.
|
||||
* Returns the ID.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_name() {
|
||||
return $this->name;
|
||||
public function get_id() {
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Introductions\Domain;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
* Invalid user ID.
|
||||
*/
|
||||
class Invalid_User_Id_Exception extends InvalidArgumentException {
|
||||
|
||||
/**
|
||||
* Constructs the exception.
|
||||
*
|
||||
* @link https://php.net/manual/en/exception.construct.php
|
||||
*
|
||||
* @param string $message [optional] The Exception message to throw.
|
||||
* @param int $code [optional] The Exception code.
|
||||
* @param null|Throwable $previous [optional] The previous throwable used for the exception chaining.
|
||||
*/
|
||||
public function __construct( // phpcs:ignore Generic.CodeAnalysis.UselessOverridingMethod.Found -- Reason: A default message is used.
|
||||
$message = 'Invalid User ID',
|
||||
$code = 0,
|
||||
$previous = null
|
||||
) {
|
||||
parent::__construct( $message, $code, $previous );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Introductions\Infrastructure;
|
||||
|
||||
use Yoast\WP\SEO\Helpers\User_Helper;
|
||||
use Yoast\WP\SEO\Introductions\Domain\Invalid_User_Id_Exception;
|
||||
|
||||
/**
|
||||
* Stores and retrieves whether the user has seen certain introductions.
|
||||
*/
|
||||
class Introductions_Seen_Repository {
|
||||
|
||||
const USER_META_KEY = '_yoast_wpseo_introductions';
|
||||
|
||||
const DEFAULT_VALUE = [];
|
||||
|
||||
/**
|
||||
* Holds the User_Helper instance.
|
||||
*
|
||||
* @var User_Helper
|
||||
*/
|
||||
private $user_helper;
|
||||
|
||||
/**
|
||||
* Constructs the class.
|
||||
*
|
||||
* @param User_Helper $user_helper The User_Helper.
|
||||
*/
|
||||
public function __construct( User_Helper $user_helper ) {
|
||||
$this->user_helper = $user_helper;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the introductions.
|
||||
*
|
||||
* @param int $user_id User ID.
|
||||
*
|
||||
* @throws Invalid_User_Id_Exception If an invalid user ID is supplied.
|
||||
*
|
||||
* @return array The introductions.
|
||||
*/
|
||||
public function get_all_introductions( $user_id ): array {
|
||||
$seen_introductions = $this->user_helper->get_meta( $user_id, self::USER_META_KEY, true );
|
||||
if ( $seen_introductions === false ) {
|
||||
throw new Invalid_User_Id_Exception();
|
||||
}
|
||||
|
||||
if ( \is_array( $seen_introductions ) ) {
|
||||
return $seen_introductions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Why could $value be invalid?
|
||||
* - When the database row does not exist yet, $value can be an empty string.
|
||||
* - Faulty data was stored?
|
||||
*/
|
||||
return self::DEFAULT_VALUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the introductions.
|
||||
*
|
||||
* @param int $user_id The user ID.
|
||||
* @param array $introductions The introductions.
|
||||
*
|
||||
* @return bool True on successful update, false on failure or if the value passed to the function is the same as
|
||||
* the one that is already in the database.
|
||||
*/
|
||||
public function set_all_introductions( $user_id, array $introductions ): bool {
|
||||
return $this->user_helper->update_meta( $user_id, self::USER_META_KEY, $introductions ) !== false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves whether an introduction is seen.
|
||||
*
|
||||
* @param int $user_id User ID.
|
||||
* @param string $introduction_id The introduction ID.
|
||||
*
|
||||
* @throws Invalid_User_Id_Exception If an invalid user ID is supplied.
|
||||
*
|
||||
* @return bool Whether the introduction is seen.
|
||||
*/
|
||||
public function is_introduction_seen( $user_id, string $introduction_id ): bool {
|
||||
$introductions = $this->get_all_introductions( $user_id );
|
||||
|
||||
if ( \array_key_exists( $introduction_id, $introductions ) ) {
|
||||
return (bool) $introductions[ $introduction_id ];
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the introduction as seen.
|
||||
*
|
||||
* @param int $user_id The user ID.
|
||||
* @param string $introduction_id The introduction ID.
|
||||
* @param bool $is_seen Whether the introduction is seen. Defaults to true.
|
||||
*
|
||||
* @throws Invalid_User_Id_Exception If an invalid user ID is supplied.
|
||||
*
|
||||
* @return bool False on failure. Not having to update is a success.
|
||||
*/
|
||||
public function set_introduction( $user_id, string $introduction_id, bool $is_seen = true ): bool {
|
||||
$introductions = $this->get_all_introductions( $user_id );
|
||||
|
||||
// Check if the wanted value is already set.
|
||||
if ( \array_key_exists( $introduction_id, $introductions ) && $introductions[ $introduction_id ] === $is_seen ) {
|
||||
return true;
|
||||
}
|
||||
$introductions[ $introduction_id ] = $is_seen;
|
||||
|
||||
return $this->set_all_introductions( $user_id, $introductions );
|
||||
}
|
||||
}
|
||||
@@ -4,13 +4,15 @@ Is for showing introductions to a user, on Yoast admin pages.
|
||||
Based on plugin version, page, user capabilities and whether the user has seen it already.
|
||||
|
||||
- `Introduction_Interface` defines what data is needed
|
||||
- `name` as unique identifier
|
||||
- `id` as unique identifier
|
||||
- `plugin` and `version` to determine if the introduction is new (version > plugin version)
|
||||
- `pages` to be able to only show on certain Yoast admin pages
|
||||
- `capabilities` to be able to only show for certain users
|
||||
- `Introductions_Collector` uses that data to determine whether an introduction should be "shown" to a user
|
||||
- uses the `wpseo_introductions` filter to be extendable from our other plugins
|
||||
- uses `_yoast_introductions` user metadata to determine if the user saw an introduction already
|
||||
- uses `Introductions_Seen_Repository` to get the data to determine if the user saw an introduction already
|
||||
- `Introductions_Seen_Repository` is the doorway whether a user has seen an introduction or not
|
||||
- uses the `_yoast_introductions` user metadata
|
||||
- `Introduction_Bucket` and `Introduction_Item` are used by the collector to get an array
|
||||
- `Introductions_Integration` runs on the Yoast Admin pages and loads the assets
|
||||
- only loads on our Yoast admin pages, but never on our installation success pages as to not disturb onboarding
|
||||
@@ -20,6 +22,6 @@ Based on plugin version, page, user capabilities and whether the user has seen i
|
||||
- `css/src/ai-generator.css` holds the CSS
|
||||
|
||||
Inside JS, register the modal content via `window.YoastSEO._registerIntroductionComponent`, which takes a
|
||||
`name` and a `Component`. The name needs to be the same as the name in the `Introduction_Interface`.
|
||||
`id` and a `Component`. The id needs to be the same as the id in the `Introduction_Interface`.
|
||||
The action `yoast.introductions.ready` can be used to know whether the registration function is available and ready for
|
||||
use.
|
||||
|
||||
@@ -153,7 +153,7 @@ class Introductions_Integration implements Integration_Interface {
|
||||
$metadata = [];
|
||||
}
|
||||
foreach ( $introductions as $introduction ) {
|
||||
$metadata[ $introduction['name'] ] = true;
|
||||
$metadata[ $introduction['id'] ] = true;
|
||||
}
|
||||
$this->user_helper->update_meta( $user_id, '_yoast_wpseo_introductions', $metadata );
|
||||
}
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Introductions\User_Interface;
|
||||
|
||||
use Exception;
|
||||
use WP_Error;
|
||||
use WP_REST_Request;
|
||||
use WP_REST_Response;
|
||||
use Yoast\WP\SEO\Conditionals\No_Conditionals;
|
||||
use Yoast\WP\SEO\Helpers\User_Helper;
|
||||
use Yoast\WP\SEO\Introductions\Application\Introductions_Collector;
|
||||
use Yoast\WP\SEO\Introductions\Infrastructure\Introductions_Seen_Repository;
|
||||
use Yoast\WP\SEO\Main;
|
||||
use Yoast\WP\SEO\Routes\Route_Interface;
|
||||
|
||||
/**
|
||||
* Registers a route to set whether the user has seen an introduction.
|
||||
*
|
||||
* @makePublic
|
||||
*/
|
||||
class Introductions_Seen_Route implements Route_Interface {
|
||||
|
||||
use No_Conditionals;
|
||||
|
||||
/**
|
||||
* Represents the prefix.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const ROUTE_PREFIX = '/introductions/(?P<introduction_id>[\w-]+)/seen';
|
||||
|
||||
/**
|
||||
* Holds the introductions collector instance.
|
||||
*
|
||||
* @var Introductions_Collector
|
||||
*/
|
||||
private $introductions_collector;
|
||||
|
||||
/**
|
||||
* Holds the repository.
|
||||
*
|
||||
* @var Introductions_Seen_Repository
|
||||
*/
|
||||
private $introductions_seen_repository;
|
||||
|
||||
/**
|
||||
* Holds the user helper.
|
||||
*
|
||||
* @var User_Helper
|
||||
*/
|
||||
private $user_helper;
|
||||
|
||||
/**
|
||||
* Constructs the class.
|
||||
*
|
||||
* @param Introductions_Seen_Repository $introductions_seen_repository The repository.
|
||||
* @param User_Helper $user_helper The user helper.
|
||||
* @param Introductions_Collector $introductions_collector The introduction collector.
|
||||
*/
|
||||
public function __construct(
|
||||
Introductions_Seen_Repository $introductions_seen_repository,
|
||||
User_Helper $user_helper,
|
||||
Introductions_Collector $introductions_collector
|
||||
) {
|
||||
$this->introductions_seen_repository = $introductions_seen_repository;
|
||||
$this->user_helper = $user_helper;
|
||||
$this->introductions_collector = $introductions_collector;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers routes with WordPress.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register_routes() {
|
||||
\register_rest_route(
|
||||
Main::API_V1_NAMESPACE,
|
||||
self::ROUTE_PREFIX,
|
||||
[
|
||||
[
|
||||
'methods' => 'POST',
|
||||
'callback' => [ $this, 'set_introduction_seen' ],
|
||||
'permission_callback' => [ $this, 'permission_edit_posts' ],
|
||||
'args' => [
|
||||
'introduction_id' => [
|
||||
'required' => true,
|
||||
'type' => 'string',
|
||||
'sanitize_callback' => 'sanitize_text_field',
|
||||
],
|
||||
'is_seen' => [
|
||||
'required' => false,
|
||||
'type' => 'bool',
|
||||
'default' => true,
|
||||
'sanitize_callback' => 'rest_sanitize_boolean',
|
||||
],
|
||||
],
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets whether the introduction is seen.
|
||||
*
|
||||
* @param WP_REST_Request $request The request object.
|
||||
*
|
||||
* @return WP_REST_Response|WP_Error The success or failure response.
|
||||
*/
|
||||
public function set_introduction_seen( WP_REST_Request $request ) {
|
||||
$params = $request->get_params();
|
||||
$introduction_id = $params['introduction_id'];
|
||||
$is_seen = $params['is_seen'];
|
||||
|
||||
if ( $this->introductions_collector->is_available_introduction( $introduction_id ) ) {
|
||||
try {
|
||||
$user_id = $this->user_helper->get_current_user_id();
|
||||
$result = $this->introductions_seen_repository->set_introduction( $user_id, $introduction_id, $is_seen );
|
||||
} catch ( Exception $exception ) {
|
||||
return new WP_Error(
|
||||
'wpseo_introductions_seen_error',
|
||||
$exception->getMessage(),
|
||||
(object) []
|
||||
);
|
||||
}
|
||||
|
||||
return new WP_REST_Response(
|
||||
[
|
||||
'json' => (object) [
|
||||
'success' => $result,
|
||||
],
|
||||
],
|
||||
( $result ) ? 200 : 400
|
||||
);
|
||||
}
|
||||
return new WP_REST_Response( [], 400 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Permission callback.
|
||||
*
|
||||
* @return bool True when user has 'edit_posts' permission.
|
||||
*/
|
||||
public function permission_edit_posts() {
|
||||
return \current_user_can( 'edit_posts' );
|
||||
}
|
||||
}
|
||||
@@ -14,8 +14,6 @@ use Yoast\WP\SEO\Routes\Route_Interface;
|
||||
|
||||
/**
|
||||
* Registers a route to offer get/set of the wistia embed permission for a user.
|
||||
*
|
||||
* @makePublic
|
||||
*/
|
||||
class Wistia_Embed_Permission_Route implements Route_Interface {
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ class Indexable_Term_Archive_Presentation extends Indexable_Presentation {
|
||||
* @return array The source.
|
||||
*/
|
||||
public function generate_source() {
|
||||
if ( ! empty( $this->model->object_id ) ) {
|
||||
if ( ! empty( $this->model->object_id ) || is_null( \get_queried_object() ) ) {
|
||||
return \get_term( $this->model->object_id, $this->model->object_sub_type );
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ class Indexable_Term_Archive_Presentation extends Indexable_Presentation {
|
||||
* First we get the no index option for this taxonomy, because it can be overwritten the indexable value for
|
||||
* this specific term.
|
||||
*/
|
||||
if ( ! $this->taxonomy->is_indexable( $this->source->taxonomy ) ) {
|
||||
if ( is_wp_error( $this->source ) || ! $this->taxonomy->is_indexable( $this->source->taxonomy ) ) {
|
||||
$robots['index'] = 'noindex';
|
||||
}
|
||||
|
||||
@@ -176,6 +176,10 @@ class Indexable_Term_Archive_Presentation extends Indexable_Presentation {
|
||||
return $this->model->title;
|
||||
}
|
||||
|
||||
if ( is_wp_error( $this->source ) ) {
|
||||
return $this->model->title;
|
||||
}
|
||||
|
||||
// Get the SEO title as entered in Search Appearance.
|
||||
$title = $this->options->get( 'title-tax-' . $this->source->taxonomy );
|
||||
if ( $title ) {
|
||||
@@ -209,6 +213,10 @@ class Indexable_Term_Archive_Presentation extends Indexable_Presentation {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( is_wp_error( $this->source ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$queried_terms = $query->tax_query->queried_terms;
|
||||
|
||||
if ( empty( $queried_terms[ $this->source->taxonomy ]['terms'] ) ) {
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Presenters\Admin;
|
||||
|
||||
use Yoast\WP\SEO\Helpers\Short_Link_Helper;
|
||||
use Yoast\WP\SEO\Presenters\Abstract_Presenter;
|
||||
|
||||
/**
|
||||
* Class Woocommerce_Beta_Editor_Presenter.
|
||||
*/
|
||||
class Woocommerce_Beta_Editor_Presenter extends Abstract_Presenter {
|
||||
|
||||
/**
|
||||
* The short link helper.
|
||||
*
|
||||
* @var Short_Link_Helper
|
||||
*/
|
||||
protected $short_link_helper;
|
||||
|
||||
/**
|
||||
* Woocommerce_Beta_Editor_Presenter constructor.
|
||||
*
|
||||
* @param Short_Link_Helper $short_link_helper The short link helper.
|
||||
*/
|
||||
public function __construct( Short_Link_Helper $short_link_helper ) {
|
||||
$this->short_link_helper = $short_link_helper;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the notification as an HTML string.
|
||||
*
|
||||
* @return string The notification in an HTML string representation.
|
||||
*/
|
||||
public function present() {
|
||||
$notification_text = '<p>';
|
||||
$notification_text .= $this->get_message();
|
||||
$notification_text .= '</p>';
|
||||
|
||||
return $notification_text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the message to show.
|
||||
*
|
||||
* @return string The message.
|
||||
*/
|
||||
protected function get_message() {
|
||||
return \sprintf(
|
||||
'<strong>%1$s</strong> %2$s',
|
||||
\esc_html__( 'Compatibility issue: Yoast SEO is incompatible with the beta WooCommerce product editor.', 'wordpress-seo' ),
|
||||
\sprintf(
|
||||
/* translators: 1: Yoast SEO, 2: Link start tag to the Learn more link, 3: Link closing tag. */
|
||||
\esc_html__( 'The %1$s interface is currently unavailable in the beta WooCommerce product editor. To resolve any issues, please disable the beta editor. %2$sLearn how to disable the beta WooCommerce product editor.%3$s', 'wordpress-seo' ),
|
||||
'Yoast SEO',
|
||||
'<a href="' . \esc_url( $this->short_link_helper->get( 'https://yoa.st/learn-how-disable-beta-woocommerce-product-editor' ) ) . '" target="_blank">',
|
||||
'</a>'
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -4,8 +4,6 @@ namespace Yoast\WP\SEO\Promotions\Application;
|
||||
|
||||
/**
|
||||
* Interface for the promotion manager.
|
||||
*
|
||||
* @makePublic
|
||||
*/
|
||||
interface Promotion_Manager_Interface {
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@ namespace Yoast\WP\SEO\Promotions\Domain;
|
||||
|
||||
/**
|
||||
* Class to manage the Black Friday checklist promotion.
|
||||
*
|
||||
* @makePublic
|
||||
*/
|
||||
class Black_Friday_Checklist_Promotion extends Abstract_Promotion implements Promotion_Interface {
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@ namespace Yoast\WP\SEO\Promotions\Domain;
|
||||
|
||||
/**
|
||||
* Class to manage the Black Friday promotion.
|
||||
*
|
||||
* @makePublic
|
||||
*/
|
||||
class Black_Friday_Promotion extends Abstract_Promotion implements Promotion_Interface {
|
||||
|
||||
|
||||
@@ -173,6 +173,9 @@ class Wincher_Route implements Route_Interface {
|
||||
'permalink' => [
|
||||
'required' => false,
|
||||
],
|
||||
'startAt' => [
|
||||
'required' => false,
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
@@ -256,7 +259,7 @@ class Wincher_Route implements Route_Interface {
|
||||
* @return WP_REST_Response The response.
|
||||
*/
|
||||
public function get_tracked_keyphrases( WP_REST_Request $request ) {
|
||||
$data = $this->keyphrases_action->get_tracked_keyphrases( $request['keyphrases'], $request['permalink'] );
|
||||
$data = $this->keyphrases_action->get_tracked_keyphrases( $request['keyphrases'], $request['permalink'], $request['startAt'] );
|
||||
|
||||
return new WP_REST_Response( $data, $data->status );
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace Yoast\WP\SEO\User_Profiles_Additions\User_Interface;
|
||||
|
||||
use WPSEO_Admin_Asset_Manager;
|
||||
use Yoast\WP\SEO\Helpers\Product_Helper;
|
||||
use Yoast\WP\SEO\Conditionals\User_Profile_Conditional;
|
||||
use Yoast\WP\SEO\Integrations\Integration_Interface;
|
||||
|
||||
@@ -10,6 +12,34 @@ use Yoast\WP\SEO\Integrations\Integration_Interface;
|
||||
*/
|
||||
class User_Profiles_Additions_Ui implements Integration_Interface {
|
||||
|
||||
/**
|
||||
* Holds the Product_Helper.
|
||||
*
|
||||
* @var Product_Helper
|
||||
*/
|
||||
private $product_helper;
|
||||
|
||||
/**
|
||||
* Holds the WPSEO_Admin_Asset_Manager.
|
||||
*
|
||||
* @var WPSEO_Admin_Asset_Manager
|
||||
*/
|
||||
private $asset_manager;
|
||||
|
||||
/**
|
||||
* Constructs Academy_Integration.
|
||||
*
|
||||
* @param WPSEO_Admin_Asset_Manager $asset_manager The WPSEO_Admin_Asset_Manager.
|
||||
* @param Product_Helper $product_helper The Product_Helper.
|
||||
*/
|
||||
public function __construct(
|
||||
WPSEO_Admin_Asset_Manager $asset_manager,
|
||||
Product_Helper $product_helper
|
||||
) {
|
||||
$this->asset_manager = $asset_manager;
|
||||
$this->product_helper = $product_helper;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the conditionals based in which this loadable should be active.
|
||||
*
|
||||
@@ -31,13 +61,24 @@ class User_Profiles_Additions_Ui implements Integration_Interface {
|
||||
\add_action( 'edit_user_profile', [ $this, 'add_hook_to_user_profile' ] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueues the assets needed for this integration.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function enqueue_assets() {
|
||||
if ( $this->product_helper->is_premium() ) {
|
||||
$this->asset_manager->enqueue_style( 'introductions' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the inputs needed for SEO values to the User Profile page.
|
||||
*
|
||||
* @param WP_User $user User instance to output for.
|
||||
*/
|
||||
public function add_hook_to_user_profile( $user ) {
|
||||
|
||||
$this->enqueue_assets();
|
||||
echo '<div class="yoast yoast-settings">';
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user