Файловый менеджер - Редактировать - /home/beautybuzzbeyond/public_html/wp-content/themes/music-night/single/thumbnail-video.php
Назад
<?php /** * The template for displaying video post format */ if( !function_exists('musicnight_fetch_post_format_video') ){ function musicnight_fetch_post_format_video(){ if( !is_single() ){ global $post, $musicnight_post_settings; $musicnight_theme_option = get_option('musicnight_admin_option', array()); $musicnight_post_settings['content'] = get_the_content(); $musicnight_post_option = musicnight_decode_stopbackslashes(get_post_meta(get_the_ID(), 'post-option', true )); if( !empty($musicnight_post_option) ){ $musicnight_post_option = json_decode( $musicnight_post_option, true ); } }else{ global $post; $musicnight_theme_option = get_option('musicnight_admin_option', array()); $musicnight_post_option = musicnight_decode_stopbackslashes(get_post_meta(get_the_ID(), 'post-option', true )); if( !empty($musicnight_post_option) ){ $musicnight_post_option = json_decode( $musicnight_post_option, true ); } } $post_format_data = ''; $content = trim(get_the_content(esc_html__('Read More', 'music-night'))); if(preg_match('#^https?://\S+#', $content, $match)){ if( is_single() || $musicnight_post_settings['blog-style'] == 'blog-full' ){ $post_format_data = musicnight_get_video($match[0], 'full'); }else{ $post_format_data = musicnight_get_video($match[0], $musicnight_post_settings['thumbnail-size']); } $musicnight_post_settings['content'] = substr($content, strlen($match[0])); }else if(preg_match('#^\[video\s.+\[/video\]#', $content, $match)){ $post_format_data = do_shortcode($match[0]); $musicnight_post_settings['content'] = substr($content, strlen($match[0])); }else if(preg_match('#^\[embed.+\[/embed\]#', $content, $match)){ global $wp_embed; $post_format_data = $wp_embed->run_shortcode($match[0]); $musicnight_post_settings['content'] = substr($content, strlen($match[0])); }else{ $musicnight_post_settings['content'] = $content; } if ( !empty($post_format_data) ){ echo '<div class="kode-blog-thumbnail kode-video">' . $post_format_data . '</div>'; }else{ $k_post_option = json_decode(get_post_meta($post->ID, 'post-option', true), true); $thumbnail_size = (empty($musicnight_post_settings['thumbnail-size']))? $musicnight_theme_option['thumbnail-size']: $musicnight_post_settings['thumbnail-size']; //Get Thumbnail Width and Height $musicnight_img_size = musicnight_get_video_size($thumbnail_size); $musicnight_width = $musicnight_img_size['width']; $musicnight_height = $musicnight_img_size['height']; // Get Slider Images $k_post_option['slider'] = (empty($k_post_option['slider']))? ' ': $k_post_option['slider']; $raw_slider_data = musicnight_decode_stopbackslashes($k_post_option['slider']); $filter_slider_data = json_decode(musicnight_stripslashes($raw_slider_data), true); //Get Media Type Selected $k_post_option['post_media_type'] = (empty($k_post_option['post_media_type']))? ' ': $k_post_option['post_media_type']; if(!empty($k_post_option['musicnight_video'])){ echo '<div class="kode-blog-thumbnail kode-video">' . musicnight_get_video($k_post_option['musicnight_video'],$thumbnail_size).'</div>'; } } } } musicnight_fetch_post_format_video();
| ver. 1.4 |
Github
|
.
| PHP 8.0.30 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка