/**
 * Adjust content width in certain contexts.
 *
 * Adjusts content_width value for full-width and single image attachment
 * templates, and when there are no active widgets in the sidebar.
 *
 */
function responsive_mobile_content_width()
{
    global $content_width;
    $full_width = is_page_template('full-width-page.php') || is_404() || 'full-width-page' == responsive_mobile_get_layout();
    if ($full_width) {
        $content_width = 1140;
    }
    $half_width = is_page_template('sidebar-content-half-page.php') || is_page_template('content-sidebar-half-page.php') || 'sidebar-content-half-page' == responsive_mobile_get_layout() || 'content-sidebar-half-page' == responsive_mobile_get_layout();
    if ($half_width) {
        $content_width = 570;
    }
}
Esempio n. 2
0
/**
 * Adds custom classes to the array of body classes.
 *
 * @param array $classes Classes for the body element.
 * @return array
 */
function responsive_mobile_body_classes($classes)
{
    // Adds a class of group-blog to blogs with more than 1 published author.
    if (is_multi_author()) {
        $classes[] = 'group-blog';
    }
    // Get Responsive theme option.
    $responsive_mobile_options = responsive_mobile_get_options();
    if (1 == $responsive_mobile_options['front_page'] && is_front_page()) {
        $classes[] = 'front-page';
    }
    $classes[] = responsive_mobile_get_layout();
    $classes = array_map('esc_attr', $classes);
    return $classes;
}
Esempio n. 3
0
 * @package      responsive_mobile
 * @license      license.txt
 * @copyright    2014 CyberChimps Inc
 * @since        0.0.1
 *
 * Please do not edit this file. This file is part of the responsive_mobile Framework and all modifications
 * should be made in a child theme.
 */
// If this file is called directly, abort.
if (!defined('WPINC')) {
    die;
}
/*
 * Load the correct sidebar according to the page layout
 */
$layout = responsive_mobile_get_layout();
switch ($layout) {
    case 'content-sidebar-page':
        get_sidebar('right');
        return;
        break;
    case 'sidebar-content-page':
        get_sidebar('left');
        return;
        break;
    case 'content-sidebar-half-page':
        get_sidebar('right-half');
        return;
        break;
    case 'sidebar-content-half-page':
        get_sidebar('left-half');