first commit

This commit is contained in:
Rachit Bhargava
2023-07-21 17:12:10 -04:00
parent d0fe47dde4
commit 5d0f0734d8
14003 changed files with 2829464 additions and 0 deletions

View File

@@ -0,0 +1,109 @@
<?php
/**
* Graceful deprecation of various classes which were renamed.
*
* {@internal As this file is just (temporarily) put in place to warn extending
* plugins about the class name changes, it is exempt from select CS standards.}
*
* @package Yoast\WP\SEO\Premium
*
* @since 16.1
* @deprecated 16.1
*
* @phpcs:disable Generic.Files.OneObjectStructurePerFile.MultipleFound
* @phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedNamespaceFound
* @phpcs:disable Yoast.Commenting.CodeCoverageIgnoreDeprecated
* @phpcs:disable Yoast.Commenting.FileComment.Unnecessary
* @phpcs:disable Yoast.Files.FileName.InvalidClassFileName
*/
namespace Yoast\WP\SEO\Actions\Prominent_Words;
use WPSEO_Premium_Prominent_Words_Support;
use Yoast\WP\SEO\Helpers\Meta_Helper;
use Yoast\WP\SEO\Helpers\Prominent_Words_Helper;
use Yoast\WP\SEO\Memoizers\Meta_Tags_Context_Memoizer;
use Yoast\WP\SEO\Premium\Actions\Prominent_Words\Complete_Action as New_Complete_Action;
use Yoast\WP\SEO\Premium\Actions\Prominent_Words\Content_Action as New_Content_Action;
use Yoast\WP\SEO\Premium\Actions\Prominent_Words\Save_Action as New_Save_Action;
use Yoast\WP\SEO\Repositories\Indexable_Repository;
use Yoast\WP\SEO\Repositories\Prominent_Words_Repository;
\_deprecated_file( \basename( __FILE__ ), 'Yoast SEO Premium 16.1' );
/**
* Class Complete_Action.
*
* @deprecated 16.1 Use {@see \Yoast\WP\SEO\Premium\Actions\Prominent_Words\Complete_Action} instead.
*/
class Complete_Action extends New_Complete_Action {
/**
* Complete_Action constructor.
*
* @deprecated 16.1 Use {@see \Yoast\WP\SEO\Premium\Actions\Prominent_Words\Complete_Action} instead.
*
* @param Prominent_Words_Helper $prominent_words_helper The prominent words helper.
*/
public function __construct( Prominent_Words_Helper $prominent_words_helper ) {
\_deprecated_function( __METHOD__, 'Yoast SEO Premium 16.1', '\Yoast\WP\SEO\Premium\Actions\Prominent_Words\Complete_Action' );
parent::__construct( $prominent_words_helper );
}
}
/**
* Class Content_Action.
*
* @deprecated 16.1 Use {@see \Yoast\WP\SEO\Premium\Actions\Prominent_Words\Content_Action} instead.
*/
class Content_Action extends New_Content_Action {
/**
* Content_Action constructor.
*
* @deprecated 16.1 Use {@see \Yoast\WP\SEO\Premium\Actions\Prominent_Words\Content_Action} instead.
*
* @param WPSEO_Premium_Prominent_Words_Support $prominent_words_support An instance of
* WPSEO_Premium_Prominent_Words_Support.
* @param Indexable_Repository $indexable_repository An instance of Indexable_Repository.
* @param Meta_Tags_Context_Memoizer $memoizer The meta tags context memoizer.
* @param Meta_Helper $meta The meta value helper.
*/
public function __construct(
WPSEO_Premium_Prominent_Words_Support $prominent_words_support,
Indexable_Repository $indexable_repository,
Meta_Tags_Context_Memoizer $memoizer,
Meta_Helper $meta
) {
\_deprecated_function( __METHOD__, 'Yoast SEO Premium 16.1', '\Yoast\WP\SEO\Premium\Actions\Prominent_Words\Content_Action' );
parent::__construct( $prominent_words_support, $indexable_repository, $memoizer, $meta );
}
}
/**
* Class Save_Action.
*
* @deprecated 16.1 Use {@see \Yoast\WP\SEO\Premium\Actions\Prominent_Words\Save_Action} instead.
*/
class Save_Action extends New_Save_Action {
/**
* Prominent_Words_Link_Service constructor.
*
* @deprecated 16.1 Use {@see \Yoast\WP\SEO\Premium\Actions\Prominent_Words\Save_Action} instead.
*
* @param Prominent_Words_Repository $prominent_words_repository The repository to create, read, update and delete
* prominent words from.
* @param Indexable_Repository $indexable_repository The repository to read, update and delete
* indexables from.
* @param Prominent_Words_Helper $prominent_words_helper The prominent words helper.
*/
public function __construct(
Prominent_Words_Repository $prominent_words_repository,
Indexable_Repository $indexable_repository,
Prominent_Words_Helper $prominent_words_helper
) {
\_deprecated_function( __METHOD__, 'Yoast SEO Premium 16.1', '\Yoast\WP\SEO\Premium\Actions\Prominent_Words\Save_Action' );
parent::__construct( $prominent_words_repository, $indexable_repository, $prominent_words_helper );
}
}

View File

@@ -0,0 +1,92 @@
<?php
/**
* Graceful deprecation of various classes which were renamed.
*
* {@internal As this file is just (temporarily) put in place to warn extending
* plugins about the class name changes, it is exempt from select CS standards.}
*
* @package Yoast\WP\SEO\Premium
*
* @since 16.1
* @deprecated 16.1
*
* @phpcs:disable Generic.Files.OneObjectStructurePerFile.MultipleFound
* @phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedNamespaceFound
* @phpcs:disable Yoast.Commenting.CodeCoverageIgnoreDeprecated
* @phpcs:disable Yoast.Commenting.FileComment.Unnecessary
* @phpcs:disable Yoast.Files.FileName.InvalidClassFileName
*/
namespace Yoast\WP\SEO\Actions;
use WPSEO_Premium_Prominent_Words_Support;
use Yoast\WP\SEO\Helpers\Options_Helper;
use Yoast\WP\SEO\Helpers\Prominent_Words_Helper;
use Yoast\WP\SEO\Helpers\Zapier_Helper;
use Yoast\WP\SEO\Premium\Actions\Link_Suggestions_Action as New_Link_Suggestions_Action;
use Yoast\WP\SEO\Premium\Actions\Zapier_Action as New_Zapier_Action;
use Yoast\WP\SEO\Repositories\Indexable_Repository;
use Yoast\WP\SEO\Repositories\Prominent_Words_Repository;
\_deprecated_file( \basename( __FILE__ ), 'Yoast SEO Premium 16.1' );
/**
* Class Link_Suggestions_Action.
*
* @deprecated 16.1 Use {@see \Yoast\WP\SEO\Premium\Actions\Link_Suggestions_Action} instead.
*/
class Link_Suggestions_Action extends New_Link_Suggestions_Action {
/**
* Link_Suggestions_Service constructor.
*
* @deprecated 16.1 Use {@see \Yoast\WP\SEO\Premium\Actions\Link_Suggestions_Action} instead.
*
* @param Prominent_Words_Repository $prominent_words_repository The repository to retrieve prominent words from.
* @param Indexable_Repository $indexable_repository The repository to retrieve indexables from.
* @param Prominent_Words_Helper $prominent_words_helper Class with helper methods for prominent words.
* @param WPSEO_Premium_Prominent_Words_Support $prominent_words_support The prominent words support class.
*/
public function __construct(
Prominent_Words_Repository $prominent_words_repository,
Indexable_Repository $indexable_repository,
Prominent_Words_Helper $prominent_words_helper,
WPSEO_Premium_Prominent_Words_Support $prominent_words_support
) {
\_deprecated_function( __METHOD__, 'Yoast SEO Premium 16.1', '\Yoast\WP\SEO\Premium\Actions\Link_Suggestions_Action' );
parent::__construct(
$prominent_words_repository,
$indexable_repository,
$prominent_words_helper,
$prominent_words_support
);
}
}
/**
* Class Zapier_Action.
*
* @deprecated 16.1 Use {@see \Yoast\WP\SEO\Premium\Actions\Zapier_Action} instead.
*/
class Zapier_Action extends New_Zapier_Action {
/**
* Zapier_Action constructor.
*
* @deprecated 16.1 Use {@see \Yoast\WP\SEO\Premium\Actions\Zapier_Action} instead.
*
* @param Options_Helper $options_helper The Options Helper.
* @param Zapier_Helper $zapier_helper The Zapier helper.
* @param Indexable_Repository $indexable_repository The Indexable repository.
*/
public function __construct(
Options_Helper $options_helper,
Zapier_Helper $zapier_helper,
Indexable_Repository $indexable_repository
) {
\_deprecated_function( __METHOD__, 'Yoast SEO Premium 16.1', '\Yoast\WP\SEO\Premium\Actions\Zapier_Action' );
parent::__construct( $options_helper, $zapier_helper, $indexable_repository );
}
}

View File

@@ -0,0 +1,42 @@
<?php
/**
* Graceful deprecation of various classes which were renamed.
*
* {@internal As this file is just (temporarily) put in place to warn extending
* plugins about the class name changes, it is exempt from select CS standards.}
*
* @package Yoast\WP\SEO\Premium
*
* @since 16.3
* @deprecated 16.3
*
* @phpcs:disable Generic.Files.OneObjectStructurePerFile.MultipleFound
* @phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedNamespaceFound
* @phpcs:disable Yoast.Commenting.CodeCoverageIgnoreDeprecated
* @phpcs:disable Yoast.Commenting.FileComment.Unnecessary
* @phpcs:disable Yoast.Files.FileName.InvalidClassFileName
*/
namespace Yoast\WP\SEO\Database;
use Yoast\WP\SEO\Premium\Database\Migration_Runner_Premium as New_Migration_Runner_Premium;
\_deprecated_file( \basename( __FILE__ ), 'Yoast SEO Premium 16.3' );
/**
* Class Migration_Runner_Premium.
*
* @deprecated 16.3 Use {@see \Yoast\WP\SEO\Premium\Database\Migration_Runner_Premium} instead.
*/
class Migration_Runner_Premium extends New_Migration_Runner_Premium {
/**
* Class constructor.
*
* @deprecated 16.3 Use {@see \Yoast\WP\SEO\Premium\Database\Migration_Runner_Premium} instead.
*/
public function __construct() {
\_deprecated_function( __METHOD__, 'Yoast SEO Premium 16.3', '\Yoast\WP\SEO\Premium\Database\Migration_Runner_Premium' );
parent::__construct();
}
}

View File

