function restimpo_get_display_image_page() { if (get_theme_mod('restimpo_display_image_page', restimpo_default_options('restimpo_display_image_page')) == '' || get_theme_mod('restimpo_display_image_page', restimpo_default_options('restimpo_display_image_page')) == 'Display') { ?> <?php if (has_post_thumbnail()) { ?> <?php the_post_thumbnail(); ?> <?php } } }
</a> <?php } ?> <div class="post-entry-content"><?php if (get_theme_mod('restimpo_content_archives', restimpo_default_options('restimpo_content_archives')) != 'Excerpt') { global $more; $more = 0; the_content(); } else { the_excerpt(); } ?> </div> <?php if (get_theme_mod('restimpo_display_meta_post', restimpo_default_options('restimpo_display_meta_post')) != 'Hide') { ?> <p class="post-info"> <span class="post-info-alignleft"> <span class="post-info-author vcard author"><span class="fn"><?php the_author_posts_link(); ?> </span></span> <span class="post-info-date post_date date updated"><a href="<?php echo get_permalink(); ?> "><?php echo get_the_date(); ?> </a></span> <?php
?> </p> <?php } ?> <div class="entry-content"> <?php the_content(); wp_link_pages(array('before' => '<p class="page-link"><span>' . __('Pages:', 'restimpo') . '</span>', 'after' => '</p>')); edit_post_link(__('(Edit)', 'restimpo'), '<p class="edit-link">', '</p>'); ?> </div> <?php } } if (get_theme_mod('restimpo_next_preview_post', restimpo_default_options('restimpo_next_preview_post')) == '' || get_theme_mod('restimpo_next_preview_post', restimpo_default_options('restimpo_next_preview_post')) == 'Display') { restimpo_prev_next('restimpo-post-nav'); } ?> <?php comments_template('', true); ?> </article> <!-- end of content --> </div> <?php get_sidebar(); ?> </div> </div> <!-- end of wrapper-content --> <?php
function restimpo_get_own_css() { $own_css = get_theme_mod('restimpo_own_css'); $own_css_def = restimpo_default_options('restimpo_own_css'); if ($own_css != '') { ?> <?php echo esc_attr($own_css); } elseif ($own_css == '' && $own_css_def != '') { echo esc_attr($own_css_def); } }
*/ get_header(); ?> <div id="wrapper-content"> <div class="container"> <div id="main-content"> <?php if (get_theme_mod('restimpo_display_latest_posts', restimpo_default_options('restimpo_display_latest_posts')) != 'Hide') { ?> <section class="home-latest-posts"> <h2 class="entry-headline"><span class="entry-headline-text"><?php if (get_theme_mod('restimpo_latest_posts_headline', restimpo_default_options('restimpo_latest_posts_headline')) == '') { _e('Latest Posts', 'restimpo'); } else { echo esc_attr(get_theme_mod('restimpo_latest_posts_headline', restimpo_default_options('restimpo_latest_posts_headline'))); } ?> </span></h2> <?php if (have_posts()) { while (have_posts()) { the_post(); get_template_part('content', 'archives'); } } restimpo_content_nav('nav-below'); ?> </section> <?php }
<?php /** * The sidebar template file. * @package RestImpo * @since RestImpo 1.0.0 */ if (get_theme_mod('restimpo_display_sidebar', restimpo_default_options('restimpo_display_sidebar')) != 'Hide') { ?> <aside id="sidebar"> <?php if (dynamic_sidebar('sidebar-1')) { } else { } ?> </aside> <!-- end of sidebar --> <?php }
} } else { if (get_theme_mod('restimpo_display_header_image', restimpo_default_options('restimpo_display_header_image')) == 'Everywhere' && get_header_image() != '') { ?> <div class="header-image"> <img class="header-img" src="<?php header_image(); ?> " alt="<?php bloginfo('name'); ?> " /> </div> <?php } } if (is_home() && get_theme_mod('restimpo_display_site_description', restimpo_default_options('restimpo_display_site_description')) != 'Hide') { ?> <div class="header-description-wrapper"> <div class="header-description"> <h1><?php bloginfo('description'); ?> </h1> </div> </div> <?php } ?> </header> <!-- end of wrapper-header -->
$wp_customize->add_setting('restimpo_sidebar_google_fonts', array('default' => restimpo_default_options('restimpo_sidebar_google_fonts'), 'capability' => 'edit_theme_options', 'type' => 'theme_mod', 'sanitize_callback' => 'restimpo_sanitize_text')); $wp_customize->add_control('restimpo_sidebar_google_fonts_control', array('settings' => 'restimpo_sidebar_google_fonts', 'label' => __('Sidebar/Footer Widget Headlines font', 'restimpo'), 'section' => 'restimpo_font_settings', 'type' => 'select', 'choices' => $restimpo_fonts)); // ============================= // = Main Header Menu font = // ============================= $wp_customize->add_setting('restimpo_menu_google_fonts', array('default' => restimpo_default_options('restimpo_menu_google_fonts'), 'capability' => 'edit_theme_options', 'type' => 'theme_mod', 'sanitize_callback' => 'restimpo_sanitize_text')); $wp_customize->add_control('restimpo_menu_google_fonts_control', array('settings' => 'restimpo_menu_google_fonts', 'label' => __('Main Header Menu font', 'restimpo'), 'section' => 'restimpo_font_settings', 'type' => 'select', 'choices' => $restimpo_fonts)); // ============================= // = Top Header Menu font = // ============================= $wp_customize->add_setting('restimpo_top_menu_google_fonts', array('default' => restimpo_default_options('restimpo_top_menu_google_fonts'), 'capability' => 'edit_theme_options', 'type' => 'theme_mod', 'sanitize_callback' => 'restimpo_sanitize_text')); $wp_customize->add_control('restimpo_top_menu_google_fonts_control', array('settings' => 'restimpo_top_menu_google_fonts', 'label' => __('Top Header Menu font', 'restimpo'), 'section' => 'restimpo_font_settings', 'type' => 'select', 'choices' => $restimpo_fonts)); // ============================= // = Custom CSS = // ============================= $wp_customize->add_setting('restimpo_own_css', array('default' => restimpo_default_options('restimpo_own_css'), 'capability' => 'edit_theme_options', 'type' => 'theme_mod', 'sanitize_callback' => 'wp_filter_nohtml_kses')); $wp_customize->add_control(new restimpo_customize_textarea_control($wp_customize, 'restimpo_own_css_control', array('label' => __('Custom CSS', 'restimpo'), 'section' => 'restimpo_general_settings', 'settings' => 'restimpo_own_css'))); } add_action('customize_register', 'restimpo_customize_register'); /** * Sanitize URIs */ function restimpo_sanitize_uri($uri) { if ('' === $uri) { return ''; } return esc_url_raw($uri); } /** * Sanitize Texts