Файловый менеджер - Редактировать - /home/beautybuzzbeyond/public_html/wp-content/themes/music-night/single/thumbnail.php
Назад
<?php if( !function_exists('musicnight_fetch_post_format_thumbnail') ){ function musicnight_fetch_post_format_thumbnail(){ if( !is_single() ){ global $musicnight_post_settings,$post,$musicnight_theme_option,$musicnight_post_option; }else{ global $musicnight_post_settings, $musicnight_theme_option, $musicnight_post_option,$post; } $musicnight_post_settings['content'] = get_the_content(); if ( has_post_thumbnail() && ! post_password_required() ){ $k_post_option = json_decode(get_post_meta($post->ID, 'post-option', true), true); if(is_single() && isset($musicnight_theme_option['force-thumbnail-size']) && $musicnight_theme_option['force-thumbnail-size'] == 'enable' ){ $thumbnail_size = (empty($musicnight_theme_option['recommended-thumbnail-size']))? $musicnight_post_settings['thumbnail-size']: $musicnight_theme_option['recommended-thumbnail-size']; }else{ $thumbnail_size = (empty($musicnight_post_settings['thumbnail-size']))? 'full': $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']; //Condition for Audio, Video, Slider if($k_post_option['post_media_type'] == 'audio'){ if(isset($k_post_option['musicnight_audio']) && 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 kode-ux">'; 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); if(isset($k_post_option['musicnight_audio'])){ echo '<div class="kode-blog-thumbnail kode-audio">' . do_shortcode('[audio mp3="'.$k_post_option['musicnight_audio'].'"][/audio]') . '</div>'; } } echo '</div>'; }else{ echo '<div class="kode-blog-thumbnail kode-audio">' . do_shortcode('[audio mp3="'.$k_post_option['musicnight_audio'].'"][/audio]') . '</div>'; } } }else if($k_post_option['post_media_type'] == 'video'){ echo '<div class="kode-blog-thumbnail kode-video">' . musicnight_get_video($k_post_option['musicnight_video'],$thumbnail_size).'</div>'; }else if($k_post_option['post_media_type'] == 'slider'){ echo musicnight_get_slider( $filter_slider_data, esc_attr($thumbnail_size), 'flexslider' ); }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 kode-ux">'; if( is_single() ){ echo musicnight_get_image(get_post_thumbnail_id(), esc_attr($thumbnail_size), true); }else{ $temp_option = json_decode(get_post_meta(get_the_ID(), 'post-option', true), true); echo musicnight_get_image(get_post_thumbnail_id(), esc_attr($thumbnail_size)); } echo '</div>'; } } } } } musicnight_fetch_post_format_thumbnail();
| ver. 1.4 |
Github
|
.
| PHP 8.0.30 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка