rebase on oct-10-2023
This commit is contained in:
@@ -109,7 +109,6 @@ class Aioseo_Cleanup_Action extends Abstract_Aioseo_Importing_Action {
|
||||
$aioseo_table_truncate_done = $this->wpdb->query( $this->truncate_query() );
|
||||
// phpcs:enable WordPress.DB.PreparedSQL.NotPrepared
|
||||
|
||||
|
||||
if ( $meta_data === false && $aioseo_table_truncate_done === false ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,6 @@ class Aioseo_Validate_Data_Action extends Abstract_Aioseo_Importing_Action {
|
||||
$validated_aioseo_settings = $this->validate_aioseo_settings();
|
||||
$validated_robot_settings = $this->validate_robot_settings();
|
||||
|
||||
|
||||
if ( $validated_aioseo_table === false || $validated_aioseo_settings === false || $validated_robot_settings === false ) {
|
||||
throw new Aioseo_Validation_Exception();
|
||||
}
|
||||
|
||||
@@ -90,6 +90,7 @@ abstract class Abstract_Indexing_Action implements Indexation_Action_Interface,
|
||||
}
|
||||
|
||||
\set_transient( static::UNINDEXED_COUNT_TRANSIENT, $count, \DAY_IN_SECONDS );
|
||||
|
||||
/**
|
||||
* Action: 'wpseo_indexables_unindexed_calculated' - sets an option to timestamp when there are no unindexed indexables left.
|
||||
*
|
||||
|
||||
@@ -53,9 +53,9 @@ class Indexable_Post_Type_Archive_Indexation_Action implements Indexation_Action
|
||||
* Indexation_Post_Type_Archive_Action constructor.
|
||||
*
|
||||
* @param Indexable_Repository $repository The indexable repository.
|
||||
* @param Indexable_Builder $builder The indexable builder.
|
||||
* @param Post_Type_Helper $post_type The post type helper.
|
||||
* @param Indexable_Builder_Versions $versions The current versions of all indexable builders.
|
||||
* @param Indexable_Builder $builder The indexable builder.
|
||||
* @param Post_Type_Helper $post_type The post type helper.
|
||||
* @param Indexable_Builder_Versions $versions The current versions of all indexable builders.
|
||||
*/
|
||||
public function __construct(
|
||||
Indexable_Repository $repository,
|
||||
|
||||
@@ -28,8 +28,8 @@ class Integrations_Action {
|
||||
/**
|
||||
* Sets an integration state.
|
||||
*
|
||||
* @param string $integration_name The name of the integration to activate/deactivate.
|
||||
* @param boolean $value The value to store.
|
||||
* @param string $integration_name The name of the integration to activate/deactivate.
|
||||
* @param bool $value The value to store.
|
||||
*
|
||||
* @return object The response object.
|
||||
*/
|
||||
|
||||
@@ -94,4 +94,3 @@ class SEMrush_Phrases_Action {
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,8 @@ use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
*/
|
||||
class Wincher_Account_Action {
|
||||
|
||||
const ACCOUNT_URL = 'https://api.wincher.com/beta/account';
|
||||
const ACCOUNT_URL = 'https://api.wincher.com/beta/account';
|
||||
const UPGRADE_CAMPAIGN_URL = 'https://api.wincher.com/v1/yoast/upgrade-campaign';
|
||||
|
||||
/**
|
||||
* The Wincher_Client instance.
|
||||
@@ -63,4 +64,39 @@ class Wincher_Account_Action {
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the upgrade campaign.
|
||||
*
|
||||
* @return object The response object.
|
||||
*/
|
||||
public function get_upgrade_campaign() {
|
||||
try {
|
||||
$result = $this->client->get( self::UPGRADE_CAMPAIGN_URL );
|
||||
$type = $result['type'];
|
||||
$months = $result['months'];
|
||||
|
||||
// We display upgrade discount only if it's a rate discount and positive months.
|
||||
if ( $type === 'RATE' && $months && $months > 0 ) {
|
||||
$discount = $result['value'];
|
||||
|
||||
return (object) [
|
||||
'discount' => $discount,
|
||||
'months' => $months,
|
||||
'status' => 200,
|
||||
];
|
||||
}
|
||||
|
||||
return (object) [
|
||||
'discount' => null,
|
||||
'months' => null,
|
||||
'status' => 200,
|
||||
];
|
||||
} catch ( \Exception $e ) {
|
||||
return (object) [
|
||||
'status' => $e->getCode(),
|
||||
'error' => $e->getMessage(),
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,8 +275,6 @@ class Wincher_Keyphrases_Action {
|
||||
* @return array
|
||||
*/
|
||||
protected function collect_all_keyphrases() {
|
||||
global $wpdb;
|
||||
|
||||
// Collect primary keyphrases first.
|
||||
$keyphrases = \array_column(
|
||||
$this->indexable_repository
|
||||
@@ -347,7 +345,7 @@ class Wincher_Keyphrases_Action {
|
||||
*/
|
||||
protected function to_result_object( $result ) {
|
||||
if ( \array_key_exists( 'data', $result ) ) {
|
||||
$result['results'] = $result['data'];
|
||||
$result['results'] = (object) $result['data'];
|
||||
|
||||
unset( $result['data'] );
|
||||
}
|
||||
|
||||
@@ -9,13 +9,15 @@ use Yoast\WP\SEO\Analytics\Domain\Missing_Indexable_Count;
|
||||
|
||||
/**
|
||||
* Manages the collection of the missing indexable data.
|
||||
*
|
||||
* @makePublic
|
||||
*/
|
||||
class Missing_Indexables_Collector implements WPSEO_Collection {
|
||||
|
||||
/**
|
||||
* All the indexation actions.
|
||||
*
|
||||
* @var array<Indexation_Action_Interface> $indexation_actions
|
||||
* @var array<Indexation_Action_Interface>
|
||||
*/
|
||||
private $indexation_actions;
|
||||
|
||||
@@ -34,10 +36,10 @@ class Missing_Indexables_Collector implements WPSEO_Collection {
|
||||
*
|
||||
* @return array The list of missing indexables.
|
||||
*/
|
||||
public function get(): array {
|
||||
public function get() {
|
||||
$missing_indexable_bucket = new Missing_Indexable_Bucket();
|
||||
foreach ( $this->indexation_actions as $indexation_action ) {
|
||||
$missing_indexable_count = new Missing_Indexable_Count( get_class( $indexation_action ), $indexation_action->get_total_unindexed() );
|
||||
$missing_indexable_count = new Missing_Indexable_Count( \get_class( $indexation_action ), $indexation_action->get_total_unindexed() );
|
||||
$missing_indexable_bucket->add_missing_indexable_count( $missing_indexable_count );
|
||||
}
|
||||
|
||||
@@ -49,7 +51,7 @@ class Missing_Indexables_Collector implements WPSEO_Collection {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function add_additional_indexing_actions(): void {
|
||||
private function add_additional_indexing_actions() {
|
||||
/**
|
||||
* Filter: Adds the possibility to add additional indexation actions to be included in the count routine.
|
||||
*
|
||||
|
||||
@@ -9,6 +9,8 @@ use Yoast\WP\SEO\Repositories\Indexable_Cleanup_Repository;
|
||||
|
||||
/**
|
||||
* Collects data about to-be-cleaned indexables.
|
||||
*
|
||||
* @makePublic
|
||||
*/
|
||||
class To_Be_Cleaned_Indexables_Collector implements WPSEO_Collection {
|
||||
|
||||
@@ -31,7 +33,7 @@ class To_Be_Cleaned_Indexables_Collector implements WPSEO_Collection {
|
||||
/**
|
||||
* Gets the data for the collector.
|
||||
*/
|
||||
public function get(): array {
|
||||
public function get() {
|
||||
$to_be_cleaned_indexable_bucket = new To_Be_Cleaned_Indexable_Bucket();
|
||||
$cleanup_tasks = [
|
||||
'indexables_with_post_object_type_and_shop_order_object_sub_type' => $this->indexable_cleanup_repository->count_indexables_with_object_type_and_object_sub_type( 'post', 'shop_order' ),
|
||||
@@ -41,7 +43,7 @@ class To_Be_Cleaned_Indexables_Collector implements WPSEO_Collection {
|
||||
'indexables_for_non_publicly_viewable_post_type_archive_pages' => $this->indexable_cleanup_repository->count_indexables_for_non_publicly_post_type_archive_pages(),
|
||||
'indexables_for_authors_archive_disabled' => $this->indexable_cleanup_repository->count_indexables_for_authors_archive_disabled(),
|
||||
'indexables_for_authors_without_archive' => $this->indexable_cleanup_repository->count_indexables_for_authors_without_archive(),
|
||||
'indexables_for_object_type_and_source_table_users' => $this->indexable_cleanup_repository->count_indexables_for_object_type_and_source_table( 'users', 'ID', 'user' ),
|
||||
'indexables_for_object_type_and_source_table_users' => $this->indexable_cleanup_repository->count_indexables_for_orphaned_users(),
|
||||
'indexables_for_object_type_and_source_table_posts' => $this->indexable_cleanup_repository->count_indexables_for_object_type_and_source_table( 'posts', 'ID', 'post' ),
|
||||
'indexables_for_object_type_and_source_table_terms' => $this->indexable_cleanup_repository->count_indexables_for_object_type_and_source_table( 'terms', 'term_id', 'term' ),
|
||||
'orphaned_from_table_indexable_hierarchy' => $this->indexable_cleanup_repository->count_orphaned_from_table( 'Indexable_Hierarchy', 'indexable_id' ),
|
||||
@@ -50,8 +52,10 @@ class To_Be_Cleaned_Indexables_Collector implements WPSEO_Collection {
|
||||
];
|
||||
|
||||
foreach ( $cleanup_tasks as $name => $count ) {
|
||||
$count_object = new To_Be_Cleaned_Indexable_Count( $name, $count );
|
||||
$to_be_cleaned_indexable_bucket->add_to_be_cleaned_indexable_count( $count_object );
|
||||
if ( $count !== null ) {
|
||||
$count_object = new To_Be_Cleaned_Indexable_Count( $name, $count );
|
||||
$to_be_cleaned_indexable_bucket->add_to_be_cleaned_indexable_count( $count_object );
|
||||
}
|
||||
}
|
||||
|
||||
$this->add_additional_counts( $to_be_cleaned_indexable_bucket );
|
||||
@@ -66,7 +70,7 @@ class To_Be_Cleaned_Indexables_Collector implements WPSEO_Collection {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function add_additional_counts( To_Be_Cleaned_Indexable_Bucket $to_be_cleaned_indexable_bucket ): void {
|
||||
private function add_additional_counts( $to_be_cleaned_indexable_bucket ) {
|
||||
/**
|
||||
* Action: Adds the possibility to add additional to be cleaned objects.
|
||||
*
|
||||
|
||||
@@ -10,7 +10,7 @@ class Missing_Indexable_Bucket {
|
||||
/**
|
||||
* All the missing indexable count objects.
|
||||
*
|
||||
* @var array<Missing_Indexable_Count> $missing_indexable_counts
|
||||
* @var array<Missing_Indexable_Count>
|
||||
*/
|
||||
private $missing_indexable_counts;
|
||||
|
||||
@@ -37,14 +37,12 @@ class Missing_Indexable_Bucket {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function to_array(): array {
|
||||
public function to_array() {
|
||||
return \array_map(
|
||||
function ( $item ) {
|
||||
static function ( $item ) {
|
||||
return $item->to_array();
|
||||
},
|
||||
$this->missing_indexable_counts
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -10,14 +10,14 @@ class Missing_Indexable_Count {
|
||||
/**
|
||||
* The indexable type that is represented by this.
|
||||
*
|
||||
* @var string $indexable_type
|
||||
* @var string
|
||||
*/
|
||||
private $indexable_type;
|
||||
|
||||
/**
|
||||
* The amount of missing indexables.
|
||||
*
|
||||
* @var int $count
|
||||
* @var int
|
||||
*/
|
||||
private $count;
|
||||
|
||||
@@ -27,7 +27,7 @@ class Missing_Indexable_Count {
|
||||
* @param string $indexable_type The indexable type that is represented by this.
|
||||
* @param int $count The amount of missing indexables.
|
||||
*/
|
||||
public function __construct( string $indexable_type, int $count ) {
|
||||
public function __construct( $indexable_type, $count ) {
|
||||
$this->indexable_type = $indexable_type;
|
||||
$this->count = $count;
|
||||
}
|
||||
@@ -37,7 +37,7 @@ class Missing_Indexable_Count {
|
||||
*
|
||||
* @return array Returns both values in an array format.
|
||||
*/
|
||||
public function to_array(): array {
|
||||
public function to_array() {
|
||||
return [
|
||||
'indexable_type' => $this->get_indexable_type(),
|
||||
'count' => $this->get_count(),
|
||||
@@ -49,7 +49,7 @@ class Missing_Indexable_Count {
|
||||
*
|
||||
* @return string Returns the indexable type.
|
||||
*/
|
||||
public function get_indexable_type(): string {
|
||||
public function get_indexable_type() {
|
||||
return $this->indexable_type;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ class Missing_Indexable_Count {
|
||||
*
|
||||
* @return int Returns the amount of missing indexables.
|
||||
*/
|
||||
public function get_count(): int {
|
||||
public function get_count() {
|
||||
return $this->count;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ class To_Be_Cleaned_Indexable_Bucket {
|
||||
/**
|
||||
* All the to be cleaned indexable count objects.
|
||||
*
|
||||
* @var array<To_Be_Cleaned_Indexable_Count> $to_be_cleaned_indexable_counts
|
||||
* @var array<To_Be_Cleaned_Indexable_Count>
|
||||
*/
|
||||
private $to_be_cleaned_indexable_counts;
|
||||
|
||||
@@ -28,7 +28,7 @@ class To_Be_Cleaned_Indexable_Bucket {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function add_to_be_cleaned_indexable_count( To_Be_Cleaned_Indexable_Count $to_be_cleaned_indexable_counts ): void {
|
||||
public function add_to_be_cleaned_indexable_count( To_Be_Cleaned_Indexable_Count $to_be_cleaned_indexable_counts ) {
|
||||
$this->to_be_cleaned_indexable_counts[] = $to_be_cleaned_indexable_counts;
|
||||
}
|
||||
|
||||
@@ -37,14 +37,12 @@ class To_Be_Cleaned_Indexable_Bucket {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function to_array(): array {
|
||||
public function to_array() {
|
||||
return \array_map(
|
||||
function ( $item ) {
|
||||
static function ( $item ) {
|
||||
return $item->to_array();
|
||||
},
|
||||
$this->to_be_cleaned_indexable_counts
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -10,14 +10,14 @@ class To_Be_Cleaned_Indexable_Count {
|
||||
/**
|
||||
* The cleanup task that is represented by this.
|
||||
*
|
||||
* @var string $cleanup_name
|
||||
* @var string
|
||||
*/
|
||||
private $cleanup_name;
|
||||
|
||||
/**
|
||||
* The amount of missing indexables.
|
||||
*
|
||||
* @var int $count
|
||||
* @var int
|
||||
*/
|
||||
private $count;
|
||||
|
||||
@@ -25,9 +25,9 @@ class To_Be_Cleaned_Indexable_Count {
|
||||
* The constructor.
|
||||
*
|
||||
* @param string $cleanup_name The indexable type that is represented by this.
|
||||
* @param int $count The amount of missing indexables.
|
||||
* @param int $count The amount of missing indexables.
|
||||
*/
|
||||
public function __construct( string $cleanup_name, int $count ) {
|
||||
public function __construct( $cleanup_name, $count ) {
|
||||
$this->cleanup_name = $cleanup_name;
|
||||
$this->count = $count;
|
||||
}
|
||||
@@ -37,7 +37,7 @@ class To_Be_Cleaned_Indexable_Count {
|
||||
*
|
||||
* @return array Returns both values in an array format.
|
||||
*/
|
||||
public function to_array(): array {
|
||||
public function to_array() {
|
||||
return [
|
||||
'cleanup_name' => $this->get_cleanup_name(),
|
||||
'count' => $this->get_count(),
|
||||
@@ -49,7 +49,7 @@ class To_Be_Cleaned_Indexable_Count {
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_cleanup_name(): string {
|
||||
public function get_cleanup_name() {
|
||||
return $this->cleanup_name;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ class To_Be_Cleaned_Indexable_Count {
|
||||
*
|
||||
* @return int Returns the amount of missing indexables.
|
||||
*/
|
||||
public function get_count(): int {
|
||||
public function get_count() {
|
||||
return $this->count;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
namespace Yoast\WP\SEO\Analytics\User_Interface;
|
||||
|
||||
use Yoast\WP\SEO\Integrations\Integration_Interface;
|
||||
use Yoast\WP\SEO\Conditionals\No_Conditionals;
|
||||
use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
use Yoast\WP\SEO\Integrations\Integration_Interface;
|
||||
|
||||
/**
|
||||
* Handles setting a timestamp when the indexation of a specific indexation action is completed.
|
||||
@@ -16,7 +16,7 @@ class Last_Completed_Indexation_Integration implements Integration_Interface {
|
||||
/**
|
||||
* The options helper.
|
||||
*
|
||||
* @var Options_Helper $options_helper The options helper.
|
||||
* @var Options_Helper The options helper.
|
||||
*/
|
||||
private $options_helper;
|
||||
|
||||
@@ -50,7 +50,7 @@ class Last_Completed_Indexation_Integration implements Integration_Interface {
|
||||
* Saves a timestamp option when there are no unindexed indexables.
|
||||
*
|
||||
* @param string $indexable_name The name of the indexable that is being checked.
|
||||
* @param int $count The amount of missing indexables.
|
||||
* @param int $count The amount of missing indexables.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace Yoast\WP\SEO\Builders;
|
||||
use wpdb;
|
||||
use Yoast\WP\SEO\Exceptions\Indexable\Author_Not_Built_Exception;
|
||||
use Yoast\WP\SEO\Helpers\Author_Archive_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Post_Helper;
|
||||
use Yoast\WP\SEO\Models\Indexable;
|
||||
use Yoast\WP\SEO\Values\Indexables\Indexable_Builder_Versions;
|
||||
@@ -32,6 +33,13 @@ class Indexable_Author_Builder {
|
||||
*/
|
||||
protected $version;
|
||||
|
||||
/**
|
||||
* Holds the options helper instance.
|
||||
*
|
||||
* @var Options_Helper
|
||||
*/
|
||||
protected $options_helper;
|
||||
|
||||
/**
|
||||
* Holds the taxonomy helper instance.
|
||||
*
|
||||
@@ -51,17 +59,20 @@ class Indexable_Author_Builder {
|
||||
*
|
||||
* @param Author_Archive_Helper $author_archive The author archive helper.
|
||||
* @param Indexable_Builder_Versions $versions The Indexable version manager.
|
||||
* @param Options_Helper $options_helper The options helper.
|
||||
* @param Post_Helper $post_helper The post helper.
|
||||
* @param wpdb $wpdb The WPDB instance.
|
||||
*/
|
||||
public function __construct(
|
||||
Author_Archive_Helper $author_archive,
|
||||
Indexable_Builder_Versions $versions,
|
||||
Options_Helper $options_helper,
|
||||
Post_Helper $post_helper,
|
||||
wpdb $wpdb
|
||||
) {
|
||||
$this->author_archive = $author_archive;
|
||||
$this->version = $versions->get_latest_version_for_type( 'user' );
|
||||
$this->options_helper = $options_helper;
|
||||
$this->post_helper = $post_helper;
|
||||
$this->wpdb = $wpdb;
|
||||
}
|
||||
@@ -215,7 +226,8 @@ class Indexable_Author_Builder {
|
||||
}
|
||||
|
||||
// We will check if the author has public posts the WP way, instead of the indexable way, to make sure we get proper results even if SEO optimization is not run.
|
||||
if ( $this->author_archive->author_has_public_posts_wp( $user_id ) === false ) {
|
||||
// In case the user has no public posts, we check if the user should be indexed anyway.
|
||||
if ( $this->options_helper->get( 'noindex-author-noposts-wpseo', false ) === true && $this->author_archive->author_has_public_posts_wp( $user_id ) === false ) {
|
||||
$exception = Author_Not_Built_Exception::author_archives_are_not_indexed_for_users_without_posts( $user_id );
|
||||
}
|
||||
|
||||
|
||||
@@ -428,6 +428,7 @@ class Indexable_Builder {
|
||||
if ( ! $this->is_type_with_no_id( $indexable->object_type ) && ( ! isset( $indexable->object_id ) || \is_null( $indexable->object_id ) ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* The current indexable could not be indexed. Create a placeholder indexable, so we can
|
||||
* skip this indexable in future indexing runs.
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
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\Options_Helper;
|
||||
@@ -211,14 +213,146 @@ 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 string[] An array of urls.
|
||||
* @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 [];
|
||||
@@ -229,7 +363,7 @@ class Indexable_Link_Builder {
|
||||
// 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[] = \trim( $match[2], "'" );
|
||||
$images[ $match[2] ] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,7 +375,7 @@ class Indexable_Link_Builder {
|
||||
*
|
||||
* @param Indexable $indexable The indexable.
|
||||
* @param string[] $links The link URLs.
|
||||
* @param string[] $images The image sources.
|
||||
* @param int[] $images The image sources.
|
||||
*
|
||||
* @return SEO_Links[] The link models.
|
||||
*/
|
||||
@@ -262,13 +396,12 @@ class Indexable_Link_Builder {
|
||||
}
|
||||
);
|
||||
|
||||
$images = \array_map(
|
||||
function( $link ) use ( $home_url, $indexable ) {
|
||||
return $this->create_internal_link( $link, $home_url, $indexable, true );
|
||||
},
|
||||
$images
|
||||
);
|
||||
return \array_merge( $links, $images );
|
||||
$image_links = [];
|
||||
foreach ( $images as $image_url => $image_id ) {
|
||||
$image_links[] = $this->create_internal_link( $image_url, $home_url, $indexable, true, $image_id );
|
||||
}
|
||||
|
||||
return \array_merge( $links, $image_links );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -294,10 +427,11 @@ class Indexable_Link_Builder {
|
||||
* @param array $home_url The home url, as parsed by wp_parse_url.
|
||||
* @param Indexable $indexable The indexable of the post containing the link.
|
||||
* @param bool $is_image Whether or not the link is an image.
|
||||
* @param int $image_id The ID of the internal image.
|
||||
*
|
||||
* @return SEO_Links The created link.
|
||||
*/
|
||||
protected function create_internal_link( $url, $home_url, $indexable, $is_image = false ) {
|
||||
protected function create_internal_link( $url, $home_url, $indexable, $is_image = false, $image_id = 0 ) {
|
||||
$parsed_url = \wp_parse_url( $url );
|
||||
$link_type = $this->url_helper->get_link_type( $parsed_url, $home_url, $is_image );
|
||||
|
||||
@@ -326,11 +460,12 @@ class Indexable_Link_Builder {
|
||||
if ( $model->type === SEO_Links::TYPE_INTERNAL_IMAGE ) {
|
||||
$permalink = $this->build_permalink( $url, $home_url );
|
||||
|
||||
if ( ! $this->options_helper->get( 'disable-attachment' ) ) {
|
||||
/** The `wpseo_force_creating_and_using_attachment_indexables` filter is documented in indexable-link-builder.php */
|
||||
if ( ! $this->options_helper->get( 'disable-attachment' ) || \apply_filters( 'wpseo_force_creating_and_using_attachment_indexables', false ) ) {
|
||||
$model = $this->enhance_link_from_indexable( $model, $permalink );
|
||||
}
|
||||
else {
|
||||
$target_post_id = WPSEO_Image_Utils::get_attachment_by_url( $permalink );
|
||||
$target_post_id = ( $image_id !== 0 ) ? $image_id : WPSEO_Image_Utils::get_attachment_by_url( $permalink );
|
||||
|
||||
if ( ! empty( $target_post_id ) ) {
|
||||
$model->target_post_id = $target_post_id;
|
||||
@@ -572,7 +707,6 @@ class Indexable_Link_Builder {
|
||||
foreach ( $counts as $count ) {
|
||||
|
||||
$this->indexable_repository->update_incoming_link_count( $count['target_indexable_id'], $count['incoming'] );
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,11 +55,11 @@ class Indexable_Post_Type_Archive_Builder {
|
||||
/**
|
||||
* Indexable_Post_Type_Archive_Builder constructor.
|
||||
*
|
||||
* @param Options_Helper $options The options helper.
|
||||
* @param Indexable_Builder_Versions $versions The latest version of each Indexable builder.
|
||||
* @param Post_Helper $post_helper The post helper.
|
||||
* @param Options_Helper $options The options helper.
|
||||
* @param Indexable_Builder_Versions $versions The latest version of each Indexable builder.
|
||||
* @param Post_Helper $post_helper The post helper.
|
||||
* @param Post_Type_Helper $post_type_helper The post type helper.
|
||||
* @param wpdb $wpdb The WPDB instance.
|
||||
* @param wpdb $wpdb The WPDB instance.
|
||||
*/
|
||||
public function __construct(
|
||||
Options_Helper $options,
|
||||
@@ -82,7 +82,7 @@ class Indexable_Post_Type_Archive_Builder {
|
||||
* @param Indexable $indexable The indexable to format.
|
||||
*
|
||||
* @return Indexable The extended indexable.
|
||||
* @throws \Yoast\WP\SEO\Exceptions\Indexable\Post_Type_Not_Built_Exception Throws exception if the post type is excluded.
|
||||
* @throws Post_Type_Not_Built_Exception Throws exception if the post type is excluded.
|
||||
*/
|
||||
public function build( $post_type, Indexable $indexable ) {
|
||||
if ( ! $this->post_type_helper->is_post_type_archive_indexable( $post_type ) ) {
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
namespace Yoast\WP\SEO\Commands;
|
||||
|
||||
use WP_CLI;
|
||||
use WP_CLI\ExitException;
|
||||
use WP_CLI\Utils;
|
||||
use Yoast\WP\SEO\Integrations\Cleanup_Integration;
|
||||
use Yoast\WP\SEO\Main;
|
||||
use function get_sites;
|
||||
use function WP_CLI\Utils\make_progress_bar;
|
||||
|
||||
/**
|
||||
* A WP CLI command that helps with cleaning up unwanted records from our custom tables.
|
||||
@@ -78,10 +78,10 @@ final class Cleanup_Command implements Command_Interface {
|
||||
*/
|
||||
public function cleanup( $args = null, $assoc_args = null ) {
|
||||
if ( isset( $assoc_args['interval'] ) && (int) $assoc_args['interval'] < 0 ) {
|
||||
\WP_CLI::error( __( 'The value for \'interval\' must be a positive integer.', 'wordpress-seo' ) );
|
||||
WP_CLI::error( \__( 'The value for \'interval\' must be a positive integer.', 'wordpress-seo' ) );
|
||||
}
|
||||
if ( isset( $assoc_args['batch-size'] ) && (int) $assoc_args['batch-size'] < 1 ) {
|
||||
\WP_CLI::error( __( 'The value for \'batch-size\' must be a positive integer higher than equal to 1.', 'wordpress-seo' ) );
|
||||
WP_CLI::error( \__( 'The value for \'batch-size\' must be a positive integer higher than equal to 1.', 'wordpress-seo' ) );
|
||||
}
|
||||
|
||||
if ( isset( $assoc_args['network'] ) && \is_multisite() ) {
|
||||
@@ -91,7 +91,7 @@ final class Cleanup_Command implements Command_Interface {
|
||||
$total_removed = $this->cleanup_current_site( $assoc_args );
|
||||
}
|
||||
|
||||
\WP_CLI::success(
|
||||
WP_CLI::success(
|
||||
\sprintf(
|
||||
/* translators: %1$d is the number of records that are removed. */
|
||||
\_n(
|
||||
@@ -141,9 +141,9 @@ final class Cleanup_Command implements Command_Interface {
|
||||
$site_url = \site_url();
|
||||
$total_removed = 0;
|
||||
|
||||
if ( ! \is_plugin_active( WPSEO_BASENAME ) ) {
|
||||
if ( ! \is_plugin_active( \WPSEO_BASENAME ) ) {
|
||||
/* translators: %1$s is the site url of the site that is skipped. %2$s is Yoast SEO. */
|
||||
\WP_CLI::warning( \sprintf( \__( 'Skipping %1$s. %2$s is not active on this site.', 'wordpress-seo' ), $site_url, 'Yoast SEO' ) );
|
||||
WP_CLI::warning( \sprintf( \__( 'Skipping %1$s. %2$s is not active on this site.', 'wordpress-seo' ), $site_url, 'Yoast SEO' ) );
|
||||
|
||||
return $total_removed;
|
||||
}
|
||||
@@ -157,7 +157,7 @@ final class Cleanup_Command implements Command_Interface {
|
||||
|
||||
/* translators: %1$s is the site url of the site that is cleaned up. %2$s is the name of the cleanup task that is currently running. */
|
||||
$progress_bar_title_format = \__( 'Cleaning up %1$s [%2$s]', 'wordpress-seo' );
|
||||
$progress = make_progress_bar( \sprintf( $progress_bar_title_format, $site_url, \key( $tasks ) ), count( $tasks ) );
|
||||
$progress = Utils\make_progress_bar( \sprintf( $progress_bar_title_format, $site_url, \key( $tasks ) ), \count( $tasks ) );
|
||||
|
||||
foreach ( $tasks as $task_name => $task ) {
|
||||
// Update the progressbar title with the current task name.
|
||||
@@ -177,7 +177,7 @@ final class Cleanup_Command implements Command_Interface {
|
||||
$progress->finish();
|
||||
|
||||
$this->cleanup_integration->reset_cleanup();
|
||||
\WP_CLI::log(
|
||||
WP_CLI::log(
|
||||
\sprintf(
|
||||
/* translators: %1$d is the number of records that were removed. %2$s is the site url. */
|
||||
\_n(
|
||||
|
||||
@@ -14,6 +14,7 @@ use Yoast\WP\SEO\Actions\Indexing\Indexation_Action_Interface;
|
||||
use Yoast\WP\SEO\Actions\Indexing\Indexing_Prepare_Action;
|
||||
use Yoast\WP\SEO\Actions\Indexing\Post_Link_Indexing_Action;
|
||||
use Yoast\WP\SEO\Actions\Indexing\Term_Link_Indexing_Action;
|
||||
use Yoast\WP\SEO\Helpers\Indexable_Helper;
|
||||
use Yoast\WP\SEO\Main;
|
||||
|
||||
/**
|
||||
@@ -77,6 +78,13 @@ class Index_Command implements Command_Interface {
|
||||
*/
|
||||
private $prepare_indexing_action;
|
||||
|
||||
/**
|
||||
* Represents the indexable helper.
|
||||
*
|
||||
* @var Indexable_Helper
|
||||
*/
|
||||
protected $indexable_helper;
|
||||
|
||||
/**
|
||||
* Generate_Indexables_Command constructor.
|
||||
*
|
||||
@@ -96,6 +104,7 @@ class Index_Command implements Command_Interface {
|
||||
* action.
|
||||
* @param Term_Link_Indexing_Action $term_link_indexing_action The term link indexation
|
||||
* action.
|
||||
* @param Indexable_Helper $indexable_helper The indexable helper.
|
||||
*/
|
||||
public function __construct(
|
||||
Indexable_Post_Indexation_Action $post_indexation_action,
|
||||
@@ -105,7 +114,8 @@ class Index_Command implements Command_Interface {
|
||||
Indexable_Indexing_Complete_Action $complete_indexation_action,
|
||||
Indexing_Prepare_Action $prepare_indexing_action,
|
||||
Post_Link_Indexing_Action $post_link_indexing_action,
|
||||
Term_Link_Indexing_Action $term_link_indexing_action
|
||||
Term_Link_Indexing_Action $term_link_indexing_action,
|
||||
Indexable_Helper $indexable_helper
|
||||
) {
|
||||
$this->post_indexation_action = $post_indexation_action;
|
||||
$this->term_indexation_action = $term_indexation_action;
|
||||
@@ -115,6 +125,7 @@ class Index_Command implements Command_Interface {
|
||||
$this->prepare_indexing_action = $prepare_indexing_action;
|
||||
$this->post_link_indexing_action = $post_link_indexing_action;
|
||||
$this->term_link_indexing_action = $term_link_indexing_action;
|
||||
$this->indexable_helper = $indexable_helper;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -158,6 +169,14 @@ class Index_Command implements Command_Interface {
|
||||
* @return void
|
||||
*/
|
||||
public function index( $args = null, $assoc_args = null ) {
|
||||
if ( ! $this->indexable_helper->should_index_indexables() ) {
|
||||
WP_CLI::log(
|
||||
\__( 'Your WordPress environment is running on a non-production site. Indexables can only be created on production environments. Please check your `WP_ENVIRONMENT_TYPE` settings.', 'wordpress-seo' )
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! isset( $assoc_args['network'] ) ) {
|
||||
$this->run_indexation_actions( $assoc_args );
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php // phpcs:ignore Yoast.Files.FileName.InvalidClassFileName -- Reason: this explicitly concerns the Yoast admin.
|
||||
|
||||
namespace Yoast\WP\SEO\Conditionals\Admin;
|
||||
|
||||
use Yoast\WP\SEO\Conditionals\Conditional;
|
||||
use Yoast\WP\SEO\Helpers\Current_Page_Helper;
|
||||
|
||||
/**
|
||||
* Conditional that is only met when on a Yoast SEO admin page.
|
||||
*/
|
||||
class Yoast_Admin_Conditional implements Conditional {
|
||||
|
||||
/**
|
||||
* Holds the Current_Page_Helper.
|
||||
*
|
||||
* @var Current_Page_Helper
|
||||
*/
|
||||
private $current_page_helper;
|
||||
|
||||
/**
|
||||
* Constructs the conditional.
|
||||
*
|
||||
* @param \Yoast\WP\SEO\Helpers\Current_Page_Helper $current_page_helper The current page helper.
|
||||
*/
|
||||
public function __construct( Current_Page_Helper $current_page_helper ) {
|
||||
$this->current_page_helper = $current_page_helper;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns `true` when on the admin dashboard, update or Yoast SEO pages.
|
||||
*
|
||||
* @return bool `true` when on the admin dashboard, update or Yoast SEO pages.
|
||||
*/
|
||||
public function is_met() {
|
||||
if ( ! \is_admin() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->current_page_helper->is_yoast_seo_page();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Conditionals;
|
||||
|
||||
/**
|
||||
* Conditional that is only met when on deactivating Yoast SEO.
|
||||
*/
|
||||
class Deactivating_Yoast_Seo_Conditional implements Conditional {
|
||||
|
||||
/**
|
||||
* Returns whether this conditional is met.
|
||||
*
|
||||
* @return bool Whether the conditional is met.
|
||||
*/
|
||||
public function is_met() {
|
||||
// phpcs:ignore WordPress.Security.NonceVerification -- We can't verify nonce since this might run from any user.
|
||||
if ( isset( $_GET['action'] ) && \sanitize_text_field( \wp_unslash( $_GET['action'] ) ) === 'deactivate' && isset( $_GET['plugin'] ) && \sanitize_text_field( \wp_unslash( $_GET['plugin'] === 'wordpress-seo/wp-seo.php' ) ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -37,6 +37,7 @@ class Primary_Category_Conditional implements Conditional {
|
||||
if ( ! \is_admin() ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter: Adds the possibility to use primary category at additional admin pages.
|
||||
*
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Yoast\WP\SEO\Conditionals\Third_Party;
|
||||
|
||||
use Automattic\Jetpack_Boost\Lib\Premium_Features;
|
||||
use Yoast\WP\SEO\Conditionals\Conditional;
|
||||
|
||||
/**
|
||||
@@ -25,8 +26,8 @@ class Jetpack_Boost_Not_Premium_Conditional implements Conditional {
|
||||
*/
|
||||
private function is_premium() {
|
||||
if ( \class_exists( '\Automattic\Jetpack_Boost\Lib\Premium_Features', false ) ) {
|
||||
return \Automattic\Jetpack_Boost\Lib\Premium_Features::has_feature(
|
||||
\Automattic\Jetpack_Boost\Lib\Premium_Features::PRIORITY_SUPPORT
|
||||
return Premium_Features::has_feature(
|
||||
Premium_Features::PRIORITY_SUPPORT
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php // phpcs:ignore Yoast.Files.FileName.InvalidClassFileName -- Reason: this explicitly concerns the Yoast tools page.
|
||||
|
||||
namespace Yoast\WP\SEO\Conditionals;
|
||||
|
||||
/**
|
||||
* Conditional that is only met when current page is the tools page.
|
||||
*/
|
||||
class User_Profile_Conditional implements Conditional {
|
||||
|
||||
/**
|
||||
* Returns whether or not this conditional is met.
|
||||
*
|
||||
* @return bool Whether or not the conditional is met.
|
||||
*/
|
||||
public function is_met() {
|
||||
global $pagenow;
|
||||
|
||||
if ( $pagenow !== 'profile.php' ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Conditionals;
|
||||
|
||||
/**
|
||||
* Class that checks if WP_CRON is enabled.
|
||||
*/
|
||||
class WP_CRON_Enabled_Conditional implements Conditional {
|
||||
|
||||
/**
|
||||
* Checks if WP_CRON is enabled.
|
||||
*
|
||||
* @return bool True when WP_CRON is enabled.
|
||||
*/
|
||||
public function is_met() {
|
||||
return ! ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON );
|
||||
}
|
||||
}
|
||||
@@ -16,4 +16,3 @@ class XMLRPC_Conditional implements Conditional {
|
||||
return ( \defined( 'XMLRPC_REQUEST' ) && \XMLRPC_REQUEST );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,4 +56,3 @@ class AddInclusiveLanguageScore extends Migration {
|
||||
return Model::get_table_name( 'Indexable' );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Content_Type_Visibility\Application;
|
||||
|
||||
use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
use Yoast_Notification_Center;
|
||||
|
||||
/**
|
||||
* Handles dismissing notifications and "New" badges for new content types.
|
||||
*/
|
||||
class Content_Type_Visibility_Dismiss_Notifications {
|
||||
|
||||
/**
|
||||
* Holds the Options_Helper instance.
|
||||
*
|
||||
* @var Options_Helper
|
||||
*/
|
||||
private $options;
|
||||
|
||||
/**
|
||||
* Constructs Content_Type_Visibility_Dismiss_New_Route.
|
||||
*
|
||||
* @param Options_Helper $options The options helper.
|
||||
*/
|
||||
public function __construct( Options_Helper $options ) {
|
||||
$this->options = $options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes New badge from a post type in the Settings, remove notifications if needed.
|
||||
*
|
||||
* @param string $post_type_name The post type name from the request.
|
||||
* @return array The response.
|
||||
*/
|
||||
public function post_type_dismiss( $post_type_name ) {
|
||||
$success = true;
|
||||
$message = __( 'Post type is not new.', 'wordpress-seo' );
|
||||
$post_types_needs_review = $this->options->get( 'new_post_types', [] );
|
||||
|
||||
if ( $post_types_needs_review && \in_array( $post_type_name, $post_types_needs_review, true ) ) {
|
||||
$new_needs_review = \array_diff( $post_types_needs_review, [ $post_type_name ] );
|
||||
$success = $this->options->set( 'new_post_types', $new_needs_review );
|
||||
$message = ( $success ) ? __( 'Post type is no longer new.', 'wordpress-seo' ) : __( 'Error: Post type was not removed from new_post_types list.', 'wordpress-seo' );
|
||||
if ( $success ) {
|
||||
$this->maybe_dismiss_notifications( [ 'new_post_types' => $new_needs_review ] );
|
||||
}
|
||||
}
|
||||
|
||||
$status = ( $success ) ? 200 : 400;
|
||||
|
||||
return [
|
||||
'message' => $message,
|
||||
'success' => $success,
|
||||
'status' => $status,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes New badge from a taxonomy in the Settings, remove notifications if needed.
|
||||
*
|
||||
* @param string $taxonomy_name The taxonomy name from the request.
|
||||
* @return array The response.
|
||||
*/
|
||||
public function taxonomy_dismiss( $taxonomy_name ) {
|
||||
$success = true;
|
||||
$message = __( 'Taxonomy is not new.', 'wordpress-seo' );
|
||||
$taxonomies_needs_review = $this->options->get( 'new_taxonomies', [] );
|
||||
|
||||
if ( \in_array( $taxonomy_name, $taxonomies_needs_review, true ) ) {
|
||||
|
||||
$new_needs_review = \array_diff( $taxonomies_needs_review, [ $taxonomy_name ] );
|
||||
$success = $this->options->set( 'new_taxonomies', $new_needs_review );
|
||||
$message = ( $success ) ? __( 'Taxonomy is no longer new.', 'wordpress-seo' ) : __( 'Error: Taxonomy was not removed from new_taxonomies list.', 'wordpress-seo' );
|
||||
if ( $success ) {
|
||||
$this->maybe_dismiss_notifications( [ 'new_taxonomies' => $new_needs_review ] );
|
||||
}
|
||||
}
|
||||
|
||||
$status = ( $success ) ? 200 : 400;
|
||||
|
||||
return [
|
||||
'message' => $message,
|
||||
'success' => $success,
|
||||
'status' => $status,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if there are new content types or taxonomies.
|
||||
*
|
||||
* @param array $new_content_types The new content types.
|
||||
* @return bool
|
||||
*/
|
||||
public function maybe_dismiss_notifications( $new_content_types = [] ) {
|
||||
|
||||
$post_types_needs_review = ( array_key_exists( 'new_post_types', $new_content_types ) ) ? $new_content_types['new_post_types'] : $this->options->get( 'new_post_types', [] );
|
||||
$taxonomies_needs_review = ( array_key_exists( 'new_taxonomies', $new_content_types ) ) ? $new_content_types['new_taxonomies'] : $this->options->get( 'new_taxonomies', [] );
|
||||
|
||||
if ( $post_types_needs_review || $taxonomies_needs_review ) {
|
||||
return;
|
||||
}
|
||||
$this->dismiss_notifications();
|
||||
}
|
||||
|
||||
/**
|
||||
* Dismisses the notification in the notification center when there are no more new content types.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function dismiss_notifications() {
|
||||
$notification_center = Yoast_Notification_Center::get();
|
||||
$notification_center->remove_notification_by_id( 'content-types-made-public' );
|
||||
return $this->options->set( 'show_new_content_type_notification', false );
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if there is a new content type to show notification only once in the settings.
|
||||
*
|
||||
* @return bool $show_new_content_type_notification Should the notification be shown.
|
||||
*/
|
||||
public function maybe_add_settings_notification() {
|
||||
$show_new_content_type_notification = $this->options->get( 'show_new_content_type_notification', false );
|
||||
if ( $show_new_content_type_notification ) {
|
||||
$this->options->set( 'show_new_content_type_notification', false );
|
||||
}
|
||||
return $show_new_content_type_notification;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,175 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Content_Type_Visibility\Application;
|
||||
|
||||
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
|
||||
use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
use Yoast\WP\SEO\Integrations\Integration_Interface;
|
||||
use Yoast_Notification;
|
||||
use Yoast_Notification_Center;
|
||||
use Yoast\WP\SEO\Content_Type_Visibility\Application\Content_Type_Visibility_Dismiss_Notifications;
|
||||
|
||||
/**
|
||||
* Handles showing notifications for new content types.
|
||||
* Actions are used in the indexable taxonomy and post type change watchers.
|
||||
*/
|
||||
class Content_Type_Visibility_Watcher_Actions implements Integration_Interface {
|
||||
|
||||
/**
|
||||
* Holds the Options_Helper instance.
|
||||
*
|
||||
* @var Options_Helper
|
||||
*/
|
||||
private $options;
|
||||
|
||||
/**
|
||||
* The notifications center.
|
||||
*
|
||||
* @var Yoast_Notification_Center
|
||||
*/
|
||||
private $notification_center;
|
||||
|
||||
/**
|
||||
* The notifications center.
|
||||
*
|
||||
* @var Content_Type_Visibility_Dismiss_Notifications
|
||||
*/
|
||||
private $content_type_dismiss_notifications;
|
||||
|
||||
/**
|
||||
* Indexable_Post_Type_Change_Watcher constructor.
|
||||
*
|
||||
* @param Options_Helper $options The options helper.
|
||||
* @param Yoast_Notification_Center $notification_center The notification center.
|
||||
* @param Content_Type_Visibility_Dismiss_Notifications $content_type_dismiss_notifications The content type dismiss notifications.
|
||||
*/
|
||||
public function __construct(
|
||||
Options_Helper $options,
|
||||
Yoast_Notification_Center $notification_center,
|
||||
Content_Type_Visibility_Dismiss_Notifications $content_type_dismiss_notifications
|
||||
) {
|
||||
$this->options = $options;
|
||||
$this->notification_center = $notification_center;
|
||||
$this->content_type_dismiss_notifications = $content_type_dismiss_notifications;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the conditionals based on which this loadable should be active.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function get_conditionals() {
|
||||
return [ Admin_Conditional::class ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the integration.
|
||||
*
|
||||
* Register actions that are used in the post types and taxonomies indexable watcher.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register_hooks() {
|
||||
// Used in Idexable_Post_Type_Change_Watcher class.
|
||||
\add_action( 'new_public_post_type_notifications', [ $this, 'new_post_type' ], 10, 1 );
|
||||
\add_action( 'clean_new_public_post_type_notifications', [ $this, 'clean_new_public_post_type' ], 10, 1 );
|
||||
|
||||
// Used in Idexable_Taxonomy_Change_Watcher class.
|
||||
\add_action( 'new_public_taxonomy_notifications', [ $this, 'new_taxonomy' ], 10, 1 );
|
||||
\add_action( 'clean_new_public_taxonomy_notifications', [ $this, 'clean_new_public_taxonomy' ], 10, 1 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Update db and tigger notification when a new post type is registered.
|
||||
*
|
||||
* @param array $newly_made_public_post_types The newly made public post types.
|
||||
* @return void
|
||||
*/
|
||||
public function new_post_type( $newly_made_public_post_types ) {
|
||||
$this->options->set( 'new_post_types', $newly_made_public_post_types );
|
||||
$this->options->set( 'show_new_content_type_notification', true );
|
||||
$this->maybe_add_notification();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update db when a post type is made removed.
|
||||
*
|
||||
* @param array $newly_made_non_public_post_types The newly made non public post types.
|
||||
* @return void
|
||||
*/
|
||||
public function clean_new_public_post_type( $newly_made_non_public_post_types ) {
|
||||
// See if post types that needs review were removed and update option.
|
||||
$needs_review = $this->options->get( 'new_post_types', [] );
|
||||
$new_needs_review = \array_diff( $needs_review, $newly_made_non_public_post_types );
|
||||
if ( \count( $new_needs_review ) !== \count( $needs_review ) ) {
|
||||
$this->options->set( 'new_post_types', $new_needs_review );
|
||||
$this->content_type_dismiss_notifications->maybe_dismiss_notifications( [ 'new_post_types' => $new_needs_review ] );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update db and tigger notification when a new taxonomy is registered.
|
||||
*
|
||||
* @param array $newly_made_public_taxonomies The newly made public post types.
|
||||
* @return void
|
||||
*/
|
||||
public function new_taxonomy( $newly_made_public_taxonomies ) {
|
||||
$this->options->set( 'new_taxonomies', $newly_made_public_taxonomies );
|
||||
$this->options->set( 'show_new_content_type_notification', true );
|
||||
$this->maybe_add_notification();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update db when a post type is made removed.
|
||||
*
|
||||
* @param array $newly_made_non_public_taxonomies The newly made non public post types.
|
||||
* @return void
|
||||
*/
|
||||
public function clean_new_public_taxonomy( $newly_made_non_public_taxonomies ) {
|
||||
// See if post types that needs review were removed and update option.
|
||||
$needs_review = $this->options->get( 'new_taxonomies', [] );
|
||||
$new_needs_review = \array_diff( $needs_review, $newly_made_non_public_taxonomies );
|
||||
if ( \count( $new_needs_review ) !== \count( $needs_review ) ) {
|
||||
$this->options->set( 'new_taxonomies', $new_needs_review );
|
||||
$this->content_type_dismiss_notifications->maybe_dismiss_notifications( [ 'new_taxonomies' => $new_needs_review ] );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Decides if a notification should be added in the notification center.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function maybe_add_notification() {
|
||||
$notification = $this->notification_center->get_notification_by_id( 'content-types-made-public' );
|
||||
if ( \is_null( $notification ) ) {
|
||||
$this->add_notification();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a notification to be shown on the next page request since posts are updated in an ajax request.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function add_notification() {
|
||||
$message = \sprintf(
|
||||
/* translators: 1: Opening tag of the link to the Search appearance settings page, 2: Link closing tag. */
|
||||
\esc_html__( 'You\'ve added a new type of content. We recommend that you review the corresponding %1$sSearch appearance settings%2$s.', 'wordpress-seo' ),
|
||||
'<a href="' . \esc_url( \admin_url( 'admin.php?page=wpseo_page_settings' ) ) . '">',
|
||||
'</a>'
|
||||
);
|
||||
|
||||
$notification = new Yoast_Notification(
|
||||
$message,
|
||||
[
|
||||
'type' => Yoast_Notification::WARNING,
|
||||
'id' => 'content-types-made-public',
|
||||
'capabilities' => 'wpseo_manage_options',
|
||||
'priority' => 0.8,
|
||||
]
|
||||
);
|
||||
|
||||
$this->notification_center->add_notification( $notification );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Content_Type_Visibility\User_Interface;
|
||||
|
||||
use Yoast\WP\SEO\Conditionals\No_Conditionals;
|
||||
use Yoast\WP\SEO\Main;
|
||||
use Yoast\WP\SEO\Routes\Route_Interface;
|
||||
use Yoast\WP\SEO\Content_Type_Visibility\Application\Content_Type_Visibility_Dismiss_Notifications;
|
||||
use WP_REST_Request;
|
||||
use WP_REST_Response;
|
||||
|
||||
/**
|
||||
* Handles the dismiss route for "New" badges of new content types in settings menu.
|
||||
* @phpcs:disable Yoast.NamingConventions.ObjectNameDepth.MaxExceeded
|
||||
*/
|
||||
class Content_Type_Visibility_Dismiss_New_Route implements Route_Interface {
|
||||
|
||||
use No_Conditionals;
|
||||
|
||||
/**
|
||||
* Represents the alerts route prefix.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const ROUTE_PREFIX = 'new-content-type-visibility';
|
||||
|
||||
/**
|
||||
* Represents post type dismiss route.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const POST_TYPE_DISMISS_ROUTE = self::ROUTE_PREFIX . '/dismiss-post-type';
|
||||
|
||||
/**
|
||||
* Represents taxonomy dismiss route.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const TAXONOMY_DISMISS_ROUTE = self::ROUTE_PREFIX . '/dismiss-taxonomy';
|
||||
|
||||
/**
|
||||
* Holds the Options_Helper instance.
|
||||
*
|
||||
* @var Content_Type_Visibility_Dismiss_Notifications
|
||||
*/
|
||||
private $dismiss_notifications;
|
||||
|
||||
/**
|
||||
* Constructs Content_Type_Visibility_Dismiss_New_Route.
|
||||
*
|
||||
* @param Content_Type_Visibility_Dismiss_Notifications $dismiss_notifications The options helper.
|
||||
*/
|
||||
public function __construct( Content_Type_Visibility_Dismiss_Notifications $dismiss_notifications ) {
|
||||
$this->dismiss_notifications = $dismiss_notifications;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers routes with WordPress.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register_routes() {
|
||||
$post_type_dismiss_route_args = [
|
||||
'methods' => 'POST',
|
||||
'callback' => [ $this, 'post_type_dismiss_callback' ],
|
||||
'permission_callback' => [ $this, 'can_dismiss' ],
|
||||
'args' => [
|
||||
'postTypeName' => [
|
||||
'validate_callback' => [ $this, 'validate_post_type' ],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
$taxonomy_dismiss_route_args = [
|
||||
'methods' => 'POST',
|
||||
'callback' => [ $this, 'taxonomy_dismiss_callback' ],
|
||||
'permission_callback' => [ $this, 'can_dismiss' ],
|
||||
'args' => [
|
||||
'taxonomyName' => [
|
||||
'validate_callback' => [ $this, 'validate_taxonomy' ],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
\register_rest_route( Main::API_V1_NAMESPACE, self::POST_TYPE_DISMISS_ROUTE, $post_type_dismiss_route_args );
|
||||
\register_rest_route( Main::API_V1_NAMESPACE, self::TAXONOMY_DISMISS_ROUTE, $taxonomy_dismiss_route_args );
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether or not the current user is allowed to dismiss alerts.
|
||||
*
|
||||
* @return bool Whether or not the current user is allowed to dismiss alerts.
|
||||
*/
|
||||
public function can_dismiss() {
|
||||
return \current_user_can( 'edit_posts' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates post type.
|
||||
*
|
||||
* @param string $param The parameter.
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @param string $key The key.
|
||||
*/
|
||||
public function validate_post_type( $param, $request, $key ) {
|
||||
return post_type_exists( $param );
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper method for Content_Type_Visibility_Dismiss_Notifications::post_type_dismiss().
|
||||
*
|
||||
* @param WP_REST_Request $request The request. This request should have a key param set.
|
||||
*
|
||||
* @return WP_REST_Response The response.
|
||||
*/
|
||||
public function post_type_dismiss_callback( $request ) {
|
||||
$response = $this->dismiss_notifications->post_type_dismiss( $request['post_type_name'] );
|
||||
|
||||
return new WP_REST_Response(
|
||||
(object) $response,
|
||||
$response['status']
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates taxonomy.
|
||||
*
|
||||
* @param string $param The parameter.
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @param string $key The key.
|
||||
*/
|
||||
public function validate_taxonomy( $param, $request, $key ) {
|
||||
return taxonomy_exists( $param );
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper method for Content_Type_Visibility_Dismiss_Notifications::taxonomy_dismiss().
|
||||
*
|
||||
* @param WP_REST_Request $request The request. This request should have a key param set.
|
||||
*
|
||||
* @return WP_REST_Response The response.
|
||||
*/
|
||||
public function taxonomy_dismiss_callback( WP_REST_Request $request ) {
|
||||
$response = $this->dismiss_notifications->taxonomy_dismiss( $request['taxonomy_name'] );
|
||||
|
||||
return new WP_REST_Response(
|
||||
(object) $response,
|
||||
$response['status']
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,169 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* WPSEO plugin file.
|
||||
*
|
||||
* @package WPSEO\Admin
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class handles the data for the option where the Ryte data is stored.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class WPSEO_Ryte_Option {
|
||||
|
||||
/**
|
||||
* Indicates the data is not fetched.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @var int
|
||||
*/
|
||||
const NOT_FETCHED = 0;
|
||||
|
||||
/**
|
||||
* Indicates the option is indexable.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @var int
|
||||
*/
|
||||
const IS_INDEXABLE = 0;
|
||||
|
||||
/**
|
||||
* Indicates the option is not indexable.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @var int
|
||||
*/
|
||||
const IS_NOT_INDEXABLE = 0;
|
||||
|
||||
/**
|
||||
* Indicates the data could not be fetched.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @var int
|
||||
*/
|
||||
const CANNOT_FETCH = -1;
|
||||
|
||||
/**
|
||||
* The name of the option where data will be stored.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @var string
|
||||
*/
|
||||
const OPTION_NAME = '';
|
||||
|
||||
/**
|
||||
* The key of the status in the option.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @var string
|
||||
*/
|
||||
const STATUS = '';
|
||||
|
||||
/**
|
||||
* The key of the last fetch date in the option.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @var string
|
||||
*/
|
||||
const LAST_FETCH = '';
|
||||
|
||||
/**
|
||||
* The limit for fetching the status manually.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @var int
|
||||
*/
|
||||
const FETCH_LIMIT = 0;
|
||||
|
||||
/**
|
||||
* Setting the object by setting the properties.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function __construct() {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Getting the status from the option.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return int|string
|
||||
*/
|
||||
public function get_status() {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Saving the status to the options.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $status The status to save.
|
||||
*/
|
||||
public function set_status( $status ) {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Saving the last fetch timestamp to the options.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param int $timestamp Timestamp with the new value.
|
||||
*/
|
||||
public function set_last_fetch( $timestamp ) {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether the indexability status should be fetched.
|
||||
*
|
||||
* If LAST_FETCH isn't set, we assume the indexability status hasn't been fetched
|
||||
* yet and return true. Then, we check whether the last fetch is within the
|
||||
* FETCH_LIMIT time interval (15 seconds) to avoid too many consecutive API calls.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return bool Whether the indexability status should be fetched.
|
||||
*/
|
||||
public function should_be_fetched() {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Saving the option with the current data.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function save_option() {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value of the onpage_enabled status.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function is_enabled() {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* WPSEO plugin file.
|
||||
*
|
||||
* @package WPSEO\Admin
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class will fetch a new status from Ryte and if it's necessary it will
|
||||
* notify the site admin by email and remove the current meta value to hide the
|
||||
* notice for all admin users.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class WPSEO_Ryte_Request {
|
||||
|
||||
/**
|
||||
* Sends a request to the Ryte API to check whether a URL is indexable.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $target_url The URL to check indexability for.
|
||||
* @param array $parameters Array of extra parameters to send to the Ryte API.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function do_request( $target_url, $parameters = [] ) {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -1,284 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* WPSEO plugin file.
|
||||
*
|
||||
* @package WPSEO\Admin
|
||||
*/
|
||||
|
||||
/**
|
||||
* Handles the request for getting the Ryte status.
|
||||
*
|
||||
* @deprecated 18.5
|
||||
*/
|
||||
class WPSEO_Ryte implements WPSEO_WordPress_Integration {
|
||||
|
||||
/**
|
||||
* Is the request started by pressing the fetch button.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
private $is_manual_request = false;
|
||||
|
||||
/**
|
||||
* Holds the Ryte API response.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $ryte_response = null;
|
||||
|
||||
/**
|
||||
* Constructs the object.
|
||||
*
|
||||
* @deprecated 18.5
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function __construct() {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 18.5' );
|
||||
$this->maybe_add_weekly_schedule();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up the hooks.
|
||||
*
|
||||
* @deprecated 18.5
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register_hooks() {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 18.5' );
|
||||
if ( ! self::is_active() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Sets the action for the Ryte fetch cron job.
|
||||
add_action( 'wpseo_ryte_fetch', [ $this, 'fetch_from_ryte' ] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if we can use the functionality.
|
||||
*
|
||||
* @deprecated 18.5
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return bool True if this functionality can be used.
|
||||
*/
|
||||
public static function is_active() {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 18.5' );
|
||||
if ( wp_doing_ajax() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ! WPSEO_Options::get( 'ryte_indexability' ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hooks to run on plugin activation.
|
||||
*
|
||||
* @deprecated 18.5
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function activate_hooks() {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 18.5' );
|
||||
if ( $this->get_option()->is_enabled() ) {
|
||||
$this->schedule_cron();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$this->unschedule_cron();
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether to add a custom cron weekly schedule.
|
||||
*
|
||||
* @deprecated 18.5
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function maybe_add_weekly_schedule() {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 18.5' );
|
||||
// If there's no default cron weekly schedule, add a custom one.
|
||||
add_filter( 'cron_schedules', [ $this, 'add_weekly_schedule' ] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a custom weekly cron schedule.
|
||||
*
|
||||
* @deprecated 18.5
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param array $schedules The existing custom cron schedules.
|
||||
*
|
||||
* @return array Enriched list of custom cron schedules.
|
||||
*/
|
||||
public function add_weekly_schedule( $schedules ) {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 18.5' );
|
||||
if ( ! is_array( $schedules ) ) {
|
||||
$schedules = [];
|
||||
}
|
||||
|
||||
/*
|
||||
* Starting with version 5.4, WordPress does have a default weekly cron
|
||||
* schedule. See https://core.trac.wordpress.org/changeset/47062.
|
||||
* We need to add a custom one only if the default one doesn't exist.
|
||||
*/
|
||||
if ( isset( $schedules['weekly'] ) ) {
|
||||
return $schedules;
|
||||
}
|
||||
|
||||
$schedules['weekly'] = [
|
||||
'interval' => WEEK_IN_SECONDS,
|
||||
'display' => __( 'Once Weekly', 'wordpress-seo' ),
|
||||
];
|
||||
|
||||
return $schedules;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches the data from Ryte.
|
||||
*
|
||||
* @deprecated 18.5
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return bool|null Whether the request ran.
|
||||
*/
|
||||
public function fetch_from_ryte() {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 18.5' );
|
||||
// Don't do anything when the WordPress environment type isn't "production".
|
||||
if ( wp_get_environment_type() !== 'production' ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$ryte_option = $this->get_option();
|
||||
if ( ! $ryte_option->should_be_fetched() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$new_status = $this->request_indexability();
|
||||
|
||||
// Updates the timestamp in the option.
|
||||
$ryte_option->set_last_fetch( time() );
|
||||
|
||||
$ryte_option->set_status( $new_status );
|
||||
$ryte_option->save_option();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the option to use.
|
||||
*
|
||||
* @deprecated 18.5
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return WPSEO_Ryte_Option The option.
|
||||
*/
|
||||
protected function get_option() {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 18.5' );
|
||||
return new WPSEO_Ryte_Option();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a request to Ryte to get the indexability status.
|
||||
*
|
||||
* @deprecated 18.5
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return int The indexability status value.
|
||||
*/
|
||||
protected function request_indexability() {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 18.5' );
|
||||
$parameters = [];
|
||||
if ( $this->wordfence_protection_enabled() ) {
|
||||
$parameters['wf_strict'] = 1;
|
||||
}
|
||||
|
||||
$request = new WPSEO_Ryte_Request();
|
||||
$response = $request->do_request( get_option( 'home' ), $parameters );
|
||||
|
||||
// Populate the ryte_response property.
|
||||
$this->ryte_response = $response;
|
||||
|
||||
// It's a valid Ryte response because the array contains an `is_indexable` element.
|
||||
if ( isset( $response['is_indexable'] ) ) {
|
||||
return (int) $response['is_indexable'];
|
||||
}
|
||||
|
||||
// It's not a valid Ryte response.
|
||||
return WPSEO_Ryte_Option::CANNOT_FETCH;
|
||||
}
|
||||
|
||||
/**
|
||||
* Schedules the cronjob to get the new indexability status.
|
||||
*
|
||||
* @deprecated 18.5
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function schedule_cron() {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 18.5' );
|
||||
if ( wp_next_scheduled( 'wpseo_ryte_fetch' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
wp_schedule_event( time(), 'weekly', 'wpseo_ryte_fetch' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Unschedules the cronjob to get the new indexability status.
|
||||
*
|
||||
* @deprecated 18.5
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function unschedule_cron() {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 18.5' );
|
||||
if ( ! wp_next_scheduled( 'wpseo_ryte_fetch' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
wp_clear_scheduled_hook( 'wpseo_ryte_fetch' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if WordFence protects the site against 'fake' Google crawlers.
|
||||
*
|
||||
* @deprecated 18.5
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return bool True if WordFence protects the site.
|
||||
*/
|
||||
private function wordfence_protection_enabled() {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 18.5' );
|
||||
if ( ! class_exists( 'wfConfig' ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ! method_exists( 'wfConfig', 'get' ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (bool) wfConfig::get( 'blockFakeBots' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the Ryte API response property.
|
||||
*
|
||||
* @deprecated 18.5
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return array|WP_Error The response or WP_Error on failure.
|
||||
*/
|
||||
public function get_response() {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 18.5' );
|
||||
return $this->ryte_response;
|
||||
}
|
||||
}
|
||||
@@ -38,12 +38,12 @@ class Yoast_View_Utils {
|
||||
*
|
||||
* Used for all the Help sections for indexable objects like post types, taxonomies, or archives.
|
||||
*
|
||||
* @param string|object $post_type The post type to show the search results help for.
|
||||
* @param string $help_text_switch Switch the help text to one that's more appropriate
|
||||
* for the indexable object type the help section is for.
|
||||
* @deprecated 20.3
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string|object $post_type The post type to show the search results help for.
|
||||
* @param string $help_text_switch Switch the help text to one that's more appropriate
|
||||
* for the indexable object type the help section is for.
|
||||
* @return object The help panel instance.
|
||||
*/
|
||||
public function search_results_setting_help( $post_type, $help_text_switch = '' ) {
|
||||
@@ -79,11 +79,11 @@ class Yoast_View_Utils {
|
||||
/**
|
||||
* Generates the OpenGraph disabled alert, depending on whether the OpenGraph feature is disabled.
|
||||
*
|
||||
* @param string $type The type of message. Can be altered to homepage, taxonomies or archives. Empty string by default.
|
||||
*
|
||||
* @deprecated 20.3
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $type The type of message. Can be altered to homepage, taxonomies or archives. Empty string by default.
|
||||
*
|
||||
* @return string The alert. Returns an empty string if the setting is enabled.
|
||||
*/
|
||||
public function generate_opengraph_disabled_alert( $type = '' ) {
|
||||
|
||||
@@ -132,6 +132,7 @@ class WPSEO_Breadcrumbs {
|
||||
private function render() {
|
||||
$presenter = new Breadcrumbs_Presenter();
|
||||
$context = $this->context_memoizer->for_current_page();
|
||||
|
||||
/** This filter is documented in src/integrations/front-end-integration.php */
|
||||
$presentation = apply_filters( 'wpseo_frontend_presentation', $context->presentation, $context );
|
||||
$presenter->presentation = $presentation;
|
||||
|
||||
@@ -113,6 +113,7 @@ class WPSEO_Frontend {
|
||||
|
||||
$presentation = $this->get_current_page_presentation();
|
||||
$presenter = new Canonical_Presenter();
|
||||
|
||||
/** This filter is documented in src/integrations/front-end-integration.php */
|
||||
$presenter->presentation = $presentation;
|
||||
$presenter->helpers = $this->helpers;
|
||||
@@ -270,6 +271,7 @@ class WPSEO_Frontend {
|
||||
*/
|
||||
private function get_current_page_presentation() {
|
||||
$context = $this->context_memoizer->for_current_page();
|
||||
|
||||
/** This filter is documented in src/integrations/front-end-integration.php */
|
||||
return apply_filters( 'wpseo_frontend_presentation', $context->presentation, $context );
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ class Yoast_I18n_v3 {
|
||||
* @param bool $show_translation_box Whether the translation box should be shown.
|
||||
*/
|
||||
public function __construct( $args, $show_translation_box = true ) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.12' );
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 19.12' );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -39,7 +39,7 @@ class Yoast_I18n_v3 {
|
||||
* @return bool Returns true if the language is en_US.
|
||||
*/
|
||||
protected function is_default_language( $language ) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.12' );
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 19.12' );
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -49,12 +49,10 @@ class Yoast_I18n_v3 {
|
||||
* @deprecated 19.12
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
* @return string The i18n promo message.
|
||||
*/
|
||||
public function get_promo_message() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.12' );
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 19.12' );
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -64,12 +62,10 @@ class Yoast_I18n_v3 {
|
||||
* @deprecated 19.12
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_dismiss_i18n_message_button() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.12' );
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 19.12' );
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -78,11 +74,9 @@ class Yoast_I18n_v3 {
|
||||
*
|
||||
* @deprecated 19.12
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function promo() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.12' );
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 19.12' );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -94,6 +88,6 @@ class Yoast_I18n_v3 {
|
||||
* @param string $api_url The new API URL.
|
||||
*/
|
||||
public function set_api_url( $api_url ) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.12' );
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 19.12' );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Actions\Configuration;
|
||||
|
||||
/**
|
||||
* Class Configuration_Workout_Action.
|
||||
*
|
||||
* @deprecated 19.0 - Use \Yoast\WP\SEO\Actions\First_Time_Configuration_Action instead.
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class Configuration_Workout_Action extends First_Time_Configuration_Action {}
|
||||
@@ -80,6 +80,7 @@ class Indexables_Page_Action {
|
||||
$object_sub_types = \array_values( $this->post_type_helper->get_public_post_types() );
|
||||
|
||||
$excluded_post_types = \apply_filters( 'wpseo_indexable_excluded_post_types', [ 'attachment' ] );
|
||||
|
||||
/**
|
||||
* Filter: 'wpseo_indexable_included_post_types' - Allow developers to specify which post types will
|
||||
* be shown in the indexables overview cards.
|
||||
|
||||
@@ -30,10 +30,10 @@ class Settings_Introduction_Action {
|
||||
/**
|
||||
* Constructs Settings_Introduction_Action.
|
||||
*
|
||||
* @param User_Helper $user_helper The User_Helper.
|
||||
*
|
||||
* @deprecated 20.7
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param User_Helper $user_helper The User_Helper.
|
||||
*/
|
||||
public function __construct( User_Helper $user_helper ) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 20.7' );
|
||||
@@ -44,12 +44,12 @@ class Settings_Introduction_Action {
|
||||
/**
|
||||
* Retrieves the Wistia embed permission value.
|
||||
*
|
||||
* @throws Exception If an invalid user ID is supplied.
|
||||
*
|
||||
* @deprecated 20.7
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return bool The value of the Wistia embed permission.
|
||||
*
|
||||
* @throws Exception If an invalid user ID is supplied.
|
||||
*/
|
||||
public function get_wistia_embed_permission() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 20.7' );
|
||||
@@ -63,14 +63,14 @@ class Settings_Introduction_Action {
|
||||
/**
|
||||
* Sets the Wistia embed permission value.
|
||||
*
|
||||
* @param bool $value The value.
|
||||
*
|
||||
* @throws Exception If an invalid user ID is supplied.
|
||||
*
|
||||
* @deprecated 20.7
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param bool $value The value.
|
||||
*
|
||||
* @return bool Whether the update was successful.
|
||||
*
|
||||
* @throws Exception If an invalid user ID is supplied.
|
||||
*/
|
||||
public function set_wistia_embed_permission( $value ) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 20.7' );
|
||||
@@ -91,12 +91,12 @@ class Settings_Introduction_Action {
|
||||
/**
|
||||
* Retrieves the show value.
|
||||
*
|
||||
* @throws Exception If an invalid user ID is supplied.
|
||||
*
|
||||
* @deprecated 20.7
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return bool The value of show.
|
||||
*
|
||||
* @throws Exception If an invalid user ID is supplied.
|
||||
*/
|
||||
public function get_show() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 20.7' );
|
||||
@@ -110,14 +110,14 @@ class Settings_Introduction_Action {
|
||||
/**
|
||||
* Sets the show value.
|
||||
*
|
||||
* @param bool $value The value.
|
||||
*
|
||||
* @throws Exception If an invalid user ID is supplied.
|
||||
*
|
||||
* @deprecated 20.7
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param bool $value The value.
|
||||
*
|
||||
* @return bool Whether the update was successful.
|
||||
*
|
||||
* @throws Exception If an invalid user ID is supplied.
|
||||
*/
|
||||
public function set_show( $value ) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 20.7' );
|
||||
@@ -140,9 +140,9 @@ class Settings_Introduction_Action {
|
||||
*
|
||||
* @param int $user_id User ID.
|
||||
*
|
||||
* @throws Exception If an invalid user ID is supplied.
|
||||
*
|
||||
* @return array The (meta) values.
|
||||
*
|
||||
* @throws Exception If an invalid user ID is supplied.
|
||||
*/
|
||||
private function get_values_for_user( $user_id ) {
|
||||
$values = $this->user_helper->get_meta( $user_id, self::USER_META_KEY, true );
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Conditionals;
|
||||
|
||||
/**
|
||||
* Feature flag conditional for the front-end inspector.
|
||||
*
|
||||
* @deprecated 19.5
|
||||
*/
|
||||
class Front_End_Inspector_Conditional extends Feature_Flag_Conditional {
|
||||
|
||||
/**
|
||||
* Returns the name of the feature flag.
|
||||
*
|
||||
* @deprecated 19.5
|
||||
*
|
||||
* @return string The name of the feature flag.
|
||||
*/
|
||||
protected function get_feature_flag() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.5' );
|
||||
return 'FRONT_END_INSPECTOR';
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Conditionals;
|
||||
|
||||
/**
|
||||
* Checks if the YOAST_SEO_JAPANESE_SUPPORT constant is set.
|
||||
*
|
||||
* @deprecated 17.9
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class Japanese_Support_Conditional extends Feature_Flag_Conditional {
|
||||
|
||||
/**
|
||||
* Returns the name of the feature flag.
|
||||
* 'YOAST_SEO_' is automatically prepended to it and it will be uppercased.
|
||||
*
|
||||
* @deprecated 17.9
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return string the name of the feature flag.
|
||||
*/
|
||||
public function get_feature_flag() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 17.9' );
|
||||
return 'JAPANESE_SUPPORT';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Integrations\Admin;
|
||||
|
||||
use WPSEO_Admin_Asset_Manager;
|
||||
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
|
||||
use Yoast\WP\SEO\Helpers\Capability_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Current_Page_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Product_Helper;
|
||||
use Yoast\WP\SEO\Integrations\Integration_Interface;
|
||||
|
||||
/**
|
||||
* Old_Premium_Integration class
|
||||
*
|
||||
* @deprecated 20.10
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class Old_Premium_Integration implements Integration_Interface {
|
||||
|
||||
/**
|
||||
* The options' helper.
|
||||
*
|
||||
* @var Options_Helper
|
||||
*/
|
||||
private $options_helper;
|
||||
|
||||
/**
|
||||
* The product helper.
|
||||
*
|
||||
* @var Product_Helper
|
||||
*/
|
||||
private $product_helper;
|
||||
|
||||
/**
|
||||
* The capability helper.
|
||||
*
|
||||
* @var Capability_Helper
|
||||
*/
|
||||
private $capability_helper;
|
||||
|
||||
/**
|
||||
* The admin asset manager.
|
||||
*
|
||||
* @var WPSEO_Admin_Asset_Manager
|
||||
*/
|
||||
private $admin_asset_manager;
|
||||
|
||||
/**
|
||||
* The Current_Page_Helper.
|
||||
*
|
||||
* @var Current_Page_Helper
|
||||
*/
|
||||
private $current_page_helper;
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public static function get_conditionals() {
|
||||
return [ Admin_Conditional::class ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Old_Premium_Integration constructor.
|
||||
*
|
||||
* @deprecated 20.10
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param Options_Helper $options_helper The options helper.
|
||||
* @param Product_Helper $product_helper The product helper.
|
||||
* @param Capability_Helper $capability_helper The capability helper.
|
||||
* @param WPSEO_Admin_Asset_Manager $admin_asset_manager The admin asset manager.
|
||||
* @param Current_Page_Helper $current_page_helper The Current_Page_Helper.
|
||||
*/
|
||||
public function __construct(
|
||||
Options_Helper $options_helper,
|
||||
Product_Helper $product_helper,
|
||||
Capability_Helper $capability_helper,
|
||||
WPSEO_Admin_Asset_Manager $admin_asset_manager,
|
||||
Current_Page_Helper $current_page_helper
|
||||
) {
|
||||
$this->options_helper = $options_helper;
|
||||
$this->product_helper = $product_helper;
|
||||
$this->capability_helper = $capability_helper;
|
||||
$this->admin_asset_manager = $admin_asset_manager;
|
||||
$this->current_page_helper = $current_page_helper;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @deprecated 20.10
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function register_hooks() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 20.7' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows a notice if Premium is older than 20.0-RC1 so Settings might be missing from the UI.
|
||||
*
|
||||
* @deprecated 20.10
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function old_premium_notice() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 20.7' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Dismisses the old premium notice.
|
||||
*
|
||||
* @deprecated 20.10
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function dismiss_old_premium_notice() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 20.7' );
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -3,8 +3,8 @@
|
||||
namespace Yoast\WP\SEO\Integrations\Admin;
|
||||
|
||||
use WPSEO_Admin_Asset_Manager;
|
||||
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
|
||||
use Yoast\WP\SEO\Conditionals\Admin\Non_Network_Admin_Conditional;
|
||||
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
|
||||
use Yoast\WP\SEO\Integrations\Integration_Interface;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,163 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Integrations\Admin;
|
||||
|
||||
use WPSEO_Ryte_Option;
|
||||
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
|
||||
use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
use Yoast\WP\SEO\Integrations\Integration_Interface;
|
||||
|
||||
/**
|
||||
* Handles the request for getting the Ryte status.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class Ryte_Integration implements Integration_Interface {
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param Options_Helper $options_helper The options helper object used to determine if Ryte is active or not.
|
||||
*/
|
||||
public function __construct( Options_Helper $options_helper ) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up the hooks.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register_hooks() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the conditionals based on which this loadable should be active.
|
||||
*
|
||||
* In this case: only when on an admin page.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return array The conditionals.
|
||||
*/
|
||||
public static function get_conditionals() {
|
||||
return [ Admin_Conditional::class ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if we can use the functionality.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return bool True if this functionality can be used.
|
||||
*/
|
||||
public function is_active() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hooks to run on plugin activation.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function activate_hooks() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether to add a custom cron weekly schedule.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function maybe_add_weekly_schedule() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a custom weekly cron schedule.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param array $schedules The existing custom cron schedules.
|
||||
*
|
||||
* @return array Enriched list of custom cron schedules.
|
||||
*/
|
||||
public function add_weekly_schedule( $schedules ) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches the data from Ryte.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return bool Whether the request ran.
|
||||
*/
|
||||
public function fetch_from_ryte() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the option to use.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return WPSEO_Ryte_Option The option.
|
||||
*/
|
||||
public function get_option() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
|
||||
return new WPSEO_Ryte_Option();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a request to Ryte to get the indexability status.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return int The indexability status value.
|
||||
*/
|
||||
protected function request_indexability() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the Ryte API response property.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return array The response or WP_Error on failure.
|
||||
*/
|
||||
public function get_response() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -56,7 +56,7 @@ class Social_Templates_Integration implements Integration_Interface {
|
||||
* @return array
|
||||
*/
|
||||
public static function get_conditionals() {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 20.3' );
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 20.3' );
|
||||
return [ Admin_Conditional::class, Open_Graph_Conditional::class ];
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ class Social_Templates_Integration implements Integration_Interface {
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function register_hooks() {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 20.3' );
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 20.3' );
|
||||
\add_action( 'Yoast\WP\SEO\admin_author_archives_meta_internal', [ $this, 'social_author_archives' ] );
|
||||
\add_action( 'Yoast\WP\SEO\admin_date_archives_meta_internal', [ $this, 'social_date_archives' ] );
|
||||
\add_action( 'Yoast\WP\SEO\admin_post_types_beforearchive_internal', [ $this, 'social_post_type' ], \PHP_INT_MAX, 2 );
|
||||
@@ -110,7 +110,7 @@ class Social_Templates_Integration implements Integration_Interface {
|
||||
* @param Yoast_Form $yform The form builder.
|
||||
*/
|
||||
public function social_author_archives( $yform ) {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 20.3' );
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 20.3' );
|
||||
$identifier = 'author-wpseo';
|
||||
$page_type_recommended = $this->get_admin_recommended_replace_vars()->determine_for_archive( 'author' );
|
||||
$page_type_specific = $this->get_admin_editor_specific_replace_vars()->determine_for_archive( 'author' );
|
||||
@@ -127,7 +127,7 @@ class Social_Templates_Integration implements Integration_Interface {
|
||||
* @param Yoast_Form $yform The form builder.
|
||||
*/
|
||||
public function social_date_archives( $yform ) {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 20.3' );
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 20.3' );
|
||||
$identifier = 'archive-wpseo';
|
||||
$page_type_recommended = $this->get_admin_recommended_replace_vars()->determine_for_archive( 'date' );
|
||||
$page_type_specific = $this->get_admin_editor_specific_replace_vars()->determine_for_archive( 'date' );
|
||||
@@ -145,7 +145,7 @@ class Social_Templates_Integration implements Integration_Interface {
|
||||
* @param string $post_type_name The name of the current post_type that gets the social fields added.
|
||||
*/
|
||||
public function social_post_type( $yform, $post_type_name ) {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 20.3' );
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 20.3' );
|
||||
if ( $post_type_name === 'attachment' ) {
|
||||
return;
|
||||
}
|
||||
@@ -166,7 +166,7 @@ class Social_Templates_Integration implements Integration_Interface {
|
||||
* @param string $post_type_name The name of the current post_type that gets the social fields added.
|
||||
*/
|
||||
public function social_post_types_archive( $yform, $post_type_name ) {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 20.3' );
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 20.3' );
|
||||
$identifier = 'ptarchive-' . $post_type_name;
|
||||
$page_type_recommended = $this->get_admin_recommended_replace_vars()->determine_for_archive( $post_type_name );
|
||||
$page_type_specific = $this->get_admin_editor_specific_replace_vars()->determine_for_archive( $post_type_name );
|
||||
@@ -184,7 +184,7 @@ class Social_Templates_Integration implements Integration_Interface {
|
||||
* @param WP_Taxonomy $taxonomy The taxonomy that gets the social fields added.
|
||||
*/
|
||||
public function social_taxonomies( $yform, $taxonomy ) {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 20.3' );
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 20.3' );
|
||||
$identifier = 'tax-' . $taxonomy->name;
|
||||
$page_type_recommended = $this->get_admin_recommended_replace_vars()->determine_for_term( $taxonomy->name );
|
||||
$page_type_specific = $this->get_admin_editor_specific_replace_vars()->determine_for_term( $taxonomy->name );
|
||||
|
||||
@@ -69,11 +69,11 @@ class Schema_Blocks implements Integration_Interface {
|
||||
/**
|
||||
* Initializes the integration.
|
||||
*
|
||||
* This is the place to register hooks and filters.
|
||||
*
|
||||
* @deprecated 20.5
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* This is the place to register hooks and filters.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register_hooks() {
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace Yoast\WP\SEO\Integrations\Third_Party;
|
||||
|
||||
use Yoast\WP\SEO\Conditionals\Front_End_Conditional;
|
||||
use Yoast\WP\SEO\Conditionals\Open_Graph_Conditional;
|
||||
use Yoast\WP\SEO\Conditionals\The_Events_Calendar_Conditional;
|
||||
use Yoast\WP\SEO\Integrations\Integration_Interface;
|
||||
|
||||
/**
|
||||
@@ -45,12 +44,12 @@ class The_Events_Calendar implements Integration_Interface {
|
||||
/**
|
||||
* Adds the events graph pieces to the schema collector.
|
||||
*
|
||||
* @param array $pieces The current graph pieces.
|
||||
* @param string $context The current context.
|
||||
*
|
||||
* @deprecated 19.12
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param array $pieces The current graph pieces.
|
||||
* @param string $context The current context.
|
||||
*
|
||||
* @return array Extended graph pieces.
|
||||
*/
|
||||
public function add_graph_pieces( $pieces, $context ) {
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Presenters\Admin;
|
||||
|
||||
use Yoast\WP\SEO\Presenters\Abstract_Presenter;
|
||||
|
||||
/**
|
||||
* Class Auto_Update_Notification_Presenter.
|
||||
*
|
||||
* @deprecated 19.8
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class Auto_Update_Notification_Presenter extends Abstract_Presenter {
|
||||
|
||||
/**
|
||||
* Returns the notification as an HTML string.
|
||||
*
|
||||
* @deprecated 19.8
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return string The notification in an HTML string representation.
|
||||
*/
|
||||
public function present() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.8' );
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the message to show.
|
||||
*
|
||||
* @deprecated 19.8
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return string The message.
|
||||
*/
|
||||
protected function get_message() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.8' );
|
||||
|
||||
return '';
|
||||
}
|
||||
}
|
||||
@@ -1,188 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Routes;
|
||||
|
||||
use WP_REST_Request;
|
||||
use Yoast\WP\SEO\Actions\Configuration\Configuration_Workout_Action;
|
||||
use Yoast\WP\SEO\Conditionals\No_Conditionals;
|
||||
|
||||
/**
|
||||
* Configuration_Workout_Route class.
|
||||
*
|
||||
* @deprecated 19.0 - Use \Yoast\WP\SEO\Actions\First_Time_Configuration_Action instead.
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class Configuration_Workout_Route implements Route_Interface {
|
||||
|
||||
use No_Conditionals;
|
||||
|
||||
/**
|
||||
* Represents a site representation route.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const SITE_REPRESENTATION_ROUTE = '/site_representation';
|
||||
|
||||
/**
|
||||
* Represents a social profiles route.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const SOCIAL_PROFILES_ROUTE = '/social_profiles';
|
||||
|
||||
/**
|
||||
* Represents a person's social profiles route.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const PERSON_SOCIAL_PROFILES_ROUTE = '/person_social_profiles';
|
||||
|
||||
/**
|
||||
* Represents a route to enable/disable tracking.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const ENABLE_TRACKING_ROUTE = '/enable_tracking';
|
||||
|
||||
/**
|
||||
* Represents a route to check if current user has the correct capabilities to edit another user's profile.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const CHECK_CAPABILITY_ROUTE = '/check_capability';
|
||||
|
||||
/**
|
||||
* Configuration_Workout_Route constructor.
|
||||
*
|
||||
* @deprecated 19.0
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param Configuration_Workout_Action $configuration_workout_action The configuration workout action.
|
||||
*/
|
||||
public function __construct(
|
||||
Configuration_Workout_Action $configuration_workout_action
|
||||
) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.0' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers routes with WordPress.
|
||||
*
|
||||
* @deprecated 19.0
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register_routes() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.0', '\Yoast\WP\SEO\Routes\First_Time_Configuration_Route::register_routes' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the site representation values.
|
||||
*
|
||||
* @deprecated 19.0
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param WP_REST_Request $request The request.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function set_site_representation( WP_REST_Request $request ) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.0', '\Yoast\WP\SEO\Routes\First_Time_Configuration_Route::set_site_representation' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the social profiles values.
|
||||
*
|
||||
* @deprecated 19.0
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param WP_REST_Request $request The request.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function set_social_profiles( WP_REST_Request $request ) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.0', '\Yoast\WP\SEO\Routes\First_Time_Configuration_Route::set_social_profiles' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a person's social profiles values.
|
||||
*
|
||||
* @deprecated 19.0
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param WP_REST_Request $request The request.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function get_person_social_profiles( WP_REST_Request $request ) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.0', '\Yoast\WP\SEO\Routes\First_Time_Configuration_Route::get_person_social_profiles' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a person's social profiles values.
|
||||
*
|
||||
* @deprecated 19.0
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param WP_REST_Request $request The request.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function set_person_social_profiles( WP_REST_Request $request ) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.0', '\Yoast\WP\SEO\Routes\First_Time_Configuration_Route::set_person_social_profiles' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the current user has the correct capability to edit a specific user.
|
||||
*
|
||||
* @deprecated 19.0
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param WP_REST_Request $request The request.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function check_capability( WP_REST_Request $request ) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.0', '\Yoast\WP\SEO\Routes\First_Time_Configuration_Route::check_capability' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables or disables tracking.
|
||||
*
|
||||
* @deprecated 19.0
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param WP_REST_Request $request The request.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function set_enable_tracking( WP_REST_Request $request ) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.0', '\Yoast\WP\SEO\Routes\First_Time_Configuration_Route::set_enable_tracking' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the current user has the right capability.
|
||||
*
|
||||
* @deprecated 19.0
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function can_manage_options() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.0', '\Yoast\WP\SEO\Routes\First_Time_Configuration_Route::can_manage_options' );
|
||||
|
||||
return \current_user_can( 'wpseo_manage_options' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the current user has the capability to edit a specific user.
|
||||
*
|
||||
* @param WP_REST_Request $request The request.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function can_edit_user( WP_REST_Request $request ) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.0', '\Yoast\WP\SEO\Routes\First_Time_Configuration_Route::can_edit_user' );
|
||||
}
|
||||
}
|
||||
@@ -49,10 +49,10 @@ class Settings_Introduction_Route implements Route_Interface {
|
||||
/**
|
||||
* Constructs Settings_Introduction_Route.
|
||||
*
|
||||
* @param Settings_Introduction_Action $settings_introduction_action The $settings_introduction_action.
|
||||
*
|
||||
* @deprecated 20.7
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param Settings_Introduction_Action $settings_introduction_action The $settings_introduction_action.
|
||||
*/
|
||||
public function __construct( Settings_Introduction_Action $settings_introduction_action ) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 20.7' );
|
||||
@@ -177,11 +177,11 @@ class Settings_Introduction_Route implements Route_Interface {
|
||||
/**
|
||||
* Sets the value of the wistia embed permission.
|
||||
*
|
||||
* @param WP_REST_Request $request The request object.
|
||||
*
|
||||
* @deprecated 20.7
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param WP_REST_Request $request The request object.
|
||||
*
|
||||
* @return WP_REST_Response|WP_Error The success or failure response.
|
||||
*/
|
||||
public function set_wistia_embed_permission( WP_REST_Request $request ) {
|
||||
@@ -243,11 +243,11 @@ class Settings_Introduction_Route implements Route_Interface {
|
||||
/**
|
||||
* Sets the value of show.
|
||||
*
|
||||
* @param WP_REST_Request $request The request object.
|
||||
*
|
||||
* @deprecated 20.7
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param WP_REST_Request $request The request object.
|
||||
*
|
||||
* @return WP_REST_Response|WP_Error The success or failure response.
|
||||
*/
|
||||
public function set_show( WP_REST_Request $request ) {
|
||||
|
||||
@@ -7,10 +7,10 @@ namespace Yoast\WP\SEO\Schema_Templates\Assets;
|
||||
/**
|
||||
* Class Icons.
|
||||
*
|
||||
* Provides SVG icons as strings.
|
||||
*
|
||||
* @deprecated 20.5
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* Provides SVG icons as strings.
|
||||
*/
|
||||
class Icons {
|
||||
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Services\Health_Check;
|
||||
|
||||
/**
|
||||
* Passes if the health check can reach the MyYoast API using a recent enough cURL version.
|
||||
*
|
||||
* @deprecated 19.7.2
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class Curl_Check extends Health_Check {
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @deprecated 19.7.2
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param Curl_Runner $runner The object that implements the actual health check.
|
||||
* @param Curl_Reports $reports The object that generates WordPress-friendly results.
|
||||
*/
|
||||
public function __construct(
|
||||
Curl_Runner $runner,
|
||||
Curl_Reports $reports
|
||||
) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.7.2' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a human-readable label for this health check.
|
||||
*
|
||||
* @deprecated 19.7.2
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return string The human-readable label.
|
||||
*/
|
||||
public function get_test_label() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.7.2' );
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the WordPress-friendly health check result.
|
||||
*
|
||||
* @return string[] The WordPress-friendly health check result.
|
||||
*/
|
||||
protected function get_result() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.7.2' );
|
||||
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Services\Health_Check;
|
||||
|
||||
use WPSEO_Shortlinker;
|
||||
|
||||
/**
|
||||
* Presents a set of different messages for the cURL health check.
|
||||
*
|
||||
* @deprecated 19.7.2
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class Curl_Reports {
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @deprecated 19.7.2
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param Report_Builder_Factory $report_builder_factory The factory for result builder objects.
|
||||
* This class uses the report builder to generate WordPress-friendly
|
||||
* health check results.
|
||||
* @param WPSEO_Shortlinker $shortlinker The WPSEO_Shortlinker object used to generate short links.
|
||||
*/
|
||||
public function __construct(
|
||||
Report_Builder_Factory $report_builder_factory,
|
||||
WPSEO_Shortlinker $shortlinker
|
||||
) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.7.2' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the message for a successful health check.
|
||||
*
|
||||
* @deprecated 19.7.2
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return string[] The message as a WordPress site status report.
|
||||
*/
|
||||
public function get_success_result() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.7.2' );
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the message for when the health check was unable to reach the MyYoast API.
|
||||
*
|
||||
* @deprecated 19.7.2
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return string[] The message as a WordPress site status report.
|
||||
*/
|
||||
public function get_my_yoast_api_not_reachable_result() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.7.2' );
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the message for a successful health check.
|
||||
*
|
||||
* @deprecated 19.7.2
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return string[] The message as a WordPress site status report.
|
||||
*/
|
||||
public function get_no_recent_curl_version_installed_result() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.7.2' );
|
||||
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -1,113 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Services\Health_Check;
|
||||
|
||||
use WPSEO_Addon_Manager;
|
||||
use Yoast\WP\SEO\Helpers\Curl_Helper;
|
||||
|
||||
/**
|
||||
* Runs the Curl health check.
|
||||
*
|
||||
* @deprecated 19.7.2
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class Curl_Runner implements Runner_Interface {
|
||||
|
||||
/**
|
||||
* Sets the minimum cURL version for this health check to pass.
|
||||
*/
|
||||
const MINIMUM_CURL_VERSION = '7.34.0';
|
||||
|
||||
/**
|
||||
* Sets the target URL for testing whether the MyYoast API is reachable.
|
||||
*/
|
||||
const MYYOAST_API_REQUEST_URL = 'sites/current';
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @deprecated 19.7.2
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @psalm-suppress InvalidClass MyYoast is a product name, so it's an exception to the class naming conventions.
|
||||
* @param WPSEO_Addon_Manager $addon_manager The add-on manager.
|
||||
* @param MyYoast_Api_Request_Factory $my_yoast_api_request_factory A MyYoast API request object.
|
||||
* @param Curl_Helper $curl_helper A cURL helper object for obtaining
|
||||
* cURL installation information.
|
||||
*/
|
||||
public function __construct(
|
||||
WPSEO_Addon_Manager $addon_manager,
|
||||
MyYoast_Api_Request_Factory $my_yoast_api_request_factory,
|
||||
Curl_Helper $curl_helper
|
||||
) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.7.2' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the health check. Checks if cURL is installed and up to date, and if it's able to reach the MyYoast API
|
||||
*
|
||||
* @deprecated 19.7.2
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.7.2' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the health check was successful.
|
||||
*
|
||||
* @deprecated 19.7.2
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return bool True if all the routines for this health check were successful.
|
||||
*/
|
||||
public function is_successful() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.7.2' );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether there are premium plugins installed.
|
||||
*
|
||||
* @deprecated 19.7.2
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return bool True if there are premium plugins installed.
|
||||
*/
|
||||
public function has_premium_plugins_installed() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.7.2' );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether cURL was able to reach the MyYoast API.
|
||||
*
|
||||
* @deprecated 19.7.2
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return bool True if cURL was able to reach the MyYoast API.
|
||||
*/
|
||||
public function can_reach_my_yoast_api() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.7.2' );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the installed cURL version is recent enough.
|
||||
*
|
||||
* @deprecated 19.7.2
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return bool True if the installed cURL version is more recent than MINIMUM_CURL_VERSION.
|
||||
*/
|
||||
public function has_recent_curl_version_installed() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.7.2' );
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Services\Health_Check;
|
||||
|
||||
/**
|
||||
* Passes if the health check determines that the site is indexable using Ryte.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class Ryte_Check extends Health_Check {
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param Ryte_Runner $runner The object that implements the actual health check.
|
||||
* @param Ryte_Reports $reports The object that generates WordPress-friendly results.
|
||||
*/
|
||||
public function __construct(
|
||||
Ryte_Runner $runner,
|
||||
Ryte_Reports $reports
|
||||
) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a human-readable label for this health check.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return string The human-readable label.
|
||||
*/
|
||||
public function get_test_label() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the WordPress-friendly health check result.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return string[] The WordPress-friendly health check result.
|
||||
*/
|
||||
protected function get_result() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -1,93 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Services\Health_Check;
|
||||
|
||||
use WPSEO_Shortlinker;
|
||||
|
||||
/**
|
||||
* Presents a set of different messages for the Ryte health check.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class Ryte_Reports {
|
||||
|
||||
use Reports_Trait;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param Report_Builder_Factory $report_builder_factory The factory for result builder objects.
|
||||
* This class uses the report builder to generate
|
||||
* WordPress-friendly health check results.
|
||||
* @param WPSEO_Shortlinker $shortlinker The WPSEO_Shortlinker object used to generate short
|
||||
* links.
|
||||
*/
|
||||
public function __construct(
|
||||
Report_Builder_Factory $report_builder_factory,
|
||||
WPSEO_Shortlinker $shortlinker
|
||||
) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the message for a successful health check.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return string[] The message as a WordPress site status report.
|
||||
*/
|
||||
public function get_success_result() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the report for a health check result in which the site was not indexable.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return string[] The message as a WordPress site status report.
|
||||
*/
|
||||
public function get_not_indexable_result() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the report for when the health check was unable to determine indexability.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return string[] The message as a WordPress site status report.
|
||||
*/
|
||||
public function get_unknown_indexability_result() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result for when the health check got an error response from Ryte.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param array $response_error The error response from Ryte.
|
||||
*
|
||||
* @return string[] The message as a WordPress site status report.
|
||||
*/
|
||||
public function get_response_error_result( $response_error ) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Services\Health_Check;
|
||||
|
||||
use WPSEO_Utils;
|
||||
use Yoast\WP\SEO\Integrations\Admin\Ryte_Integration;
|
||||
|
||||
/**
|
||||
* Runs the Ryte health check.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class Ryte_Runner implements Runner_Interface {
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param Ryte_Integration $ryte The Ryte_Integration object that the health check uses to check indexability.
|
||||
* @param WPSEO_Utils $utils The WPSEO_Utils object used to determine whether the site is in development mode.
|
||||
*/
|
||||
public function __construct(
|
||||
Ryte_Integration $ryte,
|
||||
WPSEO_Utils $utils
|
||||
) {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the health check. Checks if Ryte is accessible and whether the site is indexable.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the site is a live production site that has Ryte enabled.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function should_run() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the site is indexable.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function is_successful() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the site's indexability is unknown.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return bool Returns true if the site indexability is unknown even though getting a response from Ryte was
|
||||
* successful.
|
||||
*/
|
||||
public function has_unknown_indexability() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether there was a response error when attempting a request to Ryte.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return bool True if the health check got a valid error response.
|
||||
*/
|
||||
public function got_response_error() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the error response is there was one.
|
||||
*
|
||||
* @deprecated 19.6
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return array|null
|
||||
*/
|
||||
public function get_error_response() {
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
|
||||
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ class Author_Not_Built_Exception extends Not_Built_Exception {
|
||||
* @return Author_Not_Built_Exception The exception.
|
||||
*/
|
||||
public static function author_archives_are_not_indexed_for_users_without_posts( $user_id ) {
|
||||
return new Author_Not_Built_Exception(
|
||||
return new self(
|
||||
'Indexable for author with id ' . $user_id . ' is not being built, since author archives are not indexed for users without posts.'
|
||||
);
|
||||
}
|
||||
@@ -30,7 +30,7 @@ class Author_Not_Built_Exception extends Not_Built_Exception {
|
||||
* @return Author_Not_Built_Exception The exception.
|
||||
*/
|
||||
public static function author_archives_are_disabled( $user_id ) {
|
||||
return new Author_Not_Built_Exception(
|
||||
return new self(
|
||||
'Indexable for author with id ' . $user_id . ' is not being built, since author archives are disabled.'
|
||||
);
|
||||
}
|
||||
@@ -44,7 +44,7 @@ class Author_Not_Built_Exception extends Not_Built_Exception {
|
||||
* @return Author_Not_Built_Exception The exception.
|
||||
*/
|
||||
public static function author_not_built_because_of_filter( $user_id ) {
|
||||
return new Author_Not_Built_Exception(
|
||||
return new self(
|
||||
'Indexable for author with id ' . $user_id . ' is not being built, since it is excluded because of the \'wpseo_should_build_and_save_user_indexable\' filter.'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class Not_Built_Exception extends Indexable_Exception {
|
||||
* @return Not_Built_Exception The exception.
|
||||
*/
|
||||
public static function invalid_object_id( $object_id ) {
|
||||
return new Not_Built_Exception(
|
||||
return new self(
|
||||
"Indexable was not built because it had an invalid object id of $object_id."
|
||||
);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ class Post_Not_Built_Exception extends Not_Built_Exception {
|
||||
*/
|
||||
public static function because_not_indexable( $post_id ) {
|
||||
/* translators: %s: expands to the post id */
|
||||
return new Post_Not_Built_Exception( \sprintf( \__( 'The post %s could not be indexed because it does not meet indexing requirements.', 'wordpress-seo' ), $post_id ) );
|
||||
return new self( \sprintf( \__( 'The post %s could not be indexed because it does not meet indexing requirements.', 'wordpress-seo' ), $post_id ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -29,6 +29,6 @@ class Post_Not_Built_Exception extends Not_Built_Exception {
|
||||
*/
|
||||
public static function because_post_type_excluded( $post_id ) {
|
||||
/* translators: %s: expands to the post id */
|
||||
return new Post_Not_Built_Exception( \sprintf( \__( 'The post %s could not be indexed because it\'s post type is excluded from indexing.', 'wordpress-seo' ), $post_id ) );
|
||||
return new self( \sprintf( \__( 'The post %s could not be indexed because it\'s post type is excluded from indexing.', 'wordpress-seo' ), $post_id ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,6 @@ class Post_Type_Not_Built_Exception extends Not_Built_Exception {
|
||||
*/
|
||||
public static function because_not_indexable( $post_type ) {
|
||||
/* translators: %s: expands to the post type */
|
||||
return new Post_Type_Not_Built_Exception( \sprintf( \__( 'The post type %s could not be indexed because it does not meet indexing requirements.', 'wordpress-seo' ), $post_type ) );
|
||||
return new self( \sprintf( \__( 'The post type %s could not be indexed because it does not meet indexing requirements.', 'wordpress-seo' ), $post_type ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,6 @@ class Term_Not_Built_Exception extends Not_Built_Exception {
|
||||
*/
|
||||
public static function because_not_indexable( $term_id ) {
|
||||
/* translators: %s: expands to the term id */
|
||||
return new Term_Not_Built_Exception( \sprintf( \__( 'The term %s could not be built because it\'s not indexable.', 'wordpress-seo' ), $term_id ) );
|
||||
return new self( \sprintf( \__( 'The term %s could not be built because it\'s not indexable.', 'wordpress-seo' ), $term_id ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,8 +15,6 @@ use Yoast\WP\SEO\Main;
|
||||
|
||||
if ( is_dir( WPSEO_PATH . YOAST_VENDOR_PREFIX_DIRECTORY ) ) {
|
||||
require_once WPSEO_PATH . YOAST_VENDOR_PREFIX_DIRECTORY . '/guzzlehttp/guzzle/src/functions.php';
|
||||
require_once WPSEO_PATH . YOAST_VENDOR_PREFIX_DIRECTORY . '/guzzlehttp/psr7/src/functions_include.php';
|
||||
require_once WPSEO_PATH . YOAST_VENDOR_PREFIX_DIRECTORY . '/guzzlehttp/promises/src/functions_include.php';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1 +1 @@
|
||||
<?php return array('analysisReport.js' => array('dependencies' => array('lodash', 'react', 'wp-element', 'wp-i18n', 'wp-polyfill', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => 'aa3bdbb8ea1665ef47e3471256f7aa5c'), 'componentsNew.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-element', 'wp-i18n', 'wp-polyfill', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-react-select', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '937acd29ba7203afc5d3ed6774308f82'), 'featureFlag.js' => array('dependencies' => array('wp-polyfill'), 'version' => '7cc57e609da16550149c257c02703b70'), 'helpers.js' => array('dependencies' => array('lodash', 'react', 'wp-element', 'wp-i18n', 'wp-polyfill', 'yoast-seo-prop-types-package', 'yoast-seo-styled-components-package'), 'version' => 'c0f74d333d711ca14c340381799a243b'), 'replacementVariableEditor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-components', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'yoast-seo-components-new-package', 'yoast-seo-draft-js-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '63d20336aa853a4cae056ba6c97578af'), 'searchMetadataPreviews.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-element', 'wp-i18n', 'wp-polyfill', 'yoast-seo-analysis-package', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-replacement-variable-editor-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '0f7fccb8e81a087176a421795bf33b2b'), 'socialMetadataForms.js' => array('dependencies' => array('lodash', 'react', 'wp-element', 'wp-i18n', 'wp-polyfill', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-redux-package', 'yoast-seo-replacement-variable-editor-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => 'dbb3f93cf373d4c5ba8c4a6934809dc6'), 'styleGuide.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-helpers-package', 'yoast-seo-styled-components-package'), 'version' => 'd01297fc991cfc7d982fc499e20021e8'), 'uiLibrary.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-element', 'wp-polyfill', 'yoast-seo-prop-types-package', 'yoast-seo-redux-package'), 'version' => '4f2135db2791e793a35b8958bb96dd0c'), 'draftJs.js' => array('dependencies' => array('react', 'react-dom', 'wp-polyfill'), 'version' => 'd49a9c18d9d795dffc089729072d9b62'), 'jed.js' => array('dependencies' => array('wp-polyfill'), 'version' => '13b0f09271aa0cdb1a21c5cfbacdff69'), 'propTypes.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'bb4a153787b7327d677cf4ac0d366003'), 'redux.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'cf0b6f4074f71b9dd07a7f38d8c96010'), 'styledComponents.js' => array('dependencies' => array('react', 'wp-polyfill'), 'version' => '72859cfa859ce93b5f0547a12ca7e7f6'), 'components.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-element', 'wp-i18n', 'wp-polyfill', 'yoast-seo-analysis-report-package', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-jed-package', 'yoast-seo-prop-types-package', 'yoast-seo-redux-package', 'yoast-seo-replacement-variable-editor-package', 'yoast-seo-search-metadata-previews-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => 'e84e083f517030ae171c3188f4e8eca2'), 'analysis.js' => array('dependencies' => array('lodash', 'wp-autop', 'wp-i18n', 'wp-polyfill', 'yoast-seo-feature-flag-package'), 'version' => '618334c780347377ccede5cc788f0f8e'));
|
||||
<?php return array('analysisReport.js' => array('dependencies' => array('lodash', 'react', 'wp-element', 'wp-i18n', 'wp-polyfill', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => 'e95f437ae34ac15c6a553865448aff6c'), 'componentsNew.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-element', 'wp-i18n', 'wp-polyfill', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-react-select', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '5bf88ecd3df9ad5b4539b67fa6acb459'), 'featureFlag.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e10bc9cc72a611812bfc07e62a49fc87'), 'helpers.js' => array('dependencies' => array('lodash', 'react', 'wp-element', 'wp-i18n', 'wp-polyfill', 'yoast-seo-prop-types-package', 'yoast-seo-styled-components-package'), 'version' => 'daf04ff1091383587e7329416ccbbc66'), 'replacementVariableEditor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-components', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'yoast-seo-components-new-package', 'yoast-seo-draft-js-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '0a5fcadf27d9de01c826a88c004ea8f5'), 'searchMetadataPreviews.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-element', 'wp-i18n', 'wp-polyfill', 'yoast-seo-analysis-package', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-replacement-variable-editor-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '4351e99333a31af6ccc0a72d597eaa6c'), 'socialMetadataForms.js' => array('dependencies' => array('lodash', 'react', 'wp-element', 'wp-i18n', 'wp-polyfill', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-redux-package', 'yoast-seo-replacement-variable-editor-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '546bcd16f24f0a8af91ec1d987018c82'), 'styleGuide.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-helpers-package', 'yoast-seo-styled-components-package'), 'version' => '5fc06aa928153289521ef4fad66209f2'), 'uiLibrary.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-element', 'wp-polyfill', 'yoast-seo-prop-types-package', 'yoast-seo-redux-js-toolkit-package'), 'version' => 'ac5d507ddcf7f505f5ab53332342b807'), 'draftJs.js' => array('dependencies' => array('react', 'react-dom', 'wp-polyfill'), 'version' => '884a06763ec66f3f2b98ae2228a2166b'), 'jed.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b5de44b7e6b35120d8ba97761f9b11b0'), 'propTypes.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e9441ac3feaba74c71d9793f44b9b676'), 'reactHelmet.js' => array('dependencies' => array('react', 'wp-polyfill', 'yoast-seo-prop-types-package'), 'version' => '23f47eadf3891c8ff5f8acb97ba6b4bc'), 'redux.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '2340e784d7d5751f1fa3189ba31b493f'), 'styledComponents.js' => array('dependencies' => array('react', 'wp-polyfill'), 'version' => 'e0a1a87f171b1b09fda15f788867e8eb'), 'components.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-element', 'wp-i18n', 'wp-polyfill', 'yoast-seo-analysis-report-package', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-jed-package', 'yoast-seo-prop-types-package', 'yoast-seo-redux-package', 'yoast-seo-replacement-variable-editor-package', 'yoast-seo-search-metadata-previews-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => 'e2d878e6411504189a4a41ac5e966b7e'), 'analysis.js' => array('dependencies' => array('lodash', 'wp-i18n', 'wp-polyfill', 'yoast-seo-feature-flag-package'), 'version' => '597bb5930c02bf4e1fc701fad15d9980'), 'reduxJsToolkit.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-redux-package'), 'version' => 'aae2438a60d27ad77ac35206db5f93bd'));
|
||||
@@ -1 +1 @@
|
||||
<?php return array('default.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '19f47693b2c982334cfdf4657aef980c'), 'ar.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '184af465610c9920b8439063afba0806'), 'ca.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '72f4605e103e80ba87bd6269b0f57fec'), 'cs.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '274ea62f5c1be36bce3ef760ca877ecd'), 'de.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'f0e4cbbb4fff4ebfa27903b0be6ea835'), 'el.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '4c083eb4c20581f33b319e9bc7c72dbc'), 'en.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'aa368e49b08abd0d18083269333d881d'), 'es.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '53c675ded8d5b1813313f8cbbccadaf6'), 'fa.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '4cedf8e078aa69632e3b9957a0745e05'), 'fr.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '714df1d9c1e56b8df63563009d7f1e25'), 'he.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '8850d42282de0a05d68a07c96368e373'), 'hu.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '5a0418f88c12384ff4d79032e13db605'), 'id.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '498f8b2f5a6f1a4af8f82272fa9d538f'), 'it.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '7f619d256584235aed6053f22a690d60'), 'ja.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '962e713ac93f5e1fdd0a570bc284bc05'), 'nb.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'c7e7389bf066aa53eedb070aa549922c'), 'nl.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'f145d75ea089dd090c10d9b7a0ba32d8'), 'pl.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '32db23299989a239215142772ee061ea'), 'pt.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'fca603a260ce67d957d4051a15b6686b'), 'ru.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '215cfdef2e9302bd54c1d44652331174'), 'sk.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '1c47902c41736502e8debb528c028276'), 'sv.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '69e32b16c1213beb73a33015cc8cdd80'), 'tr.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '98130c60f12ca63eedbcc0a7a824a69f'));
|
||||
<?php return array('default.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '19f47693b2c982334cfdf4657aef980c'), 'ar.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '184af465610c9920b8439063afba0806'), 'ca.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '72f4605e103e80ba87bd6269b0f57fec'), 'cs.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '274ea62f5c1be36bce3ef760ca877ecd'), 'de.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '57563d81ad6c43bd64b0935bedbebce3'), 'el.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '4c083eb4c20581f33b319e9bc7c72dbc'), 'en.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'aa368e49b08abd0d18083269333d881d'), 'es.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '53c675ded8d5b1813313f8cbbccadaf6'), 'fa.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '4cedf8e078aa69632e3b9957a0745e05'), 'fr.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '714df1d9c1e56b8df63563009d7f1e25'), 'he.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '8850d42282de0a05d68a07c96368e373'), 'hu.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '5a0418f88c12384ff4d79032e13db605'), 'id.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '498f8b2f5a6f1a4af8f82272fa9d538f'), 'it.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '7f619d256584235aed6053f22a690d60'), 'ja.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '425ba8543cfb80e5d18a5715ed6528be'), 'nb.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'c7e7389bf066aa53eedb070aa549922c'), 'nl.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'f145d75ea089dd090c10d9b7a0ba32d8'), 'pl.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '32db23299989a239215142772ee061ea'), 'pt.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'fca603a260ce67d957d4051a15b6686b'), 'ru.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '215cfdef2e9302bd54c1d44652331174'), 'sk.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '1c47902c41736502e8debb528c028276'), 'sv.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '69e32b16c1213beb73a33015cc8cdd80'), 'tr.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '98130c60f12ca63eedbcc0a7a824a69f'));
|
||||
File diff suppressed because one or more lines are too long
@@ -87,11 +87,12 @@ class Cached_Container extends Container
|
||||
'yoast\\wp\\seo\\conditionals\\admin\\non_network_admin_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Admin\\Non_Network_Admin_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\admin\\post_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Admin\\Post_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\admin\\posts_overview_or_ajax_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Admin\\Posts_Overview_Or_Ajax_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\admin\\yoast_admin_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Admin\\Yoast_Admin_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\admin_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Admin_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\attachment_redirections_enabled_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Attachment_Redirections_Enabled_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\deactivating_yoast_seo_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Deactivating_Yoast_Seo_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\development_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Development_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\front_end_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Front_End_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\front_end_inspector_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Front_End_Inspector_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\get_request_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Get_Request_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\headless_rest_endpoints_enabled_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Headless_Rest_Endpoints_Enabled_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\import_tool_selected_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Import_Tool_Selected_Conditional',
|
||||
@@ -130,12 +131,14 @@ class Cached_Container extends Container
|
||||
'yoast\\wp\\seo\\conditionals\\updated_importer_framework_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Updated_Importer_Framework_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\user_can_manage_wpseo_options_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\User_Can_Manage_Wpseo_Options_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\user_can_publish_posts_and_pages_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\User_Can_Publish_Posts_And_Pages_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\user_profile_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\User_Profile_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\web_stories_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Web_Stories_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\wincher_automatically_track_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Wincher_Automatically_Track_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\wincher_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Wincher_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\wincher_enabled_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Wincher_Enabled_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\wincher_token_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Wincher_Token_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\woocommerce_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\WooCommerce_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\wp_cron_enabled_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\WP_CRON_Enabled_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\wp_robots_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\WP_Robots_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\xmlrpc_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\XMLRPC_Conditional',
|
||||
'yoast\\wp\\seo\\conditionals\\yoast_admin_and_dashboard_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Yoast_Admin_And_Dashboard_Conditional',
|
||||
@@ -175,6 +178,9 @@ class Cached_Container extends Container
|
||||
'yoast\\wp\\seo\\config\\wincher_client' => 'Yoast\\WP\\SEO\\Config\\Wincher_Client',
|
||||
'yoast\\wp\\seo\\config\\wordproof_app_config' => 'Yoast\\WP\\SEO\\Config\\Wordproof_App_Config',
|
||||
'yoast\\wp\\seo\\config\\wordproof_translations' => 'Yoast\\WP\\SEO\\Config\\Wordproof_Translations',
|
||||
'yoast\\wp\\seo\\content_type_visibility\\application\\content_type_visibility_dismiss_notifications' => 'Yoast\\WP\\SEO\\Content_Type_Visibility\\Application\\Content_Type_Visibility_Dismiss_Notifications',
|
||||
'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\\generators\\breadcrumbs_generator' => 'Yoast\\WP\\SEO\\Generators\\Breadcrumbs_Generator',
|
||||
'yoast\\wp\\seo\\generators\\open_graph_image_generator' => 'Yoast\\WP\\SEO\\Generators\\Open_Graph_Image_Generator',
|
||||
@@ -286,6 +292,8 @@ class Cached_Container extends Container
|
||||
'yoast\\wp\\seo\\integrations\\admin\\redirects_page_integration' => 'Yoast\\WP\\SEO\\Integrations\\Admin\\Redirects_Page_Integration',
|
||||
'yoast\\wp\\seo\\integrations\\admin\\social_templates_integration' => 'Yoast\\WP\\SEO\\Integrations\\Admin\\Social_Templates_Integration',
|
||||
'yoast\\wp\\seo\\integrations\\admin\\workouts_integration' => 'Yoast\\WP\\SEO\\Integrations\\Admin\\Workouts_Integration',
|
||||
'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_promo_notification' => 'Yoast\\WP\\SEO\\Integrations\\Alerts\\Black_Friday_Promo_Notification',
|
||||
'yoast\\wp\\seo\\integrations\\alerts\\jetpack_boost_pre_publish' => 'Yoast\\WP\\SEO\\Integrations\\Alerts\\Jetpack_Boost_Pre_Publish',
|
||||
'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',
|
||||
@@ -318,6 +326,7 @@ class Cached_Container extends Container
|
||||
'yoast\\wp\\seo\\integrations\\primary_category' => 'Yoast\\WP\\SEO\\Integrations\\Primary_Category',
|
||||
'yoast\\wp\\seo\\integrations\\schema_blocks' => 'Yoast\\WP\\SEO\\Integrations\\Schema_Blocks',
|
||||
'yoast\\wp\\seo\\integrations\\settings_integration' => 'Yoast\\WP\\SEO\\Integrations\\Settings_Integration',
|
||||
'yoast\\wp\\seo\\integrations\\support_integration' => 'Yoast\\WP\\SEO\\Integrations\\Support_Integration',
|
||||
'yoast\\wp\\seo\\integrations\\third_party\\amp' => 'Yoast\\WP\\SEO\\Integrations\\Third_Party\\AMP',
|
||||
'yoast\\wp\\seo\\integrations\\third_party\\bbpress' => 'Yoast\\WP\\SEO\\Integrations\\Third_Party\\BbPress',
|
||||
'yoast\\wp\\seo\\integrations\\third_party\\coauthors_plus' => 'Yoast\\WP\\SEO\\Integrations\\Third_Party\\CoAuthors_Plus',
|
||||
@@ -364,6 +373,11 @@ class Cached_Container extends Container
|
||||
'yoast\\wp\\seo\\integrations\\watchers\\primary_term_watcher' => 'Yoast\\WP\\SEO\\Integrations\\Watchers\\Primary_Term_Watcher',
|
||||
'yoast\\wp\\seo\\integrations\\watchers\\search_engines_discouraged_watcher' => 'Yoast\\WP\\SEO\\Integrations\\Watchers\\Search_Engines_Discouraged_Watcher',
|
||||
'yoast\\wp\\seo\\integrations\\xmlrpc' => 'Yoast\\WP\\SEO\\Integrations\\XMLRPC',
|
||||
'yoast\\wp\\seo\\introductions\\application\\ai_generate_titles_and_descriptions_introduction_upsell' => 'Yoast\\WP\\SEO\\Introductions\\Application\\Ai_Generate_Titles_And_Descriptions_Introduction_Upsell',
|
||||
'yoast\\wp\\seo\\introductions\\application\\introductions_collector' => 'Yoast\\WP\\SEO\\Introductions\\Application\\Introductions_Collector',
|
||||
'yoast\\wp\\seo\\introductions\\infrastructure\\wistia_embed_permission_repository' => 'Yoast\\WP\\SEO\\Introductions\\Infrastructure\\Wistia_Embed_Permission_Repository',
|
||||
'yoast\\wp\\seo\\introductions\\user_interface\\introductions_integration' => 'Yoast\\WP\\SEO\\Introductions\\User_Interface\\Introductions_Integration',
|
||||
'yoast\\wp\\seo\\introductions\\user_interface\\wistia_embed_permission_route' => 'Yoast\\WP\\SEO\\Introductions\\User_Interface\\Wistia_Embed_Permission_Route',
|
||||
'yoast\\wp\\seo\\loader' => 'Yoast\\WP\\SEO\\Loader',
|
||||
'yoast\\wp\\seo\\loggers\\logger' => 'Yoast\\WP\\SEO\\Loggers\\Logger',
|
||||
'yoast\\wp\\seo\\memoizers\\meta_tags_context_memoizer' => 'Yoast\\WP\\SEO\\Memoizers\\Meta_Tags_Context_Memoizer',
|
||||
@@ -380,6 +394,9 @@ class Cached_Container extends Container
|
||||
'yoast\\wp\\seo\\presentations\\indexable_static_home_page_presentation' => 'Yoast\\WP\\SEO\\Presentations\\Indexable_Static_Home_Page_Presentation',
|
||||
'yoast\\wp\\seo\\presentations\\indexable_static_posts_page_presentation' => 'Yoast\\WP\\SEO\\Presentations\\Indexable_Static_Posts_Page_Presentation',
|
||||
'yoast\\wp\\seo\\presentations\\indexable_term_archive_presentation' => 'Yoast\\WP\\SEO\\Presentations\\Indexable_Term_Archive_Presentation',
|
||||
'yoast\\wp\\seo\\promotions\\application\\promotion_manager' => 'Yoast\\WP\\SEO\\Promotions\\Application\\Promotion_Manager',
|
||||
'yoast\\wp\\seo\\promotions\\domain\\black_friday_checklist_promotion' => 'Yoast\\WP\\SEO\\Promotions\\Domain\\Black_Friday_Checklist_Promotion',
|
||||
'yoast\\wp\\seo\\promotions\\domain\\black_friday_promotion' => 'Yoast\\WP\\SEO\\Promotions\\Domain\\Black_Friday_Promotion',
|
||||
'yoast\\wp\\seo\\repositories\\indexable_cleanup_repository' => 'Yoast\\WP\\SEO\\Repositories\\Indexable_Cleanup_Repository',
|
||||
'yoast\\wp\\seo\\repositories\\indexable_hierarchy_repository' => 'Yoast\\WP\\SEO\\Repositories\\Indexable_Hierarchy_Repository',
|
||||
'yoast\\wp\\seo\\repositories\\indexable_repository' => 'Yoast\\WP\\SEO\\Repositories\\Indexable_Repository',
|
||||
@@ -427,6 +444,7 @@ class Cached_Container extends Container
|
||||
'yoast\\wp\\seo\\surfaces\\open_graph_helpers_surface' => 'Yoast\\WP\\SEO\\Surfaces\\Open_Graph_Helpers_Surface',
|
||||
'yoast\\wp\\seo\\surfaces\\schema_helpers_surface' => 'Yoast\\WP\\SEO\\Surfaces\\Schema_Helpers_Surface',
|
||||
'yoast\\wp\\seo\\surfaces\\twitter_helpers_surface' => 'Yoast\\WP\\SEO\\Surfaces\\Twitter_Helpers_Surface',
|
||||
'yoast\\wp\\seo\\user_profiles_additions\\user_interface\\user_profiles_additions_ui' => 'Yoast\\WP\\SEO\\User_Profiles_Additions\\User_Interface\\User_Profiles_Additions_Ui',
|
||||
'yoast\\wp\\seo\\values\\images' => 'Yoast\\WP\\SEO\\Values\\Images',
|
||||
'yoast\\wp\\seo\\values\\indexables\\indexable_builder_versions' => 'Yoast\\WP\\SEO\\Values\\Indexables\\Indexable_Builder_Versions',
|
||||
'yoast\\wp\\seo\\values\\open_graph\\images' => 'Yoast\\WP\\SEO\\Values\\Open_Graph\\Images',
|
||||
@@ -499,11 +517,12 @@ class Cached_Container extends Container
|
||||
'Yoast\\WP\\SEO\\Conditionals\\Admin\\Non_Network_Admin_Conditional' => 'getNonNetworkAdminConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\Admin\\Post_Conditional' => 'getPostConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\Admin\\Posts_Overview_Or_Ajax_Conditional' => 'getPostsOverviewOrAjaxConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\Admin\\Yoast_Admin_Conditional' => 'getYoastAdminConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\Admin_Conditional' => 'getAdminConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\Attachment_Redirections_Enabled_Conditional' => 'getAttachmentRedirectionsEnabledConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\Deactivating_Yoast_Seo_Conditional' => 'getDeactivatingYoastSeoConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\Development_Conditional' => 'getDevelopmentConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\Front_End_Conditional' => 'getFrontEndConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\Front_End_Inspector_Conditional' => 'getFrontEndInspectorConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\Get_Request_Conditional' => 'getGetRequestConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\Headless_Rest_Endpoints_Enabled_Conditional' => 'getHeadlessRestEndpointsEnabledConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\Import_Tool_Selected_Conditional' => 'getImportToolSelectedConditionalService',
|
||||
@@ -542,6 +561,8 @@ class Cached_Container extends Container
|
||||
'Yoast\\WP\\SEO\\Conditionals\\Updated_Importer_Framework_Conditional' => 'getUpdatedImporterFrameworkConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\User_Can_Manage_Wpseo_Options_Conditional' => 'getUserCanManageWpseoOptionsConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\User_Can_Publish_Posts_And_Pages_Conditional' => 'getUserCanPublishPostsAndPagesConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\User_Profile_Conditional' => 'getUserProfileConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\WP_CRON_Enabled_Conditional' => 'getWPCRONEnabledConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\WP_Robots_Conditional' => 'getWPRobotsConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\Web_Stories_Conditional' => 'getWebStoriesConditionalService',
|
||||
'Yoast\\WP\\SEO\\Conditionals\\Wincher_Automatically_Track_Conditional' => 'getWincherAutomaticallyTrackConditionalService',
|
||||
@@ -587,6 +608,9 @@ class Cached_Container extends Container
|
||||
'Yoast\\WP\\SEO\\Config\\Wincher_Client' => 'getWincherClientService',
|
||||
'Yoast\\WP\\SEO\\Config\\Wordproof_App_Config' => 'getWordproofAppConfigService',
|
||||
'Yoast\\WP\\SEO\\Config\\Wordproof_Translations' => 'getWordproofTranslationsService',
|
||||
'Yoast\\WP\\SEO\\Content_Type_Visibility\\Application\\Content_Type_Visibility_Dismiss_Notifications' => 'getContentTypeVisibilityDismissNotificationsService',
|
||||
'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\\Generators\\Breadcrumbs_Generator' => 'getBreadcrumbsGeneratorService',
|
||||
'Yoast\\WP\\SEO\\Generators\\Open_Graph_Image_Generator' => 'getOpenGraphImageGeneratorService',
|
||||
@@ -698,6 +722,8 @@ class Cached_Container extends Container
|
||||
'Yoast\\WP\\SEO\\Integrations\\Admin\\Redirects_Page_Integration' => 'getRedirectsPageIntegrationService',
|
||||
'Yoast\\WP\\SEO\\Integrations\\Admin\\Social_Templates_Integration' => 'getSocialTemplatesIntegrationService',
|
||||
'Yoast\\WP\\SEO\\Integrations\\Admin\\Workouts_Integration' => 'getWorkoutsIntegrationService',
|
||||
'Yoast\\WP\\SEO\\Integrations\\Alerts\\Black_Friday_Product_Editor_Checklist_Notification' => 'getBlackFridayProductEditorChecklistNotificationService',
|
||||
'Yoast\\WP\\SEO\\Integrations\\Alerts\\Black_Friday_Promo_Notification' => 'getBlackFridayPromoNotificationService',
|
||||
'Yoast\\WP\\SEO\\Integrations\\Alerts\\Jetpack_Boost_Pre_Publish' => 'getJetpackBoostPrePublishService',
|
||||
'Yoast\\WP\\SEO\\Integrations\\Alerts\\Webinar_Promo_Notification' => 'getWebinarPromoNotificationService',
|
||||
'Yoast\\WP\\SEO\\Integrations\\Blocks\\Breadcrumbs_Block' => 'getBreadcrumbsBlockService',
|
||||
@@ -730,6 +756,7 @@ class Cached_Container extends Container
|
||||
'Yoast\\WP\\SEO\\Integrations\\Primary_Category' => 'getPrimaryCategoryService',
|
||||
'Yoast\\WP\\SEO\\Integrations\\Schema_Blocks' => 'getSchemaBlocksService',
|
||||
'Yoast\\WP\\SEO\\Integrations\\Settings_Integration' => 'getSettingsIntegrationService',
|
||||
'Yoast\\WP\\SEO\\Integrations\\Support_Integration' => 'getSupportIntegrationService',
|
||||
'Yoast\\WP\\SEO\\Integrations\\Third_Party\\AMP' => 'getAMPService',
|
||||
'Yoast\\WP\\SEO\\Integrations\\Third_Party\\BbPress' => 'getBbPressService',
|
||||
'Yoast\\WP\\SEO\\Integrations\\Third_Party\\CoAuthors_Plus' => 'getCoAuthorsPlusService',
|
||||
@@ -776,6 +803,11 @@ class Cached_Container extends Container
|
||||
'Yoast\\WP\\SEO\\Integrations\\Watchers\\Primary_Term_Watcher' => 'getPrimaryTermWatcherService',
|
||||
'Yoast\\WP\\SEO\\Integrations\\Watchers\\Search_Engines_Discouraged_Watcher' => 'getSearchEnginesDiscouragedWatcherService',
|
||||
'Yoast\\WP\\SEO\\Integrations\\XMLRPC' => 'getXMLRPCService',
|
||||
'Yoast\\WP\\SEO\\Introductions\\Application\\Ai_Generate_Titles_And_Descriptions_Introduction_Upsell' => 'getAiGenerateTitlesAndDescriptionsIntroductionUpsellService',
|
||||
'Yoast\\WP\\SEO\\Introductions\\Application\\Introductions_Collector' => 'getIntroductionsCollectorService',
|
||||
'Yoast\\WP\\SEO\\Introductions\\Infrastructure\\Wistia_Embed_Permission_Repository' => 'getWistiaEmbedPermissionRepositoryService',
|
||||
'Yoast\\WP\\SEO\\Introductions\\User_Interface\\Introductions_Integration' => 'getIntroductionsIntegrationService',
|
||||
'Yoast\\WP\\SEO\\Introductions\\User_Interface\\Wistia_Embed_Permission_Route' => 'getWistiaEmbedPermissionRouteService',
|
||||
'Yoast\\WP\\SEO\\Loader' => 'getLoaderService',
|
||||
'Yoast\\WP\\SEO\\Loggers\\Logger' => 'getLoggerService',
|
||||
'Yoast\\WP\\SEO\\Memoizers\\Meta_Tags_Context_Memoizer' => 'getMetaTagsContextMemoizerService',
|
||||
@@ -792,6 +824,9 @@ class Cached_Container extends Container
|
||||
'Yoast\\WP\\SEO\\Presentations\\Indexable_Static_Home_Page_Presentation' => 'getIndexableStaticHomePagePresentationService',
|
||||
'Yoast\\WP\\SEO\\Presentations\\Indexable_Static_Posts_Page_Presentation' => 'getIndexableStaticPostsPagePresentationService',
|
||||
'Yoast\\WP\\SEO\\Presentations\\Indexable_Term_Archive_Presentation' => 'getIndexableTermArchivePresentationService',
|
||||
'Yoast\\WP\\SEO\\Promotions\\Application\\Promotion_Manager' => 'getPromotionManagerService',
|
||||
'Yoast\\WP\\SEO\\Promotions\\Domain\\Black_Friday_Checklist_Promotion' => 'getBlackFridayChecklistPromotionService',
|
||||
'Yoast\\WP\\SEO\\Promotions\\Domain\\Black_Friday_Promotion' => 'getBlackFridayPromotionService',
|
||||
'Yoast\\WP\\SEO\\Repositories\\Indexable_Cleanup_Repository' => 'getIndexableCleanupRepositoryService',
|
||||
'Yoast\\WP\\SEO\\Repositories\\Indexable_Hierarchy_Repository' => 'getIndexableHierarchyRepositoryService',
|
||||
'Yoast\\WP\\SEO\\Repositories\\Indexable_Repository' => 'getIndexableRepositoryService',
|
||||
@@ -839,6 +874,7 @@ class Cached_Container extends Container
|
||||
'Yoast\\WP\\SEO\\Surfaces\\Open_Graph_Helpers_Surface' => 'getOpenGraphHelpersSurfaceService',
|
||||
'Yoast\\WP\\SEO\\Surfaces\\Schema_Helpers_Surface' => 'getSchemaHelpersSurfaceService',
|
||||
'Yoast\\WP\\SEO\\Surfaces\\Twitter_Helpers_Surface' => 'getTwitterHelpersSurfaceService',
|
||||
'Yoast\\WP\\SEO\\User_Profiles_Additions\\User_Interface\\User_Profiles_Additions_Ui' => 'getUserProfilesAdditionsUiService',
|
||||
'Yoast\\WP\\SEO\\Values\\Images' => 'getImagesService',
|
||||
'Yoast\\WP\\SEO\\Values\\Indexables\\Indexable_Builder_Versions' => 'getIndexableBuilderVersionsService',
|
||||
'Yoast\\WP\\SEO\\Values\\Open_Graph\\Images' => 'getImages2Service',
|
||||
@@ -850,6 +886,7 @@ class Cached_Container extends Container
|
||||
];
|
||||
$this->privates = [
|
||||
'YoastSEO_Vendor\\YoastSEO_Vendor\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
'Yoast\\WP\\SEO\\Content_Type_Visibility\\Application\\Content_Type_Visibility_Dismiss_Notifications' => true,
|
||||
];
|
||||
$this->aliases = [
|
||||
'YoastSEO_Vendor\\YoastSEO_Vendor\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => 'service_container',
|
||||
@@ -866,7 +903,13 @@ class Cached_Container extends Container
|
||||
'Yoast\\WP\\SEO\\Analytics\\Domain\\Missing_Indexable_Count' => true,
|
||||
'Yoast\\WP\\SEO\\Analytics\\Domain\\To_Be_Cleaned_Indexable_Bucket' => true,
|
||||
'Yoast\\WP\\SEO\\Analytics\\Domain\\To_Be_Cleaned_Indexable_Count' => true,
|
||||
'Yoast\\WP\\SEO\\Content_Type_Visibility\\Application\\Content_Type_Visibility_Dismiss_Notifications' => true,
|
||||
'Yoast\\WP\\SEO\\Introductions\\Domain\\Introduction_Interface' => true,
|
||||
'Yoast\\WP\\SEO\\Introductions\\Domain\\Introduction_Item' => true,
|
||||
'Yoast\\WP\\SEO\\Introductions\\Domain\\Introductions_Bucket' => true,
|
||||
'Yoast\\WP\\SEO\\Presenters\\Robots_Txt_Presenter' => true,
|
||||
'Yoast\\WP\\SEO\\Promotions\\Application\\Promotion_Manager_Interface' => true,
|
||||
'Yoast\\WP\\SEO\\Promotions\\Domain\\Time_Interval' => true,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1429,7 +1472,7 @@ class Cached_Container extends Container
|
||||
return $this->services['Yoast\\WP\\SEO\\Builders\\Indexable_Author_Builder'];
|
||||
}
|
||||
|
||||
$this->services['Yoast\\WP\\SEO\\Builders\\Indexable_Author_Builder'] = $instance = new \Yoast\WP\SEO\Builders\Indexable_Author_Builder(${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Author_Archive_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Author_Archive_Helper'] : $this->getAuthorArchiveHelperService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Values\\Indexables\\Indexable_Builder_Versions']) ? $this->services['Yoast\\WP\\SEO\\Values\\Indexables\\Indexable_Builder_Versions'] : ($this->services['Yoast\\WP\\SEO\\Values\\Indexables\\Indexable_Builder_Versions'] = new \Yoast\WP\SEO\Values\Indexables\Indexable_Builder_Versions())) && false ?: '_'}, $a, ${($_ = isset($this->services['wpdb']) ? $this->services['wpdb'] : $this->getWpdbService()) && false ?: '_'});
|
||||
$this->services['Yoast\\WP\\SEO\\Builders\\Indexable_Author_Builder'] = $instance = new \Yoast\WP\SEO\Builders\Indexable_Author_Builder(${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Author_Archive_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Author_Archive_Helper'] : $this->getAuthorArchiveHelperService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Values\\Indexables\\Indexable_Builder_Versions']) ? $this->services['Yoast\\WP\\SEO\\Values\\Indexables\\Indexable_Builder_Versions'] : ($this->services['Yoast\\WP\\SEO\\Values\\Indexables\\Indexable_Builder_Versions'] = new \Yoast\WP\SEO\Values\Indexables\Indexable_Builder_Versions())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] = new \Yoast\WP\SEO\Helpers\Options_Helper())) && false ?: '_'}, $a, ${($_ = isset($this->services['wpdb']) ? $this->services['wpdb'] : $this->getWpdbService()) && false ?: '_'});
|
||||
|
||||
$instance->set_social_image_helpers(${($_ = 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\\Open_Graph\\Image_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Open_Graph\\Image_Helper'] : $this->getImageHelper2Service()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Twitter\\Image_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Twitter\\Image_Helper'] : $this->getImageHelper4Service()) && false ?: '_'});
|
||||
|
||||
@@ -1660,7 +1703,7 @@ class Cached_Container extends Container
|
||||
*/
|
||||
protected function getIndexCommandService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Commands\\Index_Command'] = new \Yoast\WP\SEO\Commands\Index_Command(${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Post_Indexation_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Post_Indexation_Action'] : $this->getIndexablePostIndexationActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Term_Indexation_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Term_Indexation_Action'] : $this->getIndexableTermIndexationActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Post_Type_Archive_Indexation_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Post_Type_Archive_Indexation_Action'] : $this->getIndexablePostTypeArchiveIndexationActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_General_Indexation_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_General_Indexation_Action'] : $this->getIndexableGeneralIndexationActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Indexing_Complete_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Indexing_Complete_Action'] : $this->getIndexableIndexingCompleteActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexing_Prepare_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexing_Prepare_Action'] : $this->getIndexingPrepareActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Post_Link_Indexing_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Post_Link_Indexing_Action'] : $this->getPostLinkIndexingActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Term_Link_Indexing_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Term_Link_Indexing_Action'] : $this->getTermLinkIndexingActionService()) && false ?: '_'});
|
||||
return $this->services['Yoast\\WP\\SEO\\Commands\\Index_Command'] = new \Yoast\WP\SEO\Commands\Index_Command(${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Post_Indexation_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Post_Indexation_Action'] : $this->getIndexablePostIndexationActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Term_Indexation_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Term_Indexation_Action'] : $this->getIndexableTermIndexationActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Post_Type_Archive_Indexation_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Post_Type_Archive_Indexation_Action'] : $this->getIndexablePostTypeArchiveIndexationActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_General_Indexation_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_General_Indexation_Action'] : $this->getIndexableGeneralIndexationActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Indexing_Complete_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Indexing_Complete_Action'] : $this->getIndexableIndexingCompleteActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexing_Prepare_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexing_Prepare_Action'] : $this->getIndexingPrepareActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Post_Link_Indexing_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Post_Link_Indexing_Action'] : $this->getPostLinkIndexingActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Term_Link_Indexing_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Term_Link_Indexing_Action'] : $this->getTermLinkIndexingActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Indexable_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Indexable_Helper'] : $this->getIndexableHelperService()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1733,6 +1776,16 @@ class Cached_Container extends Container
|
||||
return $this->services['Yoast\\WP\\SEO\\Conditionals\\Admin\\Posts_Overview_Or_Ajax_Conditional'] = new \Yoast\WP\SEO\Conditionals\Admin\Posts_Overview_Or_Ajax_Conditional();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Conditionals\Admin\Yoast_Admin_Conditional' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Conditionals\Admin\Yoast_Admin_Conditional
|
||||
*/
|
||||
protected function getYoastAdminConditionalService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Conditionals\\Admin\\Yoast_Admin_Conditional'] = new \Yoast\WP\SEO\Conditionals\Admin\Yoast_Admin_Conditional(${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Current_Page_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Current_Page_Helper'] : $this->getCurrentPageHelperService()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Conditionals\Admin_Conditional' shared autowired service.
|
||||
*
|
||||
@@ -1753,6 +1806,16 @@ class Cached_Container extends Container
|
||||
return $this->services['Yoast\\WP\\SEO\\Conditionals\\Attachment_Redirections_Enabled_Conditional'] = new \Yoast\WP\SEO\Conditionals\Attachment_Redirections_Enabled_Conditional(${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] = new \Yoast\WP\SEO\Helpers\Options_Helper())) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Conditionals\Deactivating_Yoast_Seo_Conditional' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Conditionals\Deactivating_Yoast_Seo_Conditional
|
||||
*/
|
||||
protected function getDeactivatingYoastSeoConditionalService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Conditionals\\Deactivating_Yoast_Seo_Conditional'] = new \Yoast\WP\SEO\Conditionals\Deactivating_Yoast_Seo_Conditional();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Conditionals\Development_Conditional' shared autowired service.
|
||||
*
|
||||
@@ -1773,20 +1836,6 @@ class Cached_Container extends Container
|
||||
return $this->services['Yoast\\WP\\SEO\\Conditionals\\Front_End_Conditional'] = new \Yoast\WP\SEO\Conditionals\Front_End_Conditional();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Conditionals\Front_End_Inspector_Conditional' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Conditionals\Front_End_Inspector_Conditional
|
||||
*
|
||||
* @deprecated Yoast\WP\SEO\Conditionals\Front_End_Inspector_Conditional is deprecated since version 19.5!
|
||||
*/
|
||||
protected function getFrontEndInspectorConditionalService()
|
||||
{
|
||||
@trigger_error('Yoast\\WP\\SEO\\Conditionals\\Front_End_Inspector_Conditional is deprecated since version 19.5!', E_USER_DEPRECATED);
|
||||
|
||||
return $this->services['Yoast\\WP\\SEO\\Conditionals\\Front_End_Inspector_Conditional'] = new \Yoast\WP\SEO\Conditionals\Front_End_Inspector_Conditional();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Conditionals\Get_Request_Conditional' shared autowired service.
|
||||
*
|
||||
@@ -2187,6 +2236,26 @@ class Cached_Container extends Container
|
||||
return $this->services['Yoast\\WP\\SEO\\Conditionals\\User_Can_Publish_Posts_And_Pages_Conditional'] = new \Yoast\WP\SEO\Conditionals\User_Can_Publish_Posts_And_Pages_Conditional();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Conditionals\User_Profile_Conditional' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Conditionals\User_Profile_Conditional
|
||||
*/
|
||||
protected function getUserProfileConditionalService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Conditionals\\User_Profile_Conditional'] = new \Yoast\WP\SEO\Conditionals\User_Profile_Conditional();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Conditionals\WP_CRON_Enabled_Conditional' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Conditionals\WP_CRON_Enabled_Conditional
|
||||
*/
|
||||
protected function getWPCRONEnabledConditionalService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Conditionals\\WP_CRON_Enabled_Conditional'] = new \Yoast\WP\SEO\Conditionals\WP_CRON_Enabled_Conditional();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Conditionals\WP_Robots_Conditional' shared autowired service.
|
||||
*
|
||||
@@ -2637,6 +2706,26 @@ class Cached_Container extends Container
|
||||
return $this->services['Yoast\\WP\\SEO\\Config\\Wordproof_Translations'] = new \Yoast\WP\SEO\Config\Wordproof_Translations();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Content_Type_Visibility\Application\Content_Type_Visibility_Watcher_Actions' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Content_Type_Visibility\Application\Content_Type_Visibility_Watcher_Actions
|
||||
*/
|
||||
protected function getContentTypeVisibilityWatcherActionsService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Content_Type_Visibility\\Application\\Content_Type_Visibility_Watcher_Actions'] = new \Yoast\WP\SEO\Content_Type_Visibility\Application\Content_Type_Visibility_Watcher_Actions(${($_ = 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_Notification_Center']) ? $this->services['Yoast_Notification_Center'] : $this->getYoastNotificationCenterService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Content_Type_Visibility\\Application\\Content_Type_Visibility_Dismiss_Notifications']) ? $this->services['Yoast\\WP\\SEO\\Content_Type_Visibility\\Application\\Content_Type_Visibility_Dismiss_Notifications'] : $this->getContentTypeVisibilityDismissNotificationsService()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Content_Type_Visibility\User_Interface\Content_Type_Visibility_Dismiss_New_Route' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Content_Type_Visibility\User_Interface\Content_Type_Visibility_Dismiss_New_Route
|
||||
*/
|
||||
protected function getContentTypeVisibilityDismissNewRouteService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Content_Type_Visibility\\User_Interface\\Content_Type_Visibility_Dismiss_New_Route'] = new \Yoast\WP\SEO\Content_Type_Visibility\User_Interface\Content_Type_Visibility_Dismiss_New_Route(${($_ = isset($this->services['Yoast\\WP\\SEO\\Content_Type_Visibility\\Application\\Content_Type_Visibility_Dismiss_Notifications']) ? $this->services['Yoast\\WP\\SEO\\Content_Type_Visibility\\Application\\Content_Type_Visibility_Dismiss_Notifications'] : $this->getContentTypeVisibilityDismissNotificationsService()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Context\Meta_Tags_Context' shared autowired service.
|
||||
*
|
||||
@@ -3543,7 +3632,7 @@ class Cached_Container extends Container
|
||||
*/
|
||||
protected function getBackgroundIndexingIntegrationService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Admin\\Background_Indexing_Integration'] = new \Yoast\WP\SEO\Integrations\Admin\Background_Indexing_Integration(${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Post_Indexation_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Post_Indexation_Action'] : $this->getIndexablePostIndexationActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Term_Indexation_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Term_Indexation_Action'] : $this->getIndexableTermIndexationActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Post_Type_Archive_Indexation_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Post_Type_Archive_Indexation_Action'] : $this->getIndexablePostTypeArchiveIndexationActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_General_Indexation_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_General_Indexation_Action'] : $this->getIndexableGeneralIndexationActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Indexing_Complete_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Indexing_Complete_Action'] : $this->getIndexableIndexingCompleteActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Post_Link_Indexing_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Post_Link_Indexing_Action'] : $this->getPostLinkIndexingActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Term_Link_Indexing_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Term_Link_Indexing_Action'] : $this->getTermLinkIndexingActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Indexing_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Indexing_Helper'] : $this->getIndexingHelperService()) && false ?: '_'});
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Admin\\Background_Indexing_Integration'] = new \Yoast\WP\SEO\Integrations\Admin\Background_Indexing_Integration(${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Post_Indexation_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Post_Indexation_Action'] : $this->getIndexablePostIndexationActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Term_Indexation_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Term_Indexation_Action'] : $this->getIndexableTermIndexationActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Post_Type_Archive_Indexation_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Post_Type_Archive_Indexation_Action'] : $this->getIndexablePostTypeArchiveIndexationActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_General_Indexation_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_General_Indexation_Action'] : $this->getIndexableGeneralIndexationActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Indexing_Complete_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Indexing_Complete_Action'] : $this->getIndexableIndexingCompleteActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Post_Link_Indexing_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Post_Link_Indexing_Action'] : $this->getPostLinkIndexingActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Term_Link_Indexing_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Term_Link_Indexing_Action'] : $this->getTermLinkIndexingActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Indexing_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Indexing_Helper'] : $this->getIndexingHelperService()) && 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\\Conditionals\\Yoast_Admin_And_Dashboard_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Yoast_Admin_And_Dashboard_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Yoast_Admin_And_Dashboard_Conditional'] = new \Yoast\WP\SEO\Conditionals\Yoast_Admin_And_Dashboard_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Get_Request_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Get_Request_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Get_Request_Conditional'] = new \Yoast\WP\SEO\Conditionals\Get_Request_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\WP_CRON_Enabled_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\WP_CRON_Enabled_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\WP_CRON_Enabled_Conditional'] = new \Yoast\WP\SEO\Conditionals\WP_CRON_Enabled_Conditional())) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3754,9 +3843,13 @@ class Cached_Container extends Container
|
||||
* Gets the public 'Yoast\WP\SEO\Integrations\Admin\Old_Premium_Integration' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Integrations\Admin\Old_Premium_Integration
|
||||
*
|
||||
* @deprecated Yoast\WP\SEO\Integrations\Admin\Old_Premium_Integration is deprecated since version 20.10!
|
||||
*/
|
||||
protected function getOldPremiumIntegrationService()
|
||||
{
|
||||
@trigger_error('Yoast\\WP\\SEO\\Integrations\\Admin\\Old_Premium_Integration is deprecated since version 20.10!', E_USER_DEPRECATED);
|
||||
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Admin\\Old_Premium_Integration'] = new \Yoast\WP\SEO\Integrations\Admin\Old_Premium_Integration(${($_ = 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\\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\\Capability_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Capability_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Capability_Helper'] = new \Yoast\WP\SEO\Helpers\Capability_Helper())) && false ?: '_'}, ${($_ = 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 ?: '_'});
|
||||
}
|
||||
|
||||
@@ -3804,6 +3897,26 @@ class Cached_Container extends Container
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Admin\\Workouts_Integration'] = new \Yoast\WP\SEO\Integrations\Admin\Workouts_Integration(${($_ = isset($this->services['WPSEO_Addon_Manager']) ? $this->services['WPSEO_Addon_Manager'] : $this->getWPSEOAddonManagerService()) && false ?: '_'}, ${($_ = isset($this->services['WPSEO_Admin_Asset_Manager']) ? $this->services['WPSEO_Admin_Asset_Manager'] : $this->getWPSEOAdminAssetManagerService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] = new \Yoast\WP\SEO\Helpers\Options_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\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 ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Integrations\Alerts\Black_Friday_Product_Editor_Checklist_Notification' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Integrations\Alerts\Black_Friday_Product_Editor_Checklist_Notification
|
||||
*/
|
||||
protected function getBlackFridayProductEditorChecklistNotificationService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Alerts\\Black_Friday_Product_Editor_Checklist_Notification'] = new \Yoast\WP\SEO\Integrations\Alerts\Black_Friday_Product_Editor_Checklist_Notification();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Integrations\Alerts\Black_Friday_Promo_Notification' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Integrations\Alerts\Black_Friday_Promo_Notification
|
||||
*/
|
||||
protected function getBlackFridayPromoNotificationService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Alerts\\Black_Friday_Promo_Notification'] = new \Yoast\WP\SEO\Integrations\Alerts\Black_Friday_Promo_Notification();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Integrations\Alerts\Jetpack_Boost_Pre_Publish' shared autowired service.
|
||||
*
|
||||
@@ -4127,7 +4240,17 @@ class Cached_Container extends Container
|
||||
*/
|
||||
protected function getSettingsIntegrationService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Settings_Integration'] = new \Yoast\WP\SEO\Integrations\Settings_Integration(${($_ = isset($this->services['WPSEO_Admin_Asset_Manager']) ? $this->services['WPSEO_Admin_Asset_Manager'] : $this->getWPSEOAdminAssetManagerService()) && false ?: '_'}, ${($_ = isset($this->services['WPSEO_Replace_Vars']) ? $this->services['WPSEO_Replace_Vars'] : $this->getWPSEOReplaceVarsService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Config\\Schema_Types']) ? $this->services['Yoast\\WP\\SEO\\Config\\Schema_Types'] : ($this->services['Yoast\\WP\\SEO\\Config\\Schema_Types'] = new \Yoast\WP\SEO\Config\Schema_Types())) && 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\\Post_Type_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Post_Type_Helper'] : $this->getPostTypeHelperService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Language_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Language_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Language_Helper'] = new \Yoast\WP\SEO\Helpers\Language_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Taxonomy_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Taxonomy_Helper'] : $this->getTaxonomyHelperService()) && 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\\Woocommerce_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Woocommerce_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Woocommerce_Helper'] = new \Yoast\WP\SEO\Helpers\Woocommerce_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Schema\\Article_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Schema\\Article_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Schema\\Article_Helper'] = new \Yoast\WP\SEO\Helpers\Schema\Article_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 ?: '_'});
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Settings_Integration'] = new \Yoast\WP\SEO\Integrations\Settings_Integration(${($_ = isset($this->services['WPSEO_Admin_Asset_Manager']) ? $this->services['WPSEO_Admin_Asset_Manager'] : $this->getWPSEOAdminAssetManagerService()) && false ?: '_'}, ${($_ = isset($this->services['WPSEO_Replace_Vars']) ? $this->services['WPSEO_Replace_Vars'] : $this->getWPSEOReplaceVarsService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Config\\Schema_Types']) ? $this->services['Yoast\\WP\\SEO\\Config\\Schema_Types'] : ($this->services['Yoast\\WP\\SEO\\Config\\Schema_Types'] = new \Yoast\WP\SEO\Config\Schema_Types())) && 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\\Post_Type_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Post_Type_Helper'] : $this->getPostTypeHelperService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Language_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Language_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Language_Helper'] = new \Yoast\WP\SEO\Helpers\Language_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Taxonomy_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Taxonomy_Helper'] : $this->getTaxonomyHelperService()) && 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\\Woocommerce_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Woocommerce_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Woocommerce_Helper'] = new \Yoast\WP\SEO\Helpers\Woocommerce_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Schema\\Article_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Schema\\Article_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Schema\\Article_Helper'] = new \Yoast\WP\SEO\Helpers\Schema\Article_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\\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\\Content_Type_Visibility\\Application\\Content_Type_Visibility_Dismiss_Notifications']) ? $this->services['Yoast\\WP\\SEO\\Content_Type_Visibility\\Application\\Content_Type_Visibility_Dismiss_Notifications'] : $this->getContentTypeVisibilityDismissNotificationsService()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Integrations\Support_Integration' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Integrations\Support_Integration
|
||||
*/
|
||||
protected function getSupportIntegrationService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Support_Integration'] = new \Yoast\WP\SEO\Integrations\Support_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 ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4171,7 +4294,7 @@ class Cached_Container extends Container
|
||||
*/
|
||||
protected function getElementorService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Third_Party\\Elementor'] = new \Yoast\WP\SEO\Integrations\Third_Party\Elementor(${($_ = isset($this->services['WPSEO_Admin_Asset_Manager']) ? $this->services['WPSEO_Admin_Asset_Manager'] : $this->getWPSEOAdminAssetManagerService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] = new \Yoast\WP\SEO\Helpers\Options_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Capability_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Capability_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Capability_Helper'] = new \Yoast\WP\SEO\Helpers\Capability_Helper())) && false ?: '_'});
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\Third_Party\\Elementor'] = new \Yoast\WP\SEO\Integrations\Third_Party\Elementor(${($_ = isset($this->services['WPSEO_Admin_Asset_Manager']) ? $this->services['WPSEO_Admin_Asset_Manager'] : $this->getWPSEOAdminAssetManagerService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] = new \Yoast\WP\SEO\Helpers\Options_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Capability_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Capability_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Capability_Helper'] = new \Yoast\WP\SEO\Helpers\Capability_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Promotions\\Application\\Promotion_Manager']) ? $this->services['Yoast\\WP\\SEO\\Promotions\\Application\\Promotion_Manager'] : $this->getPromotionManagerService()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4598,6 +4721,56 @@ class Cached_Container extends Container
|
||||
return $this->services['Yoast\\WP\\SEO\\Integrations\\XMLRPC'] = new \Yoast\WP\SEO\Integrations\XMLRPC();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Introductions\Application\Ai_Generate_Titles_And_Descriptions_Introduction_Upsell' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Introductions\Application\Ai_Generate_Titles_And_Descriptions_Introduction_Upsell
|
||||
*/
|
||||
protected function getAiGenerateTitlesAndDescriptionsIntroductionUpsellService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Introductions\\Application\\Ai_Generate_Titles_And_Descriptions_Introduction_Upsell'] = new \Yoast\WP\SEO\Introductions\Application\Ai_Generate_Titles_And_Descriptions_Introduction_Upsell(${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper'] = new \Yoast\WP\SEO\Helpers\Product_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] = new \Yoast\WP\SEO\Helpers\Options_Helper())) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Introductions\Application\Introductions_Collector' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Introductions\Application\Introductions_Collector
|
||||
*/
|
||||
protected function getIntroductionsCollectorService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Introductions\\Application\\Introductions_Collector'] = new \Yoast\WP\SEO\Introductions\Application\Introductions_Collector(${($_ = isset($this->services['Yoast\\WP\\SEO\\Introductions\\Application\\Ai_Generate_Titles_And_Descriptions_Introduction_Upsell']) ? $this->services['Yoast\\WP\\SEO\\Introductions\\Application\\Ai_Generate_Titles_And_Descriptions_Introduction_Upsell'] : $this->getAiGenerateTitlesAndDescriptionsIntroductionUpsellService()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Introductions\Infrastructure\Wistia_Embed_Permission_Repository' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Introductions\Infrastructure\Wistia_Embed_Permission_Repository
|
||||
*/
|
||||
protected function getWistiaEmbedPermissionRepositoryService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Introductions\\Infrastructure\\Wistia_Embed_Permission_Repository'] = new \Yoast\WP\SEO\Introductions\Infrastructure\Wistia_Embed_Permission_Repository(${($_ = 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 ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Introductions\User_Interface\Introductions_Integration' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Introductions\User_Interface\Introductions_Integration
|
||||
*/
|
||||
protected function getIntroductionsIntegrationService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Introductions\\User_Interface\\Introductions_Integration'] = new \Yoast\WP\SEO\Introductions\User_Interface\Introductions_Integration(${($_ = isset($this->services['WPSEO_Admin_Asset_Manager']) ? $this->services['WPSEO_Admin_Asset_Manager'] : $this->getWPSEOAdminAssetManagerService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Introductions\\Application\\Introductions_Collector']) ? $this->services['Yoast\\WP\\SEO\\Introductions\\Application\\Introductions_Collector'] : $this->getIntroductionsCollectorService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Product_Helper'] = new \Yoast\WP\SEO\Helpers\Product_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\User_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\User_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\User_Helper'] = new \Yoast\WP\SEO\Helpers\User_Helper())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Short_Link_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Short_Link_Helper'] : $this->getShortLinkHelperService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Introductions\\Infrastructure\\Wistia_Embed_Permission_Repository']) ? $this->services['Yoast\\WP\\SEO\\Introductions\\Infrastructure\\Wistia_Embed_Permission_Repository'] : $this->getWistiaEmbedPermissionRepositoryService()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Introductions\User_Interface\Wistia_Embed_Permission_Route' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Introductions\User_Interface\Wistia_Embed_Permission_Route
|
||||
*/
|
||||
protected function getWistiaEmbedPermissionRouteService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Introductions\\User_Interface\\Wistia_Embed_Permission_Route'] = new \Yoast\WP\SEO\Introductions\User_Interface\Wistia_Embed_Permission_Route(${($_ = 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 ?: '_'}, ${($_ = 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 ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Loader' shared autowired service.
|
||||
*
|
||||
@@ -4634,6 +4807,8 @@ class Cached_Container extends Container
|
||||
$instance->register_migration('free', '20210817092415', 'Yoast\\WP\\SEO\\Config\\Migrations\\AddVersionColumnToIndexables');
|
||||
$instance->register_migration('free', '20211020091404', 'Yoast\\WP\\SEO\\Config\\Migrations\\AddObjectTimestamps');
|
||||
$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_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');
|
||||
@@ -4663,10 +4838,11 @@ class Cached_Container extends Container
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Admin\\Menu_Badge_Integration');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Admin\\Migration_Error_Integration');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Admin\\Old_Configuration_Integration');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Admin\\Old_Premium_Integration');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Admin\\Redirect_Integration');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Admin\\Redirects_Page_Integration');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Admin\\Workouts_Integration');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Alerts\\Black_Friday_Product_Editor_Checklist_Notification');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Alerts\\Black_Friday_Promo_Notification');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Alerts\\Jetpack_Boost_Pre_Publish');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Alerts\\Webinar_Promo_Notification');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Blocks\\Internal_Linking_Category');
|
||||
@@ -4698,6 +4874,7 @@ class Cached_Container extends Container
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Front_End\\WP_Robots_Integration');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Primary_Category');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Settings_Integration');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Support_Integration');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Third_Party\\AMP');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Third_Party\\BbPress');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Third_Party\\Elementor');
|
||||
@@ -4742,6 +4919,8 @@ class Cached_Container extends Container
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Watchers\\Primary_Term_Watcher');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Watchers\\Search_Engines_Discouraged_Watcher');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\XMLRPC');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\Introductions\\User_Interface\\Introductions_Integration');
|
||||
$instance->register_route('Yoast\\WP\\SEO\\Introductions\\User_Interface\\Wistia_Embed_Permission_Route');
|
||||
$instance->register_route('Yoast\\WP\\SEO\\Routes\\Alert_Dismissal_Route');
|
||||
$instance->register_route('Yoast\\WP\\SEO\\Routes\\First_Time_Configuration_Route');
|
||||
$instance->register_route('Yoast\\WP\\SEO\\Routes\\Importing_Route');
|
||||
@@ -4754,6 +4933,7 @@ class Cached_Container extends Container
|
||||
$instance->register_route('Yoast\\WP\\SEO\\Routes\\Wincher_Route');
|
||||
$instance->register_route('Yoast\\WP\\SEO\\Routes\\Workouts_Route');
|
||||
$instance->register_route('Yoast\\WP\\SEO\\Routes\\Yoast_Head_REST_Field');
|
||||
$instance->register_integration('Yoast\\WP\\SEO\\User_Profiles_Additions\\User_Interface\\User_Profiles_Additions_Ui');
|
||||
|
||||
return $instance;
|
||||
}
|
||||
@@ -4970,6 +5150,36 @@ class Cached_Container extends Container
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Promotions\Application\Promotion_Manager' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Promotions\Application\Promotion_Manager
|
||||
*/
|
||||
protected function getPromotionManagerService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Promotions\\Application\\Promotion_Manager'] = new \Yoast\WP\SEO\Promotions\Application\Promotion_Manager(${($_ = isset($this->services['Yoast\\WP\\SEO\\Promotions\\Domain\\Black_Friday_Checklist_Promotion']) ? $this->services['Yoast\\WP\\SEO\\Promotions\\Domain\\Black_Friday_Checklist_Promotion'] : ($this->services['Yoast\\WP\\SEO\\Promotions\\Domain\\Black_Friday_Checklist_Promotion'] = new \Yoast\WP\SEO\Promotions\Domain\Black_Friday_Checklist_Promotion())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Promotions\\Domain\\Black_Friday_Promotion']) ? $this->services['Yoast\\WP\\SEO\\Promotions\\Domain\\Black_Friday_Promotion'] : ($this->services['Yoast\\WP\\SEO\\Promotions\\Domain\\Black_Friday_Promotion'] = new \Yoast\WP\SEO\Promotions\Domain\Black_Friday_Promotion())) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Promotions\Domain\Black_Friday_Checklist_Promotion' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Promotions\Domain\Black_Friday_Checklist_Promotion
|
||||
*/
|
||||
protected function getBlackFridayChecklistPromotionService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Promotions\\Domain\\Black_Friday_Checklist_Promotion'] = new \Yoast\WP\SEO\Promotions\Domain\Black_Friday_Checklist_Promotion();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Promotions\Domain\Black_Friday_Promotion' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Promotions\Domain\Black_Friday_Promotion
|
||||
*/
|
||||
protected function getBlackFridayPromotionService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Promotions\\Domain\\Black_Friday_Promotion'] = new \Yoast\WP\SEO\Promotions\Domain\Black_Friday_Promotion();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Repositories\Indexable_Cleanup_Repository' shared autowired service.
|
||||
*
|
||||
@@ -5463,6 +5673,16 @@ class Cached_Container extends Container
|
||||
return $this->services['Yoast\\WP\\SEO\\Surfaces\\Twitter_Helpers_Surface'] = new \Yoast\WP\SEO\Surfaces\Twitter_Helpers_Surface($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\User_Profiles_Additions\User_Interface\User_Profiles_Additions_Ui' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\User_Profiles_Additions\User_Interface\User_Profiles_Additions_Ui
|
||||
*/
|
||||
protected function getUserProfilesAdditionsUiService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\User_Profiles_Additions\\User_Interface\\User_Profiles_Additions_Ui'] = new \Yoast\WP\SEO\User_Profiles_Additions\User_Interface\User_Profiles_Additions_Ui();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Yoast\WP\SEO\Values\Images' shared autowired service.
|
||||
*
|
||||
@@ -5546,4 +5766,14 @@ class Cached_Container extends Container
|
||||
{
|
||||
return $this->services['wpdb'] = \Yoast\WP\SEO\WordPress\Wrapper::get_wpdb();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'Yoast\WP\SEO\Content_Type_Visibility\Application\Content_Type_Visibility_Dismiss_Notifications' shared autowired service.
|
||||
*
|
||||
* @return \Yoast\WP\SEO\Content_Type_Visibility\Application\Content_Type_Visibility_Dismiss_Notifications
|
||||
*/
|
||||
protected function getContentTypeVisibilityDismissNotificationsService()
|
||||
{
|
||||
return $this->services['Yoast\\WP\\SEO\\Content_Type_Visibility\\Application\\Content_Type_Visibility_Dismiss_Notifications'] = new \Yoast\WP\SEO\Content_Type_Visibility\Application\Content_Type_Visibility_Dismiss_Notifications(${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] = new \Yoast\WP\SEO\Helpers\Options_Helper())) && false ?: '_'});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ class Breadcrumbs_Generator implements Generator_Interface {
|
||||
$indexables = \is_array( $indexables ) ? $indexables : [];
|
||||
$indexables = \array_filter(
|
||||
$indexables,
|
||||
function ( $indexable ) {
|
||||
static function ( $indexable ) {
|
||||
return \is_a( $indexable, Indexable::class );
|
||||
}
|
||||
);
|
||||
|
||||
@@ -184,6 +184,7 @@ class Schema_Generator implements Generator_Interface {
|
||||
foreach ( $context->blocks as $block_type => $blocks ) {
|
||||
foreach ( $blocks as $block ) {
|
||||
$block_type = \strtolower( $block['blockName'] );
|
||||
|
||||
/**
|
||||
* Filter: 'wpseo_schema_block_<block-type>'.
|
||||
* This filter is documented in the `generate_graph()` function in this class.
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Yoast\WP\SEO\Generators\Schema;
|
||||
|
||||
use WP_User;
|
||||
use Yoast\WP\SEO\Config\Schema_IDs;
|
||||
|
||||
/**
|
||||
@@ -49,7 +50,7 @@ class Article extends Abstract_Schema_Piece {
|
||||
'@id' => $this->context->canonical . Schema_IDs::ARTICLE_HASH,
|
||||
'isPartOf' => [ '@id' => $this->context->main_schema_id ],
|
||||
'author' => [
|
||||
'name' => ( $author instanceof \WP_User ) ? $this->helpers->schema->html->smart_strip_tags( $author->display_name ) : '',
|
||||
'name' => ( $author instanceof WP_User ) ? $this->helpers->schema->html->smart_strip_tags( $author->display_name ) : '',
|
||||
'@id' => $this->helpers->schema->id->get_user_schema_id( $this->context->post->post_author, $this->context ),
|
||||
],
|
||||
'headline' => $this->helpers->schema->html->smart_strip_tags( $this->helpers->post->get_post_title_with_fallback( $this->context->id ) ),
|
||||
@@ -225,9 +226,6 @@ class Article extends Abstract_Schema_Piece {
|
||||
$characters .= \mb_strtoupper( $characters );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Remove characters from HTML entities.
|
||||
$post_content = \preg_replace( '@&[a-z0-9]+;@i', ' ', \htmlentities( $post_content ) );
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ class FAQ extends Abstract_Schema_Piece {
|
||||
private function generate_ids() {
|
||||
$ids = [];
|
||||
foreach ( $this->context->blocks['yoast/faq-block'] as $block ) {
|
||||
foreach ( $block['attrs']['questions'] as $index => $question ) {
|
||||
foreach ( $block['attrs']['questions'] as $question ) {
|
||||
if ( ! isset( $question['jsonAnswer'] ) || empty( $question['jsonAnswer'] ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ class HowTo extends Abstract_Schema_Piece {
|
||||
* @param array $step The step block data.
|
||||
*/
|
||||
private function add_step_image( &$schema_step, $step ) {
|
||||
if ( isset( $step['text'] ) && is_array( $step['text'] ) ) {
|
||||
if ( isset( $step['text'] ) && \is_array( $step['text'] ) ) {
|
||||
foreach ( $step['text'] as $line ) {
|
||||
if ( \is_array( $line ) && isset( $line['type'] ) && $line['type'] === 'img' ) {
|
||||
$schema_step['image'] = $this->get_image_schema( \esc_url( $line['props']['src'] ) );
|
||||
|
||||
@@ -2,11 +2,6 @@
|
||||
|
||||
namespace Yoast\WP\SEO\Helpers;
|
||||
|
||||
use Yoast\WP\SEO\Helpers\Current_Page_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Url_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Redirect_Helper;
|
||||
|
||||
/**
|
||||
* Class Crawl_Cleanup_Helper.
|
||||
*
|
||||
@@ -81,6 +76,16 @@ class Crawl_Cleanup_Helper {
|
||||
* @return array The list of the allowed extra vars.
|
||||
*/
|
||||
public function get_allowed_extravars() {
|
||||
$default_allowed_extravars = [
|
||||
'utm_source',
|
||||
'utm_medium',
|
||||
'utm_campaign',
|
||||
'utm_term',
|
||||
'utm_content',
|
||||
'gclid',
|
||||
'gtm_debug',
|
||||
];
|
||||
|
||||
/**
|
||||
* Filter: 'Yoast\WP\SEO\allowlist_permalink_vars' - Allows plugins to register their own variables not to clean.
|
||||
*
|
||||
@@ -88,7 +93,8 @@ class Crawl_Cleanup_Helper {
|
||||
*
|
||||
* @param array $allowed_extravars The list of the allowed vars (empty by default).
|
||||
*/
|
||||
$allowed_extravars = \apply_filters( 'Yoast\WP\SEO\allowlist_permalink_vars', [] );
|
||||
|
||||
$allowed_extravars = \apply_filters( 'Yoast\WP\SEO\allowlist_permalink_vars', $default_allowed_extravars );
|
||||
|
||||
$clean_permalinks_extra_variables = $this->options_helper->get( 'clean_permalinks_extra_variables' );
|
||||
|
||||
@@ -253,7 +259,7 @@ class Crawl_Cleanup_Helper {
|
||||
* Redirects clean permalink.
|
||||
*
|
||||
* @param string $proper_url The proper URL.
|
||||
* @return void.
|
||||
* @return void
|
||||
*/
|
||||
public function do_clean_redirect( $proper_url ) {
|
||||
$this->redirect_helper->set_header( 'Content-Type: redirect', true );
|
||||
|
||||
@@ -418,7 +418,7 @@ class Current_Page_Helper {
|
||||
$current_page = \wp_unslash( $_GET['page'] );
|
||||
return \strpos( $current_page, 'wpseo_' ) === 0;
|
||||
}
|
||||
return null;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -434,7 +434,7 @@ class Current_Page_Helper {
|
||||
return \sanitize_text_field( \wp_unslash( $_GET['page'] ) );
|
||||
}
|
||||
|
||||
return null;
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -297,8 +297,8 @@ class Image_Helper {
|
||||
/**
|
||||
* Find an attachment ID for a given URL.
|
||||
*
|
||||
* @param string $url The URL to find the attachment for.
|
||||
* @param bool $use_link_table Whether the SEO Links table will be used to retrieve the id.
|
||||
* @param string $url The URL to find the attachment for.
|
||||
* @param bool $use_link_table Whether the SEO Links table will be used to retrieve the id.
|
||||
*
|
||||
* @return int The found attachment ID, or 0 if none was found.
|
||||
*/
|
||||
@@ -308,7 +308,8 @@ class Image_Helper {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( ! $this->options_helper->get( 'disable-attachment' ) ) {
|
||||
/** The `wpseo_force_creating_and_using_attachment_indexables` filter is documented in indexable-link-builder.php */
|
||||
if ( ! $this->options_helper->get( 'disable-attachment' ) || \apply_filters( 'wpseo_force_creating_and_using_attachment_indexables', false ) ) {
|
||||
// Strip out the size part of an image URL.
|
||||
$url = \preg_replace( '/(.*)-\d+x\d+\.(jpeg|jpg|png|gif)$/', '$1.$2', $url );
|
||||
|
||||
|
||||
@@ -48,6 +48,13 @@ class Indexing_Helper {
|
||||
*/
|
||||
protected $indexing_actions;
|
||||
|
||||
/**
|
||||
* The indexation actions that can be done in the background.
|
||||
*
|
||||
* @var Indexation_Action_Interface[]|Limited_Indexing_Action_Interface[]
|
||||
*/
|
||||
protected $background_indexing_actions;
|
||||
|
||||
/**
|
||||
* The indexable repository.
|
||||
*
|
||||
@@ -100,6 +107,9 @@ class Indexing_Helper {
|
||||
$post_link_indexing_action,
|
||||
$term_link_indexing_action,
|
||||
];
|
||||
|
||||
// Coincidentally, the background indexing actions are the same with the Free indexing actions for now.
|
||||
$this->background_indexing_actions = $this->indexing_actions;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -307,15 +317,20 @@ class Indexing_Helper {
|
||||
/**
|
||||
* Returns a limited number of unindexed objects.
|
||||
*
|
||||
* @param int $limit Limit the number of unindexed objects that are counted.
|
||||
* @param int $limit Limit the number of unindexed objects that are counted.
|
||||
* @param Indexation_Action_Interface[]|Limited_Indexing_Action_Interface[] $actions The actions whose counts will be calculated.
|
||||
*
|
||||
* @return int The total number of unindexed objects.
|
||||
*/
|
||||
public function get_limited_unindexed_count( $limit ) {
|
||||
public function get_limited_unindexed_count( $limit, $actions = [] ) {
|
||||
$unindexed_count = 0;
|
||||
|
||||
foreach ( $this->indexing_actions as $indexing_action ) {
|
||||
$unindexed_count += $indexing_action->get_limited_unindexed_count( $limit - $unindexed_count + 1 );
|
||||
if ( empty( $actions ) ) {
|
||||
$actions = $this->indexing_actions;
|
||||
}
|
||||
|
||||
foreach ( $actions as $action ) {
|
||||
$unindexed_count += $action->get_limited_unindexed_count( $limit - $unindexed_count + 1 );
|
||||
if ( $unindexed_count > $limit ) {
|
||||
return $unindexed_count;
|
||||
}
|
||||
@@ -332,7 +347,7 @@ class Indexing_Helper {
|
||||
* @return int The total number of unindexed objects.
|
||||
*/
|
||||
public function get_limited_filtered_unindexed_count( $limit ) {
|
||||
$unindexed_count = $this->get_limited_unindexed_count( $limit );
|
||||
$unindexed_count = $this->get_limited_unindexed_count( $limit, $this->indexing_actions );
|
||||
|
||||
if ( $unindexed_count > $limit ) {
|
||||
return $unindexed_count;
|
||||
@@ -348,4 +363,29 @@ class Indexing_Helper {
|
||||
*/
|
||||
return \apply_filters( 'wpseo_indexing_get_limited_unindexed_count', $unindexed_count, $limit );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the total number of unindexed objects that can be indexed in the background and applies a filter for third party integrations.
|
||||
*
|
||||
* @param int $limit Limit the number of unindexed objects that are counted.
|
||||
*
|
||||
* @return int The total number of unindexed objects that can be indexed in the background.
|
||||
*/
|
||||
public function get_limited_filtered_unindexed_count_background( $limit ) {
|
||||
$unindexed_count = $this->get_limited_unindexed_count( $limit, $this->background_indexing_actions );
|
||||
|
||||
if ( $unindexed_count > $limit ) {
|
||||
return $unindexed_count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter: 'wpseo_indexing_get_limited_unindexed_count_background' - Allow changing the amount of unindexed objects that can be indexed in the background,
|
||||
* and allow for a maximum number of items counted to improve performance.
|
||||
*
|
||||
* @param int $unindexed_count The amount of unindexed objects.
|
||||
* @param int|false $limit Limit the number of unindexed objects that need to be counted.
|
||||
* False if it doesn't need to be limited.
|
||||
*/
|
||||
return \apply_filters( 'wpseo_indexing_get_limited_unindexed_count_background', $unindexed_count, $limit );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,12 @@ class Pagination_Helper {
|
||||
public function get_paginated_url( $url, $page, $add_pagination_base = true, $pagination_query_name = 'page' ) {
|
||||
$wp_rewrite = $this->wp_rewrite_wrapper->get();
|
||||
|
||||
if ( $wp_rewrite->using_permalinks() ) {
|
||||
$key_query_loop = $this->get_key_query_loop();
|
||||
if ( $key_query_loop ) {
|
||||
$pagination_query_name = $key_query_loop;
|
||||
}
|
||||
|
||||
if ( $wp_rewrite->using_permalinks() && ! $key_query_loop ) {
|
||||
$url_parts = \wp_parse_url( $url );
|
||||
$has_url_params = \array_key_exists( 'query', $url_parts );
|
||||
|
||||
@@ -113,9 +118,18 @@ class Pagination_Helper {
|
||||
* @return int The current archive page.
|
||||
*/
|
||||
public function get_current_archive_page_number() {
|
||||
$wp_query = $this->wp_query_wrapper->get_main_query();
|
||||
$wp_query = $this->wp_query_wrapper->get_main_query();
|
||||
$page_number = (int) $wp_query->get( 'paged' );
|
||||
if ( $page_number > 1 ) {
|
||||
return $page_number;
|
||||
}
|
||||
|
||||
return (int) $wp_query->get( 'paged' );
|
||||
$query_loop_page_number = $this->get_page_number_from_query_loop();
|
||||
|
||||
if ( $query_loop_page_number ) {
|
||||
return $query_loop_page_number;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -126,6 +140,12 @@ class Pagination_Helper {
|
||||
public function get_current_post_page_number() {
|
||||
$wp_query = $this->wp_query_wrapper->get_main_query();
|
||||
|
||||
$query_loop_page_number = $this->get_page_number_from_query_loop();
|
||||
|
||||
if ( $query_loop_page_number ) {
|
||||
return $query_loop_page_number;
|
||||
}
|
||||
|
||||
return (int) $wp_query->get( 'page' );
|
||||
}
|
||||
|
||||
@@ -141,7 +161,47 @@ class Pagination_Helper {
|
||||
return $page_number;
|
||||
}
|
||||
|
||||
$query_loop_page_number = $this->get_page_number_from_query_loop();
|
||||
|
||||
if ( $query_loop_page_number ) {
|
||||
return $query_loop_page_number;
|
||||
}
|
||||
|
||||
// Get the page number for a page in a paginated post.
|
||||
return \get_query_var( 'page', 1 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the key of the query loop.
|
||||
*
|
||||
* @return string The key of the query loop.
|
||||
*/
|
||||
public function get_key_query_loop() {
|
||||
$regex_pattern = '/^query-\d+-page$/';
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- not form data.
|
||||
foreach ( $_GET as $key => $value ) {
|
||||
if ( \preg_match( $regex_pattern, $key ) ) {
|
||||
return $key;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the page number from the query loop.
|
||||
*
|
||||
* @return string The page number from the query loop.
|
||||
*/
|
||||
public function get_page_number_from_query_loop() {
|
||||
$key_query_loop = $this->get_key_query_loop();
|
||||
|
||||
if ( $key_query_loop ) {
|
||||
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidated, WordPress.Security.NonceVerification.Recommended -- Validated in get_key_query_loop().
|
||||
$page_number = (int) $_GET[ $key_query_loop ];
|
||||
if ( $page_number > 1 ) {
|
||||
return $page_number;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,4 +50,13 @@ class Product_Helper {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the version.
|
||||
*
|
||||
* @return string The version.
|
||||
*/
|
||||
public function get_version() {
|
||||
return \WPSEO_VERSION;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ class Redirect_Helper {
|
||||
* @param string $header The header to set.
|
||||
*/
|
||||
public function set_header( $header ) {
|
||||
header( $header );
|
||||
\header( $header );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -57,6 +57,6 @@ class Redirect_Helper {
|
||||
* @param string $header The header to remove.
|
||||
*/
|
||||
public function remove_header( $header ) {
|
||||
header_remove( $header );
|
||||
\header_remove( $header );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,11 +48,11 @@ class Image_Helper {
|
||||
/**
|
||||
* Find an image based on its URL and generate a Schema object for it.
|
||||
*
|
||||
* @param string $schema_id The `@id` to use for the returned image.
|
||||
* @param string $url The image URL to base our object on.
|
||||
* @param string $caption An optional caption.
|
||||
* @param bool $add_hash Whether a hash will be added as a suffix in the @id.
|
||||
* @param bool $use_link_table Whether the SEO Links table will be used to retrieve the id.
|
||||
* @param string $schema_id The `@id` to use for the returned image.
|
||||
* @param string $url The image URL to base our object on.
|
||||
* @param string $caption An optional caption.
|
||||
* @param bool $add_hash Whether a hash will be added as a suffix in the @id.
|
||||
* @param bool $use_link_table Whether the SEO Links table will be used to retrieve the id.
|
||||
*
|
||||
* @return array Schema ImageObject array.
|
||||
*/
|
||||
|
||||
@@ -112,9 +112,9 @@ class Short_Link_Helper {
|
||||
];
|
||||
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information.
|
||||
if ( isset( $_GET['page'] ) && is_string( $_GET['page'] ) ) {
|
||||
if ( isset( $_GET['page'] ) && \is_string( $_GET['page'] ) ) {
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information.
|
||||
$admin_page = sanitize_text_field( wp_unslash( $_GET['page'] ) );
|
||||
$admin_page = \sanitize_text_field( \wp_unslash( $_GET['page'] ) );
|
||||
if ( ! empty( $admin_page ) ) {
|
||||
$data['screen'] = $admin_page;
|
||||
}
|
||||
|
||||
@@ -328,7 +328,7 @@ class Social_Profiles_Helper {
|
||||
return [ $twitter_setting ];
|
||||
}
|
||||
|
||||
/*** DEPRECATED METHODS ***/
|
||||
/* DEPRECATED METHODS */
|
||||
|
||||
/**
|
||||
* Gets the person social profile fields supported by us after WP filtering.
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Yoast\WP\SEO\Helpers;
|
||||
|
||||
use WPSEO_Shortlinker;
|
||||
use Yoast\WP\SEO\Conditionals\Non_Multisite_Conditional;
|
||||
use Yoast\WP\SEO\Config\Wincher_Client;
|
||||
use Yoast\WP\SEO\Exceptions\OAuth\Authentication_Failed_Exception;
|
||||
@@ -82,9 +83,11 @@ class Wincher_Helper {
|
||||
*/
|
||||
public function get_admin_global_links() {
|
||||
return [
|
||||
'links.wincher.website' => \WPSEO_Shortlinker::get( 'https://yoa.st/wincher-popup' ),
|
||||
'links.wincher.pricing' => \WPSEO_Shortlinker::get( 'https://yoa.st/wincher-popup-pricing' ),
|
||||
'links.wincher.login' => 'https://app.wincher.com/login?utm_medium=plugin&utm_source=yoast&referer=yoast&partner=yoast',
|
||||
'links.wincher.about' => WPSEO_Shortlinker::get( 'https://yoa.st/dashboard-about-wincher' ),
|
||||
'links.wincher.pricing' => WPSEO_Shortlinker::get( 'https://yoa.st/wincher-popup-pricing' ),
|
||||
'links.wincher.website' => WPSEO_Shortlinker::get( 'https://yoa.st/wincher-popup' ),
|
||||
'links.wincher.upgrade' => WPSEO_Shortlinker::get( 'https://yoa.st/wincher-upgrade' ),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
namespace Yoast\WP\SEO\Initializers;
|
||||
|
||||
use Yoast\WP\SEO\Conditionals\Front_End_Conditional;
|
||||
use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Url_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Redirect_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Crawl_Cleanup_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Redirect_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Url_Helper;
|
||||
|
||||
/**
|
||||
* Class Crawl_Cleanup_Permalinks.
|
||||
@@ -44,9 +44,9 @@ class Crawl_Cleanup_Permalinks implements Initializer_Interface {
|
||||
/**
|
||||
* Crawl Cleanup Basic integration constructor.
|
||||
*
|
||||
* @param Options_Helper $options_helper The option helper.
|
||||
* @param Url_Helper $url_helper The URL helper.
|
||||
* @param Redirect_Helper $redirect_helper The Redirect Helper.
|
||||
* @param Options_Helper $options_helper The option helper.
|
||||
* @param Url_Helper $url_helper The URL helper.
|
||||
* @param Redirect_Helper $redirect_helper The Redirect Helper.
|
||||
* @param Crawl_Cleanup_Helper $crawl_cleanup_helper The Crawl_Cleanup_Helper.
|
||||
*/
|
||||
public function __construct(
|
||||
@@ -118,7 +118,6 @@ class Crawl_Cleanup_Permalinks implements Initializer_Interface {
|
||||
$utms = [];
|
||||
$other_args = [];
|
||||
|
||||
|
||||
foreach ( $query as $query_arg ) {
|
||||
if ( \stripos( $query_arg, 'utm_' ) === 0 ) {
|
||||
$utms[] = $query_arg;
|
||||
|
||||
@@ -4,11 +4,11 @@ namespace Yoast\WP\SEO\Integrations;
|
||||
|
||||
use WPSEO_Addon_Manager;
|
||||
use WPSEO_Admin_Asset_Manager;
|
||||
use Yoast\WP\SEO\Helpers\Short_Link_Helper;
|
||||
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
|
||||
use Yoast\WP\SEO\Conditionals\User_Can_Manage_Wpseo_Options_Conditional;
|
||||
use Yoast\WP\SEO\Helpers\Current_Page_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Product_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Short_Link_Helper;
|
||||
|
||||
/**
|
||||
* Class Academy_Integration.
|
||||
@@ -46,7 +46,7 @@ class Academy_Integration implements Integration_Interface {
|
||||
private $shortlink_helper;
|
||||
|
||||
/**
|
||||
* Constructs Settings_Integration.
|
||||
* 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.
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
namespace Yoast\WP\SEO\Integrations\Admin;
|
||||
|
||||
use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
use Yoast\WP\SEO\Integrations\Integration_Interface;
|
||||
use Yoast\WP\SEO\Integrations\Cleanup_Integration;
|
||||
use Yoast\WP\SEO\Conditionals\No_Conditionals;
|
||||
use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
use Yoast\WP\SEO\Integrations\Cleanup_Integration;
|
||||
use Yoast\WP\SEO\Integrations\Integration_Interface;
|
||||
|
||||
/**
|
||||
* This integration registers a run of the cleanup routine whenever the plugin is activated.
|
||||
@@ -38,7 +38,7 @@ class Activation_Cleanup_Integration implements Integration_Interface {
|
||||
* @return void
|
||||
*/
|
||||
public function register_hooks() {
|
||||
add_action( 'wpseo_activate', [ $this, 'register_cleanup_routine' ], 11 );
|
||||
\add_action( 'wpseo_activate', [ $this, 'register_cleanup_routine' ], 11 );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -49,9 +49,9 @@ class Activation_Cleanup_Integration implements Integration_Interface {
|
||||
public function register_cleanup_routine() {
|
||||
$first_activated_on = $this->options_helper->get( 'first_activated_on', false );
|
||||
|
||||
if ( ! $first_activated_on || time() > ( $first_activated_on + ( MINUTE_IN_SECONDS * 5 ) ) ) {
|
||||
if ( ! $first_activated_on || \time() > ( $first_activated_on + ( \MINUTE_IN_SECONDS * 5 ) ) ) {
|
||||
if ( ! \wp_next_scheduled( Cleanup_Integration::START_HOOK ) ) {
|
||||
\wp_schedule_single_event( ( time() + DAY_IN_SECONDS ), Cleanup_Integration::START_HOOK );
|
||||
\wp_schedule_single_event( ( \time() + \DAY_IN_SECONDS ), Cleanup_Integration::START_HOOK );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +109,9 @@ class Admin_Columns_Cache_Integration implements Integration_Interface {
|
||||
$indexables = $this->indexable_repository->find_by_multiple_ids_and_type( $post_ids, 'post', false );
|
||||
|
||||
foreach ( $indexables as $indexable ) {
|
||||
$this->indexable_cache[ $indexable->object_id ] = $indexable;
|
||||
if ( $indexable instanceof Indexable ) {
|
||||
$this->indexable_cache[ $indexable->object_id ] = $indexable;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,7 +170,7 @@ class Admin_Columns_Cache_Integration implements Integration_Interface {
|
||||
$pages_map[ $page->ID ] = $page;
|
||||
}
|
||||
|
||||
$pages = &$top_level_pages;
|
||||
$pages = $top_level_pages;
|
||||
}
|
||||
|
||||
$count = 0;
|
||||
|
||||
@@ -11,7 +11,9 @@ use Yoast\WP\SEO\Actions\Indexing\Post_Link_Indexing_Action;
|
||||
use Yoast\WP\SEO\Actions\Indexing\Term_Link_Indexing_Action;
|
||||
use Yoast\WP\SEO\Conditionals\Get_Request_Conditional;
|
||||
use Yoast\WP\SEO\Conditionals\Migrations_Conditional;
|
||||
use Yoast\WP\SEO\Conditionals\WP_CRON_Enabled_Conditional;
|
||||
use Yoast\WP\SEO\Conditionals\Yoast_Admin_And_Dashboard_Conditional;
|
||||
use Yoast\WP\SEO\Helpers\Indexable_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Indexing_Helper;
|
||||
use Yoast\WP\SEO\Integrations\Integration_Interface;
|
||||
|
||||
@@ -78,6 +80,34 @@ class Background_Indexing_Integration implements Integration_Interface {
|
||||
*/
|
||||
protected $indexing_helper;
|
||||
|
||||
/**
|
||||
* An object that checks if we are on the Yoast admin or on the dashboard page.
|
||||
*
|
||||
* @var Yoast_Admin_And_Dashboard_Conditional
|
||||
*/
|
||||
protected $yoast_admin_and_dashboard_conditional;
|
||||
|
||||
/**
|
||||
* An object that checks if we are handling a GET request.
|
||||
*
|
||||
* @var Get_Request_Conditional
|
||||
*/
|
||||
private $get_request_conditional;
|
||||
|
||||
/**
|
||||
* An object that checks if WP_CRON is enabled.
|
||||
*
|
||||
* @var WP_CRON_Enabled_Conditional
|
||||
*/
|
||||
private $wp_cron_enabled_conditional;
|
||||
|
||||
/**
|
||||
* The indexable helper
|
||||
*
|
||||
* @var Indexable_Helper
|
||||
*/
|
||||
private $indexable_helper;
|
||||
|
||||
/**
|
||||
* Returns the conditionals based on which this integration should be active.
|
||||
*
|
||||
@@ -85,23 +115,25 @@ class Background_Indexing_Integration implements Integration_Interface {
|
||||
*/
|
||||
public static function get_conditionals() {
|
||||
return [
|
||||
Yoast_Admin_And_Dashboard_Conditional::class,
|
||||
Migrations_Conditional::class,
|
||||
Get_Request_Conditional::class,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Shutdown_Indexing_Integration constructor.
|
||||
*
|
||||
* @param Indexable_Post_Indexation_Action $post_indexation The post indexing action.
|
||||
* @param Indexable_Term_Indexation_Action $term_indexation The term indexing action.
|
||||
* @param Indexable_Post_Type_Archive_Indexation_Action $post_type_archive_indexation The post type archive indexing action.
|
||||
* @param Indexable_General_Indexation_Action $general_indexation The general indexing action.
|
||||
* @param Indexable_Indexing_Complete_Action $complete_indexation_action The complete indexing action.
|
||||
* @param Post_Link_Indexing_Action $post_link_indexing_action The post indexing action.
|
||||
* @param Term_Link_Indexing_Action $term_link_indexing_action The term indexing action.
|
||||
* @param Indexing_Helper $indexing_helper The indexing helper.
|
||||
* @param Indexable_Post_Indexation_Action $post_indexation The post indexing action.
|
||||
* @param Indexable_Term_Indexation_Action $term_indexation The term indexing action.
|
||||
* @param Indexable_Post_Type_Archive_Indexation_Action $post_type_archive_indexation The post type archive indexing action.
|
||||
* @param Indexable_General_Indexation_Action $general_indexation The general indexing action.
|
||||
* @param Indexable_Indexing_Complete_Action $complete_indexation_action The complete indexing action.
|
||||
* @param Post_Link_Indexing_Action $post_link_indexing_action The post indexing action.
|
||||
* @param Term_Link_Indexing_Action $term_link_indexing_action The term indexing action.
|
||||
* @param Indexing_Helper $indexing_helper The indexing helper.
|
||||
* @param Indexable_Helper $indexable_helper The indexable helper.
|
||||
* @param Yoast_Admin_And_Dashboard_Conditional $yoast_admin_and_dashboard_conditional An object that checks if we are on the Yoast admin or on the dashboard page.
|
||||
* @param Get_Request_Conditional $get_request_conditional An object that checks if we are handling a GET request.
|
||||
* @param WP_CRON_Enabled_Conditional $wp_cron_enabled_conditional An object that checks if WP_CRON is enabled.
|
||||
*/
|
||||
public function __construct(
|
||||
Indexable_Post_Indexation_Action $post_indexation,
|
||||
@@ -111,23 +143,50 @@ class Background_Indexing_Integration implements Integration_Interface {
|
||||
Indexable_Indexing_Complete_Action $complete_indexation_action,
|
||||
Post_Link_Indexing_Action $post_link_indexing_action,
|
||||
Term_Link_Indexing_Action $term_link_indexing_action,
|
||||
Indexing_Helper $indexing_helper
|
||||
Indexing_Helper $indexing_helper,
|
||||
Indexable_Helper $indexable_helper,
|
||||
Yoast_Admin_And_Dashboard_Conditional $yoast_admin_and_dashboard_conditional,
|
||||
Get_Request_Conditional $get_request_conditional,
|
||||
WP_CRON_Enabled_Conditional $wp_cron_enabled_conditional
|
||||
) {
|
||||
$this->post_indexation = $post_indexation;
|
||||
$this->term_indexation = $term_indexation;
|
||||
$this->post_type_archive_indexation = $post_type_archive_indexation;
|
||||
$this->general_indexation = $general_indexation;
|
||||
$this->complete_indexation_action = $complete_indexation_action;
|
||||
$this->post_link_indexing_action = $post_link_indexing_action;
|
||||
$this->term_link_indexing_action = $term_link_indexing_action;
|
||||
$this->indexing_helper = $indexing_helper;
|
||||
$this->post_indexation = $post_indexation;
|
||||
$this->term_indexation = $term_indexation;
|
||||
$this->post_type_archive_indexation = $post_type_archive_indexation;
|
||||
$this->general_indexation = $general_indexation;
|
||||
$this->complete_indexation_action = $complete_indexation_action;
|
||||
$this->post_link_indexing_action = $post_link_indexing_action;
|
||||
$this->term_link_indexing_action = $term_link_indexing_action;
|
||||
$this->indexing_helper = $indexing_helper;
|
||||
$this->indexable_helper = $indexable_helper;
|
||||
$this->yoast_admin_and_dashboard_conditional = $yoast_admin_and_dashboard_conditional;
|
||||
$this->get_request_conditional = $get_request_conditional;
|
||||
$this->wp_cron_enabled_conditional = $wp_cron_enabled_conditional;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register hooks.
|
||||
*/
|
||||
public function register_hooks() {
|
||||
\add_action( 'admin_init', [ $this, 'register_shutdown_indexing' ], 10 );
|
||||
\add_action( 'admin_init', [ $this, 'register_shutdown_indexing' ] );
|
||||
\add_action( 'wpseo_indexable_index_batch', [ $this, 'index' ] );
|
||||
// phpcs:ignore WordPress.WP.CronInterval -- The sniff doesn't understand values with parentheses. https://github.com/WordPress/WordPress-Coding-Standards/issues/2025
|
||||
\add_filter( 'cron_schedules', [ $this, 'add_cron_schedule' ] );
|
||||
\add_action( 'admin_init', [ $this, 'schedule_cron_indexing' ], 11 );
|
||||
|
||||
$this->add_limit_filters();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the filters that change the indexing limits.
|
||||
*
|
||||
* @return void.
|
||||
*/
|
||||
public function add_limit_filters() {
|
||||
\add_filter( 'wpseo_post_indexation_limit', [ $this, 'throttle_cron_indexing' ] );
|
||||
\add_filter( 'wpseo_post_type_archive_indexation_limit', [ $this, 'throttle_cron_indexing' ] );
|
||||
\add_filter( 'wpseo_term_indexation_limit', [ $this, 'throttle_cron_indexing' ] );
|
||||
\add_filter( 'wpseo_prominent_words_indexation_limit', [ $this, 'throttle_cron_indexing' ] );
|
||||
\add_filter( 'wpseo_link_indexing_limit', [ $this, 'throttle_cron_link_indexing' ] );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -137,7 +196,7 @@ class Background_Indexing_Integration implements Integration_Interface {
|
||||
*/
|
||||
public function register_shutdown_indexing() {
|
||||
if ( $this->should_index_on_shutdown( $this->get_shutdown_limit() ) ) {
|
||||
\register_shutdown_function( [ $this, 'index' ] );
|
||||
$this->register_shutdown_function( 'index' );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,13 +206,152 @@ class Background_Indexing_Integration implements Integration_Interface {
|
||||
* @return void
|
||||
*/
|
||||
public function index() {
|
||||
if ( \wp_doing_cron() && ! $this->should_index_on_cron() ) {
|
||||
$this->unschedule_cron_indexing();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$this->post_indexation->index();
|
||||
$this->term_indexation->index();
|
||||
$this->general_indexation->index();
|
||||
$this->post_type_archive_indexation->index();
|
||||
$this->post_link_indexing_action->index();
|
||||
$this->term_link_indexing_action->index();
|
||||
$this->complete_indexation_action->complete();
|
||||
|
||||
if ( $this->indexing_helper->get_limited_filtered_unindexed_count_background( 1 ) === 0 ) {
|
||||
// We set this as complete, even though prominent words might not be complete. But that's the way we always treated that.
|
||||
$this->complete_indexation_action->complete();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the 'Every fifteen minutes' cron schedule to WP-Cron.
|
||||
*
|
||||
* @param array $schedules The existing schedules.
|
||||
*
|
||||
* @return array The schedules containing the fifteen_minutes schedule.
|
||||
*/
|
||||
public function add_cron_schedule( $schedules ) {
|
||||
if ( ! \is_array( $schedules ) ) {
|
||||
return $schedules;
|
||||
}
|
||||
|
||||
$schedules['fifteen_minutes'] = [
|
||||
'interval' => ( 15 * MINUTE_IN_SECONDS ),
|
||||
'display' => \esc_html__( 'Every fifteen minutes', 'wordpress-seo' ),
|
||||
];
|
||||
|
||||
return $schedules;
|
||||
}
|
||||
|
||||
/**
|
||||
* Schedule background indexing every 15 minutes if the index isn't already up to date.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function schedule_cron_indexing() {
|
||||
/**
|
||||
* Filter: 'wpseo_unindexed_count_queries_ran' - Informs whether the expensive unindexed count queries have been ran already.
|
||||
*
|
||||
* @internal
|
||||
* @api bool
|
||||
*/
|
||||
$have_queries_ran = \apply_filters( 'wpseo_unindexed_count_queries_ran', false );
|
||||
|
||||
if ( ( ! $this->yoast_admin_and_dashboard_conditional->is_met() || ! $this->get_request_conditional->is_met() ) && ! $have_queries_ran ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! \wp_next_scheduled( 'wpseo_indexable_index_batch' ) && $this->should_index_on_cron() ) {
|
||||
\wp_schedule_event( ( \time() + \HOUR_IN_SECONDS ), 'fifteen_minutes', 'wpseo_indexable_index_batch' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Limit cron indexing to 15 indexables per batch instead of 25.
|
||||
*
|
||||
* @param int $indexation_limit The current limit (filter input).
|
||||
*
|
||||
* @return int The new batch limit.
|
||||
*/
|
||||
public function throttle_cron_indexing( $indexation_limit ) {
|
||||
if ( \wp_doing_cron() ) {
|
||||
/**
|
||||
* Filter: 'wpseo_cron_indexing_limit_size' - Adds the possibility to limit the number of items that are indexed when in cron action.
|
||||
*
|
||||
* @api int $limit Maximum number of indexables to be indexed per indexing action.
|
||||
*/
|
||||
return \apply_filters( 'wpseo_cron_indexing_limit_size', 15 );
|
||||
}
|
||||
|
||||
return $indexation_limit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Limit cron indexing to 3 links per batch instead of 5.
|
||||
*
|
||||
* @param int $link_indexation_limit The current limit (filter input).
|
||||
*
|
||||
* @return int The new batch limit.
|
||||
*/
|
||||
public function throttle_cron_link_indexing( $link_indexation_limit ) {
|
||||
if ( \wp_doing_cron() ) {
|
||||
/**
|
||||
* Filter: 'wpseo_cron_link_indexing_limit_size' - Adds the possibility to limit the number of links that are indexed when in cron action.
|
||||
*
|
||||
* @api int $limit Maximum number of link indexables to be indexed per link indexing action.
|
||||
*/
|
||||
return \apply_filters( 'wpseo_cron_link_indexing_limit_size', 3 );
|
||||
}
|
||||
|
||||
return $link_indexation_limit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether cron indexation should be performed.
|
||||
*
|
||||
* @return bool Should cron indexation be performed.
|
||||
*/
|
||||
protected function should_index_on_cron() {
|
||||
if ( ! $this->indexable_helper->should_index_indexables() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// The filter supersedes everything when preventing cron indexation.
|
||||
if ( \apply_filters( 'Yoast\WP\SEO\enable_cron_indexing', true ) !== true ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->indexing_helper->get_limited_filtered_unindexed_count_background( 1 ) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether background indexation should be performed.
|
||||
*
|
||||
* @param int $shutdown_limit The shutdown limit used to determine whether indexation should be run.
|
||||
*
|
||||
* @return bool Should background indexation be performed.
|
||||
*/
|
||||
protected function should_index_on_shutdown( $shutdown_limit ) {
|
||||
if ( ! $this->yoast_admin_and_dashboard_conditional->is_met() || ! $this->get_request_conditional->is_met() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ! $this->indexable_helper->should_index_indexables() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( $this->wp_cron_enabled_conditional->is_met() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$total_unindexed = $this->indexing_helper->get_limited_filtered_unindexed_count_background( $shutdown_limit );
|
||||
if ( $total_unindexed === 0 || $total_unindexed > $shutdown_limit ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -171,15 +369,26 @@ class Background_Indexing_Integration implements Integration_Interface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether background indexation should be performed.
|
||||
* Removes the cron indexing job from the scheduled event queue.
|
||||
*
|
||||
* @param int $shutdown_limit The shutdown limit used to determine whether indexation should be run.
|
||||
*
|
||||
* @return bool Should background indexation be performed.
|
||||
* @return void
|
||||
*/
|
||||
public function should_index_on_shutdown( $shutdown_limit ) {
|
||||
$total = $this->indexing_helper->get_limited_filtered_unindexed_count( $shutdown_limit );
|
||||
protected function unschedule_cron_indexing() {
|
||||
$scheduled = \wp_next_scheduled( 'wpseo_indexable_index_batch' );
|
||||
if ( $scheduled ) {
|
||||
\wp_unschedule_event( $scheduled, 'wpseo_indexable_index_batch' );
|
||||
}
|
||||
}
|
||||
|
||||
return ( $total > 0 && $total < $shutdown_limit );
|
||||
/**
|
||||
* Registers a method to be executed on shutdown.
|
||||
* This wrapper mostly exists for making this class more unittestable.
|
||||
*
|
||||
* @param string $method_name The name of the method on the current instance to register.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function register_shutdown_function( $method_name ) {
|
||||
\register_shutdown_function( [ $this, $method_name ] );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ class Crawl_Settings_Integration implements Integration_Interface {
|
||||
* Enqueue the workouts app.
|
||||
*/
|
||||
public function enqueue_assets() {
|
||||
if ( ! is_network_admin() ) {
|
||||
if ( ! \is_network_admin() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -154,6 +154,7 @@ class Crawl_Settings_Integration implements Integration_Interface {
|
||||
$this->unused_resources_settings = [
|
||||
'remove_emoji_scripts' => \__( 'Emoji scripts', 'wordpress-seo' ),
|
||||
'deny_wp_json_crawling' => \__( 'Prevent search engines from crawling /wp-json/', 'wordpress-seo' ),
|
||||
'deny_adsbot_crawling' => \__( 'Prevent Google AdsBot from crawling', 'wordpress-seo' ),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -166,8 +167,8 @@ class Crawl_Settings_Integration implements Integration_Interface {
|
||||
* @param Yoast_Form $yform The yoast form object.
|
||||
*/
|
||||
public function add_crawl_settings_tab_content( $yform ) {
|
||||
_deprecated_function( __METHOD__, 'Yoast SEO 20.4' );
|
||||
$this->add_crawl_settings( $yform, false );
|
||||
\_deprecated_function( __METHOD__, 'Yoast SEO 20.4' );
|
||||
$this->add_crawl_settings( $yform );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -176,13 +177,13 @@ class Crawl_Settings_Integration implements Integration_Interface {
|
||||
* @param Yoast_Form $yform The yoast form object.
|
||||
*/
|
||||
public function add_crawl_settings_tab_content_network( $yform ) {
|
||||
$this->add_crawl_settings( $yform, true );
|
||||
$this->add_crawl_settings( $yform );
|
||||
}
|
||||
|
||||
/**
|
||||
* Print the settings sections.
|
||||
*
|
||||
* @param Yoast_Form $yform The Yoast form class.
|
||||
* @param Yoast_Form $yform The Yoast form class.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -213,7 +214,6 @@ class Crawl_Settings_Integration implements Integration_Interface {
|
||||
'</a>'
|
||||
);
|
||||
|
||||
|
||||
$this->print_toggles( $this->permalink_cleanup_settings, $yform, \__( 'Permalink cleanup settings', 'wordpress-seo' ), [], $permalink_warning );
|
||||
|
||||
// Add the original option as hidden, so as not to lose any values if it's disabled and the form is saved.
|
||||
@@ -223,11 +223,11 @@ class Crawl_Settings_Integration implements Integration_Interface {
|
||||
/**
|
||||
* Prints a list of toggles for an array of settings with labels.
|
||||
*
|
||||
* @param array $settings The settings being displayed.
|
||||
* @param Yoast_Form $yform The Yoast form class.
|
||||
* @param string $title Optional title for the settings being displayed.
|
||||
* @param array $toggles Optional naming of the toggle buttons.
|
||||
* @param string $warning Optional warning to be displayed above the toggles.
|
||||
* @param array $settings The settings being displayed.
|
||||
* @param Yoast_Form $yform The Yoast form class.
|
||||
* @param string $title Optional title for the settings being displayed.
|
||||
* @param array $toggles Optional naming of the toggle buttons.
|
||||
* @param string $warning Optional warning to be displayed above the toggles.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -324,7 +324,7 @@ class Crawl_Settings_Integration implements Integration_Interface {
|
||||
*/
|
||||
protected function should_feature_be_disabled_multisite( $setting ) {
|
||||
return (
|
||||
\in_array( $setting, [ 'deny_search_crawling', 'deny_wp_json_crawling' ], true )
|
||||
\in_array( $setting, [ 'deny_search_crawling', 'deny_wp_json_crawling', 'deny_adsbot_crawling' ], true )
|
||||
&& \is_multisite()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ use WPSEO_Addon_Manager;
|
||||
use WPSEO_Admin_Asset_Manager;
|
||||
use WPSEO_Option_Tab;
|
||||
use WPSEO_Shortlinker;
|
||||
use WPSEO_Utils;
|
||||
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
|
||||
use Yoast\WP\SEO\Context\Meta_Tags_Context;
|
||||
use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
@@ -140,8 +139,8 @@ class First_Time_Configuration_Integration implements Integration_Interface {
|
||||
|
||||
$this->admin_asset_manager->enqueue_script( 'indexation' );
|
||||
$this->admin_asset_manager->enqueue_script( 'first-time-configuration' );
|
||||
$this->admin_asset_manager->enqueue_style( 'first-time-configuration' );
|
||||
$this->admin_asset_manager->enqueue_style( 'admin-css' );
|
||||
$this->admin_asset_manager->enqueue_style( 'tailwind' );
|
||||
$this->admin_asset_manager->enqueue_style( 'monorepo' );
|
||||
|
||||
$data = [
|
||||
@@ -185,78 +184,44 @@ class First_Time_Configuration_Integration implements Integration_Interface {
|
||||
$selected_option_label = $selected_option['label'];
|
||||
}
|
||||
|
||||
$this->admin_asset_manager->add_inline_script(
|
||||
'first-time-configuration',
|
||||
\sprintf(
|
||||
'window.wpseoFirstTimeConfigurationData = {
|
||||
"canEditUser": %d,
|
||||
"companyOrPerson": "%s",
|
||||
"companyOrPersonLabel": "%s",
|
||||
"companyName": "%s",
|
||||
"fallbackCompanyName": "%s",
|
||||
"websiteName": "%s",
|
||||
"fallbackWebsiteName": "%s",
|
||||
"companyLogo": "%s",
|
||||
"companyLogoFallback": "%s",
|
||||
"companyLogoId": %d,
|
||||
"finishedSteps": %s,
|
||||
"personId": %d,
|
||||
"personName": "%s",
|
||||
"personLogo": "%s",
|
||||
"personLogoFallback": "%s",
|
||||
"personLogoId": %d,
|
||||
"siteTagline": "%s",
|
||||
"socialProfiles": {
|
||||
"facebookUrl": "%s",
|
||||
"twitterUsername": "%s",
|
||||
"otherSocialUrls": %s,
|
||||
},
|
||||
"isPremium": %d,
|
||||
"tracking": %d,
|
||||
"isTrackingAllowedMultisite": %d,
|
||||
"isMainSite": %d,
|
||||
"companyOrPersonOptions": %s,
|
||||
"shouldForceCompany": %d,
|
||||
"knowledgeGraphMessage": "%s",
|
||||
"shortlinks": {
|
||||
"gdpr": "%s",
|
||||
"configIndexables": "%s",
|
||||
"configIndexablesBenefits": "%s",
|
||||
},
|
||||
};',
|
||||
$this->can_edit_profile( $person_id ),
|
||||
$this->is_company_or_person(),
|
||||
$selected_option_label,
|
||||
$this->get_company_name(),
|
||||
$this->get_fallback_company_name( $this->get_company_name() ),
|
||||
$this->get_website_name(),
|
||||
$this->get_fallback_website_name( $this->get_website_name() ),
|
||||
$this->get_company_logo(),
|
||||
$this->get_company_fallback_logo( $this->get_company_logo() ),
|
||||
$this->get_company_logo_id(),
|
||||
WPSEO_Utils::format_json_encode( $finished_steps ),
|
||||
$person_id,
|
||||
$this->get_person_name(),
|
||||
$this->get_person_logo(),
|
||||
$this->get_person_fallback_logo( $this->get_person_logo() ),
|
||||
$this->get_person_logo_id(),
|
||||
$this->get_site_tagline(),
|
||||
$social_profiles['facebook_site'],
|
||||
$social_profiles['twitter_site'],
|
||||
WPSEO_Utils::format_json_encode( $social_profiles['other_social_urls'] ),
|
||||
$this->product_helper->is_premium(),
|
||||
$this->has_tracking_enabled(),
|
||||
$this->is_tracking_enabled_multisite(),
|
||||
$this->is_main_site(),
|
||||
WPSEO_Utils::format_json_encode( $options ),
|
||||
$this->should_force_company(),
|
||||
$knowledge_graph_message,
|
||||
$this->shortlinker->build_shortlink( 'https://yoa.st/gdpr-config-workout' ),
|
||||
$this->shortlinker->build_shortlink( 'https://yoa.st/config-indexables' ),
|
||||
$this->shortlinker->build_shortlink( 'https://yoa.st/config-indexables-benefits' )
|
||||
),
|
||||
'before'
|
||||
);
|
||||
$data_ftc = [
|
||||
'canEditUser' => $this->can_edit_profile( $person_id ),
|
||||
'companyOrPerson' => $this->is_company_or_person(),
|
||||
'companyOrPersonLabel' => $selected_option_label,
|
||||
'companyName' => $this->get_company_name(),
|
||||
'fallbackCompanyName' => $this->get_fallback_company_name( $this->get_company_name() ),
|
||||
'websiteName' => $this->get_website_name(),
|
||||
'fallbackWebsiteName' => $this->get_fallback_website_name( $this->get_website_name() ),
|
||||
'companyLogo' => $this->get_company_logo(),
|
||||
'companyLogoFallback' => $this->get_company_fallback_logo( $this->get_company_logo() ),
|
||||
'companyLogoId' => $this->get_person_logo_id(),
|
||||
'finishedSteps' => $finished_steps,
|
||||
'personId' => (int) $person_id,
|
||||
'personName' => $this->get_person_name(),
|
||||
'personLogo' => $this->get_person_logo(),
|
||||
'personLogoFallback' => $this->get_person_fallback_logo( $this->get_person_logo() ),
|
||||
'personLogoId' => $this->get_person_logo_id(),
|
||||
'siteTagline' => $this->get_site_tagline(),
|
||||
'socialProfiles' => [
|
||||
'facebookUrl' => $social_profiles['facebook_site'],
|
||||
'twitterUsername' => $social_profiles['twitter_site'],
|
||||
'otherSocialUrls' => $social_profiles['other_social_urls'],
|
||||
],
|
||||
'isPremium' => $this->product_helper->is_premium(),
|
||||
'tracking' => $this->has_tracking_enabled(),
|
||||
'isTrackingAllowedMultisite' => $this->is_tracking_enabled_multisite(),
|
||||
'isMainSite' => $this->is_main_site(),
|
||||
'companyOrPersonOptions' => $options,
|
||||
'shouldForceCompany' => $this->should_force_company(),
|
||||
'knowledgeGraphMessage' => $knowledge_graph_message,
|
||||
'shortlinks' => [
|
||||
'gdpr' => $this->shortlinker->build_shortlink( 'https://yoa.st/gdpr-config-workout' ),
|
||||
'configIndexables' => $this->shortlinker->build_shortlink( 'https://yoa.st/config-indexables' ),
|
||||
'configIndexablesBenefits' => $this->shortlinker->build_shortlink( 'https://yoa.st/config-indexables-benefits' ),
|
||||
],
|
||||
];
|
||||
|
||||
$this->admin_asset_manager->localize_script( 'first-time-configuration', 'wpseoFirstTimeConfigurationData', $data_ftc );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,10 +4,10 @@ namespace Yoast\WP\SEO\Integrations\Admin;
|
||||
|
||||
use WPSEO_Admin_Asset_Manager;
|
||||
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
|
||||
use Yoast\WP\SEO\Helpers\First_Time_Configuration_Notice_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
use Yoast\WP\SEO\Integrations\Integration_Interface;
|
||||
use Yoast\WP\SEO\Presenters\Admin\Notice_Presenter;
|
||||
use Yoast\WP\SEO\Helpers\First_Time_Configuration_Notice_Helper;
|
||||
|
||||
/**
|
||||
* First_Time_Configuration_Notice_Integration class
|
||||
@@ -31,7 +31,7 @@ class First_Time_Configuration_Notice_Integration implements Integration_Interfa
|
||||
/**
|
||||
* The first time configuration notice helper.
|
||||
*
|
||||
* @var \Yoast\WP\SEO\Helpers\First_Time_Configuration_Notice_Helper
|
||||
* @var First_Time_Configuration_Notice_Helper
|
||||
*/
|
||||
private $first_time_configuration_notice_helper;
|
||||
|
||||
@@ -45,9 +45,9 @@ class First_Time_Configuration_Notice_Integration implements Integration_Interfa
|
||||
/**
|
||||
* First_Time_Configuration_Notice_Integration constructor.
|
||||
*
|
||||
* @param Options_Helper $options_helper The options helper.
|
||||
* @param First_Time_Configuration_Notice_Helper $first_time_configuration_notice_helper The first time configuration notice helper.
|
||||
* @param WPSEO_Admin_Asset_Manager $admin_asset_manager The admin asset manager.
|
||||
* @param Options_Helper $options_helper The options helper.
|
||||
* @param First_Time_Configuration_Notice_Helper $first_time_configuration_notice_helper The first time configuration notice helper.
|
||||
* @param WPSEO_Admin_Asset_Manager $admin_asset_manager The admin asset manager.
|
||||
*/
|
||||
public function __construct(
|
||||
Options_Helper $options_helper,
|
||||
|
||||
@@ -9,9 +9,10 @@ use WPSEO_Utils;
|
||||
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
|
||||
use Yoast\WP\SEO\Config\Migration_Status;
|
||||
use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
use Yoast\WP\SEO\Integrations\Academy_Integration;
|
||||
use Yoast\WP\SEO\Integrations\Integration_Interface;
|
||||
use Yoast\WP\SEO\Integrations\Settings_Integration;
|
||||
use Yoast\WP\SEO\Integrations\Academy_Integration;
|
||||
use Yoast\WP\SEO\Integrations\Support_Integration;
|
||||
|
||||
/**
|
||||
* Class WPSEO_HelpScout
|
||||
@@ -69,6 +70,7 @@ class HelpScout_Beacon implements Integration_Interface {
|
||||
'wpseo_dashboard',
|
||||
Settings_Integration::PAGE,
|
||||
Academy_Integration::PAGE,
|
||||
Support_Integration::PAGE,
|
||||
'wpseo_search_console',
|
||||
'wpseo_tools',
|
||||
'wpseo_licenses',
|
||||
|
||||
@@ -199,6 +199,9 @@ class Indexing_Notification_Integration implements Integration_Interface {
|
||||
return false;
|
||||
}
|
||||
|
||||
// We're about to perform expensive queries, let's inform.
|
||||
\add_filter( 'wpseo_unindexed_count_queries_ran', '__return_true' );
|
||||
|
||||
// Never show a notification when nothing should be indexed.
|
||||
return $this->indexing_helper->get_limited_filtered_unindexed_count( 1 ) > 0;
|
||||
}
|
||||
|
||||
@@ -2,14 +2,18 @@
|
||||
|
||||
namespace Yoast\WP\SEO\Integrations\Admin;
|
||||
|
||||
use Easy_Digital_Downloads;
|
||||
use SeriouslySimplePodcasting\Integrations\Yoast\Schema\PodcastEpisode;
|
||||
use TEC\Events\Integrations\Plugins\WordPress_SEO\Events_Schema;
|
||||
use WP_Recipe_Maker;
|
||||
use WPSEO_Admin_Asset_Manager;
|
||||
use WPSEO_Plugin_Availability;
|
||||
use WPSEO_Shortlinker;
|
||||
use Yoast\WP\SEO\Conditionals\Admin_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\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\Conditionals\WooCommerce_Conditional;
|
||||
use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
use Yoast\WP\SEO\Integrations\Integration_Interface;
|
||||
@@ -111,7 +115,7 @@ 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() );
|
||||
$host = \YoastSEO()->helpers->url->get_url_host( \get_site_url() );
|
||||
|
||||
$wpseo_plugin_availability_checker = new WPSEO_Plugin_Availability();
|
||||
$woocommerce_seo_installed = \file_exists( \WP_PLUGIN_DIR . '/' . $woocommerce_seo_file );
|
||||
@@ -123,13 +127,13 @@ class Integrations_Page implements Integration_Interface {
|
||||
$acf_seo_github_active = $wpseo_plugin_availability_checker->is_active( $acf_seo_file_github );
|
||||
$acf_active = \class_exists( 'acf' );
|
||||
$algolia_active = $wpseo_plugin_availability_checker->is_active( $algolia_file );
|
||||
$edd_active = \class_exists( \Easy_Digital_Downloads::class );
|
||||
$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 = $wpseo_plugin_availability_checker->is_active( $old_algolia_file );
|
||||
$tec_active = \class_exists( \TEC\Events\Integrations\Plugins\WordPress_SEO\Events_Schema::class );
|
||||
$ssp_active = \class_exists( \SeriouslySimplePodcasting\Integrations\Yoast\Schema\PodcastEpisode::class );
|
||||
$wp_recipe_maker_active = \class_exists( \WP_Recipe_Maker::class );
|
||||
$tec_active = \class_exists( Events_Schema::class );
|
||||
$ssp_active = \class_exists( PodcastEpisode::class );
|
||||
$wp_recipe_maker_active = \class_exists( WP_Recipe_Maker::class );
|
||||
$mastodon_active = $this->is_mastodon_active();
|
||||
|
||||
$woocommerce_seo_activate_url = \wp_nonce_url(
|
||||
|
||||
@@ -1,196 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Integrations\Admin;
|
||||
|
||||
use WPSEO_Admin_Asset_Manager;
|
||||
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
|
||||
use Yoast\WP\SEO\Helpers\Capability_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Current_Page_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Options_Helper;
|
||||
use Yoast\WP\SEO\Helpers\Product_Helper;
|
||||
use Yoast\WP\SEO\Integrations\Integration_Interface;
|
||||
use Yoast\WP\SEO\Presenters\Admin\Notice_Presenter;
|
||||
|
||||
/**
|
||||
* Old_Premium_Integration class
|
||||
*/
|
||||
class Old_Premium_Integration implements Integration_Interface {
|
||||
|
||||
/**
|
||||
* The minimum Premium version.
|
||||
*/
|
||||
const MINIMUM_PREMIUM_VERSION = '20.1-RC0';
|
||||
|
||||
/**
|
||||
* The options' helper.
|
||||
*
|
||||
* @var Options_Helper
|
||||
*/
|
||||
private $options_helper;
|
||||
|
||||
/**
|
||||
* The product helper.
|
||||
*
|
||||
* @var Product_Helper
|
||||
*/
|
||||
private $product_helper;
|
||||
|
||||
/**
|
||||
* The capability helper.
|
||||
*
|
||||
* @var Capability_Helper
|
||||
*/
|
||||
private $capability_helper;
|
||||
|
||||
/**
|
||||
* The admin asset manager.
|
||||
*
|
||||
* @var WPSEO_Admin_Asset_Manager
|
||||
*/
|
||||
private $admin_asset_manager;
|
||||
|
||||
/**
|
||||
* The Current_Page_Helper.
|
||||
*
|
||||
* @var Current_Page_Helper
|
||||
*/
|
||||
private $current_page_helper;
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public static function get_conditionals() {
|
||||
return [ Admin_Conditional::class ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Old_Premium_Integration constructor.
|
||||
*
|
||||
* @param Options_Helper $options_helper The options helper.
|
||||
* @param Product_Helper $product_helper The product helper.
|
||||
* @param Capability_Helper $capability_helper The capability helper.
|
||||
* @param WPSEO_Admin_Asset_Manager $admin_asset_manager The admin asset manager.
|
||||
* @param Current_Page_Helper $current_page_helper The Current_Page_Helper.
|
||||
*/
|
||||
public function __construct(
|
||||
Options_Helper $options_helper,
|
||||
Product_Helper $product_helper,
|
||||
Capability_Helper $capability_helper,
|
||||
WPSEO_Admin_Asset_Manager $admin_asset_manager,
|
||||
Current_Page_Helper $current_page_helper
|
||||
) {
|
||||
$this->options_helper = $options_helper;
|
||||
$this->product_helper = $product_helper;
|
||||
$this->capability_helper = $capability_helper;
|
||||
$this->admin_asset_manager = $admin_asset_manager;
|
||||
$this->current_page_helper = $current_page_helper;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function register_hooks() {
|
||||
\add_action( 'admin_notices', [ $this, 'old_premium_notice' ] );
|
||||
\add_action( 'wp_ajax_dismiss_old_premium_notice', [ $this, 'dismiss_old_premium_notice' ] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows a notice if Premium is older than 20.0-RC1 so Settings might be missing from the UI.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function old_premium_notice() {
|
||||
global $pagenow;
|
||||
if ( $pagenow === 'update.php' ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( $this->notice_was_dismissed_after_current_min_premium_version() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! $this->capability_helper->current_user_can( 'wpseo_manage_options' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( $this->premium_is_old() ) {
|
||||
$this->admin_asset_manager->enqueue_style( 'monorepo' );
|
||||
|
||||
$is_plugins_page = $this->current_page_helper->get_current_admin_page() === 'plugins.php';
|
||||
$content = \sprintf(
|
||||
/* translators: 1: Yoast SEO Premium, 2 and 3: opening and closing anchor tag. */
|
||||
\esc_html__( 'Please %2$supdate %1$s to the latest version%3$s to ensure you can fully use all Premium settings and features.', 'wordpress-seo' ),
|
||||
'Yoast SEO Premium',
|
||||
( $is_plugins_page ) ? '' : '<a href="' . \esc_url( \self_admin_url( 'plugins.php' ) ) . '">',
|
||||
( $is_plugins_page ) ? '' : '</a>'
|
||||
);
|
||||
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped -- Output of the title escaped in the Notice_Presenter.
|
||||
echo new Notice_Presenter(
|
||||
/* translators: 1: Yoast SEO Premium */
|
||||
\sprintf( \__( 'Update to the latest version of %1$s!', 'wordpress-seo' ), 'Yoast SEO Premium' ),
|
||||
$content,
|
||||
null,
|
||||
null,
|
||||
true,
|
||||
'yoast-old-premium-notice'
|
||||
);
|
||||
// phpcs:enable
|
||||
|
||||
// Enable permanently dismissing the notice.
|
||||
echo "<script>
|
||||
function dismiss_old_premium_notice(){
|
||||
var data = {
|
||||
'action': 'dismiss_old_premium_notice',
|
||||
};
|
||||
|
||||
jQuery.post( ajaxurl, data, function( response ) {
|
||||
jQuery( '#yoast-old-premium-notice' ).hide();
|
||||
});
|
||||
}
|
||||
|
||||
jQuery( document ).ready( function() {
|
||||
jQuery( 'body' ).on( 'click', '#yoast-old-premium-notice .notice-dismiss', function() {
|
||||
dismiss_old_premium_notice();
|
||||
} );
|
||||
} );
|
||||
</script>";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Dismisses the old premium notice.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function dismiss_old_premium_notice() {
|
||||
return $this->options_helper->set( 'dismiss_old_premium_version_notice', self::MINIMUM_PREMIUM_VERSION );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether Premium is installed but older than the minimum premium version.
|
||||
*
|
||||
* @return bool Whether premium is installed but older than minimum premium version.
|
||||
*/
|
||||
protected function premium_is_old() {
|
||||
$premium_version = $this->product_helper->get_premium_version();
|
||||
if ( ! \is_null( $premium_version ) ) {
|
||||
return \version_compare( $premium_version, self::MINIMUM_PREMIUM_VERSION, '<' );
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the notification was dismissed in a version later than the minimum premium version.
|
||||
*
|
||||
* @return bool Whether the notification was dismissed in a version later than the minimum premium version.
|
||||
*/
|
||||
protected function notice_was_dismissed_after_current_min_premium_version() {
|
||||
$dismissed_notification_version = $this->options_helper->get( 'dismiss_old_premium_version_notice', '' );
|
||||
if ( ! empty( $dismissed_notification_version ) ) {
|
||||
return \version_compare( $dismissed_notification_version, self::MINIMUM_PREMIUM_VERSION, '>=' );
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -243,7 +243,7 @@ class Workouts_Integration implements Integration_Interface {
|
||||
$notice = new Notice_Presenter(
|
||||
$title,
|
||||
$copy,
|
||||
'Assistent_Time_bubble_500x570.png',
|
||||
null,
|
||||
$button
|
||||
);
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Integrations\Alerts;
|
||||
|
||||
/**
|
||||
* Black_Friday_Product_Editor_Checklist_Notification class.
|
||||
* @phpcs:disable Yoast.NamingConventions.ObjectNameDepth.MaxExceeded
|
||||
*/
|
||||
class Black_Friday_Product_Editor_Checklist_Notification extends Abstract_Dismissable_Alert {
|
||||
|
||||
/**
|
||||
* Holds the alert identifier.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $alert_identifier = 'black-friday-2023-product-editor-checklist';
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user