Skip to content

Commit

Permalink
refactor: use page refresh on keep action for Starter Content notice
Browse files Browse the repository at this point in the history
  • Loading branch information
Soare-Robert-Daniel committed Jan 27, 2025
1 parent 307d9ad commit aa7e943
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@ const NoticeWrapper = () => {
setError(response.data.message);
return;
}
if (wp.customize.previewer) {
wp.customize.previewer.refresh();
}
wp.customize.notifications.remove(noticeId);
window.location.reload();
})
.catch((err) => {
setError(
Expand Down
2 changes: 1 addition & 1 deletion inc/customizer/loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public function enqueue_customizer_controls() {
],
'deal' => ! defined( 'NEVE_PRO_VERSION' ) ? $offer->get_localized_data() : array(),
'starterContent' => array(
'active' => is_customize_preview() && current_theme_supports( 'starter-content' ) && get_option( 'fresh_site' ),
'active' => (bool) get_option( 'fresh_site' ),
'nonce' => wp_create_nonce( 'neve_dismiss_starter_content' ),
'dismissEndpoint' => admin_url( 'admin-ajax.php' ),
'labels' => array(
Expand Down

0 comments on commit aa7e943

Please sign in to comment.