Файловый менеджер - Редактировать - /home/beautybuzzbeyond/public_html/wp-content/themes/music-night/framework/script-handler.php
Назад
<?php /* * Kodeforest Include Script File * --------------------------------------------------------------------- * This file use to include a necessary script when it's requires * --------------------------------------------------------------------- */ // Match the values if( !function_exists('musicnight_match_page_builder') ){ function musicnight_match_page_builder($array, $item_type, $type, $data = array()){ if(isset($array)){ foreach($array as $item){ if($item['item-type'] == $item_type && $item['type'] == $type){ if(empty($data)){ return true; }else{ if( strpos($item['option'][$data[0]], $data[1]) !== false ) return true; } } if($item['item-type'] == 'wrapper'){ if( musicnight_match_page_builder($item['items'], $item_type, $type) ) return true; } } } return false; } } //Add Scripts in Theme if(!is_admin()){ add_action('wp_enqueue_scripts','musicnight_register_non_admin_styles'); add_action('wp_enqueue_scripts','musicnight_register_non_admin_scripts'); add_action('wp_enqueue_scripts','musicnight_framework_font_loader'); add_action('after_setup_theme','musicnight_theme_slug_editor_styles' ); } // Register all Css if( !function_exists('musicnight_register_non_admin_styles') ){ function musicnight_register_non_admin_styles(){ global $post,$post_id,$musicnight_content_raw,$musicnight_theme_option,$musicnight_font_controller; wp_deregister_style('ignitiondeck-base'); wp_deregister_style('accordion'); wp_enqueue_script('jquery-ui-slider'); wp_deregister_style('woocommerce-layout'); wp_deregister_style('flexslider'); wp_enqueue_style( 'bootstrap', MUSICNIGHT_PATH . '/css/bootstrap.css' ); //Bootstrap wp_enqueue_style( 'font-awesome', MUSICNIGHT_PATH . '/css/font-awesome.css' ); //Font Awesome wp_enqueue_style( 'musicforest-church-typography', MUSICNIGHT_PATH . '/css/themetypo.css' ); //Theme Typo wp_enqueue_style( 'musicforest-church-shortcode', MUSICNIGHT_PATH . '/css/shortcodes.css' ); //Shortcodes wp_enqueue_style( 'musicforest-church-color', MUSICNIGHT_PATH . '/css/colors.css' ); //Color Scheme wp_enqueue_style( 'musicforest-church-svg-icons', MUSICNIGHT_PATH . '/css/svg-icons.css' ); //Color Scheme wp_enqueue_style( 'musicforest-church-svg-icons-new', MUSICNIGHT_PATH . '/css/svg-icon/kode-svg-style.css' ); //Color Scheme wp_enqueue_style( 'musicforest-svg-icons-new-music', MUSICNIGHT_PATH . '/css/svg-icon/icon/svg-icon.css' ); //Color Scheme if(isset($musicnight_theme_option['enable-nice-scroll'])){ if($musicnight_theme_option['enable-nice-scroll'] == 'enable'){ // wp_register_script('musicforest-nicescroll', MUSICNIGHT_PATH.'/framework/include/frontend_assets/default/js/jquery.nicescroll.min.js', false, '1.0', true); // wp_enqueue_script('musicforest-nicescroll'); } } if( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'slider', array('slider-type', 'flexslider')) ){ wp_enqueue_style( 'flexslider', MUSICNIGHT_PATH . '/framework/include/frontend_assets/flexslider/flexslider.css' ); //Flex Slider } if( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'slider', array('slider-type', 'nivo-slider')) ){ wp_enqueue_style( 'nivo-slider', MUSICNIGHT_PATH . '/framework/include/frontend_assets/nivo-slider/nivo-slider.css' ); //Nivo Slider wp_enqueue_script('nivo-slider', MUSICNIGHT_PATH . '/framework/include/frontend_assets/nivo-slider/jquery.nivo.slider.js',array('jquery'), '1.0', true); } wp_enqueue_style( 'nivo-slider', MUSICNIGHT_PATH . '/framework/include/frontend_assets/nivo-slider/nivo-slider.css' ); //Nivo Slider wp_enqueue_script('nivo-slider', MUSICNIGHT_PATH . '/framework/include/frontend_assets/nivo-slider/jquery.nivo.slider.js',array('jquery'), '1.0', true); if ( class_exists( 'bbPress' ) ) { wp_enqueue_style( 'bb-buddy-press-', MUSICNIGHT_PATH . '/css/kode_bbpress.css' ); //BBpress CSS } if ( class_exists( 'BP_Blogs_Blog' ) ) { wp_enqueue_style( 'bb-buddypress', MUSICNIGHT_PATH . '/css/kode_buddypress.css' ); //BuddyPress CSS } if(isset($musicnight_theme_option['enable-sticky-sidebar'])){ if($musicnight_theme_option['enable-sticky-sidebar'] == 'enable'){ wp_register_script('musicforest-sticky-sidebar', MUSICNIGHT_PATH.'/js/sticky-sidebar.js', false, '1.0', true); wp_enqueue_script('musicforest-sticky-sidebar'); } } wp_enqueue_style('chosen', MUSICNIGHT_PATH . '/framework/include/backend_assets/css/chosen.min.css'); wp_enqueue_script('chosen', MUSICNIGHT_PATH . '/framework/include/backend_assets/js/chosen.jquery.min.js',array('jquery'), '1.0', true); // wp_enqueue_style( 'chosen-selector', MUSICNIGHT_PATH . '/css/chosen.selector.css' ); //Choosen Front End wp_enqueue_style( 'musicforest-search', MUSICNIGHT_PATH . '/framework/include/frontend_assets/default/css/search.css' ); //Search Divine if(isset($musicnight_theme_option['enable-top-bar-search']) && $musicnight_theme_option['enable-top-bar-search'] == 'enable'){ wp_register_script('musicforest-search', MUSICNIGHT_PATH.'/framework/include/frontend_assets/default/js/search.js', false, '1.0', true); wp_enqueue_script('musicforest-search'); } wp_enqueue_style( 'component', MUSICNIGHT_PATH . '/framework/include/frontend_assets/dl-menu/component.css' ); //Responsive Menu wp_enqueue_script('modernizr', MUSICNIGHT_PATH.'/framework/include/frontend_assets/dl-menu/modernizr.custom.js',array('jquery'), '1.0', true); wp_enqueue_script('dlmenu', MUSICNIGHT_PATH.'/framework/include/frontend_assets/dl-menu/jquery.dlmenu.js',array('jquery'), '1.0', true); wp_enqueue_style( 'woocommerce', MUSICNIGHT_PATH . '/framework/include/frontend_assets/default/css/woocommerce.css' ); //Woocommerce wp_enqueue_style( 'musicforest-church-widget', MUSICNIGHT_PATH . '/css/widget.css' ); //Custom Widgets wp_enqueue_style( 'style-custom', MUSICNIGHT_PATH . '/css/style-custom.css' ); //Custom Style wp_enqueue_style( 'style', get_stylesheet_uri() ); //Default Stylesheet wp_enqueue_style( 'musicforest-black-style-color', MUSICNIGHT_PATH . '/css/black-style.css' ); //Dark Color Scheme } } if( !function_exists('musicnight_theme_slug_editor_styles') ){ function musicnight_theme_slug_editor_styles() { global $post,$post_id,$musicnight_content_raw,$musicnight_theme_option,$musicnight_font_controller; if(isset($musicnight_theme_option['body-font-family'])){ $font_id = str_replace( ' ', '-', $musicnight_theme_option['body-font-family'] ); if(class_exists('musicnight_font_loader')){ add_editor_style( array( 'editor-style.css', esc_url_raw($musicnight_font_controller->musicnight_get_google_font_url($musicnight_theme_option['body-font-family'])) ) ); }else{ add_editor_style( array( 'editor-style.css', esc_url_raw('') ) ); } } } } add_action( 'admin_print_styles-appearance_page_custom-header', 'musicnight_framework_custom_header_fonts' ); if( !function_exists('musicnight_framework_custom_header_fonts') ){ function musicnight_framework_custom_header_fonts() { global $post,$post_id,$musicnight_content_raw,$musicnight_theme_option,$musicnight_font_controller; if(isset($musicnight_theme_option['body-font-family'])){ $font_id = str_replace( ' ', '-', $musicnight_theme_option['body-font-family'] ); if(class_exists('musicnight_font_loader')){ wp_enqueue_style( 'theme-slug-fonts', esc_url_raw($musicnight_font_controller->musicnight_get_google_font_url($musicnight_theme_option['body-font-family'])), array(), null ); } } } } if( !function_exists('musicnight_framework_font_loader') ){ function musicnight_framework_font_loader() { global $post,$post_id,$musicnight_content_raw,$musicnight_theme_option,$musicnight_font_controller; if(isset($musicnight_theme_option['body-font-family'])){ $font_id = str_replace( ' ', '-', $musicnight_theme_option['body-font-family'] ); if(class_exists('musicnight_font_loader')){ wp_enqueue_style( 'theme-slug-fonts', esc_url_raw($musicnight_font_controller->musicnight_get_google_font_url($musicnight_theme_option['body-font-family'])), array(), null ); } } if(isset($musicnight_theme_option['all-heading-font-family'])){ $font_id = str_replace( ' ', '-', $musicnight_theme_option['all-heading-font-family'] ); if(class_exists('musicnight_font_loader')){ wp_enqueue_style( 'theme-all-heading-fonts', esc_url_raw($musicnight_font_controller->musicnight_get_google_font_url($musicnight_theme_option['all-heading-font-family'])), array(), null ); } } if(isset($musicnight_theme_option['h2-font-family'])){ $font_id = str_replace( ' ', '-', $musicnight_theme_option['h2-font-family'] ); if(class_exists('musicnight_font_loader')){ wp_enqueue_style( 'theme-h2-fonts', esc_url_raw($musicnight_font_controller->musicnight_get_google_font_url($musicnight_theme_option['h2-font-family'])), array(), null ); } } if(isset($musicnight_theme_option['h3-font-family'])){ $font_id = str_replace( ' ', '-', $musicnight_theme_option['h3-font-family'] ); if(class_exists('musicnight_font_loader')){ wp_enqueue_style( 'theme-h3-fonts', esc_url_raw($musicnight_font_controller->musicnight_get_google_font_url($musicnight_theme_option['h3-font-family'])), array(), null ); } } if(isset($musicnight_theme_option['h4-font-family'])){ $font_id = str_replace( ' ', '-', $musicnight_theme_option['h4-font-family'] ); if(class_exists('musicnight_font_loader')){ wp_enqueue_style( 'theme-h4-fonts', esc_url_raw($musicnight_font_controller->musicnight_get_google_font_url($musicnight_theme_option['h4-font-family'])), array(), null ); } } if(isset($musicnight_theme_option['h5-font-family'])){ $font_id = str_replace( ' ', '-', $musicnight_theme_option['h5-font-family'] ); if(class_exists('musicnight_font_loader')){ wp_enqueue_style( 'theme-h5-fonts', esc_url_raw($musicnight_font_controller->musicnight_get_google_font_url($musicnight_theme_option['h5-font-family'])), array(), null ); } } if(isset($musicnight_theme_option['h6-font-family'])){ $font_id = str_replace( ' ', '-', $musicnight_theme_option['h6-font-family'] ); if(class_exists('musicnight_font_loader')){ wp_enqueue_style( 'theme-h6-fonts', esc_url_raw($musicnight_font_controller->musicnight_get_google_font_url($musicnight_theme_option['h6-font-family'])), array(), null ); } } if(isset($musicnight_theme_option['navigation-font-family'])){ $font_id = str_replace( ' ', '-', $musicnight_theme_option['navigation-font-family'] ); if(class_exists('musicnight_font_loader')){ wp_enqueue_style( 'theme-navigation-fonts', esc_url_raw($musicnight_font_controller->musicnight_get_google_font_url($musicnight_theme_option['navigation-font-family'])), array(), null ); } } } } // Register all scripts if( !function_exists('musicnight_register_non_admin_scripts') ){ function musicnight_register_non_admin_scripts(){ global $post,$post_id,$musicnight_content_raw,$musicnight_post_option,$musicnight_theme_option; if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); //BootStrap Script Loaded wp_register_script('bootstrap', MUSICNIGHT_PATH.'/js/bootstrap.min.js', array('jquery'), '1.0', true); wp_localize_script('bootstrap', 'ajax_var', array('url' => admin_url('admin-ajax.php'),'nonce' => wp_create_nonce('ajax-nonce'),'KODEPATH' => MUSICNIGHT_PATH)); wp_enqueue_script('bootstrap'); wp_register_script('acordion', MUSICNIGHT_PATH.'/framework/include/frontend_assets/default/js/jquery_accordion.js', false, '1.0', true); wp_enqueue_script('acordion'); if(isset($musicnight_theme_option['enable-one-page-header-navi']) && $musicnight_theme_option['enable-one-page-header-navi'] == 'enable'){ wp_enqueue_script('singlepage', MUSICNIGHT_PATH.'/framework/include/frontend_assets/default/js/jquery.singlePageNav.js', array('jquery'), '1.0', true); } if( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'portfolio-slider',array('slider-type', 'type-3')) || ( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'album',array('album-view', 'album-slider','album-slider-mode','horizontal') ) ) || ( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'events' ) ) || ( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'events' ) ) ){ wp_register_script('owl_carousel', MUSICNIGHT_PATH.'/framework/include/frontend_assets/owl_carousel/owl_carousel.js', false, '1.0', true); wp_enqueue_script('owl_carousel'); wp_enqueue_style( 'owl_carousel', MUSICNIGHT_PATH . '/framework/include/frontend_assets/owl_carousel/owl_carousel.css' ); ////Owl Carousel Slider For Portfolio Slider } if( ( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'team') )|| ( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'testimonial-slider' ) ) || ( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'events' ) ) || ( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'album',array('album-view', 'album-slider') ) ) || ( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'testimonial', array('album-view', 'album-slider','album-slider-mode','vertical')) )|| is_single() ){ wp_register_script('musicforest-church-slick', MUSICNIGHT_PATH.'/framework/include/frontend_assets/slick/slick.min.js', false, '1.0', true); wp_enqueue_script('musicforest-church-slick'); wp_enqueue_style( 'musicforest-church-slick', MUSICNIGHT_PATH . '/framework/include/frontend_assets/slick/slick.css' ); //owl slider css wp_enqueue_style( 'musicforest-church-slick-theme', MUSICNIGHT_PATH . '/framework/include/frontend_assets/slick/slick-theme.css' ); //owl slider css } if( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'portfolio', array('portfolio-style', 'portfolio-filterable'))){ wp_register_script('filterizr', MUSICNIGHT_PATH.'/js/jquery.filterizr.js', false, '1.0', true); wp_enqueue_script('filterizr'); } wp_register_script('nice-select', MUSICNIGHT_PATH.'/js/nice_select_min.js', false, '1.0', true); wp_enqueue_script('nice-select'); wp_enqueue_style( 'musicforest-nice-select', MUSICNIGHT_PATH . '/css/nice-select.css' ); //owl slider css if(is_singular('event')){ if(!empty($musicnight_theme_option['google-map-api'])){ wp_enqueue_script('kf-gomap-api', '//maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places&key='.esc_attr($musicnight_theme_option['google-map-api']).''); } } wp_register_script('custom_downcount', MUSICNIGHT_PATH.'/framework/include/frontend_assets/default/js/jquery-downcount.js', false, '1.0', true); wp_enqueue_script('custom_downcount'); if(isset($musicnight_theme_option['enable-responsive-mode'])){ if($musicnight_theme_option['enable-responsive-mode'] == 'enable'){ wp_enqueue_style( 'musicforest-church-responsive', MUSICNIGHT_PATH . '/css/responsive.css' ); //Responsive CSS } } if(is_singular('event')){ wp_register_script('custom_countdown', MUSICNIGHT_PATH.'/framework/include/frontend_assets/default/js/custom_countdown.js', false, '1.0', true); wp_enqueue_script('custom_countdown'); wp_enqueue_style( 'custom_countdown', MUSICNIGHT_PATH . '/framework/include/frontend_assets/default/css/custom_countdown.css' ); //owl slider css wp_enqueue_script('owl_carousel', MUSICNIGHT_PATH.'/framework/include/frontend_assets/owl_carousel/owl_carousel.js', array('jquery'), '1.0', true); wp_enqueue_style( 'owl_carousel', MUSICNIGHT_PATH . '/framework/include/frontend_assets/owl_carousel/owl_carousel.css' ); //OWL Carousel For Player Slider } if(is_singular('event')){ wp_register_script('custom_countdown', MUSICNIGHT_PATH.'/framework/include/frontend_assets/default/js/custom_countdown.js', false, '1.0', true); wp_enqueue_script('custom_countdown'); wp_enqueue_style( 'custom_countdown', MUSICNIGHT_PATH . '/framework/include/frontend_assets/default/css/custom_countdown.css' ); //owl slider css wp_enqueue_script('owl_carousel', MUSICNIGHT_PATH.'/framework/include/frontend_assets/owl_carousel/owl_carousel.js', array('jquery'), '1.0', true); wp_enqueue_style( 'owl_carousel', MUSICNIGHT_PATH . '/framework/include/frontend_assets/owl_carousel/owl_carousel.css' ); //OWL Carousel For Player Slider } // Product Slider if( (is_singular('post')) || ( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'blog') ) ){ wp_enqueue_script('owl_carousel', MUSICNIGHT_PATH.'/framework/include/frontend_assets/owl_carousel/owl_carousel.js', array('jquery'), '1.0', true); wp_enqueue_style( 'owl_carousel', MUSICNIGHT_PATH . '/framework/include/frontend_assets/owl_carousel/owl_carousel.css' ); //OWL Carousel For Player Slider } wp_enqueue_script('custom_downcount', MUSICNIGHT_PATH.'/framework/include/frontend_assets/default/js/jquery-downcount.js',array('jquery'), '1.0', true); wp_enqueue_script('ajax-upload', MUSICNIGHT_PATH.'/js/ajax-upload.js',array('jquery'), '1.0', true); //Ajax Js if( is_search() || is_archive() || ( empty($musicnight_theme_option['enable-flex-slider']) || $musicnight_theme_option['enable-flex-slider'] != 'disable' ) || ( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'blog') ) || ( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'post-slider') ) || ( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'slider', array('slider-type', 'bxslider')) ) || ( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'our-clients') ) || ( is_single() && strpos($musicnight_post_option, '"post_media_type":"slider"') )|| ( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'slider', array('slider-type', 'flexslider'))) ) { wp_enqueue_style( 'bx-slider', MUSICNIGHT_PATH . '/framework/include/frontend_assets/bxslider/bxslider.css' ); //BX Slider CSS wp_enqueue_script('bx-slider', MUSICNIGHT_PATH.'/framework/include/frontend_assets/bxslider/jquery.bxslider.js',array('jquery'), '1.0', true); wp_enqueue_style( 'flexslider', MUSICNIGHT_PATH . '/framework/include/frontend_assets/flexslider/flexslider.css' ); //Flex Slider CSS for Slider Type wp_enqueue_script('flexslider', MUSICNIGHT_PATH.'/framework/include/frontend_assets/flexslider/jquery.flexslider.js',array('jquery'), '1.0', true); } wp_enqueue_script('waypoints', MUSICNIGHT_PATH.'/framework/include/frontend_assets/default/js/waypoints-min.js',array('jquery'), '1.0', true); wp_enqueue_script('bg-moving', MUSICNIGHT_PATH.'/framework/include/frontend_assets/default/js/bg-moving.js',array('jquery'), '1.0', true); if( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'feature-campaign' ) ){ wp_enqueue_style( 'jQuery-progressbar', MUSICNIGHT_PATH . '/css/jQuery-plugin-progressbar.css' ); //Flex Slider CSS for Slider Type wp_enqueue_script('plugin-progressbar', MUSICNIGHT_PATH.'/js/jQuery-plugin-progressbar.js',array('jquery'), '1.0', true); } //Enable RTL if(isset($musicnight_theme_option['enable-rtl-layout'])){ if($musicnight_theme_option['enable-rtl-layout'] == 'enable'){ wp_enqueue_style( 'rtl', MUSICNIGHT_PATH . '/css/rtl.css' ); //RTL layout } } if( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'wrapper', 'full-size-wrapper', array('type', 'video')) ){ wp_register_script('video', MUSICNIGHT_PATH.'/framework/include/frontend_assets/video_background/video.js',array('jquery'), '1.0', true); wp_enqueue_script('video'); wp_enqueue_script('bigvideo', MUSICNIGHT_PATH.'/framework/include/frontend_assets/video_background/bigvideo.js',array('jquery'), '1.0', true); } if( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'stripe-payment' ) ){ wp_register_script('stripe', 'https://js.stripe.com/v2/', false, '1.0', false); wp_enqueue_script('stripe'); //Stripe Payment Method } if( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'campaign', array('campaign-style', 'simple-view'))|| is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'ignitiondeck') ){ wp_enqueue_script('pie', MUSICNIGHT_PATH.'/framework/include/frontend_assets/default/js/pie.js',array('jquery'), '1.0', true); } if( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'paymill-payment' ) ){ wp_register_script('paymill', 'https://bridge.paymill.com/', false, '1.0', false); wp_enqueue_script('paymill'); //Paymill Payment Method } if( (is_page() && (musicnight_match_page_builder($musicnight_content_raw, 'item', 'gallery') || musicnight_match_page_builder($musicnight_content_raw, 'item', 'video-item')))|| ( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'call-to-action', array('style', 'style-5')) )|| ( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'campaign') )|| ( is_single() ) || ( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'what-we-offer') )|| ( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'blog-full') ) || ( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'post-slider') ) || ( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'ignitiondeck') ) ){ wp_enqueue_style( 'prettyphoto', MUSICNIGHT_PATH . '/framework/include/frontend_assets/default/css/prettyphoto.css' ); //Prettyphoto wp_enqueue_script('prettyphoto', MUSICNIGHT_PATH.'/framework/include/frontend_assets/default/js/jquery.prettyphoto.js',array('jquery'), '1.0', true); wp_enqueue_script('prettypp', MUSICNIGHT_PATH.'/framework/include/frontend_assets/default/js/pp.js',array('jquery'), '1.0', true); } if( is_page() && musicnight_match_page_builder($musicnight_content_raw, 'item', 'gallery',array('style', 'gallery-slider')) ){ wp_register_script('owl_carousel', MUSICNIGHT_PATH.'/framework/include/frontend_assets/owl_carousel/owl_carousel.js', false, '1.0', true); wp_enqueue_script('owl_carousel'); wp_enqueue_style( 'owl_carousel', MUSICNIGHT_PATH . '/framework/include/frontend_assets/owl_carousel/owl_carousel.css' ); //owl slider css } wp_enqueue_script('easing', MUSICNIGHT_PATH.'/framework/include/frontend_assets/jquery.easing.js',array('jquery'), '1.0', true); //Jquery Easing wp_enqueue_script('musicforest-church-functions', MUSICNIGHT_PATH.'/js/functions.js',false ,'1.0', true); // Custom Js Functions } } // set the global variable based on the opened page, post, ... add_action('wp', 'musicnight_define_global_variable'); if( !function_exists('musicnight_define_global_variable') ){ function musicnight_define_global_variable(){ global $post; if( is_page() ){ global $musicnight_content_raw,$musicnight_post_option; $musicnight_content_raw = json_decode(musicnight_decode_stopbackslashes(get_post_meta(get_the_ID(), 'musicnight_content', true)), true); $musicnight_content_raw = (empty($musicnight_content_raw))? array(): $musicnight_content_raw; $musicnight_post_option = musicnight_decode_stopbackslashes(get_post_meta($post->ID, 'post-option', true)); }else if( is_single() || (!empty($post)) ){ global $musicnight_post_option; $musicnight_post_option = musicnight_decode_stopbackslashes(get_post_meta($post->ID, 'post-option', true)); } } }
| ver. 1.4 |
Github
|
.
| PHP 8.0.30 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка