*/ class Latest_Updates extends Notice { /** * Latest Updates Notice * * @return void */ public function __construct() { parent::__construct(); if(is_admin()){ add_action( 'admin_footer', array( $this, 'jltwp_handle_plugin_update_notice_dismiss' ),99999 ); add_action( 'wp_ajax_jltwp_plugin_update_info', array( $this, 'jltwp_plugin_update_info' ) ); } } /** * Handles the AJAX request for the plugin update info notice dismissal. * * Triggered when the user clicks the Dismiss button in the notice. * * @since 1.0 * * @return void */ public function jltwp_plugin_update_info() { if (!current_user_can('install_plugins')) { return; } // Verify nonce for security. check_ajax_referer( 'dismiss_notice_nonce', 'nonce' ); wp_send_json_success( array( 'message' => 'Notice dismissed.', 'data' => update_option('_wpadminify_plugin_update_info_notice', "dismissed" ) ) ); } /** * Notice Content * * @author Jewel Theme */ public function notice_content() { if("dismissed" !== get_option('_wpadminify_plugin_update_info_notice', true )){ $jltwp_adminify_changelog_message = sprintf( __('%3$s %4$s %5$s %6$s %7$s %8$s
Check Changelogs for %2$s', 'adminify'), esc_url_raw('https://wpadminify.com/v4-0-3-1-update-released'), __('More about Updates ', 'adminify'), /** Changelog Items * Starts from: %3$s */ '

' . WP_ADMINIFY . ' v' . esc_html(WP_ADMINIFY_VER) . '' . __(' has some updates..', 'adminify') . '


', // %3$s __(' Admin Bar adding & on url dynamically
', 'adminify'), __(' Added Adminify UI for Guttenberg editor
', 'adminify'), __(' Admin Menu custom url and admin page url swicthing issue
', 'adminify'), __(' Admin Menu custom menu icon support for Simple Line Icon and FontAwesome Icon
', 'adminify'), __(' Mini Mode Icon option added
', 'adminify') ); printf(wp_kses_post($jltwp_adminify_changelog_message)); } } /** * Notice Header * * @author Jewel Theme */ public function notice_header() { if("dismissed" !== get_option('_wpadminify_plugin_update_info_notice', true )){ ?>
';} } public function jltwp_handle_plugin_update_notice_dismiss() { ?> */ public function intervals() { return array(0); } } }