<?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
/** * 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; }
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'); ?>
hybrid_media_meta('year', array('before' => sprintf($pre, esc_html__('Year', 'vaidusworld')), 'after' => '</li>')); ?> <?php hybrid_media_meta('genre', array('before' => sprintf($pre, esc_html__('Genre', 'vaidusworld')), 'after' => '</li>')); ?> <?php hybrid_media_meta('file_type', array('before' => sprintf($pre, esc_html__('Type', 'vaidusworld')), 'after' => '</li>')); ?> <?php hybrid_media_meta('file_name', array('before' => sprintf($pre, esc_html__('Name', 'vaidusworld')), 'after' => '</li>')); ?> <?php hybrid_media_meta('file_size', array('before' => sprintf($pre, esc_html__('Size', 'vaidusworld')), 'after' => '</li>')); ?> <?php hybrid_media_meta('mime_type', array('before' => sprintf($pre, esc_html__('Mime Type', 'vaidusworld')), 'after' => '</li>')); ?> </ul> </div><!-- .media-info --> </div><!-- .attachment-meta --> <?php } else { // If not viewing a single attachment. ?> <article <?php hybrid_attr('post'); ?>
hybrid_media_meta('year', array('before' => sprintf($pre, esc_html__('Year', '<%= themeSlug %>')), 'after' => '</li>')); ?> <?php hybrid_media_meta('genre', array('before' => sprintf($pre, esc_html__('Genre', '<%= themeSlug %>')), 'after' => '</li>')); ?> <?php hybrid_media_meta('file_type', array('before' => sprintf($pre, esc_html__('Type', '<%= themeSlug %>')), 'after' => '</li>')); ?> <?php hybrid_media_meta('file_name', array('before' => sprintf($pre, esc_html__('Name', '<%= themeSlug %>')), 'after' => '</li>')); ?> <?php hybrid_media_meta('file_size', array('before' => sprintf($pre, esc_html__('Size', '<%= themeSlug %>')), 'after' => '</li>')); ?> <?php hybrid_media_meta('mime_type', array('before' => sprintf($pre, esc_html__('Mime Type', '<%= themeSlug %>')), 'after' => '</li>')); ?> </ul> </div><!-- .media-info --> </div><!-- .attachment-meta --> <?php } else { // If not viewing a single attachment. ?> <article <?php hybrid_attr('post'); ?>
/** * @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)); }