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

PHP hybrid_media_meta函数代码示例

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

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



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

示例1: _e

<?php 
if (is_attachment(get_the_ID())) {
    // If viewing a single attachment.
    ?>

	<div class="attachment-meta">

		<div class="media-info image-info">

			<h3 class="attachment-meta-title"><?php 
    _e('Image Info', 'saga');
    ?>
</h3>

			<?php 
    hybrid_media_meta();
    ?>

		</div><!-- .media-info -->

		<?php 
    $gallery = gallery_shortcode(array('columns' => 4, 'numberposts' => 8, 'orderby' => 'rand', 'id' => get_queried_object()->post_parent, 'exclude' => get_the_ID()));
    ?>

		<?php 
    if (!empty($gallery)) {
        // Check if the gallery is not empty.
        ?>

			<div class="image-gallery">
				<h3 class="attachment-meta-title"><?php 
开发者ID:8manos,项目名称:bogohack,代码行数:31,代码来源:attachment-image.php


示例2: stargazer_video_shortcode

/**
 * Adds a section below the player to  display the video file information (toggled by custom JS).
 *
 * @since  1.0.0
 * @access public
 * @param  string  $html
 * @param  array   $atts
 * @param  object  $audio
 * @return string
 */
function stargazer_video_shortcode($html, $atts, $video)
{
    /* Don't show on single attachment pages or in the admin. */
    if (is_attachment() || is_admin()) {
        return $html;
    }
    /* If we have an actual attachment to work with, use the ID. */
    if (is_object($video)) {
        $attachment_id = $video->ID;
    } else {
        $extensions = join('|', wp_get_video_extensions());
        preg_match('/(src|' . $extensions . ')=[\'"](.+?)[\'"]/i', preg_replace('/(\\?_=[0-9])/i', '', $html), $matches);
        if (!empty($matches)) {
            $attachment_id = hybrid_get_attachment_id_from_url($matches[2]);
        }
    }
    /* If an attachment ID was found, add the media info section. */
    if (!empty($attachment_id)) {
        $html .= '<div class="media-shortcode-extend">';
        $html .= '<div class="media-info video-info">';
        $html .= hybrid_media_meta(array('post_id' => $attachment_id, 'echo' => false));
        $html .= '</div>';
        $html .= '<button class="media-info-toggle">' . __('Video Info', 'stargazer') . '</button>';
        $html .= '</div>';
    }
    return $html;
}
开发者ID:htmELS,项目名称:stargazer,代码行数:37,代码来源:stargazer.php


示例3: hybrid_media_meta

    hybrid_media_meta('length_formatted', array('before' => sprintf($pre, esc_html__('Run Time', 'ubuntugnome')), 'after' => '</li>'));
    ?>
				<?php 
    hybrid_media_meta('dimensions', array('before' => sprintf($pre, esc_html__('Dimensions', 'ubuntugnome')), 'after' => '</li>'));
    ?>
				<?php 
    hybrid_media_meta('file_type', array('before' => sprintf($pre, esc_html__('Type', 'ubuntugnome')), 'after' => '</li>'));
    ?>
				<?php 
    hybrid_media_meta('file_name', array('before' => sprintf($pre, esc_html__('Name', 'ubuntugnome')), 'after' => '</li>'));
    ?>
				<?php 
    hybrid_media_meta('file_size', array('before' => sprintf($pre, esc_html__('Size', 'ubuntugnome')), 'after' => '</li>'));
    ?>
				<?php 
    hybrid_media_meta('mime_type', array('before' => sprintf($pre, esc_html__('Mime Type', 'ubuntugnome')), 'after' => '</li>'));
    ?>
			</ul>

		</div><!-- .media-info -->

	</div><!-- .attachment-meta -->

<?php 
} else {
    // If not viewing a single attachment.
    ?>

	<article <?php 
    hybrid_attr('post');
    ?>
开发者ID:UbuntuGNOMEMarketing,项目名称:ubuntugnome,代码行数:31,代码来源:attachment-video.php


示例4: socially_awkward_get_video_meta

/**
 * @since      0.1.0
 * @deprecated 1.0.0
 */
function socially_awkward_get_video_meta()
{
    _deprecated_function(__FUNCTION__, '1.0.0', 'hybrid_media_meta()');
    return hybrid_media_meta(array('echo' => false));
}
开发者ID:Jessphung,项目名称:Phungtastic,代码行数:9,代码来源:socially-awkward.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP hybrid_post_format_link函数代码示例发布时间:2022-05-15
下一篇:
PHP hybrid_media_grabber函数代码示例发布时间: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