Exemplo n.º 1
0
/**
 * Adds custom classes to the array of body classes.
 *
 * @since Gather 0.1
 */
function gather_body_classes($classes)
{
    if (gather_load_masonry()) {
        $classes[] = get_theme_mod('archive-layout', customizer_library_get_default('archive-layout'));
        $classes[] = 'masonry';
    }
    if (gather_show_sidebar()) {
        $classes[] = get_theme_mod('standard-layout', customizer_library_get_default('standard-layout'));
    } else {
        $classes[] = 'no-sidebar';
    }
    return $classes;
}
Exemplo n.º 2
0
			<div id="posts-wrap" data-columns="<?php 
    echo gather_get_columns();
    ?>
">
			<?php 
    /* Start the Loop */
    ?>
			<?php 
    while (have_posts()) {
        the_post();
        ?>

				<?php 
        $template = '';
        $type = get_post_type();
        if (gather_load_masonry()) {
            $template = 'masonry';
            if ('download' == $type) {
                $template = 'masonry-download';
            }
        }
        get_template_part('content', gather_template_part());
        ?>

			<?php 
    }
    ?>
			</div>

			<?php 
    gather_paging_nav();
Exemplo n.º 3
0
/**
 * Determine which template part to load
 *
 * @return string template part
 */
function gather_template_part()
{
    $template = '';
    $type = get_post_type();
    if (gather_load_masonry()) {
        $template = 'masonry';
    }
    if ('download' == $type && gather_load_masonry()) {
        $template = 'masonry-download';
    }
    return $template;
}
Exemplo n.º 4
0
/**
 * Enqueue scripts and styles.
 */
function gather_scripts()
{
    wp_enqueue_style('gather-style', get_stylesheet_uri(), array(), GATHER_VERSION);
    // Use style-rtl.css for RTL layouts
    wp_style_add_data('gather-style', 'rtl', 'replace');
    if (SCRIPT_DEBUG || WP_DEBUG) {
        wp_enqueue_script('gather-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), GATHER_VERSION, true);
        wp_enqueue_script('gather-fast-click', get_template_directory_uri() . '/js/jquery.fastclick.js', array(), GATHER_VERSION, true);
        wp_enqueue_script('gather-fittext', get_template_directory_uri() . '/js/jquery.fittext.js', array('jquery'), GATHER_VERSION, true);
        wp_enqueue_script('gather-fitvids', get_template_directory_uri() . '/js/jquery.fitvids.js', array('jquery'), GATHER_VERSION, true);
        wp_enqueue_script('gather-global', get_template_directory_uri() . '/js/global.js', array('jquery', 'gather-fitvids'), GATHER_VERSION, true);
    } else {
        wp_enqueue_script('gather-scripts', get_template_directory_uri() . '/js/gather.min.js', array('jquery'), GATHER_VERSION, true);
    }
    if (gather_load_masonry()) {
        wp_enqueue_script('masonry');
    }
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
}