PluginProbe
Blockenberg — 600+ Advanced Gutenberg Blocks & AI Agent for WordPress Block Editor / 2.0.14
Blockenberg — 600+ Advanced Gutenberg Blocks & AI Agent for WordPress Block Editor v2.0.14
2.0.14 2.0.13 2.0.12 2.0.11 2.0.10 2.0.9 trunk 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8
blockenberg / assets / php / admin-notices.php

admin-notices.php in Blockenberg — 600+ Advanced Gutenberg Blocks & AI Agent for WordPress Block Editor 2.0.14, at assets/php/admin-notices.php

15 lines 888 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /** Keep third-party admin notices outside Blockenberg page headers. */
3 defined( 'ABSPATH' ) || exit;
4
5 add_action( 'admin_enqueue_scripts', function ( $hook ) {
6 if ( ! in_array( $hook, array( 'toplevel_page_blockenberg', 'blockenberg_page_blockenberg-ai', 'blockenberg_page_blockenberg-templates' ), true ) ) {
7 return;
8 }
9 $base = dirname( __DIR__, 2 );
10 $url = plugins_url( '', $base . '/blockenberg.php' );
11 wp_enqueue_style( 'bkbg-admin-notices', $url . '/assets/css/admin-notices.css', array(), filemtime( $base . '/assets/css/admin-notices.css' ) );
12 wp_enqueue_script( 'bkbg-admin-notices', $url . '/assets/js/admin-notices.js', array( 'jquery', 'common' ), filemtime( $base . '/assets/js/admin-notices.js' ), true );
13 wp_localize_script( 'bkbg-admin-notices', 'bkbgAdminNotices', array( 'label' => __( 'Notifications', 'blockenberg' ) ) );
14 } );
15