| Server IP : 3.93.235.159 / Your IP : 216.73.216.140 Web Server : Apache System : Linux ip-172-26-0-169 5.10.0-46-cloud-amd64 #1 SMP Debian 5.10.262-1 (2026-07-31) x86_64 User : bitnami ( 1000) PHP Version : 8.2.9 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /bitnami/wordpress/wp-content/plugins/yoast-test-helper/src/ |
Upload File : |
<?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.
*
* @return void
*/
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 );
$domain_dropdown = new Domain_Dropdown( $option );
$this->integrations[] = $domain_dropdown;
$this->integrations[] = new Inline_Script( $option );
$this->integrations[] = new MyYoast_OAuth_Overrides( $option, $domain_dropdown );
$this->integrations[] = new Admin_Debug_Info( $option );
$this->integrations[] = new Logger_Integration( $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(),
];
}
}