plugin updates
This commit is contained in:
@@ -2,14 +2,13 @@
|
||||
|
||||
namespace Yoast\WP\SEO\Builders;
|
||||
|
||||
use DOMDocument;
|
||||
use WP_HTML_Tag_Processor;
|
||||
use WPSEO_Image_Utils;
|
||||
use Yoast\WP\SEO\Helpers\Image_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Indexable_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Post_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Url_Helper;
|
||||
use Yoast\WP\SEO\Images\Application\Image_Content_Extractor;
|
||||
use Yoast\WP\SEO\Models\Indexable;
|
||||
use Yoast\WP\SEO\Models\SEO_Links;
|
||||
use Yoast\WP\SEO\Repositories\Indexable_Repository;
|
||||
@@ -69,6 +68,13 @@ class Indexable_Link_Builder {
|
||||
*/
|
||||
protected $indexable_repository;
|
||||
|
||||
/**
|
||||
* Class that finds all images in a content string and extracts them.
|
||||
*
|
||||
* @var Image_Content_Extractor
|
||||
*/
|
||||
private $image_content_extractor;
|
||||
|
||||
/**
|
||||
* Indexable_Link_Builder constructor.
|
||||
*
|
||||
@@ -83,13 +89,15 @@ class Indexable_Link_Builder {
|
||||
Url_Helper $url_helper,
|
||||
Post_Helper $post_helper,
|
||||
Options_Helper $options_helper,
|
||||
Indexable_Helper $indexable_helper
|
||||
Indexable_Helper $indexable_helper,
|
||||
Image_Content_Extractor $image_content_extractor
|
||||
) {
|
||||
$this->seo_links_repository = $seo_links_repository;
|
||||
$this->url_helper = $url_helper;
|
||||
$this->post_helper = $post_helper;
|
||||
$this->options_helper = $options_helper;
|
||||
$this->indexable_helper = $indexable_helper;
|
||||
$this->seo_links_repository = $seo_links_repository;
|
||||
$this->url_helper = $url_helper;
|
||||
$this->post_helper = $post_helper;
|
||||
$this->options_helper = $options_helper;
|
||||
$this->indexable_helper = $indexable_helper;
|
||||
$this->image_content_extractor = $image_content_extractor;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -137,7 +145,7 @@ class Indexable_Link_Builder {
|
||||
|
||||
$content = \str_replace( ']]>', ']]>', $content );
|
||||
$links = $this->gather_links( $content );
|
||||
$images = $this->gather_images( $content );
|
||||
$images = $this->image_content_extractor->gather_images( $content );
|
||||
|
||||
if ( empty( $links ) && empty( $images ) ) {
|
||||
$indexable->link_count = 0;
|
||||
@@ -146,6 +154,10 @@ class Indexable_Link_Builder {
|
||||
return [];
|
||||
}
|
||||
|
||||
if ( ! empty( $images ) && ( $indexable->open_graph_image_source === 'first-content-image' || $indexable->twitter_image_source === 'first-content-image' ) ) {
|
||||
$this->update_first_content_image( $indexable, $images );
|
||||
}
|
||||
|
||||
$links = $this->create_links( $indexable, $links, $images );
|
||||
|
||||
$this->update_related_indexables( $indexable, $links );
|
||||
@@ -229,164 +241,6 @@ class Indexable_Link_Builder {
|
||||
return $links;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gathers all images from content with WP's WP_HTML_Tag_Processor() and returns them along with their IDs, if
|
||||
* possible.
|
||||
*
|
||||
* @param string $content The content.
|
||||
*
|
||||
* @return int[] An associated array of image IDs, keyed by their URL.
|
||||
*/
|
||||
protected function gather_images_wp( $content ) {
|
||||
$processor = new WP_HTML_Tag_Processor( $content );
|
||||
$images = [];
|
||||
|
||||
$query = [
|
||||
'tag_name' => 'img',
|
||||
];
|
||||
|
||||
/**
|
||||
* Filter 'wpseo_image_attribute_containing_id' - Allows filtering what attribute will be used to extract image IDs from.
|
||||
*
|
||||
* Defaults to "class", which is where WP natively stores the image IDs, in a `wp-image-<ID>` format.
|
||||
*
|
||||
* @api string The attribute to be used to extract image IDs from.
|
||||
*/
|
||||
$attribute = \apply_filters( 'wpseo_image_attribute_containing_id', 'class' );
|
||||
|
||||
while ( $processor->next_tag( $query ) ) {
|
||||
$src = \htmlentities( $processor->get_attribute( 'src' ), ( \ENT_QUOTES | \ENT_SUBSTITUTE | \ENT_HTML401 ), \get_bloginfo( 'charset' ) );
|
||||
$classes = $processor->get_attribute( $attribute );
|
||||
$id = $this->extract_id_of_classes( $classes );
|
||||
|
||||
$images[ $src ] = $id;
|
||||
}
|
||||
|
||||
return $images;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gathers all images from content with DOMDocument() and returns them along with their IDs, if possible.
|
||||
*
|
||||
* @param string $content The content.
|
||||
*
|
||||
* @return int[] An associated array of image IDs, keyed by their URL.
|
||||
*/
|
||||
protected function gather_images_domdocument( $content ) {
|
||||
$images = [];
|
||||
$charset = \get_bloginfo( 'charset' );
|
||||
|
||||
/**
|
||||
* Filter 'wpseo_image_attribute_containing_id' - Allows filtering what attribute will be used to extract image IDs from.
|
||||
*
|
||||
* Defaults to "class", which is where WP natively stores the image IDs, in a `wp-image-<ID>` format.
|
||||
*
|
||||
* @api string The attribute to be used to extract image IDs from.
|
||||
*/
|
||||
$attribute = \apply_filters( 'wpseo_image_attribute_containing_id', 'class' );
|
||||
|
||||
\libxml_use_internal_errors( true );
|
||||
$post_dom = new DOMDocument();
|
||||
$post_dom->loadHTML( '<?xml encoding="' . $charset . '">' . $content );
|
||||
\libxml_clear_errors();
|
||||
|
||||
foreach ( $post_dom->getElementsByTagName( 'img' ) as $img ) {
|
||||
$src = \htmlentities( $img->getAttribute( 'src' ), ( \ENT_QUOTES | \ENT_SUBSTITUTE | \ENT_HTML401 ), $charset );
|
||||
$classes = $img->getAttribute( $attribute );
|
||||
$id = $this->extract_id_of_classes( $classes );
|
||||
|
||||
$images[ $src ] = $id;
|
||||
}
|
||||
|
||||
return $images;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts image ID out of the image's classes.
|
||||
*
|
||||
* @param string $classes The classes assigned to the image.
|
||||
*
|
||||
* @return int The ID that's extracted from the classes.
|
||||
*/
|
||||
protected function extract_id_of_classes( $classes ) {
|
||||
if ( ! $classes ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter 'wpseo_extract_id_pattern' - Allows filtering the regex patern to be used to extract image IDs from class/attribute names.
|
||||
*
|
||||
* Defaults to the pattern that extracts image IDs from core's `wp-image-<ID>` native format in image classes.
|
||||
*
|
||||
* @api string The regex pattern to be used to extract image IDs from class names. Empty string if the whole class/attribute should be returned.
|
||||
*/
|
||||
$pattern = \apply_filters( 'wpseo_extract_id_pattern', '/(?<!\S)wp-image-(\d+)(?!\S)/i' );
|
||||
|
||||
if ( $pattern === '' ) {
|
||||
return (int) $classes;
|
||||
}
|
||||
|
||||
$matches = [];
|
||||
|
||||
if ( \preg_match( $pattern, $classes, $matches ) ) {
|
||||
return (int) $matches[1];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gathers all images from content.
|
||||
*
|
||||
* @param string $content The content.
|
||||
*
|
||||
* @return int[] An associated array of image IDs, keyed by their URLs.
|
||||
*/
|
||||
protected function gather_images( $content ) {
|
||||
|
||||
/**
|
||||
* Filter 'wpseo_force_creating_and_using_attachment_indexables' - Filters if we should use attachment indexables to find all content images. Instead of scanning the content.
|
||||
*
|
||||
* The default value is false.
|
||||
*
|
||||
* @since 21.1
|
||||
*/
|
||||
$should_not_parse_content = \apply_filters( 'wpseo_force_creating_and_using_attachment_indexables', false );
|
||||
|
||||
/**
|
||||
* Filter 'wpseo_force_skip_image_content_parsing' - Filters if we should force skip scanning the content to parse images.
|
||||
* This filter can be used if the regex gives a faster result than scanning the code.
|
||||
*
|
||||
* The default value is false.
|
||||
*
|
||||
* @since 21.1
|
||||
*/
|
||||
$should_not_parse_content = \apply_filters( 'wpseo_force_skip_image_content_parsing', $should_not_parse_content );
|
||||
if ( ! $should_not_parse_content && \class_exists( WP_HTML_Tag_Processor::class ) ) {
|
||||
return $this->gather_images_wp( $content );
|
||||
}
|
||||
|
||||
if ( ! $should_not_parse_content && \class_exists( DOMDocument::class ) ) {
|
||||
return $this->gather_images_DOMDocument( $content );
|
||||
}
|
||||
|
||||
if ( \strpos( $content, 'src' ) === false ) {
|
||||
// Nothing to do.
|
||||
return [];
|
||||
}
|
||||
|
||||
$images = [];
|
||||
$regexp = '<img\s[^>]*src=("??)([^" >]*?)\\1[^>]*>';
|
||||
// Used modifiers iU to match case insensitive and make greedy quantifiers lazy.
|
||||
if ( \preg_match_all( "/$regexp/iU", $content, $matches, \PREG_SET_ORDER ) ) {
|
||||
foreach ( $matches as $match ) {
|
||||
$images[ $match[2] ] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return $images;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates link models from lists of URLs and image sources.
|
||||
*
|
||||
@@ -729,4 +583,27 @@ class Indexable_Link_Builder {
|
||||
$this->indexable_repository->update_incoming_link_count( $count['target_indexable_id'], $count['incoming'] );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the image ids when the indexable images are marked as first content image.
|
||||
*
|
||||
* @param Indexable $indexable The indexable to change.
|
||||
* @param array<string|int> $images The image array.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function update_first_content_image( Indexable $indexable, array $images ): void {
|
||||
$current_open_graph_image = $indexable->open_graph_image;
|
||||
$current_twitter_image = $indexable->twitter_image;
|
||||
|
||||
$first_content_image_url = \key( $images );
|
||||
$first_content_image_id = \current( $images );
|
||||
|
||||
if ( $indexable->open_graph_image_source === 'first-content-image' && $current_open_graph_image === $first_content_image_url && ! empty( $first_content_image_id ) ) {
|
||||
$indexable->open_graph_image_id = $first_content_image_id;
|
||||
}
|
||||
if ( $indexable->twitter_image_source === 'first-content-image' && $current_twitter_image === $first_content_image_url && ! empty( $first_content_image_id ) ) {
|
||||
$indexable->twitter_image_id = $first_content_image_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Conditionals;
|
||||
|
||||
/**
|
||||
* Feature flag conditional for the new dashboard UI.
|
||||
*/
|
||||
class New_Dashboard_Ui_Conditional extends Feature_Flag_Conditional {
|
||||
|
||||
/**
|
||||
* Returns the name of the feature flag.
|
||||
*
|
||||
* @return string The name of the feature flag.
|
||||
*/
|
||||
protected function get_feature_flag() {
|
||||
return 'NEW_DASHBOARD_UI';
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Conditionals\Third_Party;
|
||||
|
||||
use Yoast\WP\SEO\Conditionals\Conditional;
|
||||
|
||||
/**
|
||||
* Conditional that is only met when Jetpack_Boost exists.
|
||||
*/
|
||||
class Jetpack_Boost_Active_Conditional implements Conditional {
|
||||
|
||||
/**
|
||||
* Returns `true` when the Jetpack_Boost class exists within this WordPress installation.
|
||||
*
|
||||
* @return bool `true` when the Jetpack_Boost class exists within this WordPress installation.
|
||||
*/
|
||||
public function is_met() {
|
||||
return \class_exists( '\Automattic\Jetpack_Boost\Jetpack_Boost', false );
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Conditionals\Third_Party;
|
||||
|
||||
use Automattic\Jetpack_Boost\Lib\Premium_Features;
|
||||
use Yoast\WP\SEO\Conditionals\Conditional;
|
||||
|
||||
/**
|
||||
* Conditional that is met when Jetpack Boost is not installed, activated or premium.
|
||||
*/
|
||||
class Jetpack_Boost_Not_Premium_Conditional implements Conditional {
|
||||
|
||||
/**
|
||||
* Whether Jetpack Boost is not premium.
|
||||
*
|
||||
* @return bool Whether Jetpack Boost is not premium.
|
||||
*/
|
||||
public function is_met() {
|
||||
return ! $this->is_premium();
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves, if available, if Jetpack Boost has priority feature available.
|
||||
*
|
||||
* @return bool Whether Jetpack Boost is premium.
|
||||
*/
|
||||
private function is_premium() {
|
||||
if ( \class_exists( '\Automattic\Jetpack_Boost\Lib\Premium_Features', false ) ) {
|
||||
return Premium_Features::has_feature(
|
||||
Premium_Features::PRIORITY_SUPPORT
|
||||
);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,180 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Dashboard\User_Interface;
|
||||
|
||||
use WPSEO_Admin_Asset_Manager;
|
||||
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
|
||||
use Yoast\WP\SEO\Conditionals\New_Dashboard_Ui_Conditional;
|
||||
use Yoast\WP\SEO\Helpers\Current_Page_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Notification_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Product_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Short_Link_Helper;
|
||||
use Yoast\WP\SEO\Integrations\Integration_Interface;
|
||||
|
||||
/**
|
||||
* Class New_Dashboard_Page_Integration.
|
||||
*/
|
||||
class New_Dashboard_Page_Integration implements Integration_Interface {
|
||||
|
||||
/**
|
||||
* The page name.
|
||||
*/
|
||||
public const PAGE = 'wpseo_dashboard';
|
||||
|
||||
/**
|
||||
* The notification helper.
|
||||
*
|
||||
* @var Notification_Helper
|
||||
*/
|
||||
protected $notification_helper;
|
||||
|
||||
/**
|
||||
* Holds the WPSEO_Admin_Asset_Manager.
|
||||
*
|
||||
* @var WPSEO_Admin_Asset_Manager
|
||||
*/
|
||||
private $asset_manager;
|
||||
|
||||
/**
|
||||
* Holds the Current_Page_Helper.
|
||||
*
|
||||
* @var Current_Page_Helper
|
||||
*/
|
||||
private $current_page_helper;
|
||||
|
||||
/**
|
||||
* Holds the Product_Helper.
|
||||
*
|
||||
* @var Product_Helper
|
||||
*/
|
||||
private $product_helper;
|
||||
|
||||
/**
|
||||
* Holds the Short_Link_Helper.
|
||||
*
|
||||
* @var Short_Link_Helper
|
||||
*/
|
||||
private $shortlink_helper;
|
||||
|
||||
/**
|
||||
* Constructs Academy_Integration.
|
||||
*
|
||||
* @param WPSEO_Admin_Asset_Manager $asset_manager The WPSEO_Admin_Asset_Manager.
|
||||
* @param Current_Page_Helper $current_page_helper The Current_Page_Helper.
|
||||
* @param Product_Helper $product_helper The Product_Helper.
|
||||
* @param Short_Link_Helper $shortlink_helper The Short_Link_Helper.
|
||||
* @param Notification_Helper $notification_helper The Notification_Helper.
|
||||
*/
|
||||
public function __construct(
|
||||
WPSEO_Admin_Asset_Manager $asset_manager,
|
||||
Current_Page_Helper $current_page_helper,
|
||||
Product_Helper $product_helper,
|
||||
Short_Link_Helper $shortlink_helper,
|
||||
Notification_Helper $notification_helper
|
||||
) {
|
||||
$this->asset_manager = $asset_manager;
|
||||
$this->current_page_helper = $current_page_helper;
|
||||
$this->product_helper = $product_helper;
|
||||
$this->shortlink_helper = $shortlink_helper;
|
||||
$this->notification_helper = $notification_helper;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the conditionals based on which this loadable should be active.
|
||||
*
|
||||
* @return array<string>
|
||||
*/
|
||||
public static function get_conditionals() {
|
||||
return [ Admin_Conditional::class, New_Dashboard_Ui_Conditional::class ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the integration.
|
||||
*
|
||||
* This is the place to register hooks and filters.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register_hooks() {
|
||||
// Add page.
|
||||
\add_filter( 'wpseo_submenu_pages', [ $this, 'add_page' ] );
|
||||
|
||||
// Are we on the dashboard page?
|
||||
if ( $this->current_page_helper->get_current_yoast_seo_page() === self::PAGE ) {
|
||||
\add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_assets' ] );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the page.
|
||||
*
|
||||
* @param array<string,array<string>> $pages The pages.
|
||||
*
|
||||
* @return array<string,array<string>> The pages.
|
||||
*/
|
||||
public function add_page( $pages ) {
|
||||
\array_splice(
|
||||
$pages,
|
||||
0,
|
||||
0,
|
||||
[
|
||||
[
|
||||
self::PAGE,
|
||||
'',
|
||||
\__( 'General', 'wordpress-seo' ),
|
||||
'wpseo_manage_options',
|
||||
self::PAGE,
|
||||
[ $this, 'display_page' ],
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
return $pages;
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the page.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function display_page() {
|
||||
echo '<div id="yoast-seo-dashboard"></div>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueues the assets.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function enqueue_assets() {
|
||||
// Remove the emoji script as it is incompatible with both React and any contenteditable fields.
|
||||
\remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
|
||||
\wp_enqueue_media();
|
||||
$this->asset_manager->enqueue_script( 'new-dashboard' );
|
||||
$this->asset_manager->enqueue_style( 'new-dashboard' );
|
||||
$this->asset_manager->localize_script( 'new-dashboard', 'wpseoScriptData', $this->get_script_data() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the script data.
|
||||
*
|
||||
* @return array<string,array<string|bool,array<string>>> The script data.
|
||||
*/
|
||||
private function get_script_data() {
|
||||
return [
|
||||
'preferences' => [
|
||||
'isPremium' => $this->product_helper->is_premium(),
|
||||
'isRtl' => \is_rtl(),
|
||||
'pluginUrl' => \plugins_url( '', \WPSEO_FILE ),
|
||||
'upsellSettings' => [
|
||||
'actionId' => 'load-nfd-ctb',
|
||||
'premiumCtbId' => 'f6a84663-465f-4cb5-8ba5-f7a6d72224b2',
|
||||
],
|
||||
],
|
||||
'linkParams' => $this->shortlink_helper->get_query_params(),
|
||||
'userEditUrl' => \add_query_arg( 'user_id', '{user_id}', \admin_url( 'user-edit.php' ) ),
|
||||
'problems' => $this->notification_helper->get_problems(),
|
||||
'notifications' => $this->notification_helper->get_notifications(),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -61,7 +61,7 @@ class Multilingual implements Integration_Data_Provider_Interface {
|
||||
* @return array<string,bool> Returns the name and if the feature is enabled.
|
||||
*/
|
||||
public function to_array(): array {
|
||||
return [ 'multilingualPluginActive' => $this->is_enabled() ];
|
||||
return [ 'isMultilingualActive' => $this->is_enabled() ];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
// @phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- This namespace should reflect the namespace of the original class.
|
||||
namespace Yoast\WP\SEO\Editors\Framework\Integrations;
|
||||
|
||||
use WPSEO_Addon_Manager;
|
||||
use Yoast\WP\SEO\Editors\Domain\Integrations\Integration_Data_Provider_Interface;
|
||||
|
||||
/**
|
||||
* Describes if the News SEO plugin is enabled.
|
||||
*/
|
||||
class News_SEO implements Integration_Data_Provider_Interface {
|
||||
|
||||
/**
|
||||
* The addon manager.
|
||||
*
|
||||
* @var WPSEO_Addon_Manager
|
||||
*/
|
||||
private $addon_manager;
|
||||
|
||||
/**
|
||||
* The constructor.
|
||||
*
|
||||
* @param WPSEO_Addon_Manager $addon_manager The addon manager.
|
||||
*/
|
||||
public function __construct( WPSEO_Addon_Manager $addon_manager ) {
|
||||
$this->addon_manager = $addon_manager;
|
||||
}
|
||||
|
||||
/**
|
||||
* If the plugin is activated.
|
||||
*
|
||||
* @return bool If the plugin is activated.
|
||||
*/
|
||||
public function is_enabled(): bool {
|
||||
return \is_plugin_active( $this->addon_manager->get_plugin_file( WPSEO_Addon_Manager::NEWS_SLUG ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Return this object represented by a key value array.
|
||||
*
|
||||
* @return array<string,bool> Returns the name and if the feature is enabled.
|
||||
*/
|
||||
public function to_array(): array {
|
||||
return [ 'isNewsSeoActive' => $this->is_enabled() ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns this object represented by a key value structure that is compliant with the script data array.
|
||||
*
|
||||
* @return array<string,bool> Returns the legacy key and if the feature is enabled.
|
||||
*/
|
||||
public function to_legacy_array(): array {
|
||||
return [ 'isNewsSeoActive' => $this->is_enabled() ];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
// @phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- This namespace should reflect the namespace of the original class.
|
||||
namespace Yoast\WP\SEO\Editors\Framework\Integrations;
|
||||
|
||||
use WPSEO_Addon_Manager;
|
||||
use Yoast\WP\SEO\Editors\Domain\Integrations\Integration_Data_Provider_Interface;
|
||||
|
||||
/**
|
||||
* Describes if the Woocommerce SEO addon is enabled.
|
||||
*/
|
||||
class WooCommerce_SEO implements Integration_Data_Provider_Interface {
|
||||
|
||||
/**
|
||||
* The addon manager.
|
||||
*
|
||||
* @var WPSEO_Addon_Manager
|
||||
*/
|
||||
private $addon_manager;
|
||||
|
||||
/**
|
||||
* The constructor.
|
||||
*
|
||||
* @param WPSEO_Addon_Manager $addon_manager The addon manager.
|
||||
*/
|
||||
public function __construct( WPSEO_Addon_Manager $addon_manager ) {
|
||||
$this->addon_manager = $addon_manager;
|
||||
}
|
||||
|
||||
/**
|
||||
* If the plugin is activated.
|
||||
*
|
||||
* @return bool If the plugin is activated.
|
||||
*/
|
||||
public function is_enabled(): bool {
|
||||
return \is_plugin_active( $this->addon_manager->get_plugin_file( WPSEO_Addon_Manager::WOOCOMMERCE_SLUG ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Return this object represented by a key value array.
|
||||
*
|
||||
* @return array<string,bool> Returns the name and if the addon is enabled.
|
||||
*/
|
||||
public function to_array(): array {
|
||||
return [ 'isWooCommerceSeoActive' => $this->is_enabled() ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns this object represented by a key value structure that is compliant with the script data array.
|
||||
*
|
||||
* @return array<string,bool> Returns the legacy key and if the feature is enabled.
|
||||
*/
|
||||
public function to_legacy_array(): array {
|
||||
return [ 'isWooCommerceSeoActive' => $this->is_enabled() ];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
// @phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- This namespace should reflect the namespace of the original class.
|
||||
namespace Yoast\WP\SEO\Editors\Framework\Integrations;
|
||||
|
||||
use Yoast\WP\SEO\Conditionals\WooCommerce_Conditional;
|
||||
use Yoast\WP\SEO\Editors\Domain\Integrations\Integration_Data_Provider_Interface;
|
||||
|
||||
/**
|
||||
* Describes if the Woocommerce plugin is enabled.
|
||||
*/
|
||||
class WooCommerce implements Integration_Data_Provider_Interface {
|
||||
|
||||
/**
|
||||
* The WooCommerce conditional.
|
||||
*
|
||||
* @var WooCommerce_Conditional $woocommerce_conditional
|
||||
*/
|
||||
private $woocommerce_conditional;
|
||||
|
||||
/**
|
||||
* The constructor.
|
||||
*
|
||||
* @param WooCommerce_Conditional $woocommerce_conditional The WooCommerce conditional.
|
||||
*/
|
||||
public function __construct( WooCommerce_Conditional $woocommerce_conditional ) {
|
||||
$this->woocommerce_conditional = $woocommerce_conditional;
|
||||
}
|
||||
|
||||
/**
|
||||
* If the plugin is activated.
|
||||
*
|
||||
* @return bool If the plugin is activated.
|
||||
*/
|
||||
public function is_enabled(): bool {
|
||||
return $this->woocommerce_conditional->is_met();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return this object represented by a key value array.
|
||||
*
|
||||
* @return array<string,bool> Returns the name and if the feature is enabled.
|
||||
*/
|
||||
public function to_array(): array {
|
||||
return [ 'isWooCommerceActive' => $this->is_enabled() ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns this object represented by a key value structure that is compliant with the script data array.
|
||||
*
|
||||
* @return array<string,bool> Returns the legacy key and if the feature is enabled.
|
||||
*/
|
||||
public function to_legacy_array(): array {
|
||||
return [ 'isWooCommerceActive' => $this->is_enabled() ];
|
||||
}
|
||||
}
|
||||
@@ -3,9 +3,11 @@
|
||||
namespace Yoast\WP\SEO\Editors\Framework\Site;
|
||||
|
||||
use Exception;
|
||||
use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Product_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Short_Link_Helper;
|
||||
use Yoast\WP\SEO\Introductions\Infrastructure\Wistia_Embed_Permission_Repository;
|
||||
use Yoast\WP\SEO\Promotions\Application\Promotion_Manager;
|
||||
use Yoast\WP\SEO\Surfaces\Meta_Surface;
|
||||
|
||||
/**
|
||||
@@ -41,6 +43,20 @@ abstract class Base_Site_Information {
|
||||
*/
|
||||
protected $product_helper;
|
||||
|
||||
/**
|
||||
* The options helper.
|
||||
*
|
||||
* @var Options_Helper $options_helper
|
||||
*/
|
||||
protected $options_helper;
|
||||
|
||||
/**
|
||||
* The promotion manager.
|
||||
*
|
||||
* @var Promotion_Manager $promotion_manager
|
||||
*/
|
||||
protected $promotion_manager;
|
||||
|
||||
/**
|
||||
* The constructor.
|
||||
*
|
||||
@@ -49,17 +65,23 @@ abstract class Base_Site_Information {
|
||||
* repository.
|
||||
* @param Meta_Surface $meta The meta surface.
|
||||
* @param Product_Helper $product_helper The product helper.
|
||||
* @param Options_Helper $options_helper The options helper.
|
||||
* @param Promotion_Manager $promotion_manager The promotion manager.
|
||||
*/
|
||||
public function __construct(
|
||||
Short_Link_Helper $short_link_helper,
|
||||
Wistia_Embed_Permission_Repository $wistia_embed_permission_repository,
|
||||
Meta_Surface $meta,
|
||||
Product_Helper $product_helper
|
||||
Product_Helper $product_helper,
|
||||
Options_Helper $options_helper,
|
||||
Promotion_Manager $promotion_manager
|
||||
) {
|
||||
$this->short_link_helper = $short_link_helper;
|
||||
$this->wistia_embed_permission_repository = $wistia_embed_permission_repository;
|
||||
$this->meta = $meta;
|
||||
$this->product_helper = $product_helper;
|
||||
$this->options_helper = $options_helper;
|
||||
$this->promotion_manager = $promotion_manager;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -70,16 +92,25 @@ abstract class Base_Site_Information {
|
||||
*/
|
||||
public function get_site_information(): array {
|
||||
return [
|
||||
'adminUrl' => \admin_url( 'admin.php' ),
|
||||
'linkParams' => $this->short_link_helper->get_query_params(),
|
||||
'pluginUrl' => \plugins_url( '', \WPSEO_FILE ),
|
||||
'wistiaEmbedPermission' => $this->wistia_embed_permission_repository->get_value_for_user( \get_current_user_id() ),
|
||||
'site_name' => $this->meta->for_current_page()->site_name,
|
||||
'contentLocale' => \get_locale(),
|
||||
'userLocale' => \get_user_locale(),
|
||||
'isRtl' => \is_rtl(),
|
||||
'isPremium' => $this->product_helper->is_premium(),
|
||||
'siteIconUrl' => \get_site_icon_url(),
|
||||
'adminUrl' => \admin_url( 'admin.php' ),
|
||||
'linkParams' => $this->short_link_helper->get_query_params(),
|
||||
'pluginUrl' => \plugins_url( '', \WPSEO_FILE ),
|
||||
'wistiaEmbedPermission' => $this->wistia_embed_permission_repository->get_value_for_user( \get_current_user_id() ),
|
||||
'site_name' => $this->meta->for_current_page()->site_name,
|
||||
'contentLocale' => \get_locale(),
|
||||
'userLocale' => \get_user_locale(),
|
||||
'isRtl' => \is_rtl(),
|
||||
'isPremium' => $this->product_helper->is_premium(),
|
||||
'siteIconUrl' => \get_site_icon_url(),
|
||||
'showSocial' => [
|
||||
'facebook' => $this->options_helper->get( 'opengraph', false ),
|
||||
'twitter' => $this->options_helper->get( 'twitter', false ),
|
||||
],
|
||||
'sitewideSocialImage' => $this->options_helper->get( 'og_default_image' ),
|
||||
// phpcs:ignore Generic.ControlStructures.DisallowYodaConditions -- Bug: squizlabs/PHP_CodeSniffer#2962.
|
||||
'isPrivateBlog' => ( (string) \get_option( 'blog_public' ) ) === '0',
|
||||
'currentPromotions' => $this->promotion_manager->get_current_promotions(),
|
||||
'blackFridayBlockEditorUrl' => ( $this->promotion_manager->is( 'black-friday-2023-checklist' ) ) ? $this->short_link_helper->get( 'https://yoa.st/black-friday-checklist' ) : '',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -91,17 +122,26 @@ abstract class Base_Site_Information {
|
||||
*/
|
||||
public function get_legacy_site_information(): array {
|
||||
return [
|
||||
'adminUrl' => \admin_url( 'admin.php' ),
|
||||
'linkParams' => $this->short_link_helper->get_query_params(),
|
||||
'pluginUrl' => \plugins_url( '', \WPSEO_FILE ),
|
||||
'wistiaEmbedPermission' => $this->wistia_embed_permission_repository->get_value_for_user( \get_current_user_id() ),
|
||||
'metabox' => [
|
||||
'adminUrl' => \admin_url( 'admin.php' ),
|
||||
'linkParams' => $this->short_link_helper->get_query_params(),
|
||||
'pluginUrl' => \plugins_url( '', \WPSEO_FILE ),
|
||||
'wistiaEmbedPermission' => $this->wistia_embed_permission_repository->get_value_for_user( \get_current_user_id() ),
|
||||
'sitewideSocialImage' => $this->options_helper->get( 'og_default_image' ),
|
||||
// phpcs:ignore Generic.ControlStructures.DisallowYodaConditions -- Bug: squizlabs/PHP_CodeSniffer#2962.
|
||||
'isPrivateBlog' => ( (string) \get_option( 'blog_public' ) ) === '0',
|
||||
'currentPromotions' => $this->promotion_manager->get_current_promotions(),
|
||||
'blackFridayBlockEditorUrl' => ( $this->promotion_manager->is( 'black-friday-2023-checklist' ) ) ? $this->short_link_helper->get( 'https://yoa.st/black-friday-checklist' ) : '',
|
||||
'metabox' => [
|
||||
'site_name' => $this->meta->for_current_page()->site_name,
|
||||
'contentLocale' => \get_locale(),
|
||||
'userLocale' => \get_user_locale(),
|
||||
'isRtl' => \is_rtl(),
|
||||
'isPremium' => $this->product_helper->is_premium(),
|
||||
'siteIconUrl' => \get_site_icon_url(),
|
||||
'showSocial' => [
|
||||
'facebook' => $this->options_helper->get( 'opengraph', false ),
|
||||
'twitter' => $this->options_helper->get( 'twitter', false ),
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace Yoast\WP\SEO\Editors\Framework\Site;
|
||||
|
||||
use Yoast\WP\SEO\Actions\Alert_Dismissal_Action;
|
||||
use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Product_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Short_Link_Helper;
|
||||
use Yoast\WP\SEO\Introductions\Infrastructure\Wistia_Embed_Permission_Repository;
|
||||
@@ -28,36 +29,30 @@ class Post_Site_Information extends Base_Site_Information {
|
||||
*/
|
||||
private $alert_dismissal_action;
|
||||
|
||||
/**
|
||||
* The promotion manager.
|
||||
*
|
||||
* @var Promotion_Manager $promotion_manager
|
||||
*/
|
||||
private $promotion_manager;
|
||||
|
||||
/**
|
||||
* Constructs the class.
|
||||
*
|
||||
* @param Promotion_Manager $promotion_manager The promotion manager.
|
||||
* @param Short_Link_Helper $short_link_helper The short link helper.
|
||||
* @param Wistia_Embed_Permission_Repository $wistia_embed_permission_repository The wistia embed permission
|
||||
* repository.
|
||||
* @param Meta_Surface $meta The meta surface.
|
||||
* @param Product_Helper $product_helper The product helper.
|
||||
* @param Alert_Dismissal_Action $alert_dismissal_action The alert dismissal action.
|
||||
* @param Options_Helper $options_helper The options helper.
|
||||
* @param Promotion_Manager $promotion_manager The promotion manager.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(
|
||||
Promotion_Manager $promotion_manager,
|
||||
Short_Link_Helper $short_link_helper,
|
||||
Wistia_Embed_Permission_Repository $wistia_embed_permission_repository,
|
||||
Meta_Surface $meta,
|
||||
Product_Helper $product_helper,
|
||||
Alert_Dismissal_Action $alert_dismissal_action
|
||||
Alert_Dismissal_Action $alert_dismissal_action,
|
||||
Options_Helper $options_helper,
|
||||
Promotion_Manager $promotion_manager
|
||||
) {
|
||||
parent::__construct( $short_link_helper, $wistia_embed_permission_repository, $meta, $product_helper );
|
||||
$this->promotion_manager = $promotion_manager;
|
||||
parent::__construct( $short_link_helper, $wistia_embed_permission_repository, $meta, $product_helper, $options_helper, $promotion_manager );
|
||||
$this->alert_dismissal_action = $alert_dismissal_action;
|
||||
}
|
||||
|
||||
@@ -82,9 +77,7 @@ class Post_Site_Information extends Base_Site_Information {
|
||||
|
||||
$data = [
|
||||
'dismissedAlerts' => $dismissed_alerts,
|
||||
'currentPromotions' => $this->promotion_manager->get_current_promotions(),
|
||||
'webinarIntroBlockEditorUrl' => $this->short_link_helper->get( 'https://yoa.st/webinar-intro-block-editor' ),
|
||||
'blackFridayBlockEditorUrl' => ( $this->promotion_manager->is( 'black-friday-2023-checklist' ) ) ? $this->short_link_helper->get( 'https://yoa.st/black-friday-checklist' ) : '',
|
||||
'metabox' => [
|
||||
'search_url' => $this->search_url(),
|
||||
'post_edit_url' => $this->edit_url(),
|
||||
@@ -105,9 +98,7 @@ class Post_Site_Information extends Base_Site_Information {
|
||||
|
||||
$data = [
|
||||
'dismissedAlerts' => $dismissed_alerts,
|
||||
'currentPromotions' => $this->promotion_manager->get_current_promotions(),
|
||||
'webinarIntroBlockEditorUrl' => $this->short_link_helper->get( 'https://yoa.st/webinar-intro-block-editor' ),
|
||||
'blackFridayBlockEditorUrl' => ( $this->promotion_manager->is( 'black-friday-2023-checklist' ) ) ? $this->short_link_helper->get( 'https://yoa.st/black-friday-checklist' ) : '',
|
||||
'search_url' => $this->search_url(),
|
||||
'post_edit_url' => $this->edit_url(),
|
||||
'base_url' => $this->base_url_for_js(),
|
||||
|
||||
@@ -4,24 +4,12 @@ namespace Yoast\WP\SEO\Editors\Framework\Site;
|
||||
|
||||
use WP_Taxonomy;
|
||||
use WP_Term;
|
||||
use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Product_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Short_Link_Helper;
|
||||
use Yoast\WP\SEO\Introductions\Infrastructure\Wistia_Embed_Permission_Repository;
|
||||
use Yoast\WP\SEO\Surfaces\Meta_Surface;
|
||||
|
||||
/**
|
||||
* The Term_Site_Information class.
|
||||
*/
|
||||
class Term_Site_Information extends Base_Site_Information {
|
||||
|
||||
/**
|
||||
* The options helper.
|
||||
*
|
||||
* @var Options_Helper
|
||||
*/
|
||||
private $options_helper;
|
||||
|
||||
/**
|
||||
* The taxonomy.
|
||||
*
|
||||
@@ -36,27 +24,6 @@ class Term_Site_Information extends Base_Site_Information {
|
||||
*/
|
||||
private $term;
|
||||
|
||||
/**
|
||||
* The constructor.
|
||||
*
|
||||
* @param Options_Helper $options_helper The options helper.
|
||||
* @param Short_Link_Helper $short_link_helper The short link helper.
|
||||
* @param Wistia_Embed_Permission_Repository $wistia_embed_permission_repository The wistia embed permission
|
||||
* repository.
|
||||
* @param Meta_Surface $meta The meta surface.
|
||||
* @param Product_Helper $product_helper The product helper.
|
||||
*/
|
||||
public function __construct(
|
||||
Options_Helper $options_helper,
|
||||
Short_Link_Helper $short_link_helper,
|
||||
Wistia_Embed_Permission_Repository $wistia_embed_permission_repository,
|
||||
Meta_Surface $meta,
|
||||
Product_Helper $product_helper
|
||||
) {
|
||||
parent::__construct( $short_link_helper, $wistia_embed_permission_repository, $meta, $product_helper );
|
||||
$this->options_helper = $options_helper;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the term for the information object and retrieves its taxonomy.
|
||||
*
|
||||
|
||||
@@ -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' => '0499348f9e5ab4c08abf'), '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' => 'ff91ef2a0dffb21796f7'));
|
||||
<?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' => '99e8468b00214a533091'), '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' => 'ac0e34c89d7739b10963'));
|
||||
|
||||
@@ -1 +1 @@
|
||||
<?php return array('default.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'dcd5887e134799f6ade3'), 'ar.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '0d834af7f322c207067e'), 'ca.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '469209f8725d57e2dd13'), 'cs.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '8e4aac0747a3c7dddf8a'), 'de.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'a6f42ad6f8355317a56c'), 'el.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'd72edcab364d544c2469'), 'en.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '51437f36b264d43a22db'), 'es.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'ff82c0b2cbb874d38d66'), 'fa.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '5afc40a75db2d68cacf2'), 'fr.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'a23c2630b045abc90aec'), 'he.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '081c52437d052c9cad74'), 'hu.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'd173d9d977c5b068443b'), 'id.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'ca63950fdd7d6938e7f0'), 'it.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'fb28921dba0da6614c80'), 'ja.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'f08d46a7f98fa0b3d579'), 'nb.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '04746196da02bb736987'), 'nl.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'c324d67321be4de5dba8'), 'pl.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '5908ab61bfa52f1abf82'), 'pt.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '1b29b34cd8ec54326129'), 'ru.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'f57759f2e75aed95a722'), 'sk.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'be3d5afc018c7be19ca5'), 'sv.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'aa3c53ba0e8c760d56ec'), 'tr.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'f48abbda9bf8076db264'));
|
||||
<?php return array('default.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'dcd5887e134799f6ade3'), 'ar.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '0d834af7f322c207067e'), 'ca.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '469209f8725d57e2dd13'), 'cs.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '8e4aac0747a3c7dddf8a'), 'de.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'a6f42ad6f8355317a56c'), 'el.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'd72edcab364d544c2469'), 'en.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '7fa3d8125ee3410b54d2'), 'es.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'ff82c0b2cbb874d38d66'), 'fa.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '5afc40a75db2d68cacf2'), 'fr.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'a23c2630b045abc90aec'), 'he.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '081c52437d052c9cad74'), 'hu.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'd173d9d977c5b068443b'), 'id.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'ca63950fdd7d6938e7f0'), 'it.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'fb28921dba0da6614c80'), 'ja.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'f08d46a7f98fa0b3d579'), 'nb.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '04746196da02bb736987'), 'nl.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'c324d67321be4de5dba8'), 'pl.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '5908ab61bfa52f1abf82'), 'pt.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '1b29b34cd8ec54326129'), 'ru.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'f57759f2e75aed95a722'), 'sk.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'be3d5afc018c7be19ca5'), 'sv.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'aa3c53ba0e8c760d56ec'), 'tr.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'bcd0ead95eae50bee792'));
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -98,6 +98,7 @@ class Cached_Container extends Container
|
||||
'yoast\\wp\\seo\\conditionals\\import_tool_selected_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Import_Tool_Selected_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\jetpack_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Jetpack_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\migrations_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Migrations_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\new_dashboard_ui_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\New_Dashboard_Ui_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\new_settings_ui_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\New_Settings_Ui_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\news_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\News_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\no_tool_selected_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\No_Tool_Selected_Conditional',
|
||||
@@ -114,8 +115,6 @@ class Cached_Container extends Container
|
||||
'yoast\\wp\\seo\\conditionals\\text_formality_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Text_Formality_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\third_party\\elementor_activated_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Third_Party\\Elementor_Activated_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\third_party\\elementor_edit_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Third_Party\\Elementor_Edit_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\third_party\\jetpack_boost_active_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Third_Party\\Jetpack_Boost_Active_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\third_party\\jetpack_boost_not_premium_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Third_Party\\Jetpack_Boost_Not_Premium_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\third_party\\polylang_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Third_Party\\Polylang_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\third_party\\translatepress_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Third_Party\\TranslatePress_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\third_party\\w3_total_cache_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Third_Party\\W3_Total_Cache_Conditional',
|
||||
@@ -179,6 +178,7 @@ class Cached_Container extends Container
|
||||
'yoast\\wp\\seo\\content_type_visibility\\application\\content_type_visibility_watcher_actions' => 'Yoast\\WP\\SEO\\Content_Type_Visibility\\Application\\Content_Type_Visibility_Watcher_Actions',
|
||||
'yoast\\wp\\seo\\content_type_visibility\\user_interface\\content_type_visibility_dismiss_new_route' => 'Yoast\\WP\\SEO\\Content_Type_Visibility\\User_Interface\\Content_Type_Visibility_Dismiss_New_Route',
|
||||
'yoast\\wp\\seo\\context\\meta_tags_context' => 'Yoast\\WP\\SEO\\Context\\Meta_Tags_Context',
|
||||
'yoast\\wp\\seo\\dashboard\\user_interface\\new_dashboard_page_integration' => 'Yoast\\WP\\SEO\\Dashboard\\User_Interface\\New_Dashboard_Page_Integration',
|
||||
'yoast\\wp\\seo\\editors\\application\\analysis_features\\enabled_analysis_features_repository' => 'Yoast\\WP\\SEO\\Editors\\Application\\Analysis_Features\\Enabled_Analysis_Features_Repository',
|
||||
'yoast\\wp\\seo\\editors\\application\\integrations\\integration_information_repository' => 'Yoast\\WP\\SEO\\Editors\\Application\\Integrations\\Integration_Information_Repository',
|
||||
'yoast\\wp\\seo\\editors\\application\\seo\\post_seo_information_repository' => 'Yoast\\WP\\SEO\\Editors\\Application\\Seo\\Post_Seo_Information_Repository',
|
||||
@@ -295,7 +295,6 @@ class Cached_Container extends Container
|
||||
'yoast\\wp\\seo\\integrations\\alerts\\black_friday_product_editor_checklist_notification' => 'Yoast\\WP\\SEO\\Integrations\\Alerts\\Black_Friday_Product_Editor_Checklist_Notification',
|
||||
'yoast\\wp\\seo\\integrations\\alerts\\black_friday_promotion_notification' => 'Yoast\\WP\\SEO\\Integrations\\Alerts\\Black_Friday_Promotion_Notification',
|
||||
'yoast\\wp\\seo\\integrations\\alerts\\black_friday_sidebar_checklist_notification' => 'Yoast\\WP\\SEO\\Integrations\\Alerts\\Black_Friday_Sidebar_Checklist_Notification',
|
||||
'yoast\\wp\\seo\\integrations\\alerts\\jetpack_boost_pre_publish' => 'Yoast\\WP\\SEO\\Integrations\\Alerts\\Jetpack_Boost_Pre_Publish',
|
||||
'yoast\\wp\\seo\\integrations\\alerts\\trustpilot_review_notification' => 'Yoast\\WP\\SEO\\Integrations\\Alerts\\Trustpilot_Review_Notification',
|
||||
'yoast\\wp\\seo\\integrations\\alerts\\webinar_promo_notification' => 'Yoast\\WP\\SEO\\Integrations\\Alerts\\Webinar_Promo_Notification',
|
||||
'yoast\\wp\\seo\\integrations\\blocks\\breadcrumbs_block' => 'Yoast\\WP\\SEO\\Integrations\\Blocks\\Breadcrumbs_Block',
|
||||
@@ -531,6 +530,7 @@ class Cached_Container extends Container
|
||||
'Yoast\\WP\\SEO\\Conditionals\\Import_Tool_Selected_Conditional' => 'getImportToolSelectedConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\Jetpack_Conditional' => 'getJetpackConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\Migrations_Conditional' => 'getMigrationsConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\New_Dashboard_Ui_Conditional' => 'getNewDashboardUiConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\New_Settings_Ui_Conditional' => 'getNewSettingsUiConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\News_Conditional' => 'getNewsConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\No_Tool_Selected_Conditional' => 'getNoToolSelectedConditionalService',
|
||||
@@ -547,8 +547,6 @@ class Cached_Container extends Container
|
||||
'Yoast\\WP\\SEO\\Conditionals\\Text_Formality_Conditional' => 'getTextFormalityConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\Third_Party\\Elementor_Activated_Conditional' => 'getElementorActivatedConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\Third_Party\\Elementor_Edit_Conditional' => 'getElementorEditConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\Third_Party\\Jetpack_Boost_Active_Conditional' => 'getJetpackBoostActiveConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\Third_Party\\Jetpack_Boost_Not_Premium_Conditional' => 'getJetpackBoostNotPremiumConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\Third_Party\\Polylang_Conditional' => 'getPolylangConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\Third_Party\\TranslatePress_Conditional' => 'getTranslatePressConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\Third_Party\\W3_Total_Cache_Conditional' => 'getW3TotalCacheConditionalService',
|
||||
@@ -612,6 +610,7 @@ class Cached_Container extends Container
|
||||
'Yoast\\WP\\SEO\\Content_Type_Visibility\\Application\\Content_Type_Visibility_Watcher_Actions' => 'getContentTypeVisibilityWatcherActionsService',
|
||||
'Yoast\\WP\\SEO\\Content_Type_Visibility\\User_Interface\\Content_Type_Visibility_Dismiss_New_Route' => 'getContentTypeVisibilityDismissNewRouteService',
|
||||
'Yoast\\WP\\SEO\\Context\\Meta_Tags_Context' => 'getMetaTagsContextService',
|
||||
'Yoast\\WP\\SEO\\Dashboard\\User_Interface\\New_Dashboard_Page_Integration' => 'getNewDashboardPageIntegrationService',
|
||||
'Yoast\\WP\\SEO\\Editors\\Application\\Analysis_Features\\Enabled_Analysis_Features_Repository' => 'getEnabledAnalysisFeaturesRepositoryService',
|
||||
'Yoast\\WP\\SEO\\Editors\\Application\\Integrations\\Integration_Information_Repository' => 'getIntegrationInformationRepositoryService',
|
||||
'Yoast\\WP\\SEO\\Editors\\Application\\Seo\\Post_Seo_Information_Repository' => 'getPostSeoInformationRepositoryService',
|
||||
@@ -728,7 +727,6 @@ class Cached_Container extends Container
|
||||
'Yoast\\WP\\SEO\\Integrations\\Alerts\\Black_Friday_Product_Editor_Checklist_Notification' => 'getBlackFridayProductEditorChecklistNotificationService',
|
||||
'Yoast\\WP\\SEO\\Integrations\\Alerts\\Black_Friday_Promotion_Notification' => 'getBlackFridayPromotionNotificationService',
|
||||
'Yoast\\WP\\SEO\\Integrations\\Alerts\\Black_Friday_Sidebar_Checklist_Notification' => 'getBlackFridaySidebarChecklistNotificationService',
|
||||
'Yoast\\WP\\SEO\\Integrations\\Alerts\\Jetpack_Boost_Pre_Publish' => 'getJetpackBoostPrePublishService',
|
||||
'Yoast\\WP\\SEO\\Integrations\\Alerts\\Trustpilot_Review_Notification' => 'getTrustpilotReviewNotificationService',
|
||||
'Yoast\\WP\\SEO\\Integrations\\Alerts\\Webinar_Promo_Notification' => 'getWebinarPromoNotificationService',
|
||||
'Yoast\\WP\\SEO\\Integrations\\Blocks\\Breadcrumbs_Block' => 'getBreadcrumbsBlockService',
|
||||
@@ -921,8 +919,11 @@ class Cached_Container extends Container
|
||||
'Yoast\\WP\\SEO\\Editors\\Framework\\Inclusive_Language_Analysis' => true,
|
||||
'Yoast\\WP\\SEO\\Editors\\Framework\\Integrations\\Jetpack_Markdown' => true,
|
||||
'Yoast\\WP\\SEO\\Editors\\Framework\\Integrations\\Multilingual' => true,
|
||||
'Yoast\\WP\\SEO\\Editors\\Framework\\Integrations\\News_SEO' => true,
|
||||
'Yoast\\WP\\SEO\\Editors\\Framework\\Integrations\\Semrush' => true,
|
||||
'Yoast\\WP\\SEO\\Editors\\Framework\\Integrations\\Wincher' => true,
|
||||
'Yoast\\WP\\SEO\\Editors\\Framework\\Integrations\\WooCommerce' => true,
|
||||
'Yoast\\WP\\SEO\\Editors\\Framework\\Integrations\\WooCommerce_SEO' => true,
|
||||
'Yoast\\WP\\SEO\\Editors\\Framework\\Keyphrase_Analysis' => true,
|
||||
'Yoast\\WP\\SEO\\Editors\\Framework\\Previously_Used_Keyphrase' => true,
|
||||
'Yoast\\WP\\SEO\\Editors\\Framework\\Readability_Analysis' => true,
|
||||
@@ -938,6 +939,7 @@ class Cached_Container extends Container
|
||||
'Yoast\\WP\\SEO\\Editors\\Framework\\Site\\Term_Site_Information' => true,
|
||||
'Yoast\\WP\\SEO\\Editors\\Framework\\Word_Form_Recognition' => true,
|
||||
'Yoast\\WP\\SEO\\Elementor\\Infrastructure\\Request_Post' => true,
|
||||
'Yoast\\WP\\SEO\\Images\\Application\\Image_Content_Extractor' => true,
|
||||
'Yoast\\WP\\SEO\\Introductions\\Application\\Ai_Fix_Assessments_Upsell' => true,
|
||||
'Yoast\\WP\\SEO\\Introductions\\Application\\Introductions_Collector' => true,
|
||||
'Yoast\\WP\\SEO\\Introductions\\Domain\\Introduction_Interface' => true,
|
||||
@@ -1671,7 +1673,7 @@ class Cached_Container extends Container
|
||||
return $this->services['Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder'];
|
||||
}
|
||||
|
||||
$this->services['Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder'] = $instance = new \Yoast\WP\SEO\Builders\Indexable_Link_Builder(${($_ = isset($this->services['Yoast\\WP\\SEO\\Repositories\\SEO_Links_Repository']) ? $this->services['Yoast\\WP\\SEO\\Repositories\\SEO_Links_Repository'] : ($this->services['Yoast\\WP\\SEO\\Repositories\\SEO_Links_Repository'] = new \Yoast\WP\SEO\Repositories\SEO_Links_Repository())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Url_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Url_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Url_Helper'] = new \Yoast\WP\SEO\Helpers\Url_Helper())) && false ?: '_'}, $a, ${($_ = 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 ?: '_'}, $b);
|
||||
$this->services['Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder'] = $instance = new \Yoast\WP\SEO\Builders\Indexable_Link_Builder(${($_ = isset($this->services['Yoast\\WP\\SEO\\Repositories\\SEO_Links_Repository']) ? $this->services['Yoast\\WP\\SEO\\Repositories\\SEO_Links_Repository'] : ($this->services['Yoast\\WP\\SEO\\Repositories\\SEO_Links_Repository'] = new \Yoast\WP\SEO\Repositories\SEO_Links_Repository())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Url_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Url_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Url_Helper'] = new \Yoast\WP\SEO\Helpers\Url_Helper())) && false ?: '_'}, $a, ${($_ = 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 ?: '_'}, $b, new \Yoast\WP\SEO\Images\Application\Image_Content_Extractor());
|
||||
|
||||
$instance->set_dependencies(${($_ = isset($this->services['Yoast\\WP\\SEO\\Repositories\\Indexable_Repository']) ? $this->services['Yoast\\WP\\SEO\\Repositories\\Indexable_Repository'] : $this->getIndexableRepositoryService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Image_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Image_Helper'] : $this->getImageHelperService()) && false ?: '_'});
|
||||
|
||||
@@ -1971,6 +1973,16 @@ class Cached_Container extends Container
|
||||
return $this->services['Yoast\\WP\\SEO\\Conditionals\\Migrations_Conditional'] = new \Yoast\WP\SEO\Conditionals\Migrations_Conditional(${($_ = isset($this->services['Yoast\\WP\\SEO\\Config\\Migration_Status']) ? $this->services['Yoast\\WP\\SEO\\Config\\Migration_Status'] : ($this->services['Yoast\\WP\\SEO\\Config\\Migration_Status'] = new \Yoast\WP\SEO\Config\Migration_Status())) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Conditionals\New_Dashboard_Ui_Conditional' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Conditionals\New_Dashboard_Ui_Conditional
|
||||
*/
|
||||
protected function getNewDashboardUiConditionalService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Conditionals\\New_Dashboard_Ui_Conditional'] = new \Yoast\WP\SEO\Conditionals\New_Dashboard_Ui_Conditional();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Conditionals\New_Settings_Ui_Conditional' shared autowired service.
|
||||
*
|
||||
@@ -2131,26 +2143,6 @@ class Cached_Container extends Container
|
||||
return $this->services['Yoast\\WP\\SEO\\Conditionals\\Third_Party\\Elementor_Edit_Conditional'] = new \Yoast\WP\SEO\Conditionals\Third_Party\Elementor_Edit_Conditional();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Conditionals\Third_Party\Jetpack_Boost_Active_Conditional' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Conditionals\Third_Party\Jetpack_Boost_Active_Conditional
|
||||
*/
|
||||
protected function getJetpackBoostActiveConditionalService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Conditionals\\Third_Party\\Jetpack_Boost_Active_Conditional'] = new \Yoast\WP\SEO\Conditionals\Third_Party\Jetpack_Boost_Active_Conditional();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Conditionals\Third_Party\Jetpack_Boost_Not_Premium_Conditional' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Conditionals\Third_Party\Jetpack_Boost_Not_Premium_Conditional
|
||||
*/
|
||||
protected function getJetpackBoostNotPremiumConditionalService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Conditionals\\Third_Party\\Jetpack_Boost_Not_Premium_Conditional'] = new \Yoast\WP\SEO\Conditionals\Third_Party\Jetpack_Boost_Not_Premium_Conditional();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Conditionals\Third_Party\Polylang_Conditional' shared autowired service.
|
||||
*
|
||||
@@ -2787,6 +2779,16 @@ class Cached_Container extends Container
|
||||
return $this->services['Yoast\\WP\\SEO\\Context\\Meta_Tags_Context'] = new \Yoast\WP\SEO\Context\Meta_Tags_Context(${($_ = 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\\Url_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Url_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Url_Helper'] = new \Yoast\WP\SEO\Helpers\Url_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Image_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Image_Helper'] : $this->getImageHelperService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Schema\\ID_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Schema\\ID_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Schema\\ID_Helper'] = new \Yoast\WP\SEO\Helpers\Schema\ID_Helper())) && false ?: '_'}, ${($_ = isset($this->services['WPSEO_Replace_Vars']) ? $this->services['WPSEO_Replace_Vars'] : $this->getWPSEOReplaceVarsService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Site_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Site_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Site_Helper'] = new \Yoast\WP\SEO\Helpers\Site_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\\Permalink_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Permalink_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Permalink_Helper'] = new \Yoast\WP\SEO\Helpers\Permalink_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Indexable_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Indexable_Helper'] : $this->getIndexableHelperService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Repositories\\Indexable_Repository']) ? $this->services['Yoast\\WP\\SEO\\Repositories\\Indexable_Repository'] : $this->getIndexableRepositoryService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Request_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Request_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Request_Helper'] = new \Yoast\WP\SEO\Helpers\Request_Helper())) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Dashboard\User_Interface\New_Dashboard_Page_Integration' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Dashboard\User_Interface\New_Dashboard_Page_Integration
|
||||
*/
|
||||
protected function getNewDashboardPageIntegrationService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Dashboard\\User_Interface\\New_Dashboard_Page_Integration'] = new \Yoast\WP\SEO\Dashboard\User_Interface\New_Dashboard_Page_Integration(${($_ = isset($this->services['WPSEO_Admin_Asset_Manager']) ? $this->services['WPSEO_Admin_Asset_Manager'] : $this->getWPSEOAdminAssetManagerService()) && 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\\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\\Short_Link_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Short_Link_Helper'] : $this->getShortLinkHelperService()) && 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 ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Editors\Application\Analysis_Features\Enabled_Analysis_Features_Repository' shared autowired service.
|
||||
*
|
||||
@@ -2807,9 +2809,10 @@ class Cached_Container extends Container
|
||||
*/
|
||||
protected function getIntegrationInformationRepositoryService()
|
||||
{
|
||||
$a = ${($_ = 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 ?: '_'};
|
||||
$a = ${($_ = isset($this->services['WPSEO_Addon_Manager']) ? $this->services['WPSEO_Addon_Manager'] : $this->getWPSEOAddonManagerService()) && false ?: '_'};
|
||||
$b = ${($_ = 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 ?: '_'};
|
||||
|
||||
return $this->services['Yoast\\WP\\SEO\\Editors\\Application\\Integrations\\Integration_Information_Repository'] = new \Yoast\WP\SEO\Editors\Application\Integrations\Integration_Information_Repository(new \Yoast\WP\SEO\Editors\Framework\Integrations\Jetpack_Markdown(), new \Yoast\WP\SEO\Editors\Framework\Integrations\Multilingual(${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Third_Party\\WPML_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Third_Party\\WPML_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Third_Party\\WPML_Conditional'] = new \Yoast\WP\SEO\Conditionals\Third_Party\WPML_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Third_Party\\Polylang_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Third_Party\\Polylang_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Third_Party\\Polylang_Conditional'] = new \Yoast\WP\SEO\Conditionals\Third_Party\Polylang_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Third_Party\\TranslatePress_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Third_Party\\TranslatePress_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Third_Party\\TranslatePress_Conditional'] = new \Yoast\WP\SEO\Conditionals\Third_Party\TranslatePress_Conditional())) && false ?: '_'}), new \Yoast\WP\SEO\Editors\Framework\Integrations\Semrush($a), new \Yoast\WP\SEO\Editors\Framework\Integrations\Wincher(${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Wincher_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Wincher_Helper'] : $this->getWincherHelperService()) && false ?: '_'}, $a));
|
||||
return $this->services['Yoast\\WP\\SEO\\Editors\\Application\\Integrations\\Integration_Information_Repository'] = new \Yoast\WP\SEO\Editors\Application\Integrations\Integration_Information_Repository(new \Yoast\WP\SEO\Editors\Framework\Integrations\Jetpack_Markdown(), new \Yoast\WP\SEO\Editors\Framework\Integrations\Multilingual(${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Third_Party\\WPML_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Third_Party\\WPML_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Third_Party\\WPML_Conditional'] = new \Yoast\WP\SEO\Conditionals\Third_Party\WPML_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Third_Party\\Polylang_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Third_Party\\Polylang_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Third_Party\\Polylang_Conditional'] = new \Yoast\WP\SEO\Conditionals\Third_Party\Polylang_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Third_Party\\TranslatePress_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Third_Party\\TranslatePress_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Third_Party\\TranslatePress_Conditional'] = new \Yoast\WP\SEO\Conditionals\Third_Party\TranslatePress_Conditional())) && false ?: '_'}), new \Yoast\WP\SEO\Editors\Framework\Integrations\News_SEO($a), new \Yoast\WP\SEO\Editors\Framework\Integrations\Semrush($b), new \Yoast\WP\SEO\Editors\Framework\Integrations\Wincher(${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Wincher_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Wincher_Helper'] : $this->getWincherHelperService()) && false ?: '_'}, $b), new \Yoast\WP\SEO\Editors\Framework\Integrations\WooCommerce_SEO($a), new \Yoast\WP\SEO\Editors\Framework\Integrations\WooCommerce(${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\WooCommerce_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\WooCommerce_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\WooCommerce_Conditional'] = new \Yoast\WP\SEO\Conditionals\WooCommerce_Conditional())) && false ?: '_'}));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2845,8 +2848,10 @@ class Cached_Container extends Container
|
||||
$b = ${($_ = 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 ?: '_'};
|
||||
$c = ${($_ = isset($this->services['Yoast\\WP\\SEO\\Surfaces\\Meta_Surface']) ? $this->services['Yoast\\WP\\SEO\\Surfaces\\Meta_Surface'] : $this->getMetaSurfaceService()) && false ?: '_'};
|
||||
$d = ${($_ = 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 ?: '_'};
|
||||
$e = ${($_ = 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 ?: '_'};
|
||||
$f = ${($_ = isset($this->services['Yoast\\WP\\SEO\\Promotions\\Application\\Promotion_Manager']) ? $this->services['Yoast\\WP\\SEO\\Promotions\\Application\\Promotion_Manager'] : $this->getPromotionManagerService()) && false ?: '_'};
|
||||
|
||||
return $this->services['Yoast\\WP\\SEO\\Editors\\Application\\Site\\Website_Information_Repository'] = new \Yoast\WP\SEO\Editors\Application\Site\Website_Information_Repository(new \Yoast\WP\SEO\Editors\Framework\Site\Post_Site_Information(${($_ = isset($this->services['Yoast\\WP\\SEO\\Promotions\\Application\\Promotion_Manager']) ? $this->services['Yoast\\WP\\SEO\\Promotions\\Application\\Promotion_Manager'] : $this->getPromotionManagerService()) && false ?: '_'}, $a, $b, $c, $d, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Alert_Dismissal_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Alert_Dismissal_Action'] : $this->getAlertDismissalActionService()) && false ?: '_'}), new \Yoast\WP\SEO\Editors\Framework\Site\Term_Site_Information(${($_ = 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 ?: '_'}, $a, $b, $c, $d));
|
||||
return $this->services['Yoast\\WP\\SEO\\Editors\\Application\\Site\\Website_Information_Repository'] = new \Yoast\WP\SEO\Editors\Application\Site\Website_Information_Repository(new \Yoast\WP\SEO\Editors\Framework\Site\Post_Site_Information($a, $b, $c, $d, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Alert_Dismissal_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Alert_Dismissal_Action'] : $this->getAlertDismissalActionService()) && false ?: '_'}, $e, $f), new \Yoast\WP\SEO\Editors\Framework\Site\Term_Site_Information($a, $b, $c, $d, $e, $f));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4008,16 +4013,6 @@ class Cached_Container extends Container
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Alerts\\Black_Friday_Sidebar_Checklist_Notification'] = new \Yoast\WP\SEO\Integrations\Alerts\Black_Friday_Sidebar_Checklist_Notification();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Integrations\Alerts\Jetpack_Boost_Pre_Publish' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Integrations\Alerts\Jetpack_Boost_Pre_Publish
|
||||
*/
|
||||
protected function getJetpackBoostPrePublishService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Alerts\\Jetpack_Boost_Pre_Publish'] = new \Yoast\WP\SEO\Integrations\Alerts\Jetpack_Boost_Pre_Publish();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Integrations\Alerts\Trustpilot_Review_Notification' shared autowired service.
|
||||
*
|
||||
@@ -4139,7 +4134,7 @@ class Cached_Container extends Container
|
||||
*/
|
||||
protected function getFeatureFlagIntegrationService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Feature_Flag_Integration'] = new \Yoast\WP\SEO\Integrations\Feature_Flag_Integration(${($_ = isset($this->services['WPSEO_Admin_Asset_Manager']) ? $this->services['WPSEO_Admin_Asset_Manager'] : $this->getWPSEOAdminAssetManagerService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Addon_Installation_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Addon_Installation_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Addon_Installation_Conditional'] = new \Yoast\WP\SEO\Conditionals\Addon_Installation_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Check_Required_Version_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Check_Required_Version_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Check_Required_Version_Conditional'] = new \Yoast\WP\SEO\Conditionals\Check_Required_Version_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\New_Settings_Ui_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\New_Settings_Ui_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\New_Settings_Ui_Conditional'] = new \Yoast\WP\SEO\Conditionals\New_Settings_Ui_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Text_Formality_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Text_Formality_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Text_Formality_Conditional'] = new \Yoast\WP\SEO\Conditionals\Text_Formality_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Updated_Importer_Framework_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Updated_Importer_Framework_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Updated_Importer_Framework_Conditional'] = new \Yoast\WP\SEO\Conditionals\Updated_Importer_Framework_Conditional())) && false ?: '_'});
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Feature_Flag_Integration'] = new \Yoast\WP\SEO\Integrations\Feature_Flag_Integration(${($_ = isset($this->services['WPSEO_Admin_Asset_Manager']) ? $this->services['WPSEO_Admin_Asset_Manager'] : $this->getWPSEOAdminAssetManagerService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Addon_Installation_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Addon_Installation_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Addon_Installation_Conditional'] = new \Yoast\WP\SEO\Conditionals\Addon_Installation_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Check_Required_Version_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Check_Required_Version_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Check_Required_Version_Conditional'] = new \Yoast\WP\SEO\Conditionals\Check_Required_Version_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\New_Dashboard_Ui_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\New_Dashboard_Ui_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\New_Dashboard_Ui_Conditional'] = new \Yoast\WP\SEO\Conditionals\New_Dashboard_Ui_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\New_Settings_Ui_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\New_Settings_Ui_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\New_Settings_Ui_Conditional'] = new \Yoast\WP\SEO\Conditionals\New_Settings_Ui_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Text_Formality_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Text_Formality_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Text_Formality_Conditional'] = new \Yoast\WP\SEO\Conditionals\Text_Formality_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Updated_Importer_Framework_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Updated_Importer_Framework_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Updated_Importer_Framework_Conditional'] = new \Yoast\WP\SEO\Conditionals\Updated_Importer_Framework_Conditional())) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4900,6 +4895,7 @@ class Cached_Container extends Container
|
||||
$instance->register_migration('free', '20230417083836', 'Yoast\\WP\\SEO\\Config\\Migrations\\AddInclusiveLanguageScore');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Content_Type_Visibility\\Application\\Content_Type_Visibility_Watcher_Actions');
|
||||
$instance->register_route('Yoast\\WP\\SEO\\Content_Type_Visibility\\User_Interface\\Content_Type_Visibility_Dismiss_New_Route');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Dashboard\\User_Interface\\New_Dashboard_Page_Integration');
|
||||
$instance->register_initializer('Yoast\\WP\\SEO\\Initializers\\Crawl_Cleanup_Permalinks');
|
||||
$instance->register_initializer('Yoast\\WP\\SEO\\Initializers\\Disable_Core_Sitemaps');
|
||||
$instance->register_initializer('Yoast\\WP\\SEO\\Initializers\\Migration_Runner');
|
||||
@@ -4937,7 +4933,6 @@ class Cached_Container extends Container
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Alerts\\Black_Friday_Product_Editor_Checklist_Notification');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Alerts\\Black_Friday_Promotion_Notification');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Alerts\\Black_Friday_Sidebar_Checklist_Notification');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Alerts\\Jetpack_Boost_Pre_Publish');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Alerts\\Trustpilot_Review_Notification');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Alerts\\Webinar_Promo_Notification');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Blocks\\Internal_Linking_Category');
|
||||
|
||||
@@ -366,7 +366,8 @@ class Image_Helper {
|
||||
}
|
||||
|
||||
/**
|
||||
* Based on and image ID return array with the best variation of that image. If it's not saved to the DB, save it to an option.
|
||||
* Based on and image ID return array with the best variation of that image. If it's not saved to the DB, save it
|
||||
* to an option.
|
||||
*
|
||||
* @param string $setting The setting name. Should be company or person.
|
||||
*
|
||||
|
||||
@@ -22,4 +22,107 @@ class Notification_Helper {
|
||||
public function restore_notification( Yoast_Notification $notification ) {
|
||||
return Yoast_Notification_Center::restore_notification( $notification );
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the notifications sorted on type and priority. (wrapper function)
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return array|Yoast_Notification[] Sorted Notifications
|
||||
*/
|
||||
public function get_sorted_notifications() {
|
||||
$notification_center = Yoast_Notification_Center::get();
|
||||
|
||||
return $notification_center->get_sorted_notifications();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the user has dismissed a notification. (wrapper function)
|
||||
*
|
||||
* @param Yoast_Notification $notification The notification to check for dismissal.
|
||||
* @param int|null $user_id User ID to check on.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function is_notification_dismissed( Yoast_Notification $notification, $user_id = null ) {
|
||||
return Yoast_Notification_Center::is_notification_dismissed( $notification, $user_id );
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses all the notifications to an array with just warnings notifications, and splitting them between dismissed
|
||||
* and active.
|
||||
*
|
||||
* @return array<Yoast_Notification>
|
||||
*/
|
||||
public function get_notifications(): array {
|
||||
$all_notifications = $this->get_sorted_notifications();
|
||||
$notifications = \array_filter(
|
||||
$all_notifications,
|
||||
static function ( $notification ) {
|
||||
return $notification->get_type() !== 'error';
|
||||
}
|
||||
);
|
||||
$dismissed_notifications = \array_filter(
|
||||
$notifications,
|
||||
function ( $notification ) {
|
||||
return $this->is_notification_dismissed( $notification );
|
||||
}
|
||||
);
|
||||
$active_notifications = \array_diff( $notifications, $dismissed_notifications );
|
||||
|
||||
return [
|
||||
'dismissed' => \array_map(
|
||||
static function ( $notification ) {
|
||||
return $notification->to_array();
|
||||
},
|
||||
$dismissed_notifications
|
||||
),
|
||||
'active' => \array_map(
|
||||
static function ( $notification ) {
|
||||
return $notification->to_array();
|
||||
},
|
||||
$active_notifications
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses all the notifications to an array with just error notifications, and splitting them between dismissed and
|
||||
* active.
|
||||
*
|
||||
* @return array<Yoast_Notification>
|
||||
*/
|
||||
public function get_problems(): array {
|
||||
$all_notifications = $this->get_sorted_notifications();
|
||||
$problems = \array_filter(
|
||||
$all_notifications,
|
||||
static function ( $notification ) {
|
||||
return $notification->get_type() === 'error';
|
||||
}
|
||||
);
|
||||
$dismissed_problems = \array_filter(
|
||||
$problems,
|
||||
function ( $notification ) {
|
||||
return $this->is_notification_dismissed( $notification );
|
||||
}
|
||||
);
|
||||
$active_problems = \array_diff( $problems, $dismissed_problems );
|
||||
|
||||
return [
|
||||
'dismissed' => \array_map(
|
||||
static function ( $notification ) {
|
||||
return $notification->to_array();
|
||||
},
|
||||
$dismissed_problems
|
||||
),
|
||||
'active' => \array_map(
|
||||
static function ( $notification ) {
|
||||
return $notification->to_array();
|
||||
},
|
||||
$active_problems
|
||||
),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Images\Application;
|
||||
|
||||
use DOMDocument;
|
||||
use WP_HTML_Tag_Processor;
|
||||
|
||||
/**
|
||||
* The image content extractor.
|
||||
*/
|
||||
class Image_Content_Extractor {
|
||||
|
||||
/**
|
||||
* Gathers all images from content.
|
||||
*
|
||||
* @param string $content The content.
|
||||
*
|
||||
* @return int[] An associated array of image IDs, keyed by their URLs.
|
||||
*/
|
||||
public function gather_images( $content ) {
|
||||
|
||||
/**
|
||||
* Filter 'wpseo_force_creating_and_using_attachment_indexables' - Filters if we should use attachment indexables to find all content images. Instead of scanning the content.
|
||||
*
|
||||
* The default value is false.
|
||||
*
|
||||
* @since 21.1
|
||||
*/
|
||||
$should_not_parse_content = \apply_filters( 'wpseo_force_creating_and_using_attachment_indexables', false );
|
||||
/**
|
||||
* Filter 'wpseo_force_skip_image_content_parsing' - Filters if we should force skip scanning the content to parse images.
|
||||
* This filter can be used if the regex gives a faster result than scanning the code.
|
||||
*
|
||||
* The default value is false.
|
||||
*
|
||||
* @since 21.1
|
||||
*/
|
||||
$should_not_parse_content = \apply_filters( 'wpseo_force_skip_image_content_parsing', $should_not_parse_content );
|
||||
|
||||
if ( ! $should_not_parse_content && \class_exists( WP_HTML_Tag_Processor::class ) ) {
|
||||
return $this->gather_images_wp( $content );
|
||||
}
|
||||
|
||||
if ( ! $should_not_parse_content && \class_exists( DOMDocument::class ) ) {
|
||||
|
||||
return $this->gather_images_DOMDocument( $content );
|
||||
}
|
||||
|
||||
if ( \strpos( $content, 'src' ) === false ) {
|
||||
// Nothing to do.
|
||||
return [];
|
||||
}
|
||||
|
||||
$images = [];
|
||||
$regexp = '<img\s[^>]*src=("??)([^" >]*?)\\1[^>]*>';
|
||||
// Used modifiers iU to match case insensitive and make greedy quantifiers lazy.
|
||||
if ( \preg_match_all( "/$regexp/iU", $content, $matches, \PREG_SET_ORDER ) ) {
|
||||
foreach ( $matches as $match ) {
|
||||
$images[ $match[2] ] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return $images;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gathers all images from content with WP's WP_HTML_Tag_Processor() and returns them along with their IDs, if
|
||||
* possible.
|
||||
*
|
||||
* @param string $content The content.
|
||||
*
|
||||
* @return int[] An associated array of image IDs, keyed by their URL.
|
||||
*/
|
||||
protected function gather_images_wp( $content ) {
|
||||
$processor = new WP_HTML_Tag_Processor( $content );
|
||||
$images = [];
|
||||
|
||||
$query = [
|
||||
'tag_name' => 'img',
|
||||
];
|
||||
|
||||
/**
|
||||
* Filter 'wpseo_image_attribute_containing_id' - Allows filtering what attribute will be used to extract image IDs from.
|
||||
*
|
||||
* Defaults to "class", which is where WP natively stores the image IDs, in a `wp-image-<ID>` format.
|
||||
*
|
||||
* @api string The attribute to be used to extract image IDs from.
|
||||
*/
|
||||
$attribute = \apply_filters( 'wpseo_image_attribute_containing_id', 'class' );
|
||||
while ( $processor->next_tag( $query ) ) {
|
||||
$src = \htmlentities( $processor->get_attribute( 'src' ), ( \ENT_QUOTES | \ENT_SUBSTITUTE | \ENT_HTML401 ), \get_bloginfo( 'charset' ) );
|
||||
$classes = $processor->get_attribute( $attribute );
|
||||
$id = $this->extract_id_of_classes( $classes );
|
||||
|
||||
$images[ $src ] = $id;
|
||||
}
|
||||
|
||||
return $images;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gathers all images from content with DOMDocument() and returns them along with their IDs, if possible.
|
||||
*
|
||||
* @param string $content The content.
|
||||
*
|
||||
* @return int[] An associated array of image IDs, keyed by their URL.
|
||||
*/
|
||||
protected function gather_images_domdocument( $content ) {
|
||||
$images = [];
|
||||
$charset = \get_bloginfo( 'charset' );
|
||||
|
||||
/**
|
||||
* Filter 'wpseo_image_attribute_containing_id' - Allows filtering what attribute will be used to extract image IDs from.
|
||||
*
|
||||
* Defaults to "class", which is where WP natively stores the image IDs, in a `wp-image-<ID>` format.
|
||||
*
|
||||
* @api string The attribute to be used to extract image IDs from.
|
||||
*/
|
||||
$attribute = \apply_filters( 'wpseo_image_attribute_containing_id', 'class' );
|
||||
|
||||
\libxml_use_internal_errors( true );
|
||||
$post_dom = new DOMDocument();
|
||||
$post_dom->loadHTML( '<?xml encoding="' . $charset . '">' . $content );
|
||||
\libxml_clear_errors();
|
||||
|
||||
foreach ( $post_dom->getElementsByTagName( 'img' ) as $img ) {
|
||||
$src = \htmlentities( $img->getAttribute( 'src' ), ( \ENT_QUOTES | \ENT_SUBSTITUTE | \ENT_HTML401 ), $charset );
|
||||
$classes = $img->getAttribute( $attribute );
|
||||
|
||||
$id = $this->extract_id_of_classes( $classes );
|
||||
|
||||
$images[ $src ] = $id;
|
||||
}
|
||||
|
||||
return $images;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts image ID out of the image's classes.
|
||||
*
|
||||
* @param string $classes The classes assigned to the image.
|
||||
*
|
||||
* @return int The ID that's extracted from the classes.
|
||||
*/
|
||||
protected function extract_id_of_classes( $classes ) {
|
||||
if ( ! $classes ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter 'wpseo_extract_id_pattern' - Allows filtering the regex patern to be used to extract image IDs from class/attribute names.
|
||||
*
|
||||
* Defaults to the pattern that extracts image IDs from core's `wp-image-<ID>` native format in image classes.
|
||||
*
|
||||
* @api string The regex pattern to be used to extract image IDs from class names. Empty string if the whole class/attribute should be returned.
|
||||
*/
|
||||
$pattern = \apply_filters( 'wpseo_extract_id_pattern', '/(?<!\S)wp-image-(\d+)(?!\S)/i' );
|
||||
|
||||
if ( $pattern === '' ) {
|
||||
return (int) $classes;
|
||||
}
|
||||
|
||||
$matches = [];
|
||||
|
||||
if ( \preg_match( $pattern, $classes, $matches ) ) {
|
||||
|
||||
return (int) $matches[1];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ use WPSEO_Option_Tab;
|
||||
use WPSEO_Shortlinker;
|
||||
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
|
||||
use Yoast\WP\SEO\Context\Meta_Tags_Context;
|
||||
use Yoast\WP\SEO\Dashboard\User_Interface\New_Dashboard_Page_Integration;
|
||||
use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Product_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Social_Profiles_Helper;
|
||||
@@ -137,7 +138,7 @@ class First_Time_Configuration_Integration implements Integration_Interface {
|
||||
*/
|
||||
public function enqueue_assets() {
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Date is not processed or saved.
|
||||
if ( ! isset( $_GET['page'] ) || $_GET['page'] !== 'wpseo_dashboard' || \is_network_admin() ) {
|
||||
if ( ! isset( $_GET['page'] ) || ( $_GET['page'] !== 'wpseo_dashboard' && $_GET['page'] !== New_Dashboard_Page_Integration::PAGE ) || \is_network_admin() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,12 +8,11 @@ use TEC\Events\Integrations\Plugins\WordPress_SEO\Events_Schema;
|
||||
use WP_Recipe_Maker;
|
||||
use WPSEO_Addon_Manager;
|
||||
use WPSEO_Admin_Asset_Manager;
|
||||
use WPSEO_Shortlinker;
|
||||
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
|
||||
use Yoast\WP\SEO\Conditionals\Jetpack_Conditional;
|
||||
use Yoast\WP\SEO\Conditionals\Third_Party\Elementor_Activated_Conditional;
|
||||
use Yoast\WP\SEO\Conditionals\Third_Party\Jetpack_Boost_Active_Conditional;
|
||||
use Yoast\WP\SEO\Conditionals\Third_Party\Jetpack_Boost_Not_Premium_Conditional;
|
||||
|
||||
|
||||
use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Woocommerce_Helper;
|
||||
use Yoast\WP\SEO\Integrations\Integration_Interface;
|
||||
@@ -115,10 +114,8 @@ class Integrations_Page implements Integration_Interface {
|
||||
|
||||
$this->admin_asset_manager->enqueue_script( 'integrations-page' );
|
||||
|
||||
$elementor_conditional = new Elementor_Activated_Conditional();
|
||||
$jetpack_conditional = new Jetpack_Conditional();
|
||||
$jetpack_boost_active_conditional = new Jetpack_Boost_Active_Conditional();
|
||||
$jetpack_boost_not_premium_conditional = new Jetpack_Boost_Not_Premium_Conditional();
|
||||
$elementor_conditional = new Elementor_Activated_Conditional();
|
||||
$jetpack_conditional = new Jetpack_Conditional();
|
||||
|
||||
$woocommerce_seo_file = 'wpseo-woocommerce/wpseo-woocommerce.php';
|
||||
$acf_seo_file = 'acf-content-analysis-for-yoast-seo/yoast-acf-analysis.php';
|
||||
@@ -126,7 +123,6 @@ class Integrations_Page implements Integration_Interface {
|
||||
$algolia_file = 'wp-search-with-algolia/algolia.php';
|
||||
$old_algolia_file = 'search-by-algolia-instant-relevant-results/algolia.php';
|
||||
|
||||
$host = \YoastSEO()->helpers->url->get_url_host( \get_site_url() );
|
||||
$addon_manager = new WPSEO_Addon_Manager();
|
||||
$woocommerce_seo_installed = $addon_manager->is_installed( WPSEO_Addon_Manager::WOOCOMMERCE_SLUG );
|
||||
|
||||
@@ -139,8 +135,6 @@ class Integrations_Page implements Integration_Interface {
|
||||
$acf_active = \class_exists( 'acf' );
|
||||
$algolia_active = \is_plugin_active( $algolia_file );
|
||||
$edd_active = \class_exists( Easy_Digital_Downloads::class );
|
||||
$jetpack_boost_active = $jetpack_boost_active_conditional->is_met();
|
||||
$jetpack_boost_premium = ( ! $jetpack_boost_not_premium_conditional->is_met() );
|
||||
$old_algolia_active = \is_plugin_active( $old_algolia_file );
|
||||
$tec_active = \class_exists( Events_Schema::class );
|
||||
$ssp_active = \class_exists( PodcastEpisode::class );
|
||||
@@ -199,12 +193,6 @@ class Integrations_Page implements Integration_Interface {
|
||||
'mastodon_active' => $mastodon_active,
|
||||
'is_multisite' => \is_multisite(),
|
||||
'plugin_url' => \plugins_url( '', \WPSEO_FILE ),
|
||||
'jetpack-boost_active' => $jetpack_boost_active,
|
||||
'jetpack-boost_premium' => $jetpack_boost_premium,
|
||||
'jetpack-boost_logo_link' => WPSEO_Shortlinker::get( 'https://yoa.st/integrations-logo-jetpack-boost' ),
|
||||
'jetpack-boost_get_link' => WPSEO_Shortlinker::get( 'https://yoa.st/integrations-get-jetpack-boost?domain=' . $host ),
|
||||
'jetpack-boost_upgrade_link' => WPSEO_Shortlinker::get( 'https://yoa.st/integrations-upgrade-jetpack-boost?domain=' . $host ),
|
||||
'jetpack-boost_learn_more_link' => \admin_url( 'admin.php?page=jetpack-boost' ),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
@@ -12,5 +12,5 @@ class Black_Friday_Promotion_Notification extends Abstract_Dismissable_Alert {
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $alert_identifier = 'black-friday-2023-promotion';
|
||||
protected $alert_identifier = 'black-friday-2024-promotion';
|
||||
}
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Integrations\Alerts;
|
||||
|
||||
use Yoast\WP\SEO\Conditionals\Premium_Inactive_Conditional;
|
||||
use Yoast\WP\SEO\Conditionals\Third_Party\Jetpack_Boost_Not_Premium_Conditional;
|
||||
|
||||
/**
|
||||
* Jetpack_Boost_Pre_Publish class.
|
||||
*/
|
||||
class Jetpack_Boost_Pre_Publish extends Abstract_Dismissable_Alert {
|
||||
|
||||
/**
|
||||
* Holds the alert identifier.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $alert_identifier = 'get-jetpack-boost-pre-publish-notification';
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public static function get_conditionals() {
|
||||
return [ Premium_Inactive_Conditional::class, Jetpack_Boost_Not_Premium_Conditional::class ];
|
||||
}
|
||||
}
|
||||
@@ -378,7 +378,7 @@ class Settings_Integration implements Integration_Interface {
|
||||
\wp_enqueue_media();
|
||||
$this->asset_manager->enqueue_script( 'new-settings' );
|
||||
$this->asset_manager->enqueue_style( 'new-settings' );
|
||||
if ( \YoastSEO()->classes->get( Promotion_Manager::class )->is( 'black-friday-2023-promotion' ) ) {
|
||||
if ( \YoastSEO()->classes->get( Promotion_Manager::class )->is( 'black-friday-2024-promotion' ) ) {
|
||||
$this->asset_manager->enqueue_style( 'black-friday-banner' );
|
||||
}
|
||||
$this->asset_manager->localize_script( 'new-settings', 'wpseoScriptData', $this->get_script_data() );
|
||||
|
||||
@@ -133,7 +133,7 @@ class Support_Integration implements Integration_Interface {
|
||||
\remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
|
||||
$this->asset_manager->enqueue_script( 'support' );
|
||||
$this->asset_manager->enqueue_style( 'support' );
|
||||
if ( \YoastSEO()->classes->get( Promotion_Manager::class )->is( 'black-friday-2023-promotion' ) ) {
|
||||
if ( \YoastSEO()->classes->get( Promotion_Manager::class )->is( 'black-friday-2024-promotion' ) ) {
|
||||
$this->asset_manager->enqueue_style( 'black-friday-banner' );
|
||||
}
|
||||
$this->asset_manager->localize_script( 'support', 'wpseoScriptData', $this->get_script_data() );
|
||||
|
||||
@@ -6,7 +6,6 @@ use WP_Post;
|
||||
use WP_Screen;
|
||||
use WPSEO_Admin_Asset_Manager;
|
||||
use WPSEO_Admin_Recommended_Replace_Vars;
|
||||
use WPSEO_Language_Utils;
|
||||
use WPSEO_Meta;
|
||||
use WPSEO_Metabox_Analysis_Inclusive_Language;
|
||||
use WPSEO_Metabox_Analysis_Readability;
|
||||
@@ -14,10 +13,8 @@ use WPSEO_Metabox_Analysis_SEO;
|
||||
use WPSEO_Metabox_Formatter;
|
||||
use WPSEO_Post_Metabox_Formatter;
|
||||
use WPSEO_Replace_Vars;
|
||||
use WPSEO_Shortlinker;
|
||||
use WPSEO_Utils;
|
||||
use Yoast\WP\SEO\Conditionals\Third_Party\Elementor_Edit_Conditional;
|
||||
use Yoast\WP\SEO\Conditionals\WooCommerce_Conditional;
|
||||
use Yoast\WP\SEO\Editors\Application\Site\Website_Information_Repository;
|
||||
use Yoast\WP\SEO\Elementor\Infrastructure\Request_Post;
|
||||
use Yoast\WP\SEO\Helpers\Capability_Helper;
|
||||
@@ -409,23 +406,19 @@ class Elementor implements Integration_Interface {
|
||||
'enabled_features' => WPSEO_Utils::retrieve_enabled_features(),
|
||||
];
|
||||
|
||||
$woocommerce_conditional = new WooCommerce_Conditional();
|
||||
$permalink = $this->get_permalink();
|
||||
$permalink = $this->get_permalink();
|
||||
|
||||
$script_data = [
|
||||
'metabox' => $this->get_metabox_script_data( $permalink ),
|
||||
'userLanguageCode' => WPSEO_Language_Utils::get_language( \get_user_locale() ),
|
||||
'isPost' => true,
|
||||
'isBlockEditor' => WP_Screen::get()->is_block_editor(),
|
||||
'isElementorEditor' => true,
|
||||
'isWooCommerceActive' => $woocommerce_conditional->is_met(),
|
||||
'postStatus' => \get_post_status( $post_id ),
|
||||
'postType' => \get_post_type( $post_id ),
|
||||
'analysis' => [
|
||||
'plugins' => $plugins_script_data,
|
||||
'worker' => $worker_script_data,
|
||||
],
|
||||
'webinarIntroElementorUrl' => WPSEO_Shortlinker::get( 'https://yoa.st/webinar-intro-elementor' ),
|
||||
'usedKeywordsNonce' => \wp_create_nonce( 'wpseo-keyword-usage-and-post-types' ),
|
||||
];
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ class Sidebar_Presenter extends Abstract_Presenter {
|
||||
* @return string The sidebar HTML.
|
||||
*/
|
||||
public function present() {
|
||||
$title = \__( 'BLACK FRIDAY - 30% OFF', 'wordpress-seo' );
|
||||
$title = \__( '30% OFF - BLACK FRIDAY', 'wordpress-seo' );
|
||||
|
||||
$assets_uri = \trailingslashit( \plugin_dir_url( \WPSEO_FILE ) );
|
||||
$buy_yoast_seo_shortlink = WPSEO_Shortlinker::get( 'https://yoa.st/jj' );
|
||||
@@ -45,7 +45,7 @@ class Sidebar_Presenter extends Abstract_Presenter {
|
||||
sizes="(min-width: 1321px) 75px">
|
||||
</figure>
|
||||
</figure>
|
||||
<?php if ( \YoastSEO()->classes->get( Promotion_Manager::class )->is( 'black-friday-2023-promotion' ) ) : ?>
|
||||
<?php if ( \YoastSEO()->classes->get( Promotion_Manager::class )->is( 'black-friday-2024-promotion' ) ) : ?>
|
||||
<div class="sidebar__sale_banner_container">
|
||||
<div class="sidebar__sale_banner">
|
||||
<span class="banner_text"><?php echo \esc_html( $title ); ?></span>
|
||||
@@ -54,30 +54,31 @@ class Sidebar_Presenter extends Abstract_Presenter {
|
||||
<?php endif; ?>
|
||||
<h2 class="yoast-get-premium-title">
|
||||
<?php
|
||||
/* translators: %1$s and %2$s expand to a span wrap to avoid linebreaks. %3$s expands to "Yoast SEO Premium". */
|
||||
\printf( \esc_html__( '%1$sGet%2$s %3$s', 'wordpress-seo' ), '<span>', '</span>', 'Yoast SEO Premium' );
|
||||
if ( \YoastSEO()->classes->get( Promotion_Manager::class )->is( 'black-friday-2024-promotion' ) ) {
|
||||
/* translators: %1$s and %2$s expand to a span wrap to avoid linebreaks. %3$s expands to "Yoast SEO Premium". */
|
||||
\printf( \esc_html__( '%1$sBuy%2$s %3$s', 'wordpress-seo' ), '<span>', '</span>', 'Yoast SEO Premium' );
|
||||
}
|
||||
else {
|
||||
/* translators: %1$s and %2$s expand to a span wrap to avoid linebreaks. %3$s expands to "Yoast SEO Premium". */
|
||||
\printf( \esc_html__( '%1$sGet%2$s %3$s', 'wordpress-seo' ), '<span>', '</span>', 'Yoast SEO Premium' );
|
||||
}
|
||||
?>
|
||||
</h2>
|
||||
<p>
|
||||
<?php
|
||||
echo \esc_html__( 'Use AI to generate titles and meta descriptions, automatically redirect deleted pages, get 24/7 support, and much, much more!', 'wordpress-seo' );
|
||||
if ( \YoastSEO()->classes->get( Promotion_Manager::class )->is( 'black-friday-2024-promotion' ) ) {
|
||||
echo \esc_html__( 'If you were thinking about upgrading, now\'s the time! 30% OFF ends 3rd Dec 11am (CET)', 'wordpress-seo' );
|
||||
}
|
||||
else {
|
||||
echo \esc_html__( 'Use AI to generate titles and meta descriptions, automatically redirect deleted pages, get 24/7 support, and much, much more!', 'wordpress-seo' );
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<?php if ( \YoastSEO()->classes->get( Promotion_Manager::class )->is( 'black-friday-2023-promotion' ) ) : ?>
|
||||
<div class="sidebar__sale_text">
|
||||
<p>
|
||||
<?php
|
||||
/* translators: %1$s expands to an opening strong tag, %2$s expands to a closing strong tag */
|
||||
\printf( \esc_html__( '%1$s SAVE 30%% %2$s on your 12 month subscription', 'wordpress-seo' ), '<strong>', '</strong>' );
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<p class="plugin-buy-button">
|
||||
<a class="yoast-button-upsell" data-action="load-nfd-ctb" data-ctb-id="f6a84663-465f-4cb5-8ba5-f7a6d72224b2" target="_blank" href="<?php echo \esc_url( $buy_yoast_seo_shortlink ); ?>">
|
||||
<?php
|
||||
if ( \YoastSEO()->classes->get( Promotion_Manager::class )->is( 'black-friday-2023-promotion' ) ) {
|
||||
echo \esc_html__( 'Claim your 30% off now!', 'wordpress-seo' );
|
||||
if ( \YoastSEO()->classes->get( Promotion_Manager::class )->is( 'black-friday-2024-promotion' ) ) {
|
||||
echo \esc_html__( 'Buy now', 'wordpress-seo' );
|
||||
}
|
||||
else {
|
||||
/* translators: %s expands to Yoast SEO Premium */
|
||||
@@ -89,9 +90,10 @@ class Sidebar_Presenter extends Abstract_Presenter {
|
||||
</p>
|
||||
<p class="yoast-price-micro-copy">
|
||||
<?php
|
||||
echo \esc_html__( 'Only $/€/£99 per year (ex VAT)', 'wordpress-seo' );
|
||||
if ( ! \YoastSEO()->classes->get( Promotion_Manager::class )->is( 'black-friday-2024-promotion' ) ) {
|
||||
echo \esc_html__( 'Only $/€/£99 per year (ex VAT)', 'wordpress-seo' ), '<br />';
|
||||
}
|
||||
?>
|
||||
<br />
|
||||
<?php
|
||||
echo \esc_html__( '30-day money back guarantee.', 'wordpress-seo' );
|
||||
?>
|
||||
|
||||
@@ -12,8 +12,8 @@ class Black_Friday_Promotion extends Abstract_Promotion implements Promotion_Int
|
||||
*/
|
||||
public function __construct() {
|
||||
parent::__construct(
|
||||
'black-friday-2023-promotion',
|
||||
new Time_Interval( \gmmktime( 11, 00, 00, 11, 23, 2023 ), \gmmktime( 11, 00, 00, 11, 28, 2023 ) )
|
||||
'black-friday-2024-promotion',
|
||||
new Time_Interval( \gmmktime( 10, 00, 00, 11, 28, 2024 ), \gmmktime( 10, 00, 00, 12, 3, 2024 ) )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user