Exemplo n.º 1
0
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 = '<a href="' . esc_url(admin_url('themes.php?page=cpotheme-welcome')) . '">' . __('quickstart guide', 'brilliance') . '</a>';
        $plugin_url = '<strong><a href="' . esc_url(admin_url('themes.php?page=cpotheme-welcome')) . '">CPO Content Types</a></strong>';
        echo '<div class="updated">';
        echo '<div class="cpotheme-notice">';
        echo '<a href="' . add_query_arg('ctdismiss', CPOTHEME_ID . '_wizard') . '" class="cpothemes-notice-dismiss">' . __('Dismiss This Notice', 'brilliance') . '</a>';
        echo '<p>' . 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) . '</p>';
        echo '<p><a href="' . esc_url(admin_url('themes.php?page=cpotheme-welcome')) . '" class="button button-primary" style="text-decoration: none;">' . sprintf(__('Start Using %s', 'brilliance'), esc_attr(CPOTHEME_NAME)) . '</a></p>';
        echo '</div>';
        echo '</div>';
    }
}
Exemplo n.º 2
0
 function cpotheme_postpage_content()
 {
     if (cpotheme_get_option('postpage_preview') === true || is_singular('post')) {
         the_content();
         cpotheme_post_pagination();
     } else {
         the_excerpt();
     }
 }