@@ -0,0 +1,121 @@
<?php
namespace Yoast\WP\SEO\Integrations\Admin;
use Yoast\WP\SEO\Actions\Indexing\Indexable_General_Indexation_Action;
use Yoast\WP\SEO\Actions\Indexing\Indexable_Post_Indexation_Action;
use Yoast\WP\SEO\Actions\Indexing\Indexable_Post_Type_Archive_Indexation_Action;
use Yoast\WP\SEO\Actions\Indexing\Indexable_Term_Indexation_Action;
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
use Yoast\WP\SEO\Helpers\Capability_Helper;
use Yoast\WP\SEO\Helpers\Options_Helper;
use Yoast\WP\SEO\Integrations\Integration_Interface;
use Yoast\WP\SEO\Premium\Actions\Prominent_Words\Content_Action;
use Yoast_Notification_Center;
/**
* Integration for determining and showing the notification
* to ask users to calculate prominent words for their site.
*
* @deprecated 15.1
* @codeCoverageIgnore
*
* @package Yoast\WP\SEO\Integrations\Admin
*/
class Prominent_Words_Notification implements Integration_Interface {
/**
* The ID of the notification.
*/
const NOTIFICATION_ID = 'wpseo-premium-prominent-words-recalculate';
/**
* How many indexables without prominent words should exist before this notification is shown to the user.
*/
const UNINDEXED_THRESHOLD = 25;
/**
* Prominent_Words_Notification_Integration constructor.
*
* @deprecated 15.1
* @codeCoverageIgnore
*
* @param Yoast_Notification_Center $notification_center The notification center.
* @param Content_Action $content_action The content action.
* @param Indexable_Post_Indexation_Action $post_indexation The post indexing action.
* @param Indexable_Term_Indexation_Action $term_indexation The term indexing action.
* @param Indexable_General_Indexation_Action $general_indexation The general indexing action.
* @param Indexable_Post_Type_Archive_Indexation_Action $post_type_archive_indexation The post type indexing action.
* @param Capability_Helper $capability The capability helper.
* @param Options_Helper $options The options helper.
*/
public function __construct(
Yoast_Notification_Center $notification_center,
Content_Action $content_action,
Indexable_Post_Indexation_Action $post_indexation,
Indexable_Term_Indexation_Action $term_indexation,
Indexable_General_Indexation_Action $general_indexation,
Indexable_Post_Type_Archive_Indexation_Action $post_type_archive_indexation,
Capability_Helper $capability,
Options_Helper $options
) {
\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
}
/**
* Initializes the integration by registering the right hooks and filters.
*
* @deprecated 15.1
* @codeCoverageIgnore
*
* @return void
*/
public function register_hooks() {
\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
}
/**
* Returns the conditionals based in which this loadable should be active.
*
* @deprecated 15.1
* @codeCoverageIgnore
*
* @return array
*/
public static function get_conditionals() {
return [ Admin_Conditional::class ];
}
/**
* Handles the option change to make sure the notification will be removed when link suggestions are disabled.
*
* @deprecated 15.1
* @codeCoverageIgnore
*
* @param mixed $old_value The old value.
* @param mixed $new_value The new value.
*/
public function handle_option_change( $old_value, $new_value ) {
\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
}
/**
* Manages, for each user, if the notification should be shown or removed.
*
* @deprecated 15.1
* @codeCoverageIgnore
*/
public function manage_notification() {
\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
}
/**
* Cleans up the notification for all applicable users.
*
* @deprecated 15.1
* @codeCoverageIgnore
*/
public function cleanup_notification() {
\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
}
}

View File

@@ -0,0 +1,13 @@
<?php
namespace Yoast\WP\SEO\Integrations\Admin\Prominent_Words;
/**
* Class Indexation_Integration. Indexing integration for prominent words.
*
* @deprecated 15.2
* @codeCoverageIgnore
*/
class Indexation_Integration extends Indexing_Integration {
}

View File

@@ -0,0 +1,42 @@
<?php
namespace Yoast\WP\SEO\Integrations\Admin\Prominent_Words;
use Yoast\WP\SEO\Conditionals\No_Conditionals;
use Yoast\WP\SEO\Integrations\Admin\Prominent_Words_Notification;
use Yoast\WP\SEO\Integrations\Integration_Interface;
/**
* Integration for the prominent words notification event used in the cron job.
*
* @deprecated 15.1
* @codeCoverageIgnore
*/
class Notification_Event_Integration implements Integration_Interface {
use No_Conditionals;
/**
* Notification_Event_Integration constructor.
*
* @deprecated 15.1
* @codeCoverageIgnore
*
* @param Prominent_Words_Notification $prominent_words_notification The prominent words notification integration.
*/
public function __construct( Prominent_Words_Notification $prominent_words_notification ) {
\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
}
/**
* Initializes the integration by registering the right hooks and filters.
*
* @deprecated 15.1
* @codeCoverageIgnore
*
* @return void
*/
public function register_hooks() {
\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
}
}

View File

@@ -0,0 +1,41 @@
<?php
namespace Yoast\WP\SEO\Presenters\Admin\Prominent_Words;
use Yoast\WP\SEO\Presenters\Abstract_Presenter;
/**
* Represents the list item presenter for the prominent words indexing.
*
* @deprecated 15.1
* @codeCoverageIgnore
*
* @package Yoast\WP\SEO\Presentations\Admin
*/
class Indexation_List_Item_Presenter extends Abstract_Presenter {
/**
* Prominent_Words_Indexation_List_Item_Presenter constructor.
*
* @deprecated 15.1
* @codeCoverageIgnore
*
* @param int $total_unindexed The number of objects that need to be indexed.
*/
public function __construct( $total_unindexed ) {
\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
}
/**
* Returns the output as string.
*
* @deprecated 15.1
* @codeCoverageIgnore
*
* @return string The output.
*/
public function present() {
\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
return '';
}
}

