/** * Post meta HTML block for single CPT's. * * @since 0.2.0 */ public function single_cpt_meta($taxonomy, $args = array()) { $args = extract($this->merge_loop_arguments($args)); if ($render_date || $render_author || $render_cats || $render_comments) { $term_list = get_the_term_list(get_the_ID(), $taxonomy, '', ', ', ''); if (empty($term_list)) { $render_cats = false; } ?> <div class="post-meta"> <?php WPGo_Hooks::wpgo_post_meta_header(); ?> <p<?php echo $header_align_meta; ?> > <?php if ($render_date) { ?> <time class="date" datetime="<?php the_date('c'); ?> " pubdate><?php the_time(get_option('date_format')); ?> </time><?php echo $date_sep; } ?> <?php if ($render_author) { ?> <span class="author"><?php echo $author_prefix; the_author_posts_link(); ?> </span><?php } ?> <?php if ($render_cats) { echo $author_sep; ?> <span class="categories"><?php echo $cat_prefix; echo $term_list; ?> </span><?php } ?> <?php if ($render_comments && comments_open()) { ?> <?php echo $cat_sep; ?> <span class="comments"><?php comments_popup_link(__('Leave Comment', 'wpgothemes'), __('1 Comment', 'wpgothemes'), __('% Comments', 'wpgothemes'), '', ''); ?> </span> <?php } ?> </p> </div><!-- .post-meta --> <?php } }
<?php get_header(); ?> <main class="content"> <?php WPGo_Hooks::wpgo_after_content_open(); ?> <?php get_template_part('loops/loop', 'single-page'); ?> </main><!-- .content --> <?php get_footer();
/** * Hook to allow further customizer defaults to be defined via other framework locations or a Plugin. * * @since 0.1.0 */ public function add_customizer_defaults() { /* Add theme specific default settings via this hook. */ WPGo_Hooks::wpgo_theme_customizer_defaults(); }
/** * Loop through the specified theme custom page template files. * * @since 0.1.0 */ public static function custom_widget_area_loop($sidebar_hook = null, $fallback_default_widget_area_name = null, $show_default = false, $check_global = false) { global $wpgo_template; /* Default to post widget area if nothing else specified. */ if (empty($fallback_default_widget_area_name)) { $fallback_default_widget_area_name = 'primary-post-widget-area'; } $custom_pages = array(); /* Initialize to empty array. */ /* At the moment this feature only supports (i.e. was only needed for) primary sidebars, but it can be easily extended for secondary sidebars. */ switch ($sidebar_hook) { case 'primary-archive': $custom_pages = WPGo_Hooks::wpgo_custom_primary_sidebar_archive($custom_pages); break; case 'primary-pages': $custom_pages = WPGo_Hooks::wpgo_custom_primary_sidebar_pages($custom_pages); break; case 'primary-posts': $custom_pages = WPGo_Hooks::wpgo_custom_primary_sidebar_posts($custom_pages); break; default: $custom_pages = array(); } $custom_pages_flag = 0; foreach ($custom_pages as $custom_page => $widget_area) { if ($wpgo_template == $custom_page) { self::render_widget_area($widget_area, $show_default, $check_global); $custom_pages_flag = 1; break; } } /* If no custom pages set then show a default widget area. */ if ($custom_pages_flag == 0) { self::render_widget_area($fallback_default_widget_area_name, true, true); } }
/** * Hook to allow further theme option defaults to be defined via other framework locations or a Plugin. * * @since 0.1.0 */ public function add_theme_option_defaults() { global $wpgo_default_options, $wpgo_default_off_checkboxes; /* Add theme specific default settings via this hook. */ WPGo_Hooks::wpgo_theme_option_defaults(); $options = get_option(WPGO_OPTIONS_DB_NAME); /* Added this here rather inside the same 'if' statement above so we can add extra $wpgo_default_off_checkboxes via a hook. */ if (is_array($options)) { /* Manually set the checkboxes that have been unchecked, by the user, to zero. */ $options = array_merge($wpgo_default_off_checkboxes, $options); } /* If there are no existing options just use defaults (no merge). */ if (!$options || empty($options)) { // Update options in db update_option(WPGO_OPTIONS_DB_NAME, $wpgo_default_options); } else { /* Merge current options with the defaults, i.e. add any new options but don't overwrite existing ones. */ $result = array_merge($wpgo_default_options, $options); /* Update options in db. */ update_option(WPGO_OPTIONS_DB_NAME, $result); } }
?> <div class="nav-wrap"> <nav class="primary-menu"> <label onclick="" for="nav-respond" id="nav-respond-wrapper"></label> <input type="checkbox" name="nav-respond" id="nav-respond" /> <?php $args = array('theme_location' => WPGO_CUSTOM_NAV_MENU_1); wp_nav_menu($args); ?> </nav> </div><!-- .nav-wrap --> <?php } ?> </div><!-- #header-container --> <?php WPGo_Hooks::wpgo_after_header_close(); ?> <div id="outer-container"> <?php WPGo_Hooks::wpgo_after_outer_container_open(); ?> <div id="container"> <?php WPGo_Hooks::wpgo_before_content_open();
/** * Define default color scheme array. * * @since 0.2.0 */ public function define_color_schemes() { $default_colors = array('wpgo-links-color' => '#333', 'wpgo-text-color' => '#363636'); if (current_theme_supports('custom-background')) { $custom_bg_args = get_theme_support('custom-background'); if (isset($custom_bg_args[0]['default-color']) && !empty($custom_bg_args[0]['default-color'])) { $default_colors['background_color'] = $custom_bg_args[0]['default-color']; } else { $default_colors['background_color'] = '#ffffff'; } // default to white bg color if none set } /* Individual customizer color picker defaults. */ $this->_wpgo_color_schemes = array(array('label' => __('Default', 'wpgothemes'), 'name' => 'default', 'default_colors' => $default_colors)); /* Add/remove color schemes via this filter. */ $this->_wpgo_color_schemes = WPGo_Hooks::wpgo_color_scheme_filter($this->_wpgo_color_schemes); /* Make sure all default hex codes contain lower case characters and are 6-digits in length. */ $this->validate_color_scheme_hex_codes(); }
<?php WPGo_Hooks::wpgo_after_content_close(); ?> </div><!-- #container --> </div><!-- #outer-container --> <footer id="footer-container"> <?php WPGo_Hooks::wpgo_after_opening_footer_tag(); ?> <?php get_sidebar('footer'); // Adds support for the four footer widget areas ?> <?php WPGo_Hooks::wpgo_before_closing_footer_tag(); ?> </footer> </div><!-- #body-container --> <?php WPGo_Hooks::wpgo_after_closing_footer_tag(); wp_footer(); ?> </body> </html>