Файловый менеджер - Редактировать - /home/beautybuzzbeyond/public_html/wp-content/themes/music-night/single/thumbnail-audio.php
Назад
<?php /** * The template for displaying audio post format */ if( !function_exists('musicnight_fetch_post_format_audio') ){ function musicnight_fetch_post_format_audio(){ if( !is_single() ){ global $musicnight_post_settings; }else{ global $musicnight_post_settings, $musicnight_theme_option, $musicnight_post_option,$post; $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)){ $post_format_data = do_shortcode('[audio src="' . $match[0] . '" ][/audio]'); $musicnight_post_settings['content'] = substr($content, strlen($match[0])); }else if(preg_match('#^\[audio\s.+\[/audio\]#', $content, $match)){ $post_format_data = do_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-audio">' . $post_format_data . '</div>'; }else{ global $post; $k_post_option = json_decode(get_post_meta($post->ID, 'post-option', true), true); if(!isset($musicnight_theme_option['musicforest-post-thumbnail-size'])){ $musicnight_theme_option['musicforest-post-thumbnail-size'] = 'full'; } $thumbnail_size = (empty($musicnight_post_settings['thumbnail-size']))? $musicnight_theme_option['musicforest-post-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_audio'])){ if(strpos($k_post_option['musicnight_audio'],'soundcloud')){ echo '<div class="kode-blog-thumbnail kode-audio">' . do_shortcode('[soundcloud url="'.esc_url($k_post_option['musicnight_audio']).'" comments="yes" auto_play="no" color="#ff7700" width="100%" height="'.esc_attr($musicnight_height).'px"][/soundcloud]') . '</div>'; }else{ $musicnight_get_image = musicnight_get_image(get_post_thumbnail_id(), esc_attr($thumbnail_size), true); if(!empty($musicnight_get_image)){ echo '<div class="kode-blog-thumbnail">'; if( is_single() ){ echo musicnight_get_image(get_post_thumbnail_id(), $thumbnail_size, true); echo '<div class="kode-blog-thumbnail kode-audio">' . do_shortcode('[audio mp3="'.$k_post_option['musicnight_audio'].'"][/audio]') . '</div>'; }else{ $temp_option = json_decode(get_post_meta(get_the_ID(), 'post-option', true), true); echo musicnight_get_image(get_post_thumbnail_id(), $thumbnail_size,true); echo '<div class="kode-blog-thumbnail kode-audio">' . do_shortcode('[audio mp3="'.$k_post_option['musicnight_audio'].'"][/audio]') . '</div>'; if( is_sticky() ){ echo '<div class="kode-sticky-banner">'; echo '<i class="fa fa-bullhorn" ></i>'; echo esc_html__('Sticky Post', 'music-night'); echo '</div>'; } } echo '</div>'; }else{ if(!empty($k_post_option['musicnight_audio'])){ echo '<div class="kode-blog-thumbnail kode-audio">' . do_shortcode('[audio mp3="'.$k_post_option['musicnight_audio'].'"][/audio]') . '</div>'; } } } } } } } musicnight_fetch_post_format_audio();
| ver. 1.4 |
Github
|
.
| PHP 8.0.30 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка