ID, array(60,60)); break; //Portfolio case 'cpo-portfolio-cats': echo get_the_term_list($post->ID, 'cpo_portfolio_category', '', ', ', ''); break; case 'cpo-portfolio-tags': echo get_the_term_list($post->ID, 'cpo_portfolio_tag', '', ', ', ''); break; //Services case 'cpo-service-cats': echo get_the_term_list($post->ID, 'cpo_service_category', '', ', ', ''); break; case 'cpo-service-tags': echo get_the_term_list($post->ID, 'cpo_service_tag', '', ', ', ''); break; //Team case 'cpo-team-cats': echo get_the_term_list($post->ID, 'cpo_team_category', '', ', ', ''); break; //Products case 'cpo-product-cats': echo get_the_term_list($post->ID, 'cpo_product_category', '', ', ', ''); break; case 'cpo-product-tags': echo get_the_term_list($post->ID, 'cpo_product_tag', '', ', ', ''); break; default:break; } } } add_action('admin_notices', 'cpotheme_admin_welcome_notice', 90); function cpotheme_admin_welcome_notice(){ $screen = get_current_screen(); $welcome_dismissed = trim(cpotheme_get_option(CPOTHEME_ID.'_wizard', 'cpotheme_settings', false)); $display = true; if(isset($_GET['action']) && $_GET['action'] == 'edit' || $screen->action == 'add' || $screen->base == 'plugins' || $screen->base == 'widgets') $display = false; if(current_user_can('manage_options') && $welcome_dismissed != 'dismissed' && $display){ $welcome_url = ''.__('quickstart guide', 'brilliance').''; $plugin_url = 'CPO Content Types'; echo '
'; echo '
'; echo ''.__('Dismiss This Notice', 'brilliance').''; echo '

'.sprintf(esc_html__('%s is ready! Make sure you install the %s companion plugin and then check the quickstart guide to see how it all works.', 'brilliance'), esc_attr(CPOTHEME_NAME), $plugin_url, $welcome_url).'

'; echo '

'.sprintf(__('Start Using %s', 'brilliance'), esc_attr(CPOTHEME_NAME)).'

'; echo '
'; echo '
'; } } add_action('admin_menu', 'cpotheme_admin_welcome'); function cpotheme_admin_welcome(){ 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')); } } } //Add a help link next to the Screen Options tab if(!function_exists('cpotheme_admin_help')){ //add_action('admin_footer', 'cpotheme_admin_help'); function cpotheme_admin_help(){ $core_path = defined('CPOTHEME_CORELITE_URL') ? CPOTHEME_CORELITE_URL : get_template_directory_uri().'/core/'; echo ''; } }