File "js.php"

Full Path: /home/cabizcok/public_html/wp-content/themes/renax/includes/js.php
File size: 5.28 KB
MIME-type: text/x-php
Charset: utf-8

<?php
if( !function_exists ('renax_enqueue_scripts') ) :
	function renax_enqueue_scripts() {
		$renax_options = get_option('renax');
		$renax_protocol = is_ssl() ? 'https' : 'http';
		wp_enqueue_script('migrate', (RENAX_THEME_URL . '/includes/js/jquery-migrate-3.4.1.min.js'), array('jquery'), RENAX_THEME_VERSION,true);
		wp_enqueue_script('modernizr', (RENAX_THEME_URL . '/includes/js/modernizr-2.6.2.min.js'), array('jquery'), RENAX_THEME_VERSION,true);
		wp_register_script('imagesloaded', (RENAX_THEME_URL . '/includes/js/imagesloaded.pkgd.min.js'), array('jquery'), RENAX_THEME_VERSION,true);
		wp_register_script('isotope', (RENAX_THEME_URL . '/includes/js/jquery.isotope.v3.0.2.js'), array('jquery'), RENAX_THEME_VERSION,true);
		wp_register_script('packery-mode', (RENAX_THEME_URL . '/includes/js/packery-mode.pkgd.min.js'), array('jquery'), RENAX_THEME_VERSION,true);
		wp_register_script('car-cat-load-more', (RENAX_THEME_URL . '/includes/js/car-cat-load-more.js'), array('jquery'), RENAX_THEME_VERSION,true);
		wp_enqueue_script('popper', (RENAX_THEME_URL . '/includes/js/popper.min.js'), array('jquery'), RENAX_THEME_VERSION,true);
		wp_enqueue_script('bootstrap', (RENAX_THEME_URL . '/includes/js/bootstrap.min.js'), array('jquery'), RENAX_THEME_VERSION,true);
		wp_enqueue_script('scrollit', (RENAX_THEME_URL . '/includes/js/scrollIt.min.js'), array('jquery'), RENAX_THEME_VERSION,true);
		wp_enqueue_script('waypoints', (RENAX_THEME_URL . '/includes/js/jquery.waypoints.min.js'), array('jquery'), RENAX_THEME_VERSION,true);
		wp_enqueue_script('owl', (RENAX_THEME_URL . '/includes/js/owl.carousel.min.js'), array('jquery'), RENAX_THEME_VERSION,true);
		wp_enqueue_script('stellar', (RENAX_THEME_URL . '/includes/js/jquery.stellar.min.js'), array('jquery'), RENAX_THEME_VERSION,true);
		wp_enqueue_script('magnific-popup', (RENAX_THEME_URL . '/includes/js/jquery.magnific-popup.js'), array('jquery'), RENAX_THEME_VERSION,true);
		wp_enqueue_script('youtubepopup', (RENAX_THEME_URL . '/includes/js/YouTubePopUp.js'), array('jquery'), RENAX_THEME_VERSION,true);
		if (class_exists('WooCommerce')) {
			if (is_checkout() || is_product_category() || is_woocommerce() || is_shop() || is_singular($post_types = 'product')) { 
			wp_enqueue_script('renax-select2-main', (RENAX_THEME_URL . '/includes/js/select2.js'), array('jquery'), RENAX_THEME_VERSION,true);
			wp_enqueue_script('renax-select2', (RENAX_THEME_URL . '/includes/js/renax-select2.js'), array('jquery'), RENAX_THEME_VERSION,true);
			}
		}
		wp_register_script('renax-select2', (RENAX_THEME_URL . '/includes/js/select2.js'), array('jquery'), RENAX_THEME_VERSION,true);
		wp_register_script('renax-search-select2', (RENAX_THEME_URL . '/includes/js/renax-search-select2.js'), array('jquery'), RENAX_THEME_VERSION,true);
		wp_register_script('renax-datepicker', (RENAX_THEME_URL . '/includes/js/datepicker.js'), array('jquery'), RENAX_THEME_VERSION,true);
		if (Renax_AfterSetupTheme::return_thme_option('site_preloader')!='st2'){
			if (Renax_AfterSetupTheme::return_thme_option('opt_preloader_style')=='st2'){
			wp_enqueue_script('renax-preloader-2', (RENAX_THEME_URL . '/includes/js/renax-preloader-2.js'), array('jquery'), RENAX_THEME_VERSION,true);
			}
			else {
			wp_enqueue_script('renax-preloader-1', (RENAX_THEME_URL . '/includes/js/renax-preloader-1.js'), array('jquery'), RENAX_THEME_VERSION,true);
			}
		}
		wp_enqueue_script('sliding-menu', (RENAX_THEME_URL . '/includes/js/sliding-menu-min.js'), array('jquery'), RENAX_THEME_VERSION,true);
		wp_enqueue_script('headroom', (RENAX_THEME_URL . '/includes/js/headroom.min.js'), array('jquery'), RENAX_THEME_VERSION,true);
		wp_enqueue_script('renax-mobile-menu', (RENAX_THEME_URL . '/includes/js/renax-mobile-menu.js'), array('jquery'), RENAX_THEME_VERSION,true);
		wp_enqueue_script('sliding-menu', (RENAX_THEME_URL . '/includes/js/sliding-menu-min.js'), array('jquery'), RENAX_THEME_VERSION,true);
		wp_enqueue_script('renax-custom', (RENAX_THEME_URL . '/includes/js/custom.js'), array('jquery'), RENAX_THEME_VERSION,true);
		//wp_enqueue_script('renax-is-mobile', (RENAX_THEME_URL . '/includes/js/renax-is-mobile.js'), array('jquery'), RENAX_THEME_VERSION,true);
		wp_register_script('renax-scrollto-script', (RENAX_THEME_URL . '/includes/js/scrollto-script.js'), array('jquery'), RENAX_THEME_VERSION,true);
		wp_register_script('renax-vegas', (RENAX_THEME_URL . '/includes/js/vegas.slider.min.js'), array('jquery'), RENAX_THEME_VERSION,true);
		wp_register_script('renax-tweenmax', (RENAX_THEME_URL . '/includes/js/tweenmax.min.js'), array('jquery'), RENAX_THEME_VERSION,true);
		wp_register_script('renax-custom-cursor', (RENAX_THEME_URL . '/includes/js/renax-custom-cursor.js'), array('jquery'), RENAX_THEME_VERSION,true);
		wp_register_script('renax-shop-slider', (RENAX_THEME_URL . '/includes/js/renax-shop-slider.js'), array('jquery'), RENAX_THEME_VERSION,true);
		if ( !is_user_logged_in()) {
			if (Renax_AfterSetupTheme::return_thme_option('content_protector')=='st2'){
				wp_enqueue_script('renax-content-protector', (RENAX_THEME_URL . '/includes/js/content-protector.js'), array('jquery'), '1.0',true);
			}
		}
		if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
			wp_enqueue_script( 'comment-reply' );
		}
	}
	add_action('wp_enqueue_scripts', 'renax_enqueue_scripts');
endif;