$ver, true ); } // Prevent TieLabs shortcodes plugin from loading its JS and CSS files add_filter( 'tie_plugin_shortcodes_enqueue_assets', '__return_false' ); } /* * Enqueue Main Scripts */ add_action( 'wp_enqueue_scripts', 'jannah_enqueue_scripts', 20 ); function jannah_enqueue_scripts(){ // Scripts wp_enqueue_script( 'tie-scripts' ); // Add support for CSS vars to the Legact Browsers //wp_enqueue_script( 'tie-js-css-vars-ponyfill' ); // LightBox if( tie_get_option( 'lightbox_all' ) || ( tie_get_option( 'footer_instagram' ) && tie_get_option( 'footer_instagram_media_link' ) == 'file' ) ){ wp_enqueue_script( 'tie-js-ilightbox' ); } // Shortcodes if( TIELABS_EXTENSIONS_IS_ACTIVE ){ wp_enqueue_script( 'tie-js-shortcodes' ); } // Desktop only scripts if( ! tie_is_mobile() ){ wp_enqueue_script( 'tie-js-desktop' ); // Live search if( tie_menu_has_search( 'top_nav', true ) || tie_menu_has_search( 'main_nav', true ) ){ wp_enqueue_script( 'tie-js-livesearch' ); } } // Mobile // else{ // Always load the file even on desktop if( tie_get_option( 'mobile_header_components_search') && tie_get_option( 'mobile_header_live_search') ){ wp_enqueue_script( 'tie-js-livesearch' ); } //} // Single pages with no builder if( is_singular() && ! TIELABS_HELPER::has_builder() ){ // Single.js wp_enqueue_script( 'tie-js-single' ); // Queue Comments reply js if ( comments_open() && get_option('thread_comments') ){ wp_enqueue_script( 'comment-reply' ); } } } /* * Enqueue Styles */ add_action( 'wp_enqueue_scripts', 'jannah_enqueue_styles', 20 ); function jannah_enqueue_styles(){ wp_enqueue_style( 'tie-css-base' ); wp_enqueue_style( 'tie-css-styles' ); wp_enqueue_style( 'tie-css-widgets' ); wp_enqueue_style( 'tie-css-helpers' ); wp_enqueue_style( 'tie-fontawesome5' ); if( tie_get_option( 'lightbox_all' ) || ( tie_get_option( 'footer_instagram' ) && tie_get_option( 'footer_instagram_media_link' ) == 'file' ) ){ wp_enqueue_style( 'tie-css-ilightbox' ); } if( TIELABS_EXTENSIONS_IS_ACTIVE ){ wp_enqueue_style( 'tie-css-shortcodes' ); } // Single pages with no builder if( ( is_singular() && ! TIELABS_HELPER::has_builder() ) || ( TIELABS_BBPRESS_IS_ACTIVE && is_bbpress() ) ){ // Single page styling wp_enqueue_style( 'tie-css-single' ); // Print File wp_enqueue_style( 'tie-css-print' ); } } /** * Demos */ add_filter( 'TieLabs/Demo_Importer/demos_data', 'jannah_demo_importer_data' ); function jannah_demo_importer_data( $demos_data = false ){ if( ! empty( $demos_data ) || tie_get_token() ){ return $demos_data; } // -- $demos = array( 'demo' => 'Main Demo', 'tech' => 'Tech', 'sport' => 'Sport', 'auto' => 'Auto', 'creative' => 'Creative', 'foods' => 'Recipes & Tips', 'times' => 'Times', 'photography' => 'Photography', 'hotels' => 'Hotels', 'health' => 'Health', 'house' => 'House', 'videos' => 'Videos', 'videos-2' => 'Videos 2', 'pets' => 'Pets', 'travel' => 'Travel', 'traveling' => 'Traveling', 'science' => 'Science', 'blog' => 'Personal Blog', 'minimal-blog' => 'Minimal Blog', 'city' => 'City', 'school' => 'school', 'games' => 'Games', 'geo' => 'Geo', 'cryptocurrency' => 'Cryptocurrency', 'salad-dash' => 'Salad Dash', 'fitness' => 'Fitness', 'seo' => 'SEO', ); $demos_data = array(); foreach ( $demos as $slug => $name ) { $demos_data[] = array( 'name' => $name, 'url' => 'https://jannah.tielabs.com/'.$slug, 'img' => TIELABS_TEMPLATE_URL ."/framework/admin/assets/images/demos-thumbnails/$slug.jpg", 'desc' => '', 'xml' => '-', 'settings' => '-', ); } return $demos_data; } /** * Plugins */ add_filter( 'TieLabs/Plugins_Installer/data', 'jannah_plugins_installer_data' ); function jannah_plugins_installer_data( $plugins_data = false ){ if( ! empty( $plugins_data ) || tie_get_token() ){ return $plugins_data; } return array( 'taqyeem' => array( 'name' => 'Taqyeem', 'slug' => 'taqyeem-tie_sample', 'source' => '-', ), 'jannah-extensions' => array( 'name' => 'Jannah Extensions', 'slug' => 'jannah-extensions-tie_sample', 'source' => '-', ), 'arqam-lite' => array( 'name' => 'Arqam Lite', 'slug' => 'arqam-lite-tie_sample', 'source' => '-', ), 'jannah-switcher' => array( 'name' => 'Jannah Switcher', 'slug' => 'jannah-switcher-tie_sample', 'source' => '-', ), 'jannah-optimization' => array( 'name' => 'Jannah Speed Optimization', 'slug' => 'jannah-optimization-tie_sample', 'source' => '-', ), 'tielabs-instagram' => array( 'name' => 'TieLabs Instagram Feed', 'slug' => 'tielabs-instagram-tie_sample', 'source' => '-', ), 'jannah-autoload-posts' => array( 'name' => 'Jannah Autoload Posts', 'slug' => 'jannah-autoload-posts-tie_sample', 'source' => '-', ), ); }