示例#1
0
/**
 * Hooking WooCommerce.
 */
function simple_life_hooking_woo()
{
    remove_action('woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0);
    if (is_woocommerce() && true === simple_life_get_option('enable_breadcrumb')) {
        add_action('simple_life_action_after_header', 'woocommerce_breadcrumb');
        remove_action('simple_life_action_after_header', 'simple_life_add_breadcrumb');
    }
}
示例#2
0
<?php

/**
 * Search form template.
 *
 * @package Simple_Life
 */
?>
<form role="search" method="get" id="searchform" class="search-form" action="<?php 
echo esc_url(home_url('/'));
?>
">
  <div>
    <label class="screen-reader-text" for="s"><?php 
esc_html_x('Search for:', 'label', 'simple-life');
?>
</label>
    <input type="text" value="<?php 
echo get_search_query();
?>
" name="s" id="s" placeholder="<?php 
echo esc_attr(simple_life_get_option('search_placeholder'));
?>
" class="search-field" />
    <input type="submit" class="search-submit screen-reader-text" id="searchsubmit" value="<?php 
echo esc_attr_x('Search', 'submit button', 'simple-life');
?>
" />
  </div>
</form>
示例#3
0
    /**
     * Displays the optional custom logo.
     *
     * @since 1.8
     */
    function simple_life_the_custom_logo()
    {
        if (function_exists('the_custom_logo')) {
            the_custom_logo();
        } else {
            $site_logo = simple_life_get_option('site_logo');
            if (!empty($site_logo)) {
                ?>
				<a href="<?php 
                echo esc_url(home_url('/'));
                ?>
" class="site-logo-link">
					<img src="<?php 
                echo esc_url($site_logo);
                ?>
" alt="<?php 
                echo esc_attr(get_bloginfo('name', 'display'));
                ?>
" />
				</a>
				<?php 
            }
        }
    }
示例#4
0
/**
 * Render the read more text for the selective refresh partial.
 *
 * @since 2.0
 *
 * @return void
 */
function simple_life_customize_partial_read_more_text()
{
    echo esc_html(simple_life_get_option('read_more_text'));
}
示例#5
0
if (!empty($copyright_text)) {
    ?>

    <div id="copyright-wrap">
      <div class="copyright-text"><?php 
    echo wp_kses_post($copyright_text);
    ?>
</div>
    </div>

	<?php 
}
?>

	<?php 
$powered_by = simple_life_get_option('powered_by');
?>

	<?php 
if (true === $powered_by) {
    ?>

  		<div class="site-info" id="powered-by-wrap">
  			<a href="<?php 
    echo esc_url(__('http://wordpress.org/', 'simple-life'));
    ?>
"><?php 
    printf(esc_html__('Proudly powered by %s', 'simple-life'), 'WordPress');
    ?>
</a>
  			<span class="sep"> | </span>
示例#6
0
 /**
  * Add breadcrumb.
  *
  * @since 1.9
  */
 function simple_life_add_breadcrumb()
 {
     // Bail if Home Page.
     if (is_front_page() || is_home()) {
         return;
     }
     // Bail if Breadcrumb disabled.
     $enable_breadcrumb = simple_life_get_option('enable_breadcrumb');
     if (true !== $enable_breadcrumb) {
         return;
     }
     // Load library if not exists.
     if (!function_exists('breadcrumb_trail')) {
         require_once get_template_directory() . '/lib/breadcrumbs.php';
     }
     echo '<div id="breadcrumb"><div class="container"><div class="row"><div class="col-sm-12">';
     $breadcrumb_args = array('container' => 'div', 'show_browse' => false);
     breadcrumb_trail($breadcrumb_args);
     echo '</div><!-- .col-sm-12 --></div></div><!-- .row --></div><!-- .container --></div><!-- #breadcrumb -->';
 }
示例#7
0
				 		<?php 
        }
        ?>
				 		<?php 
        the_excerpt();
        ?>
			 		</div>

			 	<?php 
    } else {
        ?>

			<?php 
        // Full post.
        $archive_image_thumbnail_size = esc_attr(simple_life_get_option('archive_image_thumbnail_size'));
        $archive_image_alignment = esc_attr(simple_life_get_option('archive_image_alignment'));
        ?>
					<div class="entry-content">
						<?php 
        if (has_post_thumbnail()) {
            ?>
							<a href="<?php 
            the_permalink();
            ?>
">
								<?php 
            the_post_thumbnail($archive_image_thumbnail_size, array('class' => 'align' . $archive_image_alignment));
            ?>
							</a>
						<?php 
        }