"Setup Author Website Templates"' ); ?>

' . esc_html__('go to Customizer', 'author-personal-blog') . '' ); ?>

<?php esc_attr_e('Author Portfolio Pro', 'author-personal-blog'); ?>
'Invalid nonce or action type']); } $action = sanitize_text_field(wp_unslash($_POST['action_type'])); switch ($action) { case 'dismiss_forever': update_option('author_personal_blog_notice_dismissed_forever', true); wp_send_json_success(['message' => 'Notice dismissed forever']); break; case 'remind_later': $remind_time = time() + (2 * 24 * 60 * 60); // 2 days update_option('author_personal_blog_notice_remind_time', $remind_time); wp_send_json_success(['message' => 'Notice set to remind later']); break; case 'setup_demo_again': delete_option('author_personal_blog_demo_setup_completed'); wp_send_json_success(['message' => 'Demo setup reset']); break; default: wp_send_json_error(['message' => 'Invalid action']); } } add_action('wp_ajax_author_personal_blog_notice_action', 'handle_author_personal_blog_notice_actions'); /** * Enqueue JavaScript for handling notice actions */ function author_personal_blog_enqueue_notice_scripts() { wp_enqueue_script( 'author-personal-blog-notice', get_theme_file_uri('js/notice-actions.js'), ['jquery'], '1.0.0', true ); wp_localize_script( 'author-personal-blog-notice', 'authorPersonalBlogNotice', [ 'ajaxurl' => admin_url('admin-ajax.php'), 'action' => 'author_personal_blog_notice_action', ] ); } add_action('admin_enqueue_scripts', 'author_personal_blog_enqueue_notice_scripts');