当前位置: 首页>>代码示例>>PHP>>正文


PHP hybrid_media_meta函数代码示例

本文整理汇总了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;未经允许,请勿转载。