• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP hybrid_media_grabber函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中hybrid_media_grabber函数的典型用法代码示例。如果您正苦于以下问题:PHP hybrid_media_grabber函数的具体用法?PHP hybrid_media_grabber怎么用?PHP hybrid_media_grabber使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了hybrid_media_grabber函数的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: the_ID

 */
?>

<article id="post-<?php 
the_ID();
?>
" <?php 
post_class();
?>
 <?php 
hybrid_attr('post');
?>
>

	<?php 
echo $video = hybrid_media_grabber(array('type' => 'video', 'split_media' => true, 'before' => '<div class="entry-media">', 'after' => '</div>'));
?>

	<div class="entry-inner">

		<header class="entry-header">
	
			<?php 
get_template_part('entry', 'meta');
// Loads the entry-meta.php template.
?>
		
			<?php 
if (is_single()) {
    the_title('<h1 class="entry-title" ' . hybrid_get_attr('entry-title') . '>', '</h1>');
} else {
开发者ID:samikeijonen,项目名称:chuchadon,代码行数:31,代码来源:content-video.php


示例2: shamrock_get_post_media

 function shamrock_get_post_media($format)
 {
     $media = '';
     if (empty($format)) {
         return $media;
     }
     if ($format != 'image') {
         $media = hybrid_media_grabber(array('type' => $format, 'split_media' => true));
     } else {
         if (has_post_thumbnail()) {
             $media = '<figure class="post-thumbnail">';
             $full_img = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');
             $media .= '<a href="' . esc_url($full_img[0]) . '" class="smr-image-format">' . shamrock_get_featured_image() . '</a>';
             if ($caption = get_post(get_post_thumbnail_id())->post_excerpt) {
                 $media .= '<figcaption>' . $caption . '</figcaption>';
             }
         }
     }
     return $media;
 }
开发者ID:javierev,项目名称:100pixelstheme,代码行数:20,代码来源:helpers.php


示例3: hybrid_attr

<article <?php 
hybrid_attr('post');
?>
>

	<?php 
echo $video = hybrid_media_grabber(array('type' => 'video', 'split_media' => true));
?>

	<?php 
if (is_singular(get_post_type())) {
    // If viewing a single post.
    ?>

		<header class="entry-header">

			<h1 <?php 
    hybrid_attr('entry-title');
    ?>
><?php 
    single_post_title();
    ?>
</h1>

			<div class="entry-byline">
				<?php 
    hybrid_post_format_link();
    ?>
				<span <?php 
    hybrid_attr('entry-author');
    ?>
开发者ID:grvrulz,项目名称:vaidusworld,代码行数:31,代码来源:video.php


示例4: hybrid_attr

<article <?php 
hybrid_attr('post');
?>
>

	<?php 
echo $audio = hybrid_media_grabber(array('type' => 'audio', 'split_media' => true, 'before' => '<div class="featured-media">', 'after' => '</div>'));
?>

	<div class="wrap">

		<?php 
if (is_single(get_the_ID())) {
    // If viewing a single post.
    ?>

			<header class="entry-header">

				<h1 <?php 
    hybrid_attr('entry-title');
    ?>
><?php 
    single_post_title();
    ?>
</h1>

				<div class="entry-byline">
					<?php 
    hybrid_post_format_link();
    ?>
					<span class="sep"><?php 
开发者ID:starise,项目名称:saga,代码行数:31,代码来源:audio.php


示例5: hybrid_attr

<article <?php 
hybrid_attr('post');
?>
>

	<?php 
echo $audio = hybrid_media_grabber(array('type' => 'audio', 'split_media' => true));
?>

	<?php 
if (is_singular(get_post_type())) {
    // If viewing a single post.
    ?>

		<header class="entry-header">

			<h1 <?php 
    hybrid_attr('entry-title');
    ?>
><?php 
    single_post_title();
    ?>
</h1>

			<div class="entry-byline">
				<?php 
    hybrid_post_format_link();
    ?>
				<span <?php 
    hybrid_attr('entry-author');
    ?>
开发者ID:emkal,项目名称:Infusion,代码行数:31,代码来源:audio.php


示例6: apply_atomic_shortcode

    echo apply_atomic_shortcode('entry_meta', '<div class="entry-meta">' . __('[entry-terms taxonomy="category" before="Posted in "] [entry-terms before="Tagged "]', 'clea-base') . '</div>');
    ?>
		</footer><!-- .entry-footer -->

	<?php 
} else {
    ?>

		<header class="entry-header">
			<?php 
    echo apply_atomic_shortcode('entry_title', '[entry-title]');
    ?>
		</header><!-- .entry-header -->

		<?php 
    echo $video = hybrid_media_grabber(array('type' => 'video'));
    ?>

		<?php 
    if (has_excerpt()) {
        ?>

			<div class="entry-summary">
				<?php 
        the_excerpt();
        ?>
			</div><!-- .entry-summary -->

		<?php 
    } elseif (empty($video)) {
        ?>
开发者ID:aldelpech,项目名称:clea-base,代码行数:31,代码来源:content-video.php


示例7: apply_atomic_shortcode

    echo apply_atomic_shortcode('entry_meta', '<div class="entry-meta">' . __('[entry-terms taxonomy="category" before="Posted in "] [entry-terms before="Tagged "]', 'clea-base') . '</div>');
    ?>
		</footer><!-- .entry-footer -->

	<?php 
} else {
    ?>

		<header class="entry-header">
			<?php 
    echo apply_atomic_shortcode('entry_title', '[entry-title]');
    ?>
		</header><!-- .entry-header -->

		<?php 
    echo $audio = hybrid_media_grabber(array('type' => 'audio'));
    ?>

		<?php 
    if (has_excerpt()) {
        ?>

			<div class="entry-summary">
				<?php 
        the_excerpt();
        ?>
			</div><!-- .entry-summary -->

		<?php 
    } elseif (empty($audio)) {
        ?>
开发者ID:aldelpech,项目名称:clea-base,代码行数:31,代码来源:content-audio.php


示例8: barcelona_featured_img

function barcelona_featured_img($barcelona_fimg_id = NULL)
{
    global $post;
    $barcelona_in_loop = in_the_loop();
    $barcelona_post_format = barcelona_get_post_format();
    $barcelona_is_media = in_array($barcelona_post_format, array('audio', 'gallery', 'video'));
    $barcelona_post_type = get_post_type();
    $barcelona_display = 'full';
    if (is_null($barcelona_fimg_id)) {
        $barcelona_fimg_id = sanitize_key(barcelona_get_option('featured_image_style'));
    }
    if ($barcelona_is_media && in_array($barcelona_fimg_id, array('sp', 'fp', 'fs'))) {
        $barcelona_fimg_id = 'sw';
    }
    if (in_array($barcelona_post_format, array('gallery', 'video')) && $barcelona_fimg_id != 'cl') {
        $barcelona_fimg_id = 'fw';
    }
    if ($barcelona_in_loop && $barcelona_is_media && $barcelona_fimg_id != 'cl') {
        $barcelona_display = 'title';
        $barcelona_fimg_id = 'cl';
    }
    // Post title
    $barcelona_post_title = '<h1 class="post-title">' . esc_html($post->post_title) . '</h1>';
    if (is_attachment() && !empty($post->post_excerpt)) {
        $barcelona_post_title .= '<h3 class="post-excerpt">' . esc_html($post->post_excerpt) . '</h3>';
    }
    // Post meta
    $barcelona_post_meta = '';
    if (is_single() && $barcelona_post_type == 'post') {
        $barcelona_categories_html = '<ul class="list-inline">';
        $barcelona_categories = get_the_category();
        foreach ($barcelona_categories as $c) {
            $barcelona_categories_html .= '<li><a href="' . esc_url(get_category_link($c)) . '">' . esc_html($c->name) . '</a></li>';
        }
        $barcelona_meta = array('date' => array('clock-o', esc_html(get_the_date())), 'views' => array('eye', esc_html(barcelona_get_post_views())), 'likes' => array('thumbs-up', '<span class="post_vote_up_val">' . esc_html(barcelona_get_post_vote($post->ID)) . '</span>'), 'comments' => array('comments', intval(get_comments_number())), 'categories' => array('times', $barcelona_categories_html));
        $barcelona_post_meta_choices = barcelona_get_option('post_meta_choices');
        if (!is_array($barcelona_post_meta_choices)) {
            $barcelona_post_meta_choices = array();
        }
        foreach ($barcelona_meta as $k => $v) {
            if (!in_array($k, $barcelona_post_meta_choices)) {
                unset($barcelona_meta[$k]);
            }
        }
        if (!empty($barcelona_meta)) {
            $barcelona_post_meta = '<ul class="post-meta">';
            foreach ($barcelona_meta as $k => $v) {
                $barcelona_post_meta .= '<li class="post-' . sanitize_html_class($k) . '"><span class="fa fa-' . sanitize_html_class($v[0]) . '"></span>' . $v[1] . '</li>';
            }
            $barcelona_post_meta .= '</ul>';
        }
    }
    $barcelona_media_output = '';
    if ($barcelona_post_format == 'gallery') {
        $barcelona_gallery = get_post_meta(get_the_ID(), 'barcelona_format_gallery', true);
        if (!empty($barcelona_gallery)) {
            $barcelona_size = $barcelona_fimg_id == 'fw' ? 'barcelona-lg' : 'barcelona-md';
            $barcelona_media_output = do_shortcode('[gallery ids="' . esc_attr($barcelona_gallery) . '" size="' . esc_attr($barcelona_size) . '" type="featured"]');
        }
    } else {
        if (in_array($barcelona_post_format, array('audio', 'video'))) {
            $barcelona_media_output = hybrid_media_grabber(array('split_media' => true, 'content' => get_post_meta(get_the_ID(), 'barcelona_format_' . $barcelona_post_format . '_embed', true)));
        }
    }
    $barcelona_featured_image_url = barcelona_get_thumbnail_url($barcelona_fimg_id == 'cl' ? 'barcelona-md' : 'full', NULL, false);
    $barcelona_fimg_classes = array('fimg-wrapper', 'fimg-' . $barcelona_fimg_id);
    if (empty($barcelona_post_meta)) {
        $barcelona_fimg_classes[] = 'fimg-no-meta';
    }
    if ($barcelona_is_media) {
        $barcelona_fimg_classes = array_merge($barcelona_fimg_classes, array('fimg-media', 'fimg-media-' . $barcelona_post_format));
    }
    if (!$barcelona_featured_image_url || $barcelona_is_media) {
        $barcelona_fimg_classes[] = 'fimg-no-thumb';
    }
    if ($barcelona_in_loop && $barcelona_fimg_id == 'cl') {
        ?>
		<header class="post-image">

			<?php 
        if ($barcelona_featured_image_url && !$barcelona_is_media) {
            ?>
			<script>jQuery(document).ready(function($){ $('.fimg-inner').backstretch('<?php 
            echo esc_url($barcelona_featured_image_url[0]);
            ?>
', {fade: 600}); });</script>
			<?php 
        }
        ?>

			<div class="<?php 
        echo implode(' ', array_unique($barcelona_fimg_classes));
        ?>
">

				<?php 
        if ($barcelona_post_format == 'video' && $barcelona_display != 'title') {
            echo $barcelona_media_output;
            $barcelona_display = 'title';
        }
//.........这里部分代码省略.........
开发者ID:yalmaa,项目名称:little-magazine,代码行数:101,代码来源:template-tags.php


示例9: get_permalink

	            </div>

	        <?php 
} else {
    ?>
            	<h3 class="blog-title"><a href="<?php 
    echo get_permalink();
    ?>
"><?php 
    the_title();
    ?>
</a></h3>

				<div class="framebox">
					<?php 
    echo hybrid_media_grabber(array('type' => 'video', 'split_media' => true, 'width' => 545));
    ?>
				</div>
	        <?php 
}
?>

        </div>

        <?php 
get_template_part('block-entry-meta');
?>

    </div>
</article>
开发者ID:Artgorae,项目名称:wp-artgorae,代码行数:30,代码来源:content-video.php


示例10: ravel_get_portfolio_item_media

/**
 * Gets the media for portfolio items on single portfolio item pages.
 *
 * @since  1.0.0
 * @access public
 * @return string
 */
function ravel_get_portfolio_item_media()
{
    $video = hybrid_media_grabber(array('type' => 'video', 'split_media' => true, 'before' => '<div class="featured-media">', 'after' => '</div>'));
    if (!empty($video)) {
        return $video;
    }
    $image = get_the_image(array('size' => 'ravel-large', 'split_content' => true, 'scan_raw' => true, 'scan' => true, 'order' => array('scan_raw', 'scan', 'featured'), 'link_to_post' => false, 'caption' => true, 'width' => 728, 'echo' => false));
    if (!empty($image)) {
        preg_match('/<figure.*?>/i', $image, $matches);
        if (empty($matches)) {
            return '<div class="featured-media"><figure>' . $image . '</figure></div>';
        } else {
            return '<div class="featured-media">' . $image . '</div>';
        }
    }
    return ravel_get_attached_images();
}
开发者ID:ianperrin,项目名称:ravel,代码行数:24,代码来源:ravel.php


示例11: post_format_tools_get_video

/**
 * @since 1.5.0
 * @deprecated 1.6.0
 */
function post_format_tools_get_video($deprecated = '')
{
    _deprecated_function(__FUNCTION__, '1.6.0', 'hybrid_media_grabber()');
    hybrid_media_grabber();
}
开发者ID:Jessphung,项目名称:Phungtastic,代码行数:9,代码来源:deprecated.php


示例12: hybrid_attr

<article <?php 
hybrid_attr('post');
?>
>

	<?php 
echo $video = hybrid_media_grabber(array('width' => 1100, 'type' => 'video', 'split_media' => true, 'before' => '<div class="featured-media">', 'after' => '</div>'));
?>

	<div class="wrap">

		<?php 
if (is_single(get_the_ID())) {
    // If viewing a single post.
    ?>

			<header class="entry-header">

				<h1 <?php 
    hybrid_attr('entry-title');
    ?>
><?php 
    single_post_title();
    ?>
</h1>

				<div class="entry-byline">
					<?php 
    hybrid_post_format_link();
    ?>
					<span class="sep"><?php 
开发者ID:8manos,项目名称:bogohack,代码行数:31,代码来源:video.php


示例13: hybrid_video_attachment

/**
 * Handles the output of the media for video attachment posts. This should be used within The Loop.
 *
 * @since  0.2.2
 * @access public
 * @return string
 */
function hybrid_video_attachment()
{
    return hybrid_media_grabber(array('type' => 'video'));
}
开发者ID:ifte510,项目名称:hybrid-core,代码行数:11,代码来源:template-media.php


示例14: the_ID

<div id="post-<?php 
the_ID();
?>
" <?php 
post_class();
?>
>
	<div class="framebox">
		<?php 
echo hybrid_media_grabber(array('type' => 'video', 'split_media' => true, 'width' => 920, 'height' => 350));
?>
	</div>

	<?php 
if (is_singular()) {
    ?>
		<h1 class="entry-title"><?php 
    the_title();
    ?>
</h1>
	<?php 
} else {
    ?>
		<h2 class="entry-title"><a href="<?php 
    the_permalink();
    ?>
" rel="bookmark"><?php 
    the_title();
    ?>
</a></h2>
	<?php 
开发者ID:rtmzzi,项目名称:yummMacVersao,代码行数:31,代码来源:content-video.php


示例15: post_class

<div <?php 
post_class('wp-embed');
?>
>

	<?php 
echo $video = hybrid_media_grabber(array('type' => 'video', 'split_media' => true, 'shortcodes' => array('video'), 'autoembeds' => false, 'embedded' => false));
?>

	<?php 
if (!$video) {
    ?>
		<?php 
    get_the_image(array('size' => 'stargazer-full', 'order' => array('featured', 'attachment')));
    ?>
	<?php 
}
?>

	<p class="wp-embed-heading">
		<a href="<?php 
the_permalink();
?>
"><?php 
the_title();
?>
</a>
	</p><!-- .wp-embed-heading -->

	<div class="wp-embed-excerpt">
		<?php 
开发者ID:KL-Kim,项目名称:my-theme,代码行数:31,代码来源:video.php


示例16: the_title

    ?>
</span>
		<?php 
}
?>
		<h1 class="entry-title"><?php 
the_title();
?>
</h1>
		<div class="entry-meta"><?php 
echo vce_get_meta_data('single');
?>
</div>
	</header>
	<?php 
if ($gallery = hybrid_media_grabber(array('type' => 'gallery', 'split_media' => true))) {
    ?>
	 	<div class="meta-media">
			<?php 
    echo $gallery;
    ?>
		</div>
	<?php 
}
?>

    <?php 
if (vce_get_post_display('show_headline') && has_excerpt()) {
    ?>
	    <div class="entry-headline">
	    	<?php 
开发者ID:greg3560,项目名称:plailly,代码行数:31,代码来源:content-gallery.php



注:本文中的hybrid_media_grabber函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP hybrid_media_meta函数代码示例发布时间:2022-05-15
下一篇:
PHP hybrid_get_textdomain函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap