Automattic\WooCommerce\Internal\Admin

Loader::__construct()publicWC 1.0

Constructor. Hooks added here should be removed in wc_admin_initialize via the feature plugin.

{} Это метод класса: Loader{}

Хуков нет.

Возвращает

null. Ничего.

Использование

$Loader = new Loader();
$Loader->__construct();

Код Loader::__construct() WC 6.6.1

public function __construct() {
	Features::get_instance();
	WCAdminSharedSettings::get_instance();
	Translations::get_instance();
	WCAdminUser::get_instance();
	Settings::get_instance();
	SystemStatusReport::get_instance();

	add_filter( 'admin_body_class', array( __CLASS__, 'add_admin_body_classes' ) );
	add_filter( 'admin_title', array( __CLASS__, 'update_admin_title' ) );
	add_action( 'in_admin_header', array( __CLASS__, 'embed_page_header' ) );
	add_action( 'admin_head', array( __CLASS__, 'remove_notices' ) );
	add_action( 'admin_head', array( __CLASS__, 'smart_app_banner' ) );
	add_action( 'admin_notices', array( __CLASS__, 'inject_before_notices' ), -9999 );
	add_action( 'admin_notices', array( __CLASS__, 'inject_after_notices' ), PHP_INT_MAX );

	// Added this hook to delete the field woocommerce_onboarding_homepage_post_id when deleting the homepage.
	add_action( 'trashed_post', array( __CLASS__, 'delete_homepage' ) );

	/*
	* Remove the emoji script as it always defaults to replacing emojis with Twemoji images.
	* Gutenberg has also disabled emojis. More on that here -> https://github.com/WordPress/gutenberg/pull/6151
	*/
	remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );

	add_action( 'admin_init', array( __CLASS__, 'deactivate_wc_admin_plugin' ) );
}