Ejemplo n.º 1
0
function enlightenment_teaser_post_format_hooks()
{
    if (current_theme_supports('enlightenment-grid-loop') && !enlightenment_is_lead_post() && !is_singular() && '' != get_post_format()) {
        enightenment_clear_entry_hooks();
        if (has_post_format('gallery')) {
            add_action('enlightenment_entry_header', 'enlightenment_entry_gallery');
            add_action('enlightenment_entry_header', 'the_title', 10, 2);
            add_action('enlightenment_entry_footer', 'enlightenment_entry_meta');
        } elseif (has_post_format('image')) {
            add_action('enlightenment_entry_header', 'enlightenment_entry_image');
            add_action('enlightenment_entry_header', 'the_title', 10, 2);
            add_action('enlightenment_entry_footer', 'enlightenment_entry_meta');
        } elseif (has_post_format('video')) {
            add_action('enlightenment_entry_header', 'enlightenment_entry_video');
            add_action('enlightenment_entry_header', 'the_title', 10, 2);
            add_action('enlightenment_entry_footer', 'enlightenment_entry_meta');
        } elseif (has_post_format('audio')) {
            add_action('enlightenment_entry_header', 'the_post_thumbnail');
            add_action('enlightenment_entry_header', 'enlightenment_entry_audio');
            add_action('enlightenment_entry_header', 'the_title', 10, 2);
            add_action('enlightenment_entry_footer', 'enlightenment_entry_meta');
        } elseif (has_post_format('aside')) {
            add_action('enlightenment_entry_content', 'the_content');
            add_action('enlightenment_entry_footer', 'enlightenment_entry_meta');
        } elseif (has_post_format('link')) {
            add_action('enlightenment_entry_header', 'the_title', 10, 2);
            add_action('enlightenment_entry_footer', 'enlightenment_entry_meta');
        } elseif (has_post_format('quote')) {
            add_action('enlightenment_entry_header', 'enlightenment_entry_blockquote');
            add_action('enlightenment_entry_footer', 'enlightenment_entry_meta');
        } elseif (has_post_format('status')) {
            add_action('enlightenment_entry_content', 'enlightenment_entry_author_avatar');
            add_action('enlightenment_entry_content', 'the_content');
            add_action('enlightenment_entry_footer', 'enlightenment_entry_meta');
        } elseif (has_post_format('chat')) {
            add_action('enlightenment_entry_header', 'the_title', 10, 2);
            add_action('enlightenment_entry_content', 'the_content');
            add_action('enlightenment_entry_footer', 'enlightenment_entry_meta');
        }
    }
}
Ejemplo n.º 2
0
function enlightenment_project_teaser_actions()
{
    if (current_theme_supports('jetpack-portfolio') && class_exists('Jetpack') && in_array('custom-content-types', Jetpack::get_active_modules())) {
        if ((is_post_type_archive('jetpack-portfolio') || is_tax('jetpack-portfolio-type') || is_tax('jetpack-portfolio-tag')) && current_theme_supports('enlightenment-grid-loop') && !enlightenment_is_lead_post()) {
            enightenment_clear_entry_hooks();
            add_action('enlightenment_entry_header', 'the_post_thumbnail');
            add_action('enlightenment_entry_header', 'the_title', 10, 2);
        }
    }
}