Automattic\WooCommerce\Admin
Loader::inject_before_notices() public WC 1.0
Runs before admin notices action and hides them.
{} Это метод класса: Loader{}
Хуков нет.
Возвращает
null
. Null. Ничего.
Использование
$result = Loader::inject_before_notices();
Код Loader::inject_before_notices() Loader::inject before notices WC 5.2.1
public static function inject_before_notices() {
if ( ! self::is_admin_or_embed_page() ) {
return;
}
// Wrap the notices in a hidden div to prevent flickering before
// they are moved elsewhere in the page by WordPress Core.
echo '<div class="woocommerce-layout__notice-list-hide" id="wp__notice-list">';
if ( self::is_admin_page() ) {
// Capture all notices and hide them. WordPress Core looks for
// `.wp-header-end` and appends notices after it if found.
// https://github.com/WordPress/WordPress/blob/f6a37e7d39e2534d05b9e542045174498edfe536/wp-admin/js/common.js#L737 .
echo '<div class="wp-header-end" id="woocommerce-layout__notice-catcher"></div>';
}
}