/**
 * Admin notice.
 *
 */
function presscore_admin_notice()
{
    global $current_screen;
    if (optionsframework_get_options_files($current_screen->parent_base) && !apply_filters('presscore_less_cache_writable', true)) {
        presscore_admin_notices()->add_notice('unable-to-write-css', _x('Failed to create customization .CSS file. To improve your site performance, please check whether ".../wp-content/uploads/" folder is created, and its CHMOD is set to 777.', 'admin', 'the7mk2'), 'updated');
    }
}
function presscore_admin_handle_notices()
{
    presscore_admin_notices()->get_dismissed_notices();
    // load scripts
    add_action('admin_enqueue_scripts', 'presscore_admin_enqueue_scripts');
    // add ajax handle
    add_action('wp_ajax_presscore-admin-notice', array(presscore_admin_notices(), 'dismiss_notices'));
    // print admin notices
    add_action('admin_notices', array(presscore_admin_notices(), 'print_admin_notices'), 40);
}