Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions class-bsf-admin-notices.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class BSF_Admin_Notices {
* @var string
* @since 1.2.0
*/
private static $version = '1.2.2';
private static $version = '1.2.3';

/**
* Registered notices.
Expand Down Expand Up @@ -202,11 +202,11 @@ public function dismiss_notice() {
* @return void
*/
public function enqueue_scripts() {
wp_register_style( 'astra-notices', self::get_url() . 'notices.css', array(), self::$version );
wp_register_script( 'astra-notices', self::get_url() . 'notices.js', array( 'jquery' ), self::$version, true );
wp_register_style( 'bsf-astra-notices', self::get_url() . 'notices.css', array(), self::$version );
wp_register_script( 'bsf-astra-notices', self::get_url() . 'notices.js', array( 'jquery' ), self::$version, true );
wp_localize_script(
'astra-notices',
'astraNotices',
'bsf-astra-notices',
'bsfAstraNotices',
array(
'_notice_nonce' => wp_create_nonce( 'astra-notices' ),
)
Expand Down Expand Up @@ -328,8 +328,8 @@ public function show_notices() {
* @return void
*/
public static function markup( $notice = array() ) {
wp_enqueue_script( 'astra-notices' );
wp_enqueue_style( 'astra-notices' );
wp_enqueue_script( 'bsf-astra-notices' );
wp_enqueue_style( 'bsf-astra-notices' );

// Dual-emit: legacy (astra_notice_*) + new (bsf_admin_notice_*) hooks for backward compat.
// Note: consumers hooking BOTH names for the same event will be called twice.
Expand Down
4 changes: 2 additions & 2 deletions notices.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* @since 1.0.0
* @class ASTCustomizer
*/
AstraNotices = {
var AstraNotices = {

/**
* Initializes our custom logic for the Customizer.
Expand Down Expand Up @@ -80,7 +80,7 @@
type: 'POST',
data: {
action : 'astra-notice-dismiss',
nonce : astraNotices._notice_nonce,
nonce : bsfAstraNotices._notice_nonce,
notice_id : notice_id,
repeat_notice_after : parseInt( repeat_notice_after, 10 ),
},
Expand Down
Loading