action == 'add' || $screen->base == 'plugins' || $screen->base == 'widgets')
$display = false;
if(current_user_can('manage_options') && $welcome_dismissed != 'dismissed' && $display){
$welcome_url = ''.__('quickstart guide', 'allegiant').'';
$plugin_url = 'CPO Content Types';
echo '
';
}
}
}
add_action('admin_menu', 'cpotheme_admin_welcome');
function cpotheme_admin_welcome(){
if(current_user_can('manage_options')){
add_theme_page(esc_attr(CPOTHEME_NAME), esc_attr(CPOTHEME_NAME), 'read', 'cpotheme-welcome', 'cpotheme_admin_welcome_page');
}
}
function cpotheme_admin_welcome_page(){
echo '';
$core_path = get_template_directory().'/core/';
if(defined('CPOTHEME_CORELITE')) $core_path = CPOTHEME_CORELITE;
require_once($core_path.'/templates/welcome.php');
echo '
';
}
//Notice display and dismissal
if(!function_exists('cpotheme_admin_notice_control')){
add_action('admin_init', 'cpotheme_admin_notice_control');
function cpotheme_admin_notice_control(){
//Display a notice
if(isset($_GET['ctdisplay']) && $_GET['ctdisplay'] != ''){
cpotheme_update_option(htmlentities($_GET['ctdisplay']), 'display');
wp_redirect(remove_query_arg('ctdisplay'));
}
//Dismiss a notice
if(isset($_GET['ctdismiss']) && $_GET['ctdismiss'] != ''){
cpotheme_update_option(htmlentities($_GET['ctdismiss']), 'dismissed');
wp_redirect(remove_query_arg('ctdismiss'));
}
}
}