芝麻web文件管理V1.00
编辑当前文件:/home/soundframestudio/www/wp-content/themes/betheme/visual-builder/partials/sidebar-widgets.php
get_items(); if ( !defined( 'ICL_SITEPRESS_VERSION' ) ) unset($widgets['header_language_switcher']); if ( !defined( 'WCML_VERSION' ) ) unset($widgets['header_currency_switcher']); $favs = json_decode( get_option( 'mfn_fav_items_'.get_current_user_id() ) ); echo '
'; if( !isset($this->template_type) || $this->template_type != 'header' ){ echo '
'; echo '
'.esc_html__('Favourite elements', 'mfn-opts').'
'; echo '
'; echo '
'; if( $favs && count($favs) > 0 ) { foreach( $favs as $fav ) { if( $widgets[$fav]['cat'] !== 'header' ) echo '
'.$widgets[$fav]['title'].'
'; } } echo '
'; echo '
Collect favourite elements in one place by
>
Add to favourites'. ( ! is_admin() ? ' (Unavailable in Demo)' : '' ) .'
'; echo '
'; } echo '
'; foreach($widgets as $w=>$widget) { if( isset($this->template_type) && $this->template_type == 'header' ){ // if header if($widget['cat'] == 'header' || in_array($w, array('column', 'button', 'heading', 'payment_methods', 'image', 'plain_text', 'header_language_switcher', 'header_currency_switcher'))){ echo '
'.$widget['title'].'
'; } }elseif( isset($this->template_type) && $this->template_type == 'megamenu' ){ if($widget['cat'] == 'megamenu' || ( !in_array($widget['cat'], array('shop-archive', 'single-product', 'header', 'footer', 'single-post', 'single-blog-post', 'single-portfolio-post', 'archive', 'blog', 'portfolio', 'cart', 'checkout', 'thanks', 'order-shared')) && !in_array($w, array('before_after', 'chart', 'content', 'offer', 'offer_thumb', 'our_team', 'our_team_list', 'sidebar_widget', 'slider_plugin', 'table_of_contents', 'testimonials_list', 'timeline', 'sidemenu_menu', 'popup_exit')) ) ){ echo '
'.$widget['title'].'
'; } }elseif( isset($this->template_type) && $this->template_type == 'popup' ){ if($widget['cat'] == 'popup' || ( !in_array($widget['cat'], array('loops', 'cart', 'checkout', 'thanks', 'order-shared', 'shop-archive', 'single-product', 'single-post', 'single-blog-post', 'single-portfolio-post', 'header', 'footer', 'megamenu', 'archive', 'blog', 'portfolio')) && !in_array($w, array('sidebar_widget', 'slider_plugin', 'table_of_contents', 'slider', )) ) ){ echo '
'.$widget['title'].'
'; } }elseif( isset($this->template_type) && $this->template_type == 'sidemenu' ){ if($widget['cat'] == 'sidemenu' || ( $widget['cat'] == 'header' && !in_array($w, array('header_menu', 'header_burger')) ) || ( !in_array($widget['cat'], array('popup', 'cart', 'checkout', 'order-shared', 'thanks', 'loops', 'shop-archive', 'single-product', 'header', 'footer', 'megamenu', 'single-post', 'single-blog-post', 'single-portfolio-post', 'archive', 'blog', 'portfolio')) && !in_array($w, array('sidebar_widget', 'slider_plugin', 'table_of_contents', 'slider', 'content')) ) ){ echo '
'.$widget['title'].'
'; } }elseif( // rest ( !in_array($widget['cat'], array('shop-archive', 'single-product', 'header', 'megamenu', 'footer', 'popup', 'sidemenu', 'single-post', 'single-blog-post', 'single-portfolio-post', 'archive', 'blog', 'portfolio', 'cart', 'checkout', 'thanks', 'order-shared')) ) || ( isset($this->template_type) && $this->template_type == 'single-product' && $widget['cat'] == 'single-product' ) || ( isset($this->template_type) && $this->template_type == 'footer' && $widget['cat'] == 'footer' ) || ( isset($this->template_type) && $this->template_type == 'cart' && ( $widget['cat'] == 'cart' || $widget['cat'] == 'order-shared' ) ) || ( isset($this->template_type) && $this->template_type == 'checkout' && ( $widget['cat'] == 'checkout' || $widget['cat'] == 'order-shared' ) ) || ( isset($this->template_type) && $this->template_type == 'thanks' && ( $widget['cat'] == 'thanks' || $widget['cat'] == 'order-shared' ) ) || ( isset($this->template_type) && $this->template_type == 'popup' && $widget['cat'] == 'popup' ) || ( isset($this->template_type) && $this->template_type == 'single-post' && ($widget['cat'] == 'single-post' || $widget['cat'] == 'single-blog-post') ) || ( isset($this->template_type) && $this->template_type == 'blog' && ($widget['cat'] == 'single-post' || $widget['cat'] == 'single-blog-post' || $widget['cat'] == 'archive' || $widget['cat'] == 'blog' ) && $w != 'post_blog_related' ) || ( isset($this->template_type) && $this->template_type == 'portfolio' && ($widget['cat'] == 'single-post' || $widget['cat'] == 'single-portfolio-post' || $widget['cat'] == 'archive' || $widget['cat'] == 'portfolio' ) && $w != 'post_portfolio_related' ) || ( isset($this->template_type) && $this->template_type == 'single-portfolio' && ($widget['cat'] == 'single-post' || $widget['cat'] == 'single-portfolio-post') ) || ( isset($this->template_type) && $this->template_type == 'shop-archive' && $widget['cat'] == 'shop-archive' ) ){ echo '
'.$widget['title'].'
'; } } echo '
'; ?>