Example #1
0
/**
 * Add layouts classes to the body
 *
 */
function wpshuttle_page_layout_body_class($classes)
{
    $post_page_layout = wpshuttle_get_post_page_layout();
    $page_layouts = wpshuttle_get_page_layouts();
    if (isset($page_layouts[$post_page_layout])) {
        array_push($classes, $page_layouts[$post_page_layout]['body_class']);
    }
    return $classes;
}
Example #2
0
/**
 * Check whether or not to display the sidebar
 *
 * @return bool
 *
 */
function wpshuttle_is_displayable_sidebar()
{
    $page_layout = wpshuttle_get_post_page_layout();
    $layouts_with_sidebar = array(2, 3);
    return in_array($page_layout, $layouts_with_sidebar) ? true : false;
}