WC_Admin::__construct()publicWC 1.0

Constructor.

Метод класса: WC_Admin{}

Хуков нет.

Возвращает

null. Ничего (null).

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

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

Код WC_Admin::__construct() WC 9.4.2

public function __construct() {
	add_action( 'init', array( $this, 'includes' ) );
	add_action( 'current_screen', array( $this, 'conditional_includes' ) );
	add_action( 'admin_init', array( $this, 'buffer' ), 1 );
	add_action( 'admin_init', array( $this, 'preview_emails' ) );
	add_action( 'admin_init', array( $this, 'prevent_admin_access' ) );
	add_action( 'admin_init', array( $this, 'admin_redirects' ) );
	add_action( 'admin_footer', 'wc_print_js', 25 );
	add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ), 1 );

	// Disable WXR export of schedule action posts.
	add_filter( 'action_scheduler_post_type_args', array( $this, 'disable_webhook_post_export' ) );

	// Add body class for WP 5.3+ compatibility.
	add_filter( 'admin_body_class', array( $this, 'include_admin_body_class' ), 9999 );

	// Add body class for Marketplace and My Subscriptions pages.
	if ( isset( $_GET['page'] ) && 'wc-addons' === $_GET['page'] ) {
		add_filter( 'admin_body_class', array( 'WC_Admin_Addons', 'filter_admin_body_classes' ) );
	}
}