Ejemplo n.º 1
0
/**
 * Filters post thumbnail size to get a bigger thumbnail if layout is set to 'none'
 *
 * @since 1.0
 *
 * @param string $size Default post thumbnail size
 * @return string
 */
function briar_post_thumbnail_size($size)
{
    if ($size == 'blog-post-image' && briar_get_layout() == 'none') {
        $size = 'full-width-blog-post-image';
    }
    return $size;
}
Ejemplo n.º 2
0
/**
 * Retrieve the sidebar element class
 *
 * @since 1.0
 *
 * @param bool $echo Echo or not.
 * @return false|array Null if layout is 'none', otherwise array.
 */
function briar_sidebar_class($echo = false)
{
    $layout = briar_get_layout();
    $classes = array();
    if (is_customize_preview()) {
        $classes = array('col-md-4', 'briar-sidebar-class');
    } else {
        if ('none' === $layout) {
            return false;
        } else {
            $classes[] = 'col-md-4';
            if ('left' === $layout) {
                $classes[] = 'col-md-pull-8';
            }
        }
    }
    if ($echo) {
        echo esc_attr(join(' ', $classes));
    } else {
        return $classes;
    }
}