/**
  * Generates semantic classes for BODY element
  *
  * @param array $classes body classes
  */
 function seamless_body_class($classes)
 {
     /**
      * Filter to control the theme layout
      *
      * Accepts any string that is part of seamless_available_theme_layouts(). Note that
      * the filter overrides the layout defined in the Theme Customizer. Any invalid
      * layout string will be ignored and the theme's default layout will be used.
      *
      * @see seamless_available_theme_layouts()
      *
      * @since 2.0
      *
      * @param string $current_layout
      */
     $current_layout = apply_filters('seamless_current_theme_layout', seamless_get_theme_opt('layout'));
     if (is_page_template('template-page-fullwidth.php')) {
         $classes[] = 'full-width';
     } elseif (in_array($current_layout, seamless_available_layout_slugs())) {
         $classes[] = $current_layout;
     } else {
         $classes[] = seamless_default_theme_layout();
     }
     /**
      * Filter the body classes
      * 
      * @param array $classes
      */
     return apply_filters('seamless_body_class', $classes);
 }
/**
 * Get the standard sidebar
 *
 * This includes the primary and secondary widget areas. 
 * The sidebar can be switched on or off using seamless_sidebar. <br>
 * Default: ON <br>
 * 
 * Filter: seamless_sidebar
 */
function seamless_sidebar()
{
    $current_layout = apply_filters('seamless_current_theme_layout', seamless_get_theme_opt('layout'));
    if (in_array($current_layout, seamless_available_layout_slugs()) && 'full-width' == $current_layout) {
        $show = false;
    } else {
        $show = true;
    }
    $show = apply_filters('seamless_sidebar', $show);
    if ($show) {
        get_sidebar();
    }
    return;
}
 /**
  * Display the footer text from theme options within the #siteinfo div
  * 
  * Override: childtheme_override_siteinfo
  */
 function seamless_siteinfo()
 {
     // footer text set in theme options
     echo "\t\t<p>" . do_shortcode(seamless_get_theme_opt('footer_txt')) . "</p>\n";
 }
Esempio n. 4
0
 */
// calling the header.php
get_header();
// action hook for placing content above #container
seamless_abovecontainer();
// filter for manipulating the output of the #container opening element
echo apply_filters('seamless_open_id_container', '<div id="container" class="content-wrapper">' . "\n\n");
// action hook for placing content above #content
seamless_abovecontent();
echo apply_filters('seamless_open_id_content', '<div id="content" class="site-content" role="main">' . "\n\n");
// displays the page title
seamless_page_title();
// create the navigation above the content
seamless_navigation_above();
// display microformatted vCard if selected in Theme Options and display only on the first page of the archive's pagination
if (seamless_get_theme_opt('author_info') == 1 & !is_paged()) {
    // setup the first post to acess the Author's metadata
    the_post();
    ?>

			<div id="author-info" class="vcard">

				<h2 class="entry-title"><?php 
    the_author_meta('first_name');
    ?>
 <?php 
    the_author_meta('last_name');
    ?>
</h2>

				<?php 
Esempio n. 5
0
/**
 * Renders Footer Text elements
 *
 * @since Distilled 1.0
 */
function seamless_do_footer_opt()
{
    ?>
	<textarea rows="5" cols="94" id="thm_footertext" name="seamless_theme_opt[footer_txt]"><?php 
    seamless_get_theme_opt('footer_txt', true);
    ?>
</textarea>
	<br><?php 
    printf(_x('You can use HTML in your footer text.', 'seamless'));
}
Esempio n. 6
0
/**
 * Decide the default layout of the theme
 *
 * @since 2.0
 *
 * @return string $default_layout
 */
function seamless_default_theme_layout()
{
    // use a default layout of right-sidebar if no theme option has been set
    $seamless_default_layout = seamless_get_theme_opt('layout') ? seamless_get_theme_opt('layout') : 'right-sidebar';
    /**
     * Filter for the default layout
     *
     * Specifies the theme layout upon first setup. The returned string need to match 
     * one of the available layout slugs. Any invalid slug will be ignored.
     *
     * @since 2.0
     *
     * @see seamless_available_layout_slugs()
     *
     * @param string $seamless_default_layout
     */
    $seamless_possible_default_layout = apply_filters('seamless_default_theme_layout', $seamless_default_layout);
    // only use the filtered layout if it is a valid layout
    if (in_array($seamless_possible_default_layout, seamless_available_layout_slugs())) {
        $seamless_default_layout = $seamless_possible_default_layout;
    }
    return $seamless_default_layout;
}