示例#1
0
						<a href="#" class="video-play-button"></a>
					</div>
				</div>
				<?php 
                                }
                            }
                        }
                        ?>
		<?php 
                        echo $score_bar;
                        ?>
	</div>
	<?php 
                    }
                } else {
                    if (et_has_post_format('audio')) {
                        $thumbnail_id = get_post_thumbnail_id();
                        $background_color = get_post_meta(get_the_ID(), '_audio_format_background_color', true);
                        $title = get_post_meta(get_the_ID(), '_audio_format_title', true);
                        $sub_title = get_post_meta(get_the_ID(), '_audio_format_sub_title', true);
                        $audio_src = get_post_meta(get_the_ID(), '_audio_format_file_url', true);
                        if ($audio_src) {
                            ?>
	<div class="audio-format">
		<?php 
                            $style = '';
                            if (!empty($thumbnail_id)) {
                                list($thumb_src, $thumb_width, $thumb_height) = wp_get_attachment_image_src($thumbnail_id, extra_get_column_thumbnail_size());
                                $style = 'background-image:url(\'' . $thumb_src . '\');';
                            } else {
                                if (!empty($background_color)) {
示例#2
0
文件: core.php 项目: rthburke/fltHub
function extra_load_scripts_styles()
{
    $theme_version = SCRIPT_DEBUG ? time() : et_get_theme_version();
    $template_dir = get_template_directory_uri();
    $suffix = SCRIPT_DEBUG ? '.js' : '.min.js';
    $extra_scripts_dependencies = apply_filters('extra_scripts_dependencies', array('jquery', 'imagesloaded'));
    // Load dependencies conditionally
    if (is_page_template('page-template-authors.php') || 'Masonry' === et_get_option('archive_list_style', 'Standard')) {
        $extra_scripts_dependencies[] = 'salvattore';
    }
    /*
     * Loads the main stylesheet.
     */
    wp_enqueue_style('extra-style', get_stylesheet_uri(), array(), $theme_version);
    wp_register_script('validation', $template_dir . '/scripts/ext/jquery.validate' . $suffix, array('jquery'), $theme_version, true);
    wp_register_script('raty', $template_dir . '/scripts/ext/jquery.raty' . $suffix, array('jquery'), $theme_version, true);
    wp_enqueue_script('imagesloaded', $template_dir . '/scripts/ext/imagesloaded' . $suffix, array('jquery'), $theme_version, true);
    // todo, load only when needed?
    wp_enqueue_script('waypoints', $template_dir . '/scripts/ext/jquery.waypoints' . $suffix, array('jquery'), $theme_version, true);
    // todo, load only when needed?
    wp_enqueue_script('fitvids', $template_dir . '/scripts/ext/jquery.fitvids' . $suffix, array('jquery'), $theme_version, true);
    // todo, load only when needed?
    if ('on' === et_get_option('extra_smooth_scroll', false)) {
        wp_enqueue_script('smooth-scroll', $template_dir . '/scripts/ext/smoothscroll' . $suffix, array('jquery'), $theme_version, true);
    }
    wp_enqueue_script('masonry');
    // todo, load only when needed?
    wp_enqueue_script('extra-scripts', $template_dir . '/scripts/scripts' . $suffix, $extra_scripts_dependencies, $theme_version, true);
    wp_localize_script('extra-scripts', 'EXTRA', array('images_uri' => $template_dir . '/images/', 'ajaxurl' => set_url_scheme(admin_url('admin-ajax.php')), 'your_rating' => __('Your Rating:', 'extra'), 'rating_nonce' => wp_create_nonce('extra_rating_nonce'), 'timeline_nonce' => wp_create_nonce('timeline_nonce'), 'blog_feed_nonce' => wp_create_nonce('blog_feed_nonce'), 'error' => __('There was a problem, please try again.', 'extra'), 'contact_error_name_required' => __('Name field cannot be empty.', 'extra'), 'contact_error_email_required' => __('Email field cannot be empty.', 'extra'), 'contact_error_email_invalid' => __('Please enter a valid email address.', 'extra')));
    if (is_singular()) {
        if (is_singular('post')) {
            if (et_has_post_format('map')) {
                et_extra_enqueue_google_maps_api();
            }
            wp_enqueue_script('raty');
            if (comments_open() && get_option('thread_comments')) {
                wp_enqueue_script('comment-reply');
            }
        }
        if (is_page()) {
            if (is_page_template('page-template-timeline.php')) {
                wp_enqueue_script('hash-persistance');
            }
            if (is_page_template('page-template-contact.php')) {
                wp_enqueue_script('validation');
                wp_enqueue_script('jquery-effects-highlight');
                et_extra_enqueue_google_maps_api();
            }
        }
    }
}
示例#3
0
            the_title();
            ?>
</h1>
								<div class="post-meta">
									<p><?php 
            echo extra_display_single_post_meta();
            ?>
</p>
								</div>
							</div>
							<?php 
        }
        ?>

							<?php 
        if (et_has_post_format() && et_has_format_content() || has_post_thumbnail() && is_post_extra_featured_image_enabled()) {
            ?>
							<div class="post-thumbnail header">
								<?php 
            $score_bar = extra_get_the_post_score_bar();
            $thumb_args = array('size' => 'extra-image-single-post');
            require locate_template('post-top-content.php');
            ?>
							</div>
							<?php 
        }
        ?>

							<?php 
        $post_above_ad = extra_display_ad('post_above', false);
        ?>
  data-columns>
<?php 
while ($module_posts->have_posts()) {
    $module_posts->the_post();
    $post_format = et_get_post_format();
    ?>
	<article id="post-<?php 
    the_ID();
    ?>
" <?php 
    post_class('post et-format-' . $post_format);
    ?>
>
		<div class="header">
			<?php 
    if ($show_featured_image || et_has_post_format('quote') || et_has_post_format('link')) {
        $overlay = '' !== $hover_overlay_icon ? '<span class="et_pb_extra_overlay et_pb_inline_icon" data-icon="' . esc_attr(et_pb_process_font_icon($hover_overlay_icon)) . '"></span>' : '<span class="et_pb_extra_overlay"></span>';
        $thumb_args = array('size' => 'extra-image-medium', 'img_after' => $overlay);
        $score_bar = extra_get_the_post_score_bar();
        require locate_template('post-top-content.php');
    }
    ?>
		</div>
		<?php 
    if (!in_array($post_format, array('quote', 'link'))) {
        ?>
		<div class="post-content">
			<?php 
        $color = extra_get_post_category_color();
        ?>
			<h2 class="post-title"><a class="et-accent-color" style="color:<?php