Файловый менеджер - Редактировать - /home/kunzqhe/photostocker/2/deprecated.tar
Ðазад
index.php 0000644 00000000046 15154470326 0006373 0 ustar 00 <?php /** * Nothing to see here. */ src/integrations/admin/indexation-integration.php 0000644 00000011471 15154470326 0016340 0 ustar 00 <?php namespace Yoast\WP\SEO\Integrations\Admin; use WPSEO_Admin_Asset_Manager; use Yoast\WP\SEO\Actions\Indexing\Indexable_General_Indexation_Action; use Yoast\WP\SEO\Actions\Indexing\Indexable_Indexing_Complete_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\Conditionals\Migrations_Conditional; use Yoast\WP\SEO\Conditionals\Yoast_Admin_And_Dashboard_Conditional; use Yoast\WP\SEO\Conditionals\Yoast_Tools_Page_Conditional; use Yoast\WP\SEO\Helpers\Indexable_Helper; use Yoast\WP\SEO\Helpers\Options_Helper; use Yoast\WP\SEO\Integrations\Integration_Interface; /** * Indexation_Integration class. * * @deprecated 15.1 * @codeCoverageIgnore */ class Indexation_Integration implements Integration_Interface { /** * Returns the conditionals based in which this loadable should be active. * * @deprecated 15.1 * @codeCoverageIgnore * * @return array */ public static function get_conditionals() { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); return [ Admin_Conditional::class, Yoast_Admin_And_Dashboard_Conditional::class, Migrations_Conditional::class, ]; } /** * Indexation_Integration constructor. * * @deprecated 15.1 * @codeCoverageIgnore * * @param Indexable_Post_Indexation_Action $post_indexation The post indexation action. * @param Indexable_Term_Indexation_Action $term_indexation The term indexation action. * @param Indexable_Post_Type_Archive_Indexation_Action $post_type_archive_indexation The archive indexation action. * @param Indexable_General_Indexation_Action $general_indexation The general indexation action. * @param Indexable_Indexing_Complete_Action $complete_indexation_action The complete indexation action. * @param Options_Helper $options_helper The options helper. * @param WPSEO_Admin_Asset_Manager $asset_manager The admin asset manager. * @param Yoast_Tools_Page_Conditional $yoast_tools_page_conditional The Yoast tools page conditional. * @param Indexable_Helper $indexable_helper The indexable helper. */ public function __construct( Indexable_Post_Indexation_Action $post_indexation, Indexable_Term_Indexation_Action $term_indexation, Indexable_Post_Type_Archive_Indexation_Action $post_type_archive_indexation, Indexable_General_Indexation_Action $general_indexation, Indexable_Indexing_Complete_Action $complete_indexation_action, Options_Helper $options_helper, WPSEO_Admin_Asset_Manager $asset_manager, Yoast_Tools_Page_Conditional $yoast_tools_page_conditional, Indexable_Helper $indexable_helper ) { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); } /** * Initializes the integration. * * @deprecated 15.1 * @codeCoverageIgnore */ public function register_hooks() { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); } /** * Enqueues the required scripts. * * @deprecated 15.1 * @codeCoverageIgnore * * @return void */ public function enqueue_scripts() { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); } /** * Renders the indexation warning. * * @deprecated 15.1 * @codeCoverageIgnore * * @return void */ public function render_indexation_warning() { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); } /** * Renders the indexation modal. * * @deprecated 15.1 * @codeCoverageIgnore * * @return void */ public function render_indexation_modal() { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); } /** * Renders the indexation list item. * * @deprecated 15.1 * @codeCoverageIgnore * * @return void */ public function render_indexation_list_item() { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); } /** * Renders the indexation permalink warning. * * @deprecated 15.1 * @codeCoverageIgnore * * @return void */ public function render_indexation_permalink_warning() { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); } /** * Runs a single indexation pass of each indexation action. Intended for use as a shutdown function. * * @deprecated 15.1 * @codeCoverageIgnore * * @return void */ public function shutdown_indexation() { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); } /** * Returns the total number of unindexed objects. * * @deprecated 15.1 * @codeCoverageIgnore * * @return int The total number of unindexed objects. */ public function get_total_unindexed() { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); return 0; } } src/integrations/admin/link-count-notification-integration.php 0000644 00000004044 15154470326 0020743 0 ustar 00 <?php namespace Yoast\WP\SEO\Integrations\Admin; use Yoast\WP\SEO\Actions\Indexing\Post_Link_Indexing_Action; use Yoast\WP\SEO\Conditionals\Admin_Conditional; use Yoast\WP\SEO\Integrations\Integration_Interface; use Yoast_Notification_Center; /** * Link_Count_Notification_Integration class. * * @deprecated 15.1 * @codeCoverageIgnore */ class Link_Count_Notification_Integration implements Integration_Interface { /** * The ID of the link indexing notification. * * @var string */ const NOTIFICATION_ID = 'wpseo-reindex-links'; /** * Returns the conditionals based in which this loadable should be active. * * @deprecated 15.1 * @codeCoverageIgnore * * @return array */ public static function get_conditionals() { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); return [ Admin_Conditional::class ]; } /** * Link_Count_Notification_Integration constructor. * * @deprecated 15.1 * @codeCoverageIgnore * * @param Yoast_Notification_Center $notification_center The Yoast notification center. * @param Post_Link_Indexing_Action $post_link_indexing_action The post link indexing action. */ public function __construct( Yoast_Notification_Center $notification_center, Post_Link_Indexing_Action $post_link_indexing_action ) { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); } /** * Initializes the integration. * * @deprecated 15.1 * @codeCoverageIgnore */ public function register_hooks() { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); } /** * Removes the notification when it is set and the amount of unindexed items is lower than the threshold. * * @deprecated 15.1 * @codeCoverageIgnore */ public function cleanup_notification() { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); } /** * Adds the notification when it isn't set already and the amount of unindexed items is greater than the set * threshold. * * @deprecated 15.1 * @codeCoverageIgnore */ public function manage_notification() { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); } } src/integrations/admin/link-count-tools-integration.php 0000644 00000005133 15154470326 0017415 0 ustar 00 <?php namespace Yoast\WP\SEO\Integrations\Admin; use WPSEO_Admin_Asset_Manager; 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\Admin_Conditional; use Yoast\WP\SEO\Conditionals\Migrations_Conditional; use Yoast\WP\SEO\Conditionals\Yoast_Admin_And_Dashboard_Conditional; use Yoast\WP\SEO\Integrations\Integration_Interface; /** * Link_Count_Tools_Integration class. * * @deprecated 15.1 * @codeCoverageIgnore */ class Link_Count_Tools_Integration implements Integration_Interface { /** * Returns the conditionals based in which this loadable should be active. * * @deprecated 15.1 * @codeCoverageIgnore * * @return array */ public static function get_conditionals() { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); return [ Admin_Conditional::class, Yoast_Admin_And_Dashboard_Conditional::class, Migrations_Conditional::class, ]; } /** * Constructor. * * @deprecated 15.1 * @codeCoverageIgnore * * @param Post_Link_Indexing_Action $post_link_indexing_action The post link indexing action. * @param Term_Link_Indexing_Action $term_link_indexing_action The term link indexing action. * @param WPSEO_Admin_Asset_Manager $asset_manager The asset manager. */ public function __construct( Post_Link_Indexing_Action $post_link_indexing_action, Term_Link_Indexing_Action $term_link_indexing_action, WPSEO_Admin_Asset_Manager $asset_manager ) { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); } /** * Initializes the integration. * * @deprecated 15.1 * @codeCoverageIgnore */ public function register_hooks() { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); } /** * Enqueues all required assets. * * @deprecated 15.1 * @codeCoverageIgnore * * @return void */ public function enqueue_assets() { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); } /** * Renders the tools list item. * * @deprecated 15.1 * @codeCoverageIgnore * * @return void */ public function render_tools_overview_item() { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); } /** * Renders the link count indexing modal. * * @deprecated 15.1 * @codeCoverageIgnore * * @return void */ public function render_modal() { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); } /** * Returns the total number of unindexed objects. * * @deprecated 15.1 * @codeCoverageIgnore * * @return int */ protected function get_total_unindexed() { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); return 0; } } src/integrations/third-party/elementor.php 0000644 00000002745 15154470326 0015032 0 ustar 00 <?php // phpcs:disable Yoast.Commenting.FileComment.Unnecessary /** * 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 * * @since 16.7 * @deprecated 16.7 * * @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\Integrations\Third_Party; /** * Class Elementor_Exclude_Post_Types. * * @deprecated 16.7 Use {@see \Yoast\WP\SEO\Integrations\Third_Party\Exclude_Elementor_Post_Types} instead. */ class Elementor_Exclude_Post_Types extends Exclude_Elementor_Post_Types { /** * Elementor Exclude Post Types constructor. * * @deprecated 16.7 Use {@see \Yoast\WP\SEO\Integrations\Third_Party\Exclude_Elementor_Post_Types} instead. */ public function __construct() { \_deprecated_function( __METHOD__, 'Yoast SEO 16.7', '\Yoast\WP\SEO\Integrations\Third_Party\Exclude_Elementor_Post_Types' ); // Only call a constructor if the parent has one; we already are a subclass of the parent. if ( \is_callable( 'parent::__construct' ) ) { parent::__construct(); } } } src/actions/indexing/indexable-prepare-indexation-action.php 0000644 00000000452 15154470326 0020323 0 ustar 00 <?php namespace Yoast\WP\SEO\Actions\Indexing; /** * Action for preparing the indexing routine. * * @deprecated 15.3 - Use \Yoast\WP\SEO\Actions\Indexing\Indexing_Prepare_Action instead. * @codeCoverageIgnore */ class Indexable_Prepare_Indexation_Action extends Indexing_Prepare_Action { } src/actions/indexation/indexable-post-indexation-action.php 0000644 00000000530 15154470326 0020204 0 ustar 00 <?php namespace Yoast\WP\SEO\Actions\Indexation; /** * Reindexation action for post indexables. * * @deprecated 15.1 - Use \Yoast\WP\SEO\Actions\Indexing\Indexable_Post_Indexation_Action instead. * @codeCoverageIgnore */ class Indexable_Post_Indexation_Action extends \Yoast\WP\SEO\Actions\Indexing\Indexable_Post_Indexation_Action { } src/actions/indexation/indexable-prepare-indexation-action.php 0000644 00000000557 15154470326 0020666 0 ustar 00 <?php namespace Yoast\WP\SEO\Actions\Indexation; /** * Action for preparing the indexable indexation routine. * * @deprecated 15.1 - Use \Yoast\WP\SEO\Actions\Indexing\Indexable_Prepare_Indexation_Action instead. * @codeCoverageIgnore */ class Indexable_Prepare_Indexation_Action extends \Yoast\WP\SEO\Actions\Indexing\Indexable_Prepare_Indexation_Action { } src/actions/indexation/indexation-action-interface.php 0000644 00000000540 15154470326 0017227 0 ustar 00 <?php namespace Yoast\WP\SEO\Actions\Indexation; /** * Interface definition of reindexation action for indexables. * * @deprecated 15.1 - Use \Yoast\WP\SEO\Actions\Indexing\Indexation_Action_Interface instead. * @codeCoverageIgnore */ interface Indexation_Action_Interface extends \Yoast\WP\SEO\Actions\Indexing\Indexation_Action_Interface { } src/actions/indexation/indexable-complete-indexation-action.php 0000644 00000000571 15154470326 0021034 0 ustar 00 <?php namespace Yoast\WP\SEO\Actions\Indexation; use Yoast\WP\SEO\Actions\Indexing\Indexing_Complete_Action; /** * Indexing action to call when the indexing is completed. * * @deprecated 15.1 - Use \Yoast\WP\SEO\Actions\Indexing\Indexing_Complete_Action instead. * @codeCoverageIgnore */ class Indexable_Complete_Indexation_Action extends Indexing_Complete_Action { } src/actions/indexation/indexable-general-indexation-action.php 0000644 00000000544 15154470326 0020641 0 ustar 00 <?php namespace Yoast\WP\SEO\Actions\Indexation; /** * General reindexation action for indexables. * * @deprecated 15.1 - Use \Yoast\WP\SEO\Actions\Indexing\Indexable_General_Indexation_Action instead. * @codeCoverageIgnore */ class Indexable_General_Indexation_Action extends \Yoast\WP\SEO\Actions\Indexing\Indexable_General_Indexation_Action { } src/actions/indexation/indexable-term-indexation-action.php 0000644 00000000530 15154470326 0020166 0 ustar 00 <?php namespace Yoast\WP\SEO\Actions\Indexation; /** * Reindexation action for term indexables. * * @deprecated 15.1 - Use \Yoast\WP\SEO\Actions\Indexing\Indexable_Term_Indexation_Action instead. * @codeCoverageIgnore */ class Indexable_Term_Indexation_Action extends \Yoast\WP\SEO\Actions\Indexing\Indexable_Term_Indexation_Action { } src/actions/indexation/post-link-indexing-action.php 0000644 00000000510 15154470326 0016647 0 ustar 00 <?php namespace Yoast\WP\SEO\Actions\Indexation; /** * Reindexation action for post link indexables. * * @deprecated 15.1 - Use \Yoast\WP\SEO\Actions\Indexing\Post_Link_Indexing_Action instead. * @codeCoverageIgnore */ class Post_Link_Indexing_Action extends \Yoast\WP\SEO\Actions\Indexing\Post_Link_Indexing_Action { } src/actions/indexation/indexable-post-type-archive-indexation-action.php 0000644 00000000614 15154470326 0022605 0 ustar 00 <?php namespace Yoast\WP\SEO\Actions\Indexation; /** * Reindexation action for post type archive indexables. * * @deprecated 15.1 - Use \Yoast\WP\SEO\Actions\Indexing\Indexable_Post_Type_Archive_Indexation_Action instead. * @codeCoverageIgnore */ class Indexable_Post_Type_Archive_Indexation_Action extends \Yoast\WP\SEO\Actions\Indexing\Indexable_Post_Type_Archive_Indexation_Action { } src/actions/indexation/term-link-indexing-action.php 0000644 00000000510 15154470326 0016631 0 ustar 00 <?php namespace Yoast\WP\SEO\Actions\Indexation; /** * Reindexation action for term link indexables. * * @deprecated 15.1 - Use \Yoast\WP\SEO\Actions\Indexing\Term_Link_Indexing_Action instead. * @codeCoverageIgnore */ class Term_Link_Indexing_Action extends \Yoast\WP\SEO\Actions\Indexing\Term_Link_Indexing_Action { } src/actions/indexation/abstract-link-indexing-action.php 0000644 00000000530 15154470326 0017467 0 ustar 00 <?php namespace Yoast\WP\SEO\Actions\Indexation; /** * Reindexation action for link indexables. * * @deprecated 15.1 - Use \Yoast\WP\SEO\Actions\Indexing\Abstract_Link_Indexing_Action instead. * @codeCoverageIgnore */ abstract class Abstract_Link_Indexing_Action extends \Yoast\WP\SEO\Actions\Indexing\Abstract_Link_Indexing_Action { } src/conditionals/farsi-support-conditional.php 0000644 00000001102 15154470326 0015652 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; /** * Checks if the YOAST_SEO_FARSI_SUPPORT constant is set. * * @deprecated 17.2 * @codeCoverageIgnore */ class Farsi_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.2 * @codeCoverageIgnore * * @return string the name of the feature flag. */ public function get_feature_flag() { \_deprecated_function( __METHOD__, 'WPSEO 17.2' ); return 'FARSI_SUPPORT'; } } src/conditionals/norwegian-readability-conditional.php 0000644 00000001132 15154470326 0017317 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; /** * Checks if the YOAST_SEO_NORWEGIAN_READABILITY constant is set. * * @deprecated 16.8 * @codeCoverageIgnore */ class Norwegian_Readability_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 16.8 * @codeCoverageIgnore * * @return string the name of the feature flag. */ public function get_feature_flag() { \_deprecated_function( __METHOD__, 'WPSEO 16.8' ); return 'NORWEGIAN_READABILITY'; } } src/conditionals/greek-support-conditional.php 0000644 00000001102 15154470326 0015643 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; /** * Checks if the YOAST_SEO_GREEK_SUPPORT constant is set. * * @deprecated 17.5 * @codeCoverageIgnore */ class Greek_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.5 * @codeCoverageIgnore * * @return string the name of the feature flag. */ public function get_feature_flag() { \_deprecated_function( __METHOD__, 'WPSEO 17.5' ); return 'GREEK_SUPPORT'; } } src/presenters/open-graph/fb-app-id-presenter.php 0000644 00000001361 15154470326 0016052 0 ustar 00 <?php namespace Yoast\WP\SEO\Presenters\Open_Graph; use Yoast\WP\SEO\Presenters\Abstract_Indexable_Tag_Presenter; // Mark this file as deprecated. \_deprecated_file( __FILE__, 'WPSEO 15.5' ); /** * Presenter class for the Open Graph FB app ID. * * @deprecated 15.5 * @codeCoverageIgnore */ class FB_App_ID_Presenter extends Abstract_Indexable_Tag_Presenter { /** * The tag key name. * * @var string */ protected $key = 'fb:app_id'; /** * The tag format including placeholders. * * @var string */ protected $tag_format = self::META_PROPERTY_CONTENT; /** * Gets the raw value of a presentation. * * @return string The raw value. */ public function get() { return $this->presentation->open_graph_fb_app_id; } } src/presenters/admin/indexation-list-item-presenter.php 0000644 00000001726 15154470326 0017417 0 ustar 00 <?php namespace Yoast\WP\SEO\Presenters\Admin; use Yoast\WP\SEO\Helpers\Indexable_Helper; use Yoast\WP\SEO\Presenters\Abstract_Presenter; /** * Presenter class for the indexation list item. * * @deprecated 15.1 * @codeCoverageIgnore */ class Indexation_List_Item_Presenter extends Abstract_Presenter { /** * Indexation_List_Item_Presenter constructor. * * @deprecated 15.1 * @codeCoverageIgnore * * @param int $total_unindexed The number of objects that need to be indexed. * @param Indexable_Helper $indexable_helper The indexable helper. */ public function __construct( $total_unindexed, Indexable_Helper $indexable_helper ) { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); } /** * Presents the list item for the tools menu. * * @deprecated 15.1 * @codeCoverageIgnore * * @return string The list item HTML. */ public function present() { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); return ''; } } src/presenters/admin/indexation-warning-presenter.php 0000644 00000003164 15154470326 0017153 0 ustar 00 <?php namespace Yoast\WP\SEO\Presenters\Admin; use Yoast\WP\SEO\Helpers\Options_Helper; use Yoast\WP\SEO\Presenters\Abstract_Presenter; /** * Presenter class for the indexation warning. * * @deprecated 15.1 * @codeCoverageIgnore */ class Indexation_Warning_Presenter extends Abstract_Presenter { /** * Represents the link to action type. */ const ACTION_TYPE_LINK_TO = 'link_to'; /** * Represents the run here action type. */ const ACTION_TYPE_RUN_HERE = 'run_here'; /** * The number of objects that needs to be indexed. * * @var int */ protected $total_unindexed; /** * Determines if the action is a link or a button. * * The link links to the Yoast Tools page. * The button will run the action on the current page. * * @var string */ protected $action_type; /** * The options helper. * * @var Options_Helper */ protected $options_helper; /** * Indexation_Warning_Presenter constructor. * * @deprecated 15.1 * @codeCoverageIgnore * * @param int $total_unindexed The number of objects that needs to be indexed. * @param Options_Helper $options_helper The options helper. * @param string $action_type The action type. */ public function __construct( $total_unindexed, Options_Helper $options_helper, $action_type ) { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); } /** * Presents the warning that your site's content is not fully indexed. * * @deprecated 15.1 * @codeCoverageIgnore * * @return string The warning HTML. */ public function present() { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); return ''; } } src/presenters/admin/indexation-permalink-warning-presenter.php 0000644 00000001726 15154470326 0021135 0 ustar 00 <?php namespace Yoast\WP\SEO\Presenters\Admin; /** * Presenter class for the warning that is given when the Category URLs (stripcategorybase) option is touched. * * @deprecated 15.1 * @codeCoverageIgnore */ class Indexation_Permalink_Warning_Presenter extends Indexation_Warning_Presenter { /** * Represents the reason that the permalink settings are changed. */ const REASON_PERMALINK_SETTINGS = 'permalink_settings_changed'; /** * Represents the reason that the category base is changed. */ const REASON_CATEGORY_BASE_PREFIX = 'category_base_changed'; /** * Represents the reason that the home url option is changed. */ const REASON_HOME_URL_OPTION = 'home_url_option_changed'; /** * Presents the warning that your site's content is not fully indexed. * * @deprecated 15.1 * @codeCoverageIgnore * * @return string The warning HTML. */ public function present() { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); return ''; } } src/presenters/admin/indexation-modal-presenter.php 0000644 00000001377 15154470326 0016606 0 ustar 00 <?php namespace Yoast\WP\SEO\Presenters\Admin; use Yoast\WP\SEO\Presenters\Abstract_Presenter; /** * Presenter class for the indexation modal. * * @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 ''; } } src/presenters/admin/link-count-indexing-modal-presenter.php 0000644 00000001421 15154470326 0020320 0 ustar 00 <?php namespace Yoast\WP\SEO\Presenters\Admin; use Yoast\WP\SEO\Presenters\Abstract_Presenter; /** * Presenter class for the link count indexing modal. * * @deprecated 15.1 * @codeCoverageIgnore */ class Link_Count_Indexing_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 ''; } } src/presenters/admin/link-count-indexing-list-item-presenter.php 0000644 00000001445 15154470326 0021141 0 ustar 00 <?php namespace Yoast\WP\SEO\Presenters\Admin; use Yoast\WP\SEO\Presenters\Abstract_Presenter; /** * Presenter class for the link count indexing tool. * * @deprecated 15.1 * @codeCoverageIgnore */ class Link_Count_Indexing_List_Item_Presenter extends Abstract_Presenter { /** * Link_Count_Indexing_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 */ public function present() { \_deprecated_function( __METHOD__, 'WPSEO 15.1' ); return ''; } } frontend/class-primary-category.php 0000644 00000002043 15154470326 0013503 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Frontend */ /** * Adds customizations to the front end for the primary category. * * @deprecated 14.0 */ class WPSEO_Frontend_Primary_Category implements WPSEO_WordPress_Integration { /** * Registers the hooks necessary for correct primary category behaviour. */ public function register_hooks() { add_filter( 'post_link_category', [ $this, 'post_link_category' ], 10, 3 ); } /** * Filters post_link_category to change the category to the chosen category by the user. * * @deprecated 14.0 * @codeCoverageIgnore * * @param stdClass $category The category that is now used for the post link. * @param array|null $categories This parameter is not used. * @param WP_Post|null $post The post in question. * * @return array|object|WP_Error|null The category we want to use for the post link. */ public function post_link_category( $category, $categories = null, $post = null ) { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); return $category; } } frontend/breadcrumbs.php 0000644 00000006310 15154470326 0011374 0 ustar 00 <?php /** * Backwards compatibility class for breadcrumbs. * * @package Yoast\YoastSEO\Backwards_Compatibility */ use Yoast\WP\SEO\Memoizers\Meta_Tags_Context_Memoizer; use Yoast\WP\SEO\Presenters\Breadcrumbs_Presenter; use Yoast\WP\SEO\Surfaces\Helpers_Surface; /** * Class WPSEO_Breadcrumbs * * @codeCoverageIgnore Because of deprecation. */ class WPSEO_Breadcrumbs { /** * Instance of this class. * * @var WPSEO_Breadcrumbs */ public static $instance; /** * Last used 'before' string. * * @var string */ public static $before = ''; /** * Last used 'after' string. * * @var string */ public static $after = ''; /** * The memoizer for the meta tags context. * * @var Meta_Tags_Context_Memoizer */ protected $context_memoizer; /** * The helpers surface. * * @var Helpers_Surface */ protected $helpers; /** * The replace vars helper * * @var WPSEO_Replace_Vars */ protected $replace_vars; /** * WPSEO_Breadcrumbs constructor. */ public function __construct() { $this->context_memoizer = YoastSEO()->classes->get( Meta_Tags_Context_Memoizer::class ); $this->helpers = YoastSEO()->classes->get( Helpers_Surface::class ); $this->replace_vars = YoastSEO()->classes->get( WPSEO_Replace_Vars::class ); } /** * Get breadcrumb string using the singleton instance of this class. * * @param string $before Optional string to prepend. * @param string $after Optional string to append. * @param bool $display Echo or return flag. * * @return string Returns the breadcrumbs as a string. */ public static function breadcrumb( $before = '', $after = '', $display = true ) { // Remember the last used before/after for use in case the object goes __toString(). self::$before = $before; self::$after = $after; $output = $before . self::get_instance()->render() . $after; if ( $display === true ) { echo $output; return ''; } return $output; } /** * Magic method to use in case the class would be send to string. * * @return string The rendered breadcrumbs. */ public function __toString() { return self::$before . $this->render() . self::$after; } /** * Retrieves an instance of the class. * * @return static The instance. */ public static function get_instance() { if ( is_null( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Returns the collected links for the breadcrumbs. * * @return array The collected links. */ public function get_links() { $context = $this->context_memoizer->for_current_page(); return $context->presentation->breadcrumbs; } /** * Renders the breadcrumbs. * * @return string The rendered 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; $presenter->replace_vars = $this->replace_vars; $presenter->helpers = $this->helpers; return $presenter->present(); } } frontend/class-opengraph.php 0000644 00000013413 15154470326 0012173 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Frontend */ /** * This code adds the OpenGraph output. * * @deprecated 14.0 */ class WPSEO_OpenGraph { /* ********************* DEPRECATED METHODS ********************* */ /** * Class constructor. * * @deprecated 14.0 * @codeCoverageIgnore */ public function __construct() { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); } /** * Main OpenGraph output. * * @deprecated 14.0 * @codeCoverageIgnore */ public function opengraph() { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); } /** * Internal function to output FB tags. This also adds an output filter to each bit of output based on the property. * * @deprecated 14.0 * @codeCoverageIgnore * * @param string $property Property attribute value. * @param string $content Content attribute value. * * @return bool */ public function og_tag( $property, $content ) { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); /** * Filter: 'wpseo_og_' . $og_property - Allow developers to change the content of specific OG meta tags. * * @deprecated 14.0 * * @api string $content The content of the property. */ $content = apply_filters_deprecated( 'wpseo_og_' . $og_property, $content, 'WPSEO 14.0' ); return true; } /** * Outputs the canonical URL as OpenGraph URL, which consolidates likes and shares. * * @deprecated 14.0 * @codeCoverageIgnore * * @link https://ogp.me/#type_article * * @return bool */ public function url() { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); return false; } /** * Outputs the SEO title as OpenGraph title. * * @deprecated 14.0 * @codeCoverageIgnore * * @link https://ogp.me/#type_article * * @param bool $echo Whether or not to echo the output. * * @return string|bool */ public function og_title( $echo = true ) { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); return false; } /** * Outputs the OpenGraph description, specific OG description first, if not, grabs the meta description. * * @deprecated 14.0 * @codeCoverageIgnore * * @param bool $echo Whether to echo or return the description. * * @return string */ public function description( $echo = true ) { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); return ''; } /** * Outputs the author's FB page. * * @deprecated 14.0 * @codeCoverageIgnore * * @link https://developers.facebook.com/blog/post/2013/06/19/platform-updates--new-open-graph-tags-for-media-publishers-and-more/ * @link https://ogp.me/#type_article * * @return bool */ public function article_author_facebook() { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); return false; } /** * Outputs the website's FB page. * * @deprecated 14.0 * @codeCoverageIgnore * * @link https://developers.facebook.com/blog/post/2013/06/19/platform-updates--new-open-graph-tags-for-media-publishers-and-more/ * @link https://ogp.me/#type_article * * @return bool */ public function website_facebook() { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); return false; } /** * Outputs the OpenGraph type. * * @deprecated 14.0 * @codeCoverageIgnore * * @param bool $echo Whether to echo or return the type. * * @return string */ public function type( $echo = true ) { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); return ''; } /** * Outputs the locale, doing some conversions to make sure the proper Facebook locale is output. * * Last update/compare with FB list done on 2015-03-16 by Rarst. * * @deprecated 14.0 * @codeCoverageIgnore * * @link https://developers.facebook.com/docs/internationalization/#locales for the list of supported locales. * @link https://ogp.me/#type_article * * @param bool $echo Whether to echo or return the locale. * * @return string */ public function locale( $echo = true ) { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); return ''; } /** * Filters the Facebook plugins metadata. * * @deprecated 14.0 * @codeCoverageIgnore * * @param array $meta_tags The array to fix. * * @return array */ public function facebook_filter( $meta_tags ) { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); return []; } /** * Outputs the site name straight from the blog info. * * @deprecated 14.0 * @codeCoverageIgnore * * @return void */ public function site_name() { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); } /** * Outputs the article publish and last modification date. * * @deprecated 14.0 * @codeCoverageIgnore * * @link https://ogp.me/#type_article * * @return bool ; */ public function publish_date() { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); return true; } /** * Creates new WPSEO_OpenGraph_Image class and get the images to set the og:image. * * @deprecated 14.0 * @codeCoverageIgnore * * @param string|bool $image Optional. Image URL. * * @return void */ public function image( $image = false ) { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); } /** * Outputs the Facebook app_id. * * @deprecated 14.0 * @codeCoverageIgnore * * @return void */ public function app_id() { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); } /** * Outputs the article tags as article:tag tags. * * @deprecated 14.0 * @codeCoverageIgnore * * @link https://ogp.me/#type_article * * @return bool */ public function tags() { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); return false; } /** * Outputs the article category as an article:section tag. * * @deprecated 14.0 * @codeCoverageIgnore * * @link https://ogp.me/#type_article * * @return bool ; */ public function category() { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); return false; } } frontend/schema/interface-wpseo-graph-piece.php 0000644 00000001055 15154470326 0015621 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Frontend\Schema */ if ( ! interface_exists( 'WPSEO_Graph_Piece' ) ) { /** * An interface for registering Schema Graph Pieces. * * @since 10.2 * @deprecated 14.0 */ interface WPSEO_Graph_Piece { /** * Add your piece of the graph. * * @return array|bool A graph piece on success, false on failure. */ public function generate(); /** * Determines whether or not a piece should be added to the graph. * * @return bool */ public function is_needed(); } } frontend/schema/class-schema-website.php 0000644 00000001033 15154470326 0014343 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Frontend\Schema */ use Yoast\WP\SEO\Generators\Schema\Website; /** * Returns schema Website data. * * @since 10.2 * @deprecated 14.0 */ class WPSEO_Schema_Website extends WPSEO_Deprecated_Graph_Piece { /** * WPSEO_Schema_Website constructor. * * @deprecated 14.0 * @codeCoverageIgnore * * @param null $context The context. No longer used but present for BC. */ public function __construct( $context = null ) { parent::__construct( Website::class ); } } frontend/schema/class-schema.php 0000644 00000001646 15154470326 0012715 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Frontend\Schema */ /** * Class WPSEO_Schema * * Outputs schema code specific for Google's JSON LD stuff. * * @since 1.8 * @deprecated 14.0 */ class WPSEO_Schema implements WPSEO_WordPress_Integration { /** * Registers the hooks. * * @deprecated 14.0 * @codeCoverageIgnore */ public function register_hooks() { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); } /** * JSON LD output function that the functions for specific code can hook into. * * @deprecated 14.0 * @codeCoverageIgnore * * @since 1.8 */ public function json_ld() { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); } /** * Outputs the JSON LD code in a valid JSON+LD wrapper. * * @since 10.2 * @deprecated 14.0 * @codeCoverageIgnore * * @return void */ public function generate() { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); } } frontend/schema/class-schema-faq.php 0000644 00000003476 15154470326 0013465 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Frontend\Schema */ use Yoast\WP\SEO\Generators\Schema\FAQ; /** * Returns schema FAQ data. * * @since 11.3 * @deprecated 14.0 */ class WPSEO_Schema_FAQ extends WPSEO_Deprecated_Graph_Piece { /** * WPSEO_Schema_FAQ constructor. * * @deprecated 14.0 * @codeCoverageIgnore * * @param null $context The context. No longer used but present for BC. */ public function __construct( $context = null ) { parent::__construct( FAQ::class ); } /** * If this fires, we know there's an FAQ block ont he page, so filter the page type. * * @deprecated 14.0 * @codeCoverageIgnore * * @param array $blocks The blocks of this type on the current page. */ public function prepare_schema( $blocks ) { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); } /** * Change the page type to an array if it isn't one, include FAQPage. * * @deprecated 14.0 * @codeCoverageIgnore * * @param array|string $page_type The page type. * * @return array The page type that's now an array. */ public function change_schema_page_type( $page_type ) { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); if ( ! is_array( $page_type ) ) { $page_type = [ $page_type ]; } $page_type[] = 'FAQPage'; return $page_type; } /** * Add the Questions in our FAQ blocks as separate pieces to the graph. * * @deprecated 14.0 * @codeCoverageIgnore * * @param array $graph Schema data for the current page. * @param WP_Block_Parser_Block $block The block data array. * @param WPSEO_Schema_Context $context A value object with context variables. * * @return array Our Schema graph. */ public function render_schema_questions( $graph, $block, $context ) { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); return []; } } frontend/schema/class-schema-organization.php 0000644 00000001064 15154470326 0015411 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Frontend\Schema */ use Yoast\WP\SEO\Generators\Schema\Organization; /** * Returns schema Organization data. * * @since 10.2 * @deprecated 14.0 */ class WPSEO_Schema_Organization extends WPSEO_Deprecated_Graph_Piece { /** * WPSEO_Schema_Organization constructor. * * @deprecated 14.0 * @codeCoverageIgnore * * @param null $context The context. No longer used but present for BC. */ public function __construct( $context = null ) { parent::__construct( Organization::class ); } } frontend/schema/class-schema-person.php 0000644 00000010125 15154470326 0014211 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Frontend\Schema */ use Yoast\WP\SEO\Config\Schema_IDs; use Yoast\WP\SEO\Generators\Schema\Person; /** * Returns schema Person data. * * @since 10.2 * @deprecated 14.0 */ class WPSEO_Schema_Person extends WPSEO_Deprecated_Graph_Piece { /** * The hash used for images. * * @var string */ protected $image_hash = Schema_IDs::PERSON_LOGO_HASH; /** * Array of the social profiles we display for a Person. * * @var string[] */ private $social_profiles = [ 'facebook', 'instagram', 'linkedin', 'pinterest', 'twitter', 'myspace', 'youtube', 'soundcloud', 'tumblr', 'wikipedia', ]; /** * WPSEO_Schema_Person constructor. * * @deprecated 14.0 * @codeCoverageIgnore * * @param null $context The context. No longer used but present for BC. */ public function __construct( $context = null ) { parent::__construct( Person::class ); } /** * Determines a User ID for the Person data. * * @deprecated 14.0 * @codeCoverageIgnore * * @return bool|int User ID or false upon return. */ protected function determine_user_id() { _deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\WP\SEO\Generators\Schema\Person::determine_user_id' ); return $this->stable->determine_user_id(); } /** * Retrieve a list of social profile URLs for Person. * * @deprecated 14.0 * @codeCoverageIgnore * * @param int $user_id User ID. * * @return string[] A list of social profiles. */ protected function get_social_profiles( $user_id ) { _deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\WP\SEO\Generators\Schema\Person::get_social_profiles' ); /** * Filter: 'wpseo_schema_person_social_profiles' - Allows filtering of social profiles per user. * * @param int $user_id The current user we're grabbing social profiles for. * * @api string[] $social_profiles The array of social profiles to retrieve. Each should be a user meta field * key. As they are retrieved using the WordPress function `get_the_author_meta`. */ $social_profiles = apply_filters( 'wpseo_schema_person_social_profiles', $this->social_profiles, $user_id ); $output = []; // We can only handle an array. if ( ! is_array( $social_profiles ) ) { return $output; } foreach ( $social_profiles as $profile ) { // Skip non-string values. if ( ! is_string( $profile ) ) { continue; } $social_url = $this->url_social_site( $profile, $user_id ); if ( $social_url ) { $output[] = $social_url; } } return $output; } /** * Builds our array of Schema Person data for a given user ID. * * @deprecated 14.0 * @codeCoverageIgnore * * @param int $user_id The user ID to use. * * @return array An array of Schema Person data. */ protected function build_person_data( $user_id ) { _deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\WP\SEO\Generators\Schema\Person::build_person_data' ); return $this->stable->build_person_data( $user_id ); } /** * Returns an ImageObject for the persons avatar. * * @deprecated 14.0 * @codeCoverageIgnore * * @param array $data The Person schema. * @param WP_User $user_data User data. * * @return array The Person schema. */ protected function add_image( $data, $user_data ) { _deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\WP\SEO\Generators\Schema\Person::add_image' ); return $this->stable->add_image( $data, $user_data ); } /** * Returns an author's social site URL. * * @deprecated 14.0 * @codeCoverageIgnore * * @param string $social_site The social site to retrieve the URL for. * @param mixed $user_id The user ID to use function outside of the loop. * * @return string */ protected function url_social_site( $social_site, $user_id = false ) { _deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\WP\SEO\Generators\Schema\Person::url_social_site' ); $url = get_the_author_meta( $social_site, $user_id ); if ( ! empty( $url ) && $social_site === 'twitter' ) { $url = 'https://twitter.com/' . $url; } return $url; } } frontend/schema/class-schema-author.php 0000644 00000005116 15154470326 0014211 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Frontend\Schema */ use Yoast\WP\SEO\Config\Schema_IDs; use Yoast\WP\SEO\Generators\Schema\Author; /** * Returns schema Person data. * * @since 10.2 * @deprecated 14.0 */ class WPSEO_Schema_Author extends WPSEO_Deprecated_Graph_Piece { /** * The hash used for images. * * @var string */ protected $image_hash = Schema_IDs::AUTHOR_LOGO_HASH; /** * The Schema type we use for this class. * * @var string[] */ protected $type = [ 'Person' ]; /** * WPSEO_Schema_Author constructor. * * @deprecated 14.0 * @codeCoverageIgnore * * @param null $context The context. No longer used but present for BC. */ public function __construct( $context = null ) { parent::__construct( Author::class ); } /** * Determine whether we should return Person schema. * * @deprecated 14.0 * @codeCoverageIgnore * * @return bool */ public function is_needed() { _deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\WP\SEO\Generators\Schema\Author::is_needed' ); if ( $this->stable->context->indexable->object_type === 'user' ) { return true; } // This call to `is_post_author` is why this whole block could not be replaced with a `parent::is_needed()` call. if ( $this->is_post_author() ) { // If the author is the user the site represents, no need for an extra author block. if ( $this->stable->is_needed() ) { return (int) $this->stable->context->post->post_author !== $this->stable->context->site_user_id; } return true; } return false; } /** * Gets the Schema type we use for this class. * * @deprecated 14.0 * @codeCoverageIgnore * * @return string[] The schema type. */ public static function get_type() { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); return [ 'Person' ]; } /** * Determine whether the current URL is worthy of Article schema. * * @deprecated 14.0 * @codeCoverageIgnore * * @return bool */ protected function is_post_author() { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); return ( $this->stable->context->indexable->object_type === 'post' && $this->helpers->schema->article->is_article_post_type( $this->stable->context->indexable->object_sub_type ) ); } /** * Determines a User ID for the Person data. * * @deprecated 14.0 * @codeCoverageIgnore * * @return bool|int User ID or false upon return. */ protected function determine_user_id() { _deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\WP\SEO\Generators\Schema\Author::determine_user_id' ); return parent::determine_user_id(); } } frontend/schema/class-schema-utils.php 0000644 00000003607 15154470326 0014052 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Frontend\Schema */ /** * Schema utility functions. * * @since 11.6 * @deprecated 14.0 */ class WPSEO_Schema_Utils { /** * Retrieves a user's Schema ID. * * @deprecated 14.0 * @codeCoverageIgnore * * @param int $user_id The ID of the User you need a Schema ID for. * @param WPSEO_Schema_Context $context A value object with context variables. * * @return string The user's schema ID. */ public static function get_user_schema_id( $user_id, $context ) { _deprecated_function( __METHOD__, 'WPSEO 14.0', 'YoastSEO()->helpers->schema->id->get_user_schema_id' ); return YoastSEO()->helpers->schema->id->get_user_schema_id( $user_id, $context ); } /** * Retrieves the post title with fallback to `No title`. * * @deprecated 14.0 * @codeCoverageIgnore * * @param int $post_id Optional. Post ID. * * @return string The post title with fallback to `No title`. */ public static function get_post_title_with_fallback( $post_id = 0 ) { _deprecated_function( __METHOD__, 'WPSEO 14.0', ' YoastSEO()->helpers->post->get_post_title_with_fallback' ); return YoastSEO()->helpers->post->get_post_title_with_fallback( $post_id ); } /** * Adds the `inLanguage` property to a Schema piece. * * Must use one of the language codes from the IETF BCP 47 standard. The * language tag syntax is made of one or more subtags separated by a hyphen * e.g. "en", "en-US", "zh-Hant-CN". * * @deprecated 14.0 * @codeCoverageIgnore * * @param array $data The Schema piece data. * * @return array The Schema piece data with added language property. */ public static function add_piece_language( $data ) { _deprecated_function( __METHOD__, 'WPSEO 14.0', 'YoastSEO()->helpers->schema->language->add_piece_language' ); return YoastSEO()->helpers->schema->language->add_piece_language( $data ); } } frontend/schema/class-schema-ids.php 0000644 00000002233 15154470326 0013463 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Frontend\Schema */ /** * Constants used for @id variables. * * @since 10.2 * @deprecated 14.0 */ class WPSEO_Schema_IDs { /** * Hash used for the Author `@id`. */ const AUTHOR_HASH = '#author'; /** * Hash used for the Author Logo's `@id`. */ const AUTHOR_LOGO_HASH = '#authorlogo'; /** * Hash used for the Breadcrumb's `@id`. */ const BREADCRUMB_HASH = '#breadcrumb'; /** * Hash used for the Person `@id`. */ const PERSON_HASH = '#/schema/person/'; /** * Hash used for the Article `@id`. */ const ARTICLE_HASH = '#article'; /** * Hash used for the Organization `@id`. */ const ORGANIZATION_HASH = '#organization'; /** * Hash used for the Organization `@id`. */ const ORGANIZATION_LOGO_HASH = '#logo'; /** * Hash used for the logo `@id`. */ const PERSON_LOGO_HASH = '#personlogo'; /** * Hash used for an Article's primary image `@id`. */ const PRIMARY_IMAGE_HASH = '#primaryimage'; /** * Hash used for the WebPage's `@id`. */ const WEBPAGE_HASH = '#webpage'; /** * Hash used for the Website's `@id`. */ const WEBSITE_HASH = '#website'; } frontend/schema/class-schema-webpage.php 0000644 00000002755 15154470326 0014327 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Frontend\Schema */ use Yoast\WP\SEO\Generators\Schema\WebPage; /** * Returns schema WebPage data. * * @since 10.2 * @deprecated 14.0 */ class WPSEO_Schema_WebPage extends WPSEO_Deprecated_Graph_Piece { /** * The date helper. * * @var WPSEO_Date_Helper */ protected $date; /** * WPSEO_Schema_WebPage constructor. * * @deprecated 14.0 * @codeCoverageIgnore * * @param null $context The context. No longer used but present for BC. */ public function __construct( $context = null ) { parent::__construct( WebPage::class ); $this->date = new WPSEO_Date_Helper(); } /** * Adds an author property to the $data if the WebPage is not represented. * * @deprecated 14.0 * @codeCoverageIgnore * * @param array $data The WebPage schema. * @param WP_Post $post The post the context is representing. * * @return array The WebPage schema. */ public function add_author( $data, $post ) { _deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\WP\SEO\Generators\Schema\WebPage::add_author' ); return $this->stable->add_author( $data, $post ); } /** * If we have an image, make it the primary image of the page. * * @deprecated 14.0 * @codeCoverageIgnore * * @param array $data WebPage schema data. */ public function add_image( &$data ) { _deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\WP\SEO\Generators\Schema\WebPage::add_image' ); $this->stable->add_image( $data ); } } frontend/schema/class-schema-image.php 0000644 00000005106 15154470326 0013770 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Frontend\Schema */ /** * Returns schema image data. * * @since 11.1 * * @deprecated 14.0 * * @property string $schema_id The `@id` to use for the returned image. * @property array $data The ImageObject Schema array. * @property int $attachment_id The ID of the attachment used to generate the object. */ class WPSEO_Schema_Image { /** * Value to use as the image id. * * @var string */ private $schema_id; /** * WPSEO_Schema_Image constructor. * * @codeCoverageIgnore * @deprecated 14.0 * * @param string $schema_id The string to use in an image's `@id`. */ public function __construct( $schema_id ) { _deprecated_function( __METHOD__, 'WPSEO 14.0', 'YoastSEO()->helpers->schema->image' ); $this->schema_id = $schema_id; } /** * Find an image based on its URL and generate a Schema object for it. * * @codeCoverageIgnore * @deprecated 14.0 * * @param string $url The image URL to base our object on. * @param string $caption An optional caption. * * @return array Schema ImageObject array. */ public function generate_from_url( $url, $caption = '' ) { _deprecated_function( __METHOD__, 'WPSEO 14.0', 'YoastSEO()->helpers->schema->image->generate_from_url' ); return YoastSEO()->helpers->schema->image->generate_from_url( $this->schema_id, $url, $caption ); } /** * Retrieve data about an image from the database and use it to generate a Schema object. * * @codeCoverageIgnore * @deprecated 14.0 * * @param int $attachment_id The attachment to retrieve data from. * @param string $caption The caption string, if there is one. * * @return array Schema ImageObject array. */ public function generate_from_attachment_id( $attachment_id, $caption = '' ) { _deprecated_function( __METHOD__, 'WPSEO 14.0', 'YoastSEO()->helpers->schema->image->generate_from_attachment_id' ); return YoastSEO()->helpers->schema->image->generate_from_attachment_id( $this->schema_id, $attachment_id, $caption ); } /** * If we can't find $url in our database, we output a simple ImageObject. * * @codeCoverageIgnore * @deprecated 14.0 * * @param string $url The image URL. * @param string $caption A caption, if set. * * @return array Schema ImageObject array. */ public function simple_image_object( $url, $caption = '' ) { _deprecated_function( __METHOD__, 'WPSEO 14.0', 'YoastSEO()->helpers->schema->image->simple_image_object' ); return YoastSEO()->helpers->schema->image->simple_image_object( $this->schema_id, $url, $caption ); } } frontend/schema/class-schema-howto.php 0000644 00000013445 15154470326 0014053 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Frontend\Schema */ use Yoast\WP\SEO\Generators\Schema\HowTo; /** * Returns schema FAQ data. * * @since 11.5 * @deprecated 14.0 */ class WPSEO_Schema_HowTo extends WPSEO_Deprecated_Graph_Piece { /** * The HowTo blocks count on the current page. * * @var int */ private $counter = 0; /** * WPSEO_Schema_FAQ constructor. * * @deprecated 14.0 * @codeCoverageIgnore * * @param null $context The context. No longer used but present for BC. */ public function __construct( $context = null ) { parent::__construct( HowTo::class ); } /** * Renders the How-To block into our graph. * * @deprecated 14.0 * @codeCoverageIgnore * * @param array $graph Our Schema data. * @param array $block The How-To block content. * * @return mixed */ public function render( $graph, $block ) { _deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\WP\SEO\Generators\Schema\HowTo::add_how_to' ); ++$this->counter; $this->add_how_to( $graph, $block, $this->counter ); return $graph; } /** * Generates the HowTo schema for a block. * * @param array $graph Our Schema data. * @param array $block The How-To block content. * @param int $index The index of the current block. */ protected function add_how_to( &$graph, $block, $index ) { $data = [ '@type' => 'HowTo', '@id' => $this->stable->context->canonical . '#howto-' . ( $index + 1 ), 'name' => $this->helpers->schema->html->smart_strip_tags( $this->helpers->post->get_post_title_with_fallback( $this->stable->context->id ) ), 'mainEntityOfPage' => [ '@id' => $this->stable->context->main_schema_id ], 'description' => '', ]; if ( isset( $block['attrs']['jsonDescription'] ) ) { $data['description'] = $this->helpers->schema->html->sanitize( $block['attrs']['jsonDescription'] ); } $this->add_duration( $data, $block['attrs'] ); $this->add_steps( $data, $block['attrs']['steps'] ); $data = $this->helpers->schema->language->add_piece_language( $data ); $graph[] = $data; } /** * Adds the steps to our How-To output. * * @param array $data Our How-To schema data. * @param array $steps Our How-To block's steps. */ private function add_steps( &$data, $steps ) { foreach ( $steps as $step ) { $schema_id = $this->stable->context->canonical . '#' . esc_attr( $step['id'] ); $schema_step = [ '@type' => 'HowToStep', 'url' => $schema_id, ]; if ( isset( $step['jsonText'] ) ) { $json_text = $this->helpers->schema->html->sanitize( $step['jsonText'] ); } if ( isset( $step['jsonName'] ) ) { $json_name = $this->helpers->schema->html->smart_strip_tags( $step['jsonName'] ); } if ( empty( $json_name ) ) { if ( empty( $step['text'] ) ) { continue; } $schema_step['text'] = ''; $this->add_step_image( $schema_step, $step ); // If there is no text and no image, don't output the step. if ( empty( $json_text ) && empty( $schema_step['image'] ) ) { continue; } if ( ! empty( $json_text ) ) { $schema_step['text'] = $json_text; } } elseif ( empty( $json_text ) ) { $schema_step['text'] = $json_name; } else { $schema_step['name'] = $json_name; $schema_step['itemListElement'] = [ [ '@type' => 'HowToDirection', 'text' => $json_text, ], ]; $this->add_step_description( $schema_step, $json_text ); $this->add_step_image( $schema_step, $step ); } $data['step'][] = $schema_step; } } /** * Adds the duration of the task to the Schema. * * @param array $data Our How-To schema data. * @param array $attributes The block data attributes. */ private function add_duration( &$data, $attributes ) { if ( empty( $attributes['hasDuration'] ) ) { return; } $days = empty( $attributes['days'] ) ? 0 : $attributes['days']; $hours = empty( $attributes['hours'] ) ? 0 : $attributes['hours']; $minutes = empty( $attributes['minutes'] ) ? 0 : $attributes['minutes']; if ( ( $days + $hours + $minutes ) > 0 ) { $data['totalTime'] = esc_attr( 'P' . $days . 'DT' . $hours . 'H' . $minutes . 'M' ); } } /** * Determines whether we're part of an article or a webpage. * * @deprecated 14.0 * @codeCoverageIgnore * * @return string A reference URL. */ protected function get_main_schema_id() { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); return $this->stable->context->main_schema_id; } /** * Checks if we have a step description, if we do, add it. * * @param array $schema_step Our Schema output for the Step. * @param string $json_text The step text. */ private function add_step_description( &$schema_step, $json_text ) { $schema_step['itemListElement'] = [ [ '@type' => 'HowToDirection', 'text' => $json_text, ], ]; } /** * Checks if we have a step image, if we do, add it. * * @param array $schema_step Our Schema output for the Step. * @param array $step The step block data. */ private function add_step_image( &$schema_step, $step ) { 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'] ) ); } } } /** * Generates the image schema from the attachment $url. * * @deprecated 14.0 * @codeCoverageIgnore * * @param string $url Attachment url. * * @return array Image schema. */ protected function get_image_schema( $url ) { _deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\WP\SEO\Generators\Schema\HowTo::get_image_schema' ); $schema_id = $this->stable->context->canonical . '#schema-image-' . md5( $url ); return $this->helpers->schema->image->generate_from_url( $schema_id, $url ); } } frontend/schema/class-schema-article.php 0000644 00000002246 15154470326 0014333 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Frontend\Schema */ use Yoast\WP\SEO\Generators\Schema\Article; /** * Returns schema Article data. * * @since 10.2 * @deprecated 14.0 */ class WPSEO_Schema_Article extends WPSEO_Deprecated_Graph_Piece { /** * The date helper. * * @var WPSEO_Date_Helper */ protected $date; /** * WPSEO_Schema_Article constructor. * * @deprecated 14.0 * @codeCoverageIgnore * * @param array|null $context The context. No longer used but present for BC. */ public function __construct( $context = null ) { parent::__construct( Article::class ); $this->date = new WPSEO_Date_Helper(); } /** * Determines whether a given post type should have Article schema. * * @deprecated 14.0 * @codeCoverageIgnore * * @param string|null $post_type Post type to check. * * @return bool True if it has article schema, false if not. */ public static function is_article_post_type( $post_type = null ) { _deprecated_function( __METHOD__, 'WPSEO 14.0', 'YoastSEO()->helpers->schema->article->is_article_post_type' ); return YoastSEO()->helpers->schema->article->is_article_post_type( $post_type ); } } frontend/schema/class-schema-faq-questions.php 0000644 00000002724 15154470326 0015510 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Frontend\Schema */ /** * Returns a question object for each question in an FAQ block. * * @since 11.1 * @deprecated 14.0 */ class WPSEO_Schema_FAQ_Questions { /** * A value object with context variables. * This property is public, because originally it was dynamically declared. * * @var WPSEO_Schema_Context */ public $context; /** * WPSEO_Schema_FAQ_Questions constructor. * * @deprecated 14.0 * @codeCoverageIgnore * * @param array $data Our schema graph. * @param WP_Block_Parser_Block $block The FAQ block of this type. * @param WPSEO_Schema_Context $context A value object with context variables. */ public function __construct( $data, $block, $context ) { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); $this->context = $context; } /** * Find an image based on its URL and generate a Schema object for it. * * @deprecated 14.0 * @codeCoverageIgnore * * @return array The Schema with Questions added. */ public function generate() { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); return []; } /** * Generate a Question piece. * * @deprecated 14.0 * @codeCoverageIgnore * * @param array $question The question to generate schema for. * * @return array Schema.org Question piece. */ protected function generate_question_block( $question ) { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); return []; } } frontend/schema/class-schema-faq-question-list.php 0000644 00000001613 15154470326 0016272 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Frontend\Schema */ /** * Returns a question object for each question in an FAQ block. * * @since 11.1 * * @deprecated 14.0 */ class WPSEO_Schema_FAQ_Question_List { /** * WPSEO_Schema_FAQ_Question_List constructor. * * @deprecated 14.0 * @codeCoverageIgnore * * @param WP_Block_Parser_Block[] $blocks An array of the FAQ blocks on this page. * @param WPSEO_Schema_Context $context A value object with context variables. */ public function __construct( $blocks, $context ) { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); } /** * Find an image based on its URL and generate a Schema object for it. * * @deprecated 14.0 * @codeCoverageIgnore * * @return array The Schema with a question list added. */ public function generate() { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); return []; } } frontend/schema/class-schema-main-image.php 0000644 00000004031 15154470326 0014706 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Frontend\Schema */ use Yoast\WP\SEO\Generators\Schema\Main_Image; /** * Returns ImageObject schema data. * * @since 11.5 * @deprecated 14.0 * @codeCoverageIgnore */ class WPSEO_Schema_MainImage extends WPSEO_Deprecated_Graph_Piece { /** * WPSEO_Schema_WebPage constructor. * * @deprecated 14.0 * @codeCoverageIgnore * * @param null $context The context. No longer used but present for BC. */ public function __construct( $context = null ) { parent::__construct( Main_Image::class ); } /** * Gets the post's first usable content image. Null if none is available. * * @deprecated 14.0 * @codeCoverageIgnore * * @param int $post_id The post id. * * @return string|null The image URL or null if there is no image. */ protected function get_first_usable_content_image_for_post( $post_id ) { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); return WPSEO_Image_Utils::get_first_usable_content_image_for_post( $post_id ); } /** * Generates image schema from the attachment id. * * @deprecated 14.0 * @codeCoverageIgnore * * @param string $image_id The image schema id. * * @return array Schema ImageObject array. */ protected function generate_image_schema_from_attachment_id( $image_id ) { _deprecated_function( __METHOD__, 'WPSEO 14.0', 'YoastSEO()->helpers->schema->image->generate_from_attachment_id' ); return $this->helpers->schema->image->generate_from_attachment_id( $image_id, get_post_thumbnail_id() ); } /** * Generates image schema from the url. * * @deprecated 14.0 * @codeCoverageIgnore * * @param string $image_id The image schema id. * @param string $image_url The image URL. * * @return array Schema ImageObject array. */ protected function generate_image_schema_from_url( $image_id, $image_url ) { _deprecated_function( __METHOD__, 'WPSEO 14.0', 'YoastSEO()->helpers->schema->image->generate_from_url' ); return $this->helpers->schema->image->generate_from_url( $image_id, $image_url ); } } frontend/schema/class-schema-breadcrumb.php 0000644 00000001052 15154470326 0015010 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Frontend\Schema */ use Yoast\WP\SEO\Generators\Schema\Breadcrumb; /** * Returns schema Breadcrumb data. * * @since 10.2 * @deprecated 14.0 */ class WPSEO_Schema_Breadcrumb extends WPSEO_Deprecated_Graph_Piece { /** * WPSEO_Schema_Breadcrumb constructor. * * @deprecated 14.0 * @codeCoverageIgnore * * @param null $context The context. No longer used but present for BC. */ public function __construct( $context = null ) { parent::__construct( Breadcrumb::class ); } } frontend/class-frontend-page-type.php 0000644 00000003436 15154470326 0013724 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Deprecated\Frontend */ /** * Represents the classifier for determine the type of the currently opened page. * * @deprecated 14.9 * @codeCoverageIgnore */ class WPSEO_Frontend_Page_Type { /** * Checks if the currently opened page is a simple page. * * @deprecated 14.9 * @codeCoverageIgnore * * @return bool Whether the currently opened page is a simple page. */ public static function is_simple_page() { _deprecated_function( __METHOD__, 'WPSEO 14.9' ); return false; } /** * Returns the id of the currently opened page. * * @deprecated 14.9 * @codeCoverageIgnore * * @return int The id of the currently opened page. */ public static function get_simple_page_id() { _deprecated_function( __METHOD__, 'WPSEO 14.9' ); return 0; } /** * Determine whether this is the homepage and shows posts. * * @deprecated 14.9 * @codeCoverageIgnore * * @return bool Whether or not the current page is the homepage that displays posts. */ public static function is_home_posts_page() { _deprecated_function( __METHOD__, 'WPSEO 14.9' ); return false; } /** * Determine whether this is the static frontpage. * * @deprecated 14.9 * @codeCoverageIgnore * * @return bool Whether or not the current page is a static frontpage. */ public static function is_home_static_page() { _deprecated_function( __METHOD__, 'WPSEO 14.9' ); return false; } /** * Determine whether this is the statically set posts page, when it's not the frontpage. * * @deprecated 14.9 * @codeCoverageIgnore * * @return bool Whether or not it's a non-frontpage, statically set posts page. */ public static function is_posts_page() { _deprecated_function( __METHOD__, 'WPSEO 14.9' ); return false; } } frontend/class-twitter.php 0000644 00000002033 15154470326 0011706 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Frontend */ /** * This class handles the Twitter card functionality. * * @deprecated 14.0 * * @link https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/abouts-cards */ class WPSEO_Twitter { /** * Instance of this class. * * @var WPSEO_Twitter */ public static $instance; /** * Images. * * @var array */ public $shown_images = []; /** * Class constructor. * * @deprecated 14.0 * @codeCoverageIgnore */ public function __construct() { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); } /** * Outputs the Twitter Card code on singular pages. * * @deprecated 14.0 * @codeCoverageIgnore */ public function twitter() { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); } /** * Get the singleton instance of this class. * * @deprecated 14.0 * @codeCoverageIgnore * * @return object|null */ public static function get_instance() { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); return null; } } frontend/class-handle-404.php 0000644 00000001376 15154470326 0011755 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Frontend */ /** * Class WPSEO_Handle_404 * * Handles intercepting requests. * * @deprecated 14.0 * * @since 9.4 */ class WPSEO_Handle_404 implements WPSEO_WordPress_Integration { /** * Registers all hooks to WordPress. * * @codeCoverageIgnore * @deprecated 14.0 * * @return void */ public function register_hooks() { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); } /** * Handle the 404 status code. * * @codeCoverageIgnore * @deprecated 14.0 * * @param bool $handled Whether we've handled the request. * * @return bool True if it's 404. */ public function handle_404( $handled ) { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); return $handled; } } frontend/frontend.php 0000644 00000016716 15154470326 0010735 0 ustar 00 <?php /** * Backwards compatibility class for WPSEO_Frontend. * * @package Yoast\YoastSEO\Backwards_Compatibility */ use Yoast\WP\SEO\Memoizers\Meta_Tags_Context_Memoizer; use Yoast\WP\SEO\Presenters\Canonical_Presenter; use Yoast\WP\SEO\Presenters\Meta_Description_Presenter; use Yoast\WP\SEO\Presenters\Rel_Next_Presenter; use Yoast\WP\SEO\Presenters\Rel_Prev_Presenter; use Yoast\WP\SEO\Presenters\Robots_Presenter; use Yoast\WP\SEO\Surfaces\Helpers_Surface; /** * Class WPSEO_Frontend * * @codeCoverageIgnore Because of deprecation. */ class WPSEO_Frontend { /** * Instance of this class. * * @var WPSEO_Frontend */ public static $instance; /** * The memoizer for the meta tags context. * * @var Meta_Tags_Context_Memoizer */ private $context_memoizer; /** * The WPSEO Replace Vars object. * * @var WPSEO_Replace_Vars */ private $replace_vars; /** * The helpers surface. * * @var Helpers_Surface */ private $helpers; /** * WPSEO_Frontend constructor. */ public function __construct() { $this->context_memoizer = YoastSEO()->classes->get( Meta_Tags_Context_Memoizer::class ); $this->replace_vars = YoastSEO()->classes->get( WPSEO_Replace_Vars::class ); $this->helpers = YoastSEO()->classes->get( Helpers_Surface::class ); } /** * Catches call to methods that don't exist and might deprecated. * * @param string $method The called method. * @param array $arguments The given arguments. * * @return mixed */ public function __call( $method, $arguments ) { _deprecated_function( $method, 'WPSEO 14.0' ); $title_methods = [ 'title', 'fix_woo_title', 'get_content_title', 'get_seo_title', 'get_taxonomy_title', 'get_author_title', 'get_title_from_options', 'get_default_title', 'force_wp_title', ]; if ( in_array( $method, $title_methods, true ) ) { return $this->get_title(); } return null; } /** * Retrieves an instance of the class. * * @return static The instance. */ public static function get_instance() { if ( is_null( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Outputs the canonical value. * * @param bool $echo Whether or not to output the canonical element. * @param bool $un_paged Whether or not to return the canonical with or without pagination added to the URL. * @param bool $no_override Whether or not to return a manually overridden canonical. * * @return string|void */ public function canonical( $echo = true, $un_paged = false, $no_override = false ) { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); $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; $presenter->replace_vars = $this->replace_vars; if ( ! $echo ) { return $presenter->get(); } echo $presenter->present(); } /** * Retrieves the meta robots value. * * @return string */ public function get_robots() { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); $presentation = $this->get_current_page_presentation(); return $presentation->robots; } /** * Outputs the meta robots value. */ public function robots() { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); $presentation = $this->get_current_page_presentation(); $presenter = new Robots_Presenter(); $presenter->presentation = $presentation; $presenter->helpers = $this->helpers; $presenter->replace_vars = $this->replace_vars; echo $presenter->present(); } /** * Determine $robots values for a single post. * * @param array $robots Robots data array. * @param int $post_id The post ID for which to determine the $robots values, defaults to current post. * * @return array */ public function robots_for_single_post( $robots, $post_id = 0 ) { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); $presentation = $this->get_current_page_presentation(); return $presentation->robots; } /** * Used for static home and posts pages as well as singular titles. * * @param object|null $object If filled, object to get the title for. * * @return string The content title. */ private function get_title( $object = null ) { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); $presentation = $this->get_current_page_presentation(); $title = $presentation->title; return $this->replace_vars->replace( $title, $presentation->source ); } /** * This function adds paging details to the title. * * @param string $sep Separator used in the title. * @param string $seplocation Whether the separator should be left or right. * @param string $title The title to append the paging info to. * * @return string */ public function add_paging_to_title( $sep, $seplocation, $title ) { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); return $title; } /** * Add part to title, while ensuring that the $seplocation variable is respected. * * @param string $sep Separator used in the title. * @param string $seplocation Whether the separator should be left or right. * @param string $title The title to append the title_part to. * @param string $title_part The part to append to the title. * * @return string */ public function add_to_title( $sep, $seplocation, $title, $title_part ) { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); if ( $seplocation === 'right' ) { return $title . $sep . $title_part; } return $title_part . $sep . $title; } /** * Adds 'prev' and 'next' links to archives. * * @link http://googlewebmastercentral.blogspot.com/2011/09/pagination-with-relnext-and-relprev.html */ public function adjacent_rel_links() { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); $presentation = $this->get_current_page_presentation(); $rel_prev_presenter = new Rel_Prev_Presenter(); $rel_prev_presenter->presentation = $presentation; $rel_prev_presenter->helpers = $this->helpers; $rel_prev_presenter->replace_vars = $this->replace_vars; echo $rel_prev_presenter->present(); $rel_next_presenter = new Rel_Next_Presenter(); $rel_next_presenter->presentation = $presentation; $rel_next_presenter->helpers = $this->helpers; $rel_next_presenter->replace_vars = $this->replace_vars; echo $rel_next_presenter->present(); } /** * Outputs the meta description element or returns the description text. * * @param bool $echo Echo or return output flag. * * @return string */ public function metadesc( $echo = true ) { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); $presentation = $this->get_current_page_presentation(); $presenter = new Meta_Description_Presenter(); $presenter->presentation = $presentation; $presenter->helpers = $this->helpers; $presenter->replace_vars = $this->replace_vars; if ( ! $echo ) { return $presenter->get(); } $presenter->present(); } /** * Returns the current page presentation. * * @return Indexable_Presentation The current page presentation. */ 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 ); } } frontend/abstract-class-deprecated-schema-piece.php 0000644 00000004363 15154470326 0016436 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Frontend\Schema */ use Yoast\WP\SEO\Context\Meta_Tags_Context; use Yoast\WP\SEO\Generators\Schema\Abstract_Schema_Piece; use Yoast\WP\SEO\Memoizers\Meta_Tags_Context_Memoizer; use Yoast\WP\SEO\Surfaces\Helpers_Surface; /** * Returns schema Article data. * * @deprecated 14.0 * * @since 10.2 */ abstract class WPSEO_Deprecated_Graph_Piece implements WPSEO_Graph_Piece { /** * The meta tags context. * * @var Meta_Tags_Context */ private $context; /** * The helpers surface. * * @var Helpers_Surface */ public $helpers; /** * The date helper. * * @var WPSEO_Date_Helper */ protected $date; /** * The new stable piece. * * @var Abstract_Schema_Piece */ protected $stable; /** * The stable class name. * * @var string */ protected $stable_class_name; /** * WPSEO_Schema_Article constructor. * * @deprecated 14.0 * @codeCoverageIgnore * * @param string $class_name The class name. */ public function __construct( $class_name ) { $this->stable_class_name = $class_name; $this->stable = new $class_name(); _deprecated_function( __METHOD__, 'WPSEO 14.0', $this->stable_class_name ); $memoizer = YoastSEO()->classes->get( Meta_Tags_Context_Memoizer::class ); // We cannot extend the stable graph piece because a property was made public on it that was previously private. // So instead, we instantiate a stable graph piece and delegate to it. $this->context = $memoizer->for_current_page(); $this->stable->context = $this->context; $this->helpers = YoastSEO()->helpers; $this->stable->helpers = $this->helpers; } /** * Determines whether or not a piece should be added to the graph. * * @deprecated 14.0 * @codeCoverageIgnore * * @return bool */ public function is_needed() { _deprecated_function( __METHOD__, 'WPSEO 14.0', $this->stable_class_name . '::is_needed' ); return $this->stable->is_needed(); } /** * Returns Article data. * * @deprecated 14.0 * @codeCoverageIgnore * * @return array Article data. */ public function generate() { _deprecated_function( __METHOD__, 'WPSEO 14.0', $this->stable_class_name . '::generate' ); return $this->stable->generate(); } } frontend/class-opengraph-image.php 0000644 00000001365 15154470326 0013256 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Frontend */ use Yoast\WP\SEO\Values\Open_Graph\Images; _deprecated_file( basename( __FILE__ ), 'WPSEO 14.0' ); /** * Class WPSEO_OpenGraph_Image. * * @deprecated 14.0 */ class WPSEO_OpenGraph_Image extends Images { /** * The image ID used when the image is external. * * @var string */ const EXTERNAL_IMAGE_ID = '-1'; /** * Constructor. * * @deprecated 14.0 * @codeCoverageIgnore * * @param string|null $image Optional. The Image to use. * @param WPSEO_OpenGraph|null $opengraph Optional. The OpenGraph object. */ public function __construct( $image = null, WPSEO_OpenGraph $opengraph = null ) { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); } } frontend/class-woocommerce-shop-page.php 0000644 00000002576 15154470326 0014420 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Deprecated\Frontend */ use Yoast\WP\SEO\Helpers\Woocommerce_Helper; /** * Represents the logic to determine if the current page is a WooCommerce shop page. * * @deprecated 14.9 * @codeCoverageIgnore */ class WPSEO_WooCommerce_Shop_Page { /** * Checks if the current page is the shop page. * * @deprecated 14.9 * @codeCoverageIgnore * * @return bool Whether the current page is the WooCommerce shop page. */ public function is_shop_page() { _deprecated_function( __METHOD__, 'WPSEO 14.9', Woocommerce_Helper::class . '::is_shop_page' ); return YoastSEO()->helpers->woocommerce->is_shop_page(); } /** * Returns the id of the set WooCommerce shop page. * * @deprecated 14.9 * @codeCoverageIgnore * * @return int The ID of the set page. */ public function get_shop_page_id() { _deprecated_function( __METHOD__, 'WPSEO 14.9', Woocommerce_Helper::class . '::get_shop_page_id' ); return YoastSEO()->helpers->woocommerce->get_shop_page_id(); } /** * Returns the ID of the WooCommerce shop page when the currently opened page is the shop page. * * @codeCoverageIgnore * @deprecated 14.0 * * @param int $page_id The page id. * * @return int The Page ID of the shop. */ public function get_page_id( $page_id ) { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); return $page_id; } } frontend/class-opengraph-oembed.php 0000644 00000002146 15154470326 0013425 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Frontend */ /** * Class WPSEO_OpenGraph_OEmbed. * * @deprecated 14.0 */ class WPSEO_OpenGraph_OEmbed implements WPSEO_WordPress_Integration { /** * {@inheritDoc} * * @codeCoverageIgnore * @deprecated 14.0 */ public function register_hooks() { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); } /** * Callback function to pass to the oEmbed's response data that will enable * support for using the image and title set by the WordPress SEO plugin's fields. This * address the concern where some social channels/subscribed use oEmebed data over OpenGraph data * if both are present. * * @link https://developer.wordpress.org/reference/hooks/oembed_response_data/ for hook info. * * @deprecated 14.0 * @codeCoverageIgnore * * @param array $data The oEmbed data. * @param WP_Post $post The current Post object. * * @return array An array of oEmbed data with modified values where appropriate. */ public function set_oembed_data( $data, $post ) { _deprecated_function( __METHOD__, 'WPSEO 14.0' ); return $data; } } inc/class-wpseo-validator.php 0000644 00000004502 15154470326 0012261 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Internals */ /** * Class WPSEO_Validator. * * @deprecated 15.6 */ class WPSEO_Validator { /** * Validates whether the passed variable is a boolean. * * @deprecated 15.6 * @codeCoverageIgnore * * @param mixed $variable The variable to validate. * * @return bool Whether or not the passed variable is a valid boolean. */ public static function is_boolean( $variable ) { _deprecated_function( __METHOD__, 'WPSEO 15.6' ); if ( is_bool( $variable ) ) { return true; } return filter_var( $variable, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE ) !== null; } /** * Validates whether the passed variable is a string. * * @deprecated 15.6 * @codeCoverageIgnore * * @param mixed $variable The variable to validate. * * @return bool Whether or not the passed variable is a string. */ public static function is_string( $variable ) { _deprecated_function( __METHOD__, 'WPSEO 15.6' ); return is_string( $variable ); } /** * Validates whether the passed variable is a non-empty string. * * @deprecated 15.6 * @codeCoverageIgnore * * @param mixed $variable The variable to validate. * * @return bool Whether or not the passed value is a non-empty string. */ public static function is_non_empty_string( $variable ) { _deprecated_function( __METHOD__, 'WPSEO 15.6' ); return self::is_string( $variable ) && $variable !== ''; } /** * Validates whether the passed variable is an integer. * * @deprecated 15.6 * @codeCoverageIgnore * * @param mixed $variable The variable to validate. * * @return bool Whether or not the passed variable is an integer. */ public static function is_integer( $variable ) { _deprecated_function( __METHOD__, 'WPSEO 15.6' ); return filter_var( $variable, FILTER_VALIDATE_INT ) || filter_var( $variable, FILTER_VALIDATE_INT ) === 0; } /** * Determines whether a particular key exists within the passed dataset. * * @deprecated 15.6 * @codeCoverageIgnore * * @param array $data The dataset to search through. * @param string $key The key to search for. * * @return bool Whether or not the key exists. */ public static function key_exists( array $data, $key ) { _deprecated_function( __METHOD__, 'WPSEO 15.6' ); return array_key_exists( $key, $data ); } } admin/taxonomy/class-taxonomy-content-fields.php 0000644 00000000755 15154470326 0016136 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Admin */ /** * This class parses all the values for the general tab in the Yoast SEO settings metabox. */ class WPSEO_Taxonomy_Content_Fields { /** * Returns array with the fields for the general tab. * * @deprecated 14.9 * @return array */ public function get() { _deprecated_function( __METHOD__, '14.9', 'WPSEO_Taxonomy_Fields::get' ); $fields = new WPSEO_Taxonomy_Fields(); return $fields->get( 'social' ); } } admin/taxonomy/class-taxonomy-social-fields.php 0000644 00000000747 15154470326 0015737 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Admin */ /** * This class parses all the values for the social tab in the Yoast SEO settings metabox. */ class WPSEO_Taxonomy_Social_Fields { /** * Returning the fields for the social media tab. * * @deprecated 14.9 * @return array */ public function get() { _deprecated_function( __METHOD__, '14.9', 'WPSEO_Taxonomy_Fields::get' ); $fields = new WPSEO_Taxonomy_Fields(); return $fields->get( 'social' ); } } admin/taxonomy/class-taxonomy-settings-fields.php 0000644 00000001024 15154470326 0016312 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Admin */ /** * This class parses all the values for the general tab in the Yoast SEO settings metabox. */ class WPSEO_Taxonomy_Settings_Fields { /** * Returns array with the fields for the General tab. * * @deprecated 14.9 * @return array Fields to be used on the General tab. */ public function get() { _deprecated_function( __METHOD__, '14.9', 'WPSEO_Taxonomy_Fields::get' ); $fields = new WPSEO_Taxonomy_Fields(); return $fields->get( 'social' ); } } admin/add-keyword-modal.php 0000644 00000005161 15154470326 0011663 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Admin */ // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound -- Reason: The class is deprecated. /** * Class to print out the translatable strings for the Add Keyword modal. * * @deprecated 15.5 */ class WPSEO_Add_Keyword_Modal { /** * Returns the translations for the Add Keyword modal. * * These strings are not escaped because they're meant to be used with React * which already takes care of that. If used in PHP, they should be escaped. * * @deprecated 15.5 * @codeCoverageIgnore * * @return array Translated text strings for the Add Keyword modal. */ public function get_translations() { _deprecated_function( __METHOD__, 'WPSEO 15.5' ); return [ 'title' => __( 'Would you like to add more than one keyphrase?', 'wordpress-seo' ), 'intro' => sprintf( /* translators: %s expands to a 'Yoast SEO Premium' text linked to the yoast.com website. */ __( 'Great news: you can, with %s!', 'wordpress-seo' ), '{{link}}Yoast SEO Premium{{/link}}' ), 'link' => WPSEO_Shortlinker::get( 'https://yoa.st/pe-premium-page' ), 'other' => sprintf( /* translators: %s expands to 'Yoast SEO Premium'. */ __( 'Other benefits of %s for you:', 'wordpress-seo' ), 'Yoast SEO Premium' ), 'buylink' => WPSEO_Shortlinker::get( 'https://yoa.st/add-keywords-popup' ), 'buy' => sprintf( /* translators: %s expands to 'Yoast SEO Premium'. */ __( 'Get %s', 'wordpress-seo' ), 'Yoast SEO Premium' ), 'small' => __( '1 year free support and updates included!', 'wordpress-seo' ), 'a11yNotice.opensInNewTab' => __( '(Opens in a new browser tab)', 'wordpress-seo' ), ]; } /** * Passes translations to JS for the Add Keyword modal component. * * @deprecated 15.5 * @codeCoverageIgnore * * @return array Translated text strings for the Add Keyword modal component. */ public function get_translations_for_js() { _deprecated_function( __METHOD__, 'WPSEO 15.5' ); $translations = $this->get_translations(); return [ 'locale' => get_user_locale(), 'intl' => $translations, ]; } /** * Prints the localized Add Keyword modal translations for JS. * * @deprecated 15.5 * @codeCoverageIgnore */ public function enqueue_translations() { _deprecated_function( __METHOD__, 'WPSEO 15.5' ); wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'admin-global-script', 'yoastAddKeywordModalL10n', $this->get_translations_for_js() ); } } admin/keyword-synonyms-modal.php 0000644 00000005256 15154470326 0013037 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Admin */ // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound -- Reason: The class is deprecated. /** * Class to print out the translatable strings for the Keyword Synonyms modal. * * @deprecated 15.5 */ class WPSEO_Keyword_Synonyms_Modal { /** * Returns the translations for the Keyword Synonyms modal. * * These strings are not escaped because they're meant to be used with React * which already takes care of that. If used in PHP, they should be escaped. * * @deprecated 15.5 * @codeCoverageIgnore * * @return array Translated text strings for the Keyword Synonyms modal. */ public function get_translations() { _deprecated_function( __METHOD__, 'WPSEO 15.5' ); return [ 'title' => __( 'Would you like to add keyphrase synonyms?', 'wordpress-seo' ), 'intro' => sprintf( /* translators: %s expands to a 'Yoast SEO Premium' text linked to the yoast.com website. */ __( 'Great news: you can, with %s!', 'wordpress-seo' ), '{{link}}Yoast SEO Premium{{/link}}' ), 'link' => WPSEO_Shortlinker::get( 'https://yoa.st/pe-premium-page' ), 'other' => sprintf( /* translators: %s expands to 'Yoast SEO Premium'. */ __( 'Other benefits of %s for you:', 'wordpress-seo' ), 'Yoast SEO Premium' ), 'buylink' => WPSEO_Shortlinker::get( 'https://yoa.st/keyword-synonyms-popup' ), 'buy' => sprintf( /* translators: %s expands to 'Yoast SEO Premium'. */ __( 'Get %s', 'wordpress-seo' ), 'Yoast SEO Premium' ), 'small' => __( '1 year free support and updates included!', 'wordpress-seo' ), 'a11yNotice.opensInNewTab' => __( '(Opens in a new browser tab)', 'wordpress-seo' ), ]; } /** * Passes translations to JS for the Keyword Synonyms modal component. * * @deprecated 15.5 * @codeCoverageIgnore * * @return array Translated text strings for the Keyword Synonyms modal component. */ public function get_translations_for_js() { _deprecated_function( __METHOD__, 'WPSEO 15.5' ); $translations = $this->get_translations(); return [ 'locale' => get_user_locale(), 'intl' => $translations, ]; } /** * Prints the localized Keyword Synonyms modal translations for JS. * * @deprecated 15.5 * @codeCoverageIgnore * * @return void */ public function enqueue_translations() { _deprecated_function( __METHOD__, 'WPSEO 15.5' ); wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'admin-global-script', 'yoastKeywordSynonymsModalL10n', $this->get_translations_for_js() ); } } admin/class-social-admin.php 0000644 00000004241 15154470326 0012020 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Admin */ /** * This class adds the Social tab to the Yoast SEO metabox and makes sure the settings are saved. * * @deprecated 14.6 * * @codeCoverageIgnore */ class WPSEO_Social_Admin extends WPSEO_Metabox { /** * Class constructor. * * @deprecated 14.6 * * @codeCoverageIgnore */ public function __construct() { _deprecated_function( __METHOD__, 'WPSEO 14.6' ); } /** * Translate text strings for use in the meta box. * * IMPORTANT: if you want to add a new string (option) somewhere, make sure you add that array key to * the main meta box definition array in the class WPSEO_Meta() as well!!!! * * @deprecated 14.6 * * @codeCoverageIgnore */ public static function translate_meta_boxes() { _deprecated_function( __METHOD__, 'WPSEO 14.6' ); } /** * Returns the metabox section for the social settings. * * @deprecated 14.6 * * @codeCoverageIgnore * * @return WPSEO_Metabox_Collapsibles_Sections|null */ public function get_meta_section() { _deprecated_function( __METHOD__, 'WPSEO 14.6' ); return null; } /** * Returns the Upgrade to Premium notice. * * @deprecated 14.6 * * @codeCoverageIgnore * * @param string $network The social network. * * @return string The notice HTML on the free version, empty string on premium. */ public function get_premium_notice( $network ) { _deprecated_function( __METHOD__, 'WPSEO 14.6' ); return 'class_social_admin'; } /** * Filter over the meta boxes to save, this function adds the Social meta boxes. * * @deprecated 14.6 * * @codeCoverageIgnore * * @param array $field_defs Array of metaboxes to save. * * @return array */ public function save_meta_boxes( $field_defs ) { _deprecated_function( __METHOD__, 'WPSEO 14.6' ); return []; } /** * This method will compare opengraph fields with the posted values. * * When fields are changed, the facebook cache will be purged. * * @deprecated 14.6 * * @codeCoverageIgnore * * @param WP_Post $post Post instance. */ public function og_data_compare( $post ) { _deprecated_function( __METHOD__, 'WPSEO 14.6' ); } } admin/onpage/class-onpage.php 0000644 00000001352 15154470326 0012202 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Admin */ // Mark this file as deprecated. _deprecated_file( __FILE__, 'WPSEO 13.2' ); /** * Handles the request for getting the Ryte status. * * @deprecated 13.2 * @codeCoverageIgnore */ class WPSEO_OnPage extends WPSEO_Ryte implements WPSEO_WordPress_Integration { /** * Constructs the object. * * @deprecated 13.2 * @codeCoverageIgnore */ public function __construct() { _deprecated_function( __METHOD__, 'WPSEO 13.2', WPSEO_Ryte::class ); } /** * Shows a notice when the website is not indexable. * * @deprecated 13.2 * @codeCoverageIgnore * * @return void */ public function show_notice() { _deprecated_function( __METHOD__, 'WPSEO 13.2' ); } } admin/onpage/class-onpage-option.php 0000644 00000001236 15154470326 0013511 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Admin */ // Mark this file as deprecated. _deprecated_file( __FILE__, 'WPSEO 13.2' ); /** * This class handles the data for the option where the Ryte data is stored. * * @deprecated 13.2 * @codeCoverageIgnore */ class WPSEO_OnPage_Option extends WPSEO_Ryte_Option { /** * Setting the object by setting the properties. * * @deprecated 13.2 * @codeCoverageIgnore */ public function __construct() { // phpcs:ignore WordPress.Security.EscapeOutput -- The WPSEO_Ryte_option::class value does not need to be escaped. _deprecated_function( __METHOD__, 'WPSEO 13.2', WPSEO_Ryte_Option::class ); } } admin/onpage/class-onpage-request.php 0000644 00000001211 15154470326 0013662 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Admin */ // Mark this file as deprecated. _deprecated_file( __FILE__, 'WPSEO 13.2' ); /** * 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 13.2 * @codeCoverageIgnore */ class WPSEO_OnPage_Request extends WPSEO_Ryte_Request { /** * Setting the request object. * * @deprecated 13.2 * @codeCoverageIgnore */ public function __construct() { _deprecated_function( __METHOD__, 'WPSEO 13.2', WPSEO_Ryte_Option::class ); } } admin/onpage/class-ryte-service.php 0000644 00000001263 15154470326 0013353 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Admin\OnPage */ // Mark this file as deprecated. _deprecated_file( __FILE__, 'WPSEO 13.2' ); /** * Represents the service to be used by the WPSEO_Endpoint_Ryte endpoint. * * @deprecated 13.2 * @codeCoverageIgnore */ class WPSEO_Ryte_Service { /** * Constructs the WPSEO_Ryte_Service class. * * @deprecated 13.2 * @codeCoverageIgnore */ public function __construct() { _deprecated_function( __METHOD__, 'WPSEO 13.2' ); } /** * Fetches statistics via REST request. * * @deprecated 13.2 * @codeCoverageIgnore */ public function get_statistics() { _deprecated_function( __METHOD__, 'WPSEO 13.2' ); } } admin/multiple-keywords-modal.php 0000644 00000005261 15154470326 0013152 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Admin */ // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound -- Reason: The class is deprecated. /** * Class to print out the translatable strings for the Multiple Keywords modal. * * @deprecated 15.5 */ class WPSEO_Multiple_Keywords_Modal { /** * Returns the translations for the Multiple Keywords modal. * * These strings are not escaped because they're meant to be used with React * which already takes care of that. If used in PHP, they should be escaped. * * @deprecated 15.5 * @codeCoverageIgnore * * @return array Translated text strings for the Multiple Keywords modal. */ public function get_translations() { _deprecated_function( __METHOD__, 'WPSEO 15.5' ); return [ 'title' => __( 'Would you like to add another keyphrase?', 'wordpress-seo' ), 'intro' => sprintf( /* translators: %s expands to a 'Yoast SEO Premium' text linked to the yoast.com website. */ __( 'Great news: you can, with %s!', 'wordpress-seo' ), '{{link}}Yoast SEO Premium{{/link}}' ), 'link' => WPSEO_Shortlinker::get( 'https://yoa.st/pe-premium-page' ), 'other' => sprintf( /* translators: %s expands to 'Yoast SEO Premium'. */ __( 'Other benefits of %s for you:', 'wordpress-seo' ), 'Yoast SEO Premium' ), 'buylink' => WPSEO_Shortlinker::get( 'https://yoa.st/add-keywords-popup' ), 'buy' => sprintf( /* translators: %s expands to 'Yoast SEO Premium'. */ __( 'Get %s', 'wordpress-seo' ), 'Yoast SEO Premium' ), 'small' => __( '1 year free support and updates included!', 'wordpress-seo' ), 'a11yNotice.opensInNewTab' => __( '(Opens in a new browser tab)', 'wordpress-seo' ), ]; } /** * Passes translations to JS for the Multiple Keywords modal component. * * @deprecated 15.5 * @codeCoverageIgnore * * @return array Translated text strings for the Multiple Keywords modal component. */ public function get_translations_for_js() { _deprecated_function( __METHOD__, 'WPSEO 15.5' ); $translations = $this->get_translations(); return [ 'locale' => get_user_locale(), 'intl' => $translations, ]; } /** * Prints the localized Multiple Keywords modal translations for JS. * * @deprecated 15.5 * @codeCoverageIgnore * * @return void */ public function enqueue_translations() { _deprecated_function( __METHOD__, 'WPSEO 15.5' ); wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'admin-global-script', 'yoastMultipleKeywordsModalL10n', $this->get_translations_for_js() ); } } admin/endpoints/class-endpoint-ryte.php 0000644 00000002441 15154470326 0014264 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Admin\OnPage */ /** * Represents an implementation of the WPSEO_Endpoint interface to register one or multiple endpoints. * * @deprecated 13.2 * @codeCoverageIgnore */ class WPSEO_Endpoint_Ryte implements WPSEO_Endpoint { /** * The namespace of the REST route. * * @var string */ const REST_NAMESPACE = 'yoast/v1'; /** * The route of the ryte endpoint. * * @var string */ const ENDPOINT_RETRIEVE = 'ryte'; /** * The name of the capability needed to retrieve data using the endpoints. * * @var string */ const CAPABILITY_RETRIEVE = 'manage_options'; /** * Constructs the WPSEO_Endpoint_Ryte class and sets the service to use. * * @deprecated 13.2 * @codeCoverageIgnore */ public function __construct() { _deprecated_function( __METHOD__, 'WPSEO 13.2' ); } /** * Registers the REST routes that are available on the endpoint. * * @deprecated 13.2 * @codeCoverageIgnore */ public function register() { _deprecated_function( __METHOD__, 'WPSEO 13.2' ); } /** * Determines whether or not data can be retrieved for the registered endpoints. * * @deprecated 13.2 * @codeCoverageIgnore */ public function can_retrieve_data() { _deprecated_function( __METHOD__, 'WPSEO 13.2' ); } } admin/license-page-manager.php 0000644 00000003452 15154470326 0012324 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Admin */ // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound -- Reason: The class is deprecated. /** * Represents the values for a single Yoast Premium extension plugin. */ class WPSEO_License_Page_Manager implements WPSEO_WordPress_Integration { /** * Version number for License Page Manager. * * @var string */ const VERSION_BACKWARDS_COMPATIBILITY = '2'; /** * Registers all hooks to WordPress. * * @deprecated 15.4 * @codeCoverageIgnore */ public function register_hooks() { _deprecated_function( __METHOD__, 'WPSEO 15.4' ); } /** * Removes the faulty set notifications. * * @deprecated 15.4 * @codeCoverageIgnore */ public function remove_faulty_notifications() { _deprecated_function( __METHOD__, 'WPSEO 15.4' ); } /** * Handles the response. * * @deprecated 15.4 * @codeCoverageIgnore * * @param array $response HTTP response. * @param array $request_arguments HTTP request arguments. Unused. * @param string $url The request URL. * * @return array The response array. */ public function handle_response( array $response, $request_arguments, $url ) { _deprecated_function( __METHOD__, 'WPSEO 15.4' ); return $response; } /** * Returns the license page to use based on the version number. * * @deprecated 15.4 * @codeCoverageIgnore * * @return string The page to use. */ public function get_license_page() { _deprecated_function( __METHOD__, '15.4' ); return 'licenses'; } /** * Validates the extensions and show a notice for the invalid extensions. * * @deprecated 15.4 * @codeCoverageIgnore */ public function validate_extensions() { _deprecated_function( __METHOD__, '15.4' ); } } // phpcs:enable admin/class-recalculate-scores.php 0000644 00000001576 15154470326 0013250 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Admin */ /** * Class WPSEO_Recalculate_Scores. * * This class handles the SEO score recalculation for all posts with a filled focus keyword. * * @deprecated 14.4 * @codeCoverageIgnore */ class WPSEO_Recalculate_Scores { /** * Constructing the object by modalbox, the localization and the totals. * * @deprecated 14.4 * @codeCoverageIgnore */ public function __construct() { _deprecated_function( __METHOD__, 'WPSEO 14.4' ); } /** * Run the localize script. * * @deprecated 14.4 * @codeCoverageIgnore */ public function recalculate_assets() { _deprecated_function( __METHOD__, 'WPSEO 14.4' ); } /** * Initialize the modal box to be displayed when needed. * * @deprecated 14.4 * @codeCoverageIgnore */ public function modal_box() { _deprecated_function( __METHOD__, 'WPSEO 14.4' ); } } admin/extensions.php 0000644 00000003004 15154470326 0010550 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Admin */ // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound -- Reason: The class is deprecated. /** * Represents the class that contains the list of possible extensions for Yoast SEO. * * @deprecated 15.4 * @codeCoverageIgnore */ class WPSEO_Extensions { /** * Checks if the plugin has been installed. * * @deprecated 15.4 * @codeCoverageIgnore * * @param string $extension The name of the plugin to check. * * @return bool Returns true when installed. */ public function is_installed( $extension ) { _deprecated_function( __METHOD__, 'WPSEO 15.4' ); return false; } /** * Invalidates the extension by removing its option. * * @deprecated 15.4 * @codeCoverageIgnore * * @param string $extension The extension to invalidate. */ public function invalidate( $extension ) { _deprecated_function( __METHOD__, 'WPSEO 15.4' ); } /** * Checks if the extension is valid. * * @deprecated 15.4 * @codeCoverageIgnore * * @param string $extension The extension to get the name for. * * @return bool Returns true when valid. */ public function is_valid( $extension ) { _deprecated_function( __METHOD__, 'WPSEO 15.4' ); return false; } /** * Returns the set extensions. * * @deprecated 15.4 * @codeCoverageIgnore * * @return array All the extension names. */ public function get() { _deprecated_function( __METHOD__, 'WPSEO 15.4' ); return []; } } // phpcs:enable admin/extension.php 0000644 00000005276 15154470326 0010402 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Admin */ // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound -- Reason: The class is deprecated. /** * Represents the values for a single Yoast Premium extension plugin. * * @deprecated 15.4 */ class WPSEO_Extension { /** * Holds the extension config. * * @var array */ protected $config = []; /** * WPSEO_Extension constructor. * * @deprecated 15.4 * @codeCoverageIgnore * * @param array $config The config to use. */ public function __construct( array $config ) { _deprecated_function( __METHOD__, 'WPSEO 15.4' ); $this->config = $config; } /** * Returns the product title. * * @deprecated 15.4 * @codeCoverageIgnore * * @return string The set title. */ public function get_title() { _deprecated_function( __METHOD__, 'WPSEO 15.4' ); return $this->config['title']; } /** * Returns the product title to display. * * @deprecated 15.4 * @codeCoverageIgnore * * @return string The title to display on the license page. */ public function get_display_title() { _deprecated_function( __METHOD__, 'WPSEO 15.4' ); return empty( $this->config['display_title'] ) ? $this->config['title'] : $this->config['display_title']; } /** * Returns URL to the page where the product can be bought. * * @deprecated 15.4 * @codeCoverageIgnore * * @return string The buy url. */ public function get_buy_url() { _deprecated_function( __METHOD__, 'WPSEO 15.4' ); return $this->config['buyUrl']; } /** * Returns URL to the page with more info. * * @deprecated 15.4 * @codeCoverageIgnore * * @return string The url to the info page. */ public function get_info_url() { _deprecated_function( __METHOD__, 'WPSEO 15.4' ); return $this->config['infoUrl']; } /** * Returns the image. * * @deprecated 15.4 * @codeCoverageIgnore * * @return string The image. */ public function get_image() { _deprecated_function( __METHOD__, 'WPSEO 15.4' ); return $this->config['image']; } /** * Returns the buy button value if set, otherwise fallback to the title. * * @deprecated 15.4 * @codeCoverageIgnore * * @return string The buy button. */ public function get_buy_button() { _deprecated_function( __METHOD__, 'WPSEO 15.4' ); if ( isset( $this->config['buy_button'] ) ) { return $this->config['buy_button']; } return $this->config['title']; } /** * Returns the benefits. * * @deprecated 15.4 * @codeCoverageIgnore * * @return array The array with benefits. */ public function get_benefits() { _deprecated_function( __METHOD__, 'WPSEO 15.4' ); return $this->config['benefits']; } } // phpcs:enable admin/extension-manager.php 0000644 00000003764 15154470326 0012012 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Admin */ // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound -- Reason: The class is deprecated. /** * Represents the class that contains the available extensions for Yoast SEO. * * @deprecated 15.4 * @codeCoverageIgnore */ class WPSEO_Extension_Manager { /** * Adds an extension to the manager. * * @deprecated 15.4 * @codeCoverageIgnore * * @param string $extension_name The extension name. * @param WPSEO_Extension|null $extension The extension value object. * * @return void */ public function add( $extension_name, WPSEO_Extension $extension = null ) { _deprecated_function( __METHOD__, '15.4' ); } /** * Removes an extension from the manager. * * @deprecated 15.4 * @codeCoverageIgnore * * @param string $extension_name The name of the extension to remove. * * @return void */ public function remove( $extension_name ) { _deprecated_function( __METHOD__, '15.4' ); } /** * Returns the extension for the given extension name. * * @deprecated 15.4 * @codeCoverageIgnore * * @param string $extension_name The name of the extension to get. * * @return WPSEO_Extension|null The extension object or null when it doesn't exist. */ public function get( $extension_name ) { _deprecated_function( __METHOD__, '15.4' ); return null; } /** * Returns all set extension. * * @deprecated 15.4 * @codeCoverageIgnore * * @return WPSEO_Extension[] Array with the extensions. */ public function get_all() { _deprecated_function( __METHOD__, '15.4' ); return []; } /** * Checks if the plugin is activated within My Yoast. * * @deprecated 15.4 * @codeCoverageIgnore * * @param string $extension_name The extension name to check. * * @return bool True when the plugin is activated. */ public function is_activated( $extension_name ) { _deprecated_function( __METHOD__, '15.4' ); return false; } } // phpcs:enable admin/recalculate/class-recalculate.php 0000644 00000002313 15154470326 0014226 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Admin */ /** * Abstract class to force methods in recalculate classes. * * @deprecated 14.4 * @codeCoverageIgnore */ abstract class WPSEO_Recalculate { /** * Gets the items to recalculate. * * @deprecated 14.4 * @codeCoverageIgnore * * @param int $paged The current page number. * * @return array Items that can be recalculated. */ public function get_items_to_recalculate( $paged ) { _deprecated_function( __METHOD__, 'WPSEO 14.4' ); return []; } /** * Parse the posts|terms with the value we need. * * @deprecated 14.4 * @codeCoverageIgnore * * @param array $items The items to parse. * * @return array */ protected function parse_items( array $items ) { _deprecated_function( __METHOD__, 'WPSEO 14.4' ); return []; } /** * Get default from the options for given field. * * @deprecated 14.4 * @codeCoverageIgnore * * @param string $field The field for which to get the default options. * @param string $suffix The post type. * * @return bool|string */ protected function default_from_options( $field, $suffix ) { _deprecated_function( __METHOD__, 'WPSEO 14.4' ); return false; } } admin/recalculate/class-recalculate-terms.php 0000644 00000002454 15154470326 0015364 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Admin */ /** * This class handles the calculation of the SEO score for all terms. * * @deprecated 14.4 * @codeCoverageIgnore */ class WPSEO_Recalculate_Terms extends WPSEO_Recalculate { /** * Save the scores. * * @deprecated 14.4 * @codeCoverageIgnore * * @param array $scores The scores to save. */ public function save_scores( array $scores ) { _deprecated_function( __METHOD__, 'WPSEO 14.4' ); } /** * Save the score. * * @deprecated 14.4 * @codeCoverageIgnore * * @param array $score The score to save. */ protected function save_score( array $score ) { _deprecated_function( __METHOD__, 'WPSEO 14.4' ); } /** * Get the terms from the database by doing a WP_Query. * * @deprecated 14.4 * @codeCoverageIgnore * * @param int $paged The page. * * @return array */ protected function get_items( $paged ) { _deprecated_function( __METHOD__, 'WPSEO 14.4' ); return []; } /** * Convert the given term into a analyzable object. * * @deprecated 14.4 * @codeCoverageIgnore * * @param mixed $item The term for which to build the analyzer data. * * @return array */ protected function item_to_response( $item ) { _deprecated_function( __METHOD__, 'WPSEO 14.4' ); return []; } } admin/recalculate/class-recalculate-posts.php 0000644 00000002502 15154470326 0015374 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Admin */ /** * This class handles the calculation of the SEO score for all posts with a filled focus keyword. * * @deprecated 14.4 * @codeCoverageIgnore */ class WPSEO_Recalculate_Posts extends WPSEO_Recalculate { /** * Save the scores. * * @deprecated 14.4 * @codeCoverageIgnore * * @param array $scores The scores for the posts. */ public function save_scores( array $scores ) { _deprecated_function( __METHOD__, 'WPSEO 14.4' ); } /** * Save the score. * * @deprecated 14.4 * @codeCoverageIgnore * * @param array $score The score to save. */ protected function save_score( array $score ) { _deprecated_function( __METHOD__, 'WPSEO 14.4' ); } /** * Get the posts from the database by doing a WP_Query. * * @deprecated 14.4 * @codeCoverageIgnore * * @param int $paged The page. * * @return array */ protected function get_items( $paged ) { _deprecated_function( __METHOD__, 'WPSEO 14.4' ); return []; } /** * Map the posts to a response array. * * @deprecated 14.4 * @codeCoverageIgnore * * @param WP_Post $item The post for which to build the analyzer data. * * @return array */ protected function item_to_response( $item ) { _deprecated_function( __METHOD__, 'WPSEO 14.4' ); return []; } } admin/notifiers/class-post-type-archive-notification-handler.php 0000644 00000001514 15154470326 0021144 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Admin\Notifiers */ /** * Represents the logic for showing the post type archive notification. * * @deprecated 14.1 */ class WPSEO_Post_Type_Archive_Notification_Handler extends WPSEO_Dismissible_Notification { /** * Defaults for the title option. * * @var array */ protected $option_defaults = []; /** * Sets the notification identifier. * * @deprecated 14.1 * @codeCoverageIgnore */ public function __construct() { _deprecated_function( __METHOD__, 'WPSEO 14.1' ); } /** * Returns the notification. * * @deprecated 14.1 * @codeCoverageIgnore * * @return Yoast_Notification|null The notification for the notification center. */ protected function get_notification() { _deprecated_function( __METHOD__, 'WPSEO 14.1' ); return null; } } admin/links/class-link-compatibility-notifier.php 0000644 00000001603 15154470326 0016220 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Admin\Links */ /** * Represents compatibility with php version 5.3. */ class WPSEO_Link_Compatibility_Notifier { /** * Adds the notification to the notification center. * * @deprecated 13.1 * * @codeCoverageIgnore */ public function add_notification() { _deprecated_function( __METHOD__, 'WPSEO 13.1' ); } /** * Removes the notification from the notification center. * * @deprecated 13.1 * * @codeCoverageIgnore */ public function remove_notification() { _deprecated_function( __METHOD__, 'WPSEO 13.1' ); } /** * Returns the notification when the version is incompatible. * * @deprecated 13.1 * * @codeCoverageIgnore * * @return Yoast_Notification|null The notification. */ protected function get_notification() { _deprecated_function( __METHOD__, 'WPSEO 13.1' ); return null; } } admin/links/class-link-table-accessible-notifier.php 0000644 00000001617 15154470326 0016536 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Admin\Links */ /** * Represents the notice when the table is not accessible. */ class WPSEO_Link_Table_Accessible_Notifier { /** * Adds the notification to the notification center. * * @deprecated 14.1 * * @codeCoverageIgnore */ public function add_notification() { _deprecated_function( __METHOD__, 'WPSEO 14.1' ); } /** * Removes the notification from the notification center. * * @deprecated 14.1 * * @codeCoverageIgnore */ public function remove_notification() { _deprecated_function( __METHOD__, 'WPSEO 14.1' ); } /** * Returns the notification when the table is not accessible. * * @deprecated 14.1 * * @codeCoverageIgnore * * @return Yoast_Notification|null The notification. */ protected function get_notification() { _deprecated_function( __METHOD__, 'WPSEO 14.1' ); return null; } } admin/ajax/class-recalculate-scores-ajax.php 0000644 00000002072 15154470326 0015104 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Admin\Ajax */ /** * Class WPSEO_Recalculate_Scores. * * This class handles the SEO score recalculation for all posts with a filled focus keyword. * * @deprecated 14.4 * @codeCoverageIgnore */ class WPSEO_Recalculate_Scores_Ajax { /** * Initialize the AJAX hooks. * * @deprecated 14.4 * @codeCoverageIgnore */ public function __construct() { _deprecated_function( __METHOD__, 'WPSEO 14.4' ); } /** * Get the totals for the posts and the terms. * * @deprecated 14.4 * @codeCoverageIgnore */ public function get_total() { _deprecated_function( __METHOD__, 'WPSEO 14.4' ); wp_die(); } /** * Start recalculation. * * @deprecated 14.4 * @codeCoverageIgnore */ public function recalculate_scores() { _deprecated_function( __METHOD__, 'WPSEO 14.4' ); wp_die(); } /** * Saves the new linkdex score for given post. * * @deprecated 14.4 * @codeCoverageIgnore */ public function save_score() { _deprecated_function( __METHOD__, 'WPSEO 14.4' ); wp_die(); } } admin/ajax/class-yoast-onpage-ajax.php 0000644 00000001414 15154470326 0013731 0 ustar 00 <?php /** * WPSEO plugin file. * * @package WPSEO\Admin\Ajax */ // Mark this file as deprecated. _deprecated_file( __FILE__, 'WPSEO 13.2' ); /** * Class Yoast_OnPage_Ajax. * * This class will catch the request to dismiss the Ryte notice and will store * the dismiss status as an user meta in the database. * * @deprecated 13.2 * @codeCoverageIgnore */ class Yoast_OnPage_Ajax { /** * Initialize the hooks for the AJAX request. * * @deprecated 13.2 * @codeCoverageIgnore */ public function __construct() { _deprecated_function( __METHOD__, 'WPSEO 13.2' ); } /** * Handles the dismiss notice request. * * @deprecated 13.2 * @codeCoverageIgnore */ public function dismiss_notice() { _deprecated_function( __METHOD__, 'WPSEO 13.2' ); } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка