Пример #1
0
/**
 * Enqueue scripts and styles for admin pages.
 */
function beagency_admin_scripts()
{
    $screen = get_current_screen();
    if ($screen->id === 'themes' || $screen->id === 'update-core') {
        wp_enqueue_script('betheme-admin-script', get_template_directory_uri() . '/js/admin.js', array(), beagency_get_version(), true);
    }
    // Localize the script with new data.
    wp_localize_script('betheme-admin-script', 'admin_vars', array('upgrade_available' => esc_html__('Upgrade to Pro Version', 'beagency'), 'upgrade_info' => beagency_premium_info()));
}
Пример #2
0
/**
 * Enqueue scripts and styles.
 */
function beagency_scripts()
{
    wp_enqueue_style('beagency-bootstrap-style', get_template_directory_uri() . '/layouts/bootstrap.min.css', array(), '3.3.6');
    wp_enqueue_style('beagency-font-awesome-style', get_template_directory_uri() . '/layouts/font.awesome.min.css', array(), '4.5.0');
    wp_enqueue_style('beagency-magnific-popup-style', get_template_directory_uri() . '/layouts/magnific.popup.css', array(), '1.0.1');
    wp_enqueue_style('beagency-owl-carousel-style', get_template_directory_uri() . '/layouts/owl.carousel.min.css', array(), '2.0.0-beta.2.4');
    wp_enqueue_style('beagency-owl-carousel-theme-style', get_template_directory_uri() . '/layouts/owl.theme.default.min.css', array(), '2.0.0-beta.2.4');
    wp_enqueue_style('beagency-google-fonts', 'http://fonts.googleapis.com/css?family=Lato:300,400,400italic,600,700|Raleway:300,400,500,600,700s', array(), beagency_get_version());
    wp_enqueue_style('beagency-style', get_stylesheet_uri());
    wp_enqueue_style('beagency-responsive-style', get_template_directory_uri() . '/layouts/responsive.css', array(), beagency_get_version());
    wp_enqueue_script('beagency-jRespond-script', get_template_directory_uri() . '/js/jrespond.min.js', array(), '0.10', true);
    wp_enqueue_script('beagency-superfish-script', get_template_directory_uri() . '/js/superfish.min.js', array(), '1.7.7', true);
    wp_enqueue_script('beagency-imagesloaded-script', get_template_directory_uri() . '/js/imagesloaded.pkgd.min.js', array(), '4.0.0', true);
    wp_enqueue_script('beagency-isotope-script', get_template_directory_uri() . '/js/isotope.pkgd.min.js', array(), '2.2.2', true);
    wp_enqueue_script('beagency-easing-script', get_template_directory_uri() . '/js/jquery.easing.min.js', array(), '1.3.2', true);
    wp_enqueue_script('beagency-magnific-popup-script', get_template_directory_uri() . '/js/jquery.magnific.popup.min.js', array(), '1.0.1', true);
    wp_enqueue_script('beagency-owl-carousel-script', get_template_directory_uri() . '/js/owl.carousel.min.js', array(), '2.0.0-beta.2.4', true);
    wp_enqueue_script('beagency-smoothscroll-script', get_template_directory_uri() . '/js/smoothscroll.js', array(), '1.4.1', true);
    wp_enqueue_script('beagency-infinitescroll-script', get_template_directory_uri() . '/js/jquery.infinitescroll.min.js', array(), '2.1.0', true);
    wp_enqueue_script('beagency-app-script', get_template_directory_uri() . '/js/jquery.app.js', array('jquery'), beagency_get_version(), true);
    // Localize the script with new data.
    wp_localize_script('beagency-app-script', 'app_vars', array('ajax_url' => admin_url('admin-ajax.php')));
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
}