コード例 #1
0
ファイル: extras.php プロジェクト: proudcity/wp-proud-theme
/**
 * Add <body> classes
 */
function body_class($classes)
{
    // Add page slug if it doesn't exist
    if (is_single() || is_page() && !is_front_page()) {
        if (!in_array(basename(get_permalink()), $classes)) {
            $classes[] = basename(get_permalink());
        }
    }
    // Add class if sidebar is active
    if (Setup\page_parent_info(false)) {
        $classes[] = 'sidebar-primary';
    }
    // Process colors for lightness
    $header_light = is_light_color(get_theme_mod('color_topnav', '#000000'));
    $highlight_light = is_light_color(get_theme_mod('color_highlight', '#333333'));
    $footer_light = is_light_color(get_theme_mod('color_footer', '#333333'));
    $footer_actions_light = is_light_color(get_theme_mod('color_footer_actions', '#FFFFFF'));
    if ($header_light) {
        $classes[] = 'light-background-main';
    }
    if ($highlight_light) {
        $classes[] = 'light-background-highlight';
    }
    if ($footer_light) {
        $classes[] = 'light-background-footer';
    }
    if ($footer_actions_light) {
        $classes[] = 'light-background-footer-actions';
    }
    return apply_filters('proud_body_class', $classes);
}
コード例 #2
0
ファイル: wrapper.php プロジェクト: proudcity/wp-proud-theme
/**
 * Theme wrapper
 *
 * @link https://roots.io/proud/docs/theme-wrapper/
 * @link http://scribu.net/wordpress/theme-wrappers.html
 */
function container_class()
{
    global $proudcore;
    return $proudcore::$layout->post_is_full_width() && !Setup\page_parent_info() ? 'full-width-container' : 'container';
}
コード例 #3
0
ファイル: base.php プロジェクト: proudcity/wp-proud-theme
      <div class="content row">
        
        <?php 
if (Setup\page_parent_info('noagency')) {
    ?>
          <aside class="sidebar">
            <?php 
    include Wrapper\sidebar_path();
    ?>
          </aside><!-- /.sidebar -->
        <?php 
}
?>

        <?php 
if (Setup\page_parent_info('agency')) {
    ?>
          <aside class="sidebar">
            <?php 
    include Wrapper\sidebar_agency_path();
    ?>
          </aside><!-- /.sidebar -->
        <?php 
}
?>

        <main class="main">
          <?php 
include Wrapper\template_path();
?>
        </main><!-- /.main -->