芝麻web文件管理V1.00
编辑当前文件:/home4/randall/public_html/sl/wp-content/themes/lorem-ipsum-books-media-store/functions.php
false)); // Custom backgrounds setup add_theme_support( 'custom-background'); // Supported posts formats add_theme_support( 'post-formats', array('gallery', 'video', 'audio', 'link', 'quote', 'image', 'status', 'aside', 'chat') ); // Autogenerate title tag add_theme_support('title-tag'); // Add user menu add_theme_support('nav-menus'); add_theme_support( 'align-wide' ); add_theme_support( 'woocommerce', array( 'product_grid' => array( 'max_columns' => 5 ) ) ); // Next setting from the WooCommerce 3.0+ enable built-in image slider on the single product page add_theme_support( 'wc-product-gallery-slider' ); // Next setting from the WooCommerce 3.0+ enable built-in image lightbox on the single product page add_theme_support( 'wc-product-gallery-lightbox' ); // Set list of the theme required plugins lorem_ipsum_books_media_store_storage_set('required_plugins', array( 'essgrids', 'learndash', 'revslider', 'trx_utils', 'visual_composer', 'learndash', 'woocommerce', 'trx_updater', 'trx_socials', 'elegro-payment', 'mailchimp-for-wp', 'contact-form-7' ) ); lorem_ipsum_books_media_store_storage_set('demo_data_url', esc_url(lorem_ipsum_books_media_store_get_protocol() . '://loremipsum.themerex.net/demo/')); lorem_ipsum_books_media_store_register_theme_sidebars(); } } // Add/Remove theme nav menus if ( !function_exists( 'lorem_ipsum_books_media_store_add_theme_menus' ) ) { function lorem_ipsum_books_media_store_add_theme_menus($menus) { return $menus; } } // Add theme specific widgetized areas if ( !function_exists( 'lorem_ipsum_books_media_store_add_theme_sidebars' ) ) { function lorem_ipsum_books_media_store_add_theme_sidebars($sidebars=array()) { if (is_array($sidebars)) { $theme_sidebars = array( 'sidebar_main' => esc_html__( 'Main Sidebar', 'lorem-ipsum-books-media-store' ), 'sidebar_footer' => esc_html__( 'Footer Sidebar', 'lorem-ipsum-books-media-store' ) ); if (function_exists('lorem_ipsum_books_media_store_exists_woocommerce') && lorem_ipsum_books_media_store_exists_woocommerce()) { $theme_sidebars['sidebar_cart'] = esc_html__( 'WooCommerce Cart Sidebar', 'lorem-ipsum-books-media-store' ); } $sidebars = array_merge($theme_sidebars, $sidebars); } return $sidebars; } } // Add theme required plugins if ( !function_exists( 'lorem_ipsum_books_media_store_add_required_plugins' ) ) { function lorem_ipsum_books_media_store_add_required_plugins($plugins) { $plugins[] = array( 'name' => esc_html__( 'ThemeREX Utilities', 'lorem-ipsum-books-media-store' ), 'version' => '3.2.0.3', 'slug' => 'trx_utils', 'source' => lorem_ipsum_books_media_store_get_file_dir('plugins/install/trx_utils.zip'), 'required' => true ); return $plugins; } } // Return text for the "I agree ..." checkbox if ( ! function_exists( 'lorem_ipsum_books_media_store_trx_addons_privacy_text' ) ) { add_filter( 'trx_utils_filter_privacy_text', 'lorem_ipsum_books_media_store_trx_addons_privacy_text' ); function lorem_ipsum_books_media_store_trx_addons_privacy_text( $text='' ) { return lorem_ipsum_books_media_store_get_privacy_text(); } } // Add data to the head and to the beginning of the body //------------------------------------------------------------------------ // Add theme specified classes to the body tag if ( !function_exists('lorem_ipsum_books_media_store_body_classes') ) { function lorem_ipsum_books_media_store_body_classes( $classes ) { $classes[] = 'lorem_ipsum_books_media_store_body'; $classes[] = 'body_style_' . trim(lorem_ipsum_books_media_store_get_custom_option('body_style')); $classes[] = 'body_' . (lorem_ipsum_books_media_store_get_custom_option('body_filled')=='yes' ? 'filled' : 'transparent'); $classes[] = 'article_style_' . trim(lorem_ipsum_books_media_store_get_custom_option('article_style')); $blog_style = lorem_ipsum_books_media_store_get_custom_option(is_singular() && !lorem_ipsum_books_media_store_storage_get('blog_streampage') ? 'single_style' : 'blog_style'); $classes[] = 'layout_' . trim($blog_style); $classes[] = 'template_' . trim(lorem_ipsum_books_media_store_get_template_name($blog_style)); $body_scheme = lorem_ipsum_books_media_store_get_custom_option('body_scheme'); if (empty($body_scheme) || lorem_ipsum_books_media_store_is_inherit_option($body_scheme)) $body_scheme = 'original'; $classes[] = 'scheme_' . trim($body_scheme); $top_panel_position = lorem_ipsum_books_media_store_get_custom_option('top_panel_position'); if (!lorem_ipsum_books_media_store_param_is_off($top_panel_position)) { $classes[] = 'top_panel_show'; $classes[] = 'top_panel_' . trim($top_panel_position); } else $classes[] = 'top_panel_hide'; $classes[] = lorem_ipsum_books_media_store_get_sidebar_class(); if (lorem_ipsum_books_media_store_get_custom_option('show_video_bg')=='yes' && (lorem_ipsum_books_media_store_get_custom_option('video_bg_youtube_code')!='' || lorem_ipsum_books_media_store_get_custom_option('video_bg_url')!='')) $classes[] = 'video_bg_show'; if (!lorem_ipsum_books_media_store_param_is_off(lorem_ipsum_books_media_store_get_theme_option('page_preloader'))) $classes[] = 'preloader'; return $classes; } } // Add page meta to the head if (!function_exists('lorem_ipsum_books_media_store_head_add_page_meta')) { function lorem_ipsum_books_media_store_head_add_page_meta() { ?>
div { background-color: '.esc_attr($link_clr).'; }'; } return $css; } } // Add gtm code to the beginning of the body if (!function_exists('lorem_ipsum_books_media_store_body_add_gtm')) { function lorem_ipsum_books_media_store_body_add_gtm() { lorem_ipsum_books_media_store_show_layout(lorem_ipsum_books_media_store_get_custom_option('gtm_code')); } } // Add TOC anchors to the beginning of the body if (!function_exists('lorem_ipsum_books_media_store_body_add_toc')) { function lorem_ipsum_books_media_store_body_add_toc() { // Add TOC items 'Home' and "To top" if (lorem_ipsum_books_media_store_get_custom_option('menu_toc_home')=='yes' && function_exists('lorem_ipsum_books_media_store_sc_anchor')) lorem_ipsum_books_media_store_show_layout(lorem_ipsum_books_media_store_sc_anchor(array( 'id' => "toc_home", 'title' => esc_html__('Home', 'lorem-ipsum-books-media-store'), 'description' => esc_html__('{{Return to Home}} - ||navigate to home page of the site', 'lorem-ipsum-books-media-store'), 'icon' => "icon-home", 'separator' => "yes", 'url' => esc_url(home_url('/')) ) )); if (lorem_ipsum_books_media_store_get_custom_option('menu_toc_top')=='yes' && function_exists('lorem_ipsum_books_media_store_sc_anchor')) lorem_ipsum_books_media_store_show_layout(lorem_ipsum_books_media_store_sc_anchor(array( 'id' => "toc_top", 'title' => esc_html__('To Top', 'lorem-ipsum-books-media-store'), 'description' => esc_html__('{{Back to top}} - ||scroll to top of the page', 'lorem-ipsum-books-media-store'), 'icon' => "icon-double-up", 'separator' => "yes") )); } } // Add page preloader to the beginning of the body if (!function_exists('lorem_ipsum_books_media_store_body_add_page_preloader')) { function lorem_ipsum_books_media_store_body_add_page_preloader() { if ( ($preloader=lorem_ipsum_books_media_store_get_theme_option('page_preloader')) != 'none' && ( $preloader != 'custom' || ($image=lorem_ipsum_books_media_store_get_theme_option('page_preloader_image')) != '')) { ?>
tag. */ do_action('wp_body_open'); } } // Include framework core files //------------------------------------------------------------------- require_once trailingslashit( get_template_directory() ) . 'fw/loader.php'; ?>