Exemplo n.º 3
0
function cpotheme_show_posts()
{
    $display = false;
    if (!is_front_page() || cpotheme_get_option('home_posts') === true) {
        $display = true;
    }
    return $display;
}
Exemplo n.º 4
0
 function cpotheme_admin_wizard()
 {
     $screen = get_current_screen();
     $wizard_dismissed = trim(cpotheme_get_option(CPOTHEME_ID . '_wizard', 'cpotheme_settings', false));
     //Display only on the dashboard and custom post listings
     $display = true;
     if (isset($_GET['action']) && $_GET['action'] == 'edit' || $screen->action == 'add' || $screen->base == 'plugins' || $screen->base == 'widgets') {
         $display = false;
     }
     //If notice hasn't been explicitly dismissed, display it
     if (current_user_can('manage_options') && $wizard_dismissed != 'dismissed' && $display) {
         $core_path = defined('CPO_CORELITE_URL') ? CPO_CORELITE_URL : get_template_directory_uri() . '/core/';
         echo '<div id="message" class="updated">';
         echo '<div class="cpotheme-notice">';
         echo '<a href="' . add_query_arg('ctdismiss', CPOTHEME_ID . '_wizard') . '" class="cpothemes-notice-dismiss">' . __('Dismiss This Notice', 'cpocore') . '</a>';
         echo '<img class="cpotheme-wizard-image" src="' . $core_path . 'images/ct-icon.png">';
         echo '<h3 class="cpotheme-wizard-title">' . sprintf(__('%s Is Ready', 'cpocore'), CPOTHEME_NAME) . '</h3>';
         echo '<p class="cpotheme-wizard-description">' . __('Your new theme has been activated! To get started, check the following list:', 'cpocore') . '</p>';
         echo '<div class="cpotheme-wizard-clear"></div>';
         //RECOMMENDED PLUGINS
         echo '<div class="cpotheme-wizard-column">';
         echo '<h3>1. ' . __('Install Recommended Plugins', 'cpocore') . '</h3>';
         echo __('This theme works well with a number of free plugins to unlock its full potential. It is highly recommended that you install them.', 'cpocore');
         //CPO Content Types
         $plugin_url = add_query_arg(array('tab' => 'plugin-information', 'plugin' => 'cpo-content-types', 'TB_iframe' => 'true', 'width' => '640', 'height' => '500'), admin_url('plugin-install.php'));
         echo '<a class="cpotheme-wizard-task thickbox" href="' . $plugin_url . '"><span class="cpotheme-wizard-icon dashicons-before dashicons-admin-plugins"></span> <strong>' . __('Install CPO Content Types', 'cpocore') . '</strong></a>';
         //CPO Shortcodes
         $plugin_url = add_query_arg(array('tab' => 'plugin-information', 'plugin' => 'cpo-shortcodes', 'TB_iframe' => 'true', 'width' => '640', 'height' => '500'), admin_url('plugin-install.php'));
         echo '<a class="cpotheme-wizard-task thickbox" href="' . $plugin_url . '"><span class="cpotheme-wizard-icon dashicons-before dashicons-admin-plugins"></span> ' . __('Install CPO Shortcodes', 'cpocore') . '</a>';
         //CPO Widgets
         $plugin_url = add_query_arg(array('tab' => 'plugin-information', 'plugin' => 'cpo-widgets', 'TB_iframe' => 'true', 'width' => '640', 'height' => '500'), admin_url('plugin-install.php'));
         echo '<a class="cpotheme-wizard-task thickbox" href="' . $plugin_url . '"><span class="cpotheme-wizard-icon dashicons-before dashicons-admin-plugins"></span> ' . __('Install CPO Widgets', 'cpocore') . '</a>';
         echo '</div>';
         //CONTENT TYPES
         echo '<div class="cpotheme-wizard-column">';
         echo '<h3>2. ' . __('Add Custom Content Types', 'cpocore') . '</h3>';
         echo __('This theme supports special content types. Populate the following and your site will start taking shape.', 'cpocore');
         echo ' ';
         $plugin_url = add_query_arg(array('tab' => 'plugin-information', 'plugin' => 'cpo-content-types', 'TB_iframe' => 'true', 'width' => '640', 'height' => '500'), admin_url('plugin-install.php'));
         echo sprintf(__('You will need the %s plugin.', 'cpocore'), '<strong><a class="thickbox" href="' . $plugin_url . '">CPO Content Types</a></strong>');
         //Posts and Pages - In case there are no custom post types
         if (!defined('CPOTHEME_USE_SLIDES') && !defined('CPOTHEME_USE_FEATURES') && !defined('CPOTHEME_USE_PORTFOLIO') && !defined('CPOTHEME_USE_PRODUCTS') && !defined('CPOTHEME_USE_SERVICES') && !defined('CPOTHEME_USE_TESTIMONIALS') && !defined('CPOTHEME_USE_TEAM')) {
             echo '<a class="cpotheme-wizard-task" href="edit.php?post_type=cpo_slide"><span class="cpotheme-wizard-icon dashicons-before dashicons-admin-post"></span> ' . __('Start creating posts', 'cpocore') . '</a>';
         }
         //Homepage Slides
         if (defined('CPOTHEME_USE_SLIDES') && CPOTHEME_USE_SLIDES == true) {
             echo '<a class="cpotheme-wizard-task" href="edit.php?post_type=cpo_slide"><span class="cpotheme-wizard-icon dashicons-before dashicons-images-alt2"></span> ' . __('Add slides to the homepage', 'cpocore') . '</a>';
         }
         //Homepage features
         if (defined('CPOTHEME_USE_FEATURES') && CPOTHEME_USE_FEATURES == true) {
             echo '<a class="cpotheme-wizard-task" href="edit.php?post_type=cpo_feature"><span class="cpotheme-wizard-icon dashicons-before dashicons-star-filled"></span> ' . __('Add feature blocks to the homepage', 'cpocore') . '</a>';
         }
         //Portfolio
         if (defined('CPOTHEME_USE_PORTFOLIO') && CPOTHEME_USE_PORTFOLIO == true) {
             echo '<a class="cpotheme-wizard-task" href="edit.php?post_type=cpo_portfolio"><span class="cpotheme-wizard-icon dashicons-before dashicons-portfolio"></span> ' . __('Create your portfolio items', 'cpocore') . '</a>';
         }
         //Products
         if (defined('CPOTHEME_USE_PRODUCTS') && CPOTHEME_USE_PRODUCTS == true) {
             echo '<a class="cpotheme-wizard-task" href="edit.php?post_type=cpo_product"><span class="cpotheme-wizard-icon dashicons-before dashicons-cart"></span> ' . __('Showcase your products', 'cpocore') . '</a>';
         }
         //Services
         if (defined('CPOTHEME_USE_SERVICES') && CPOTHEME_USE_SERVICES == true) {
             echo '<a class="cpotheme-wizard-task" href="edit.php?post_type=cpo_service"><span class="cpotheme-wizard-icon dashicons-before dashicons-archive"></span> ' . __('List your services', 'cpocore') . '</a>';
         }
         //Testimonials
         if (defined('CPOTHEME_USE_TESTIMONIALS') && CPOTHEME_USE_TESTIMONIALS == true) {
             echo '<a class="cpotheme-wizard-task" href="edit.php?post_type=cpo_testimonial"><span class="cpotheme-wizard-icon dashicons-before dashicons-format-chat"></span> ' . __('Add some testimonials', 'cpocore') . '</a>';
         }
         //Team
         if (defined('CPOTHEME_USE_TEAM') && CPOTHEME_USE_TEAM == true) {
             echo '<a class="cpotheme-wizard-task" href="edit.php?post_type=cpo_team"><span class="cpotheme-wizard-icon dashicons-before dashicons-universal-access"></span> ' . __('Add your team members', 'cpocore') . '</a>';
         }
         //Portfolio listing
         if (defined('CPOTHEME_USE_PORTFOLIO') && CPOTHEME_USE_PORTFOLIO == true) {
             echo '<a class="cpotheme-wizard-task" href="post-new.php?post_type=page"><span class="cpotheme-wizard-icon dashicons-before dashicons-welcome-add-page"></span> ' . __('Create a page with the Portfolio template', 'cpocore') . '</a>';
         }
         //Products listing
         if (defined('CPOTHEME_USE_PRODUCTS') && CPOTHEME_USE_PRODUCTS == true) {
             echo '<a class="cpotheme-wizard-task" href="post-new.php?post_type=page"><span class="cpotheme-wizard-icon dashicons-before dashicons-welcome-add-page"></span> ' . __('Create a page with the Products template', 'cpocore') . '</a>';
         }
         //Services listing
         if (defined('CPOTHEME_USE_SERVICES') && CPOTHEME_USE_SERVICES == true) {
             echo '<a class="cpotheme-wizard-task" href="post-new.php?post_type=page"><span class="cpotheme-wizard-icon dashicons-before dashicons-welcome-add-page"></span> ' . __('Create a page with the Services template', 'cpocore') . '</a>';
         }
         //Team listing
         if (defined('CPOTHEME_USE_TEAM') && CPOTHEME_USE_TEAM == true) {
             echo '<a class="cpotheme-wizard-task" href="post-new.php?post_type=page"><span class="cpotheme-wizard-icon dashicons-before dashicons-welcome-add-page"></span> ' . __('Create a page with the Team template', 'cpocore') . '</a>';
         }
         echo '</div>';
         //THEME OPTIONS
         echo '<div class="cpotheme-wizard-column cpotheme-wizard-column-last">';
         echo '<h3>3. ' . __('Configure The Theme', 'cpocore') . '</h3>';
         echo __('Add the finishing touch. Customize your theme using the theme options page, add your menus, and create your sidebar widgets.', 'cpocore');
         echo '<a class="cpotheme-wizard-task" href="customize.php"><span class="cpotheme-wizard-icon dashicons-before dashicons-admin-appearance"></span> ' . __('Customize the appearance of your site', 'cpocore') . '</a>';
         echo '<a class="cpotheme-wizard-task" href="nav-menus.php"><span class="cpotheme-wizard-icon dashicons-before dashicons-menu"></span> ' . __('Set up the main navigation menu', 'cpocore') . '</a>';
         echo '<a class="cpotheme-wizard-task" href="widgets.php"><span class="cpotheme-wizard-icon dashicons-before dashicons-welcome-widgets-menus"></span> ' . __('Add some widgets to your sidebar', 'cpocore') . '</a>';
         echo '</div>';
         echo '<div class="cpotheme-wizard-clear"></div>';
         echo '</div>';
         echo '</div>';
     }
 }
Exemplo n.º 5
0
        post_class();
        ?>
>
				<div class="page-content">
					<?php 
        the_content();
        ?>
				</div>
			</div>
			<?php 
    }
}
?>
			
			<?php 
$columns = cpotheme_get_option('services_columns');
?>
			<?php 
$query = new WP_Query('post_type=cpo_service&posts_per_page=-1&order=ASC&orderby=menu_order');
?>
			<?php 
if ($query->posts) {
    ?>
			<section id="services" class="services">
				<?php 
    cpotheme_grid($query->posts, 'element', 'service', $columns);
    ?>
			</section>
			<?php 
    wp_reset_postdata();
    ?>
Exemplo n.º 6
0
<?php

get_header();
?>

<?php 
if (cpotheme_get_option('home_posts') === true) {
    ?>
<div id="main" class="main">
	<div class="container">		
		<section id="content" class="content">
			<?php 
    do_action('cpotheme_before_content');
    ?>
			<?php 
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            ?>
			<?php 
            get_template_part('element', 'blog');
            ?>
			<?php 
        }
    }
    ?>
			<?php 
    cpotheme_numbered_pagination();
    ?>
			<?php 
    do_action('cpotheme_after_content');
Exemplo n.º 7
0
>
	<div class="outer" id="top">
		<?php 
do_action('cpotheme_before_wrapper');
?>
		<div class="wrapper">
			<div id="topbar" class="topbar secondary-color-bg dark">
				<div class="container">
					<?php 
do_action('cpotheme_top');
?>
					<div class="clear"></div>
				</div>
			</div>
			<header id="header" class="header <?php 
if (cpotheme_get_option('header_opaque')) {
    echo ' header-opaque';
}
?>
">
				<div class="header-wrapper">
					<div class="container">
						<?php 
do_action('cpotheme_header');
?>
						<div class='clear'></div>
					</div>
				</div>
			</header>
			<?php 
do_action('cpotheme_before_main');