View File

@@ -0,0 +1,39 @@
<?php
namespace Yoast\WP\SEO\Presenters\Admin\Prominent_Words;
use Yoast\WP\SEO\Presenters\Abstract_Presenter;
/**
* Class Indexation_Modal_Presenter.
*
* @deprecated 15.1
* @codeCoverageIgnore
*/
class Indexation_Modal_Presenter extends Abstract_Presenter {
/**
* Indexation_Modal constructor.
*
* @deprecated 15.1
* @codeCoverageIgnore
*
* @param int $total_unindexed The number of objects that need to be indexed.
*/
public function __construct( $total_unindexed ) {
\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
}
/**
* Presents the modal.
*
* @deprecated 15.1
* @codeCoverageIgnore
*
* @return string The modal HTML.
*/
public function present() {
\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
return '';
}
}

View File

@@ -0,0 +1,27 @@
<?php
namespace Yoast\WP\SEO\Presenters;
/**
* Class Prominent_Words_Notification_Presenter
*
* @deprecated 15.1
* @codeCoverageIgnore
*
* @package Yoast\WP\SEO\Presenters
*/
class Prominent_Words_Notification extends Abstract_Presenter {
/**
* Presents the notification.
*
* @deprecated 15.1
* @codeCoverageIgnore
*
* @return string The notification.
*/
public function present() {
\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
return '';
}
}

View File

@@ -0,0 +1,39 @@
<?php
/**
* WPSEO Premium plugin file.
*
* @package WPSEO\Premium\Classes
*/
use Yoast\WP\SEO\Initializers\Redirect_Handler;
/**
* WPSEO_Redirect_Handler class
*
* @deprecated 16.0
*/
class WPSEO_Redirect_Handler extends Redirect_Handler {
/**
* Constructor to throw deprecation notice.
*
* @deprecated 16.0
* @codeCoverageIgnore
*/
public function __construct() {
\_deprecated_function( __METHOD__, 'WPSEO Premium 16.0', \esc_html( Redirect_Handler::class ) );
}
/**
* Loads the redirect handler.
*
* @deprecated 16.0
* @codeCoverageIgnore
*
* @return void
*/
public function load() {
\_deprecated_function( __METHOD__, 'WPSEO Premium 16.0', \esc_html( Redirect_Handler::class . '::initialize' ) );
$this->initialize();
}
}

View File

@@ -0,0 +1,42 @@
<?php
/**
* Graceful deprecation of various classes which were renamed.
*
* {@internal As this file is just (temporarily) put in place to warn extending
* plugins about the class name changes, it is exempt from select CS standards.}
*
* @package Yoast\WP\SEO\Premium
*
* @since 16.1
* @deprecated 16.1
*
* @phpcs:disable Generic.Files.OneObjectStructurePerFile.MultipleFound
* @phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedNamespaceFound
* @phpcs:disable Yoast.Commenting.CodeCoverageIgnoreDeprecated
* @phpcs:disable Yoast.Commenting.FileComment.Unnecessary
* @phpcs:disable Yoast.Files.FileName.InvalidClassFileName
*/
namespace Yoast\WP\SEO\WordPress;
use Yoast\WP\SEO\Premium\WordPress\Wrapper;
\_deprecated_file( \basename( __FILE__ ), 'Yoast SEO Premium 16.1' );
/**
* Class Premium_Wrapper.
*
* @deprecated 16.1 Use {@see \Yoast\WP\SEO\Premium\WordPress\Wrapper} instead.
*/
class Premium_Wrapper extends Wrapper {
/**
* Class constructor.
*
* @deprecated 16.1 Use {@see \Yoast\WP\SEO\Premium\WordPress\Wrapper} instead.
*/
public function __construct() {
\_deprecated_function( __METHOD__, 'Yoast SEO Premium 16.1', '\Yoast\WP\SEO\Premium\WordPress\Wrapper' );
parent::__construct();
}
}