/**
 * Adds main classes to blog post entries
 *
 * @since 1.1.6
 */
function wpex_blog_wrap_classes($classes = NULL)
{
    // Return custom class if set
    if ($classes) {
        return $classes;
    }
    // Admin defaults
    $style = wpex_blog_style();
    $classes = array('entries', 'clr');
    // Isotope classes
    if ($style == 'grid-entry-style') {
        $classes[] = 'wpex-row ';
        if ('masonry' == wpex_blog_grid_style()) {
            $classes[] = 'blog-masonry-grid ';
        } else {
            if ('infinite_scroll' == wpex_blog_pagination_style()) {
                $classes[] = 'blog-masonry-grid ';
            } else {
                $classes[] = 'blog-grid ';
            }
        }
    }
    // Left thumbs
    if ('thumbnail-entry-style' == $style) {
        $classes[] = 'left-thumbs';
    }
    // Add some margin when author is enabled
    if ($style == 'grid-entry-style' && wpex_get_mod('blog_entry_author_avatar')) {
        $classes[] = 'grid-w-avatars ';
    }
    // Infinite scroll classes
    if ('infinite_scroll' == wpex_blog_pagination_style()) {
        $classes[] = 'infinite-scroll-wrap ';
    }
    // Add filter for child theming
    $classes = apply_filters('wpex_blog_wrap_classes', $classes);
    // Turn classes into space seperated string
    if (is_array($classes)) {
        $classes = implode(' ', $classes);
    }
    // Echo classes
    echo $classes;
}
Exemplo n.º 2
0
 function wpex_blog_wrap_classes($classes = false)
 {
     // Return custom class if set
     if ($classes) {
         return $classes;
     }
     // Admin defaults
     $style = wpex_blog_style();
     $classes = array();
     // Isotope classes
     if ($style == 'grid-entry-style') {
         $classes[] = 'wpex-row ';
         if ('masonry' == wpex_blog_grid_style()) {
             $classes[] = 'blog-masonry-grid ';
         } else {
             if ('infinite_scroll' == wpex_blog_pagination_style()) {
                 $classes[] = 'blog-masonry-grid ';
             } else {
                 $classes[] = 'blog-grid ';
             }
         }
     }
     // Add some margin when author is enabled
     if ($style == 'grid-entry-style' && get_theme_mod('blog_entry_author_avatar')) {
         $classes[] = 'grid-w-avatars ';
     }
     // Infinite scroll classes
     if ('infinite_scroll' == wpex_blog_pagination_style()) {
         $classes[] = 'infinite-scroll-wrap ';
     }
     // Add filter for child theming
     $classes = apply_filters('wpex_blog_wrap_classes', $classes);
     // Return classes
     if (is_array($classes)) {
         echo implode(' ', $classes);
     }
 }