File: /home/vmasmheia229/domains/cindymuscarello.com/html/wp-content/themes/kathy/includes/assets.php
<?php
/**
* Collection of the functions for loading JS and CSS in the theme
*
* @since 1.0.0
*/
if ( ! function_exists( 'kathy_load_theme_assets' ) ) {
function kathy_load_theme_assets() {
kathy_load_theme_css();
kathy_load_theme_js();
}
}
if ( ! function_exists( 'kathy_load_theme_css' ) ) {
function kathy_load_theme_css() {
// Enqueue all CSS
wp_enqueue_style( 'kathy-google-fonts', kathy_get_google_fonts_url(), array(), null );
wp_enqueue_style( 'ionicon', get_template_directory_uri() . '/css/ionicons.min.css', array(), null );
wp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css', array(), null );
wp_enqueue_style( 'jquery-mmenu', get_template_directory_uri() . '/css/jquery.mmenu.all.css', array(), null );
wp_enqueue_style( 'jquery-fancybox', get_template_directory_uri() . '/css/jquery.fancybox.css', array(), null );
wp_enqueue_style( 'jquery-fancybox-helpers-thumbs', get_template_directory_uri() . '/css/fancybox/helpers/jquery.fancybox-thumbs.css', array(), null );
wp_enqueue_style( 'jquery-fancybox-helpers-buttons', get_template_directory_uri() . '/css/fancybox/helpers/jquery.fancybox-buttons.css', array(), null );
wp_enqueue_style( 'kathy-theme', get_template_directory_uri() . '/style.css', array(), kathy_get_theme_version() );
}
}
if ( ! function_exists( 'kathy_load_theme_js' ) ) {
function kathy_load_theme_js() {
wp_enqueue_script( 'modernizr', get_template_directory_uri() . '/js/modernizr-custom.js', array( 'jquery' ), null );
wp_enqueue_script( 'superfish', get_template_directory_uri() . '/js/superfish.min.js', array( 'jquery' ), null, true );
wp_enqueue_script( 'jquery-fitvids', get_template_directory_uri() . '/js/jquery.fitvids.js', array( 'jquery' ), null, true );
wp_enqueue_script( 'jquery-mmenu', get_template_directory_uri() . '/js/jquery.mmenu.all.min.js', array( 'jquery' ), null, true );
wp_enqueue_script( 'jquery-fancybox', get_template_directory_uri() . '/js/jquery.fancybox.pack.js', array( 'jquery' ), null, true );
wp_enqueue_script( 'jquery-fancybox-helpers-thumbs', get_template_directory_uri() . '/js/fancybox-helpers/jquery.fancybox-thumbs.js', array( 'jquery' ), null, true );
wp_enqueue_script( 'jquery-fancybox-helpers-buttons', get_template_directory_uri() . '/js/fancybox-helpers/jquery.fancybox-buttons.js', array( 'jquery' ), null, true );
wp_enqueue_script( 'imagesloaded', get_template_directory_uri() . '/js/imagesloaded.pkgd.min.js', array( 'jquery' ), null, true );
wp_enqueue_script( 'jquery-flex-images', get_template_directory_uri() . '/js/jquery.flex-images.js', array( 'jquery' ), null, true );
wp_enqueue_script( 'jquery-easing', get_template_directory_uri() . '/js/jquery.easing.js', array( 'jquery' ), null, true );
wp_enqueue_script( 'kathy-theme', get_template_directory_uri() . '/js/kathy.js', array( 'jquery' ), kathy_get_theme_version(), true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
$params = array(
'clear_text' => esc_html__( 'Clear', 'kathy' ),
'justified_images_row_height' => intval( get_theme_mod( 'kathy_ctmzr_portfolio_grid_max_row_height', 350 ) ),
'modal_search_input_text' => get_theme_mod( 'kathy_ctmzr_search_placeholder_text', esc_html__( 'Type and hit enter', 'kathy' ) ),
'show_search_button' => get_theme_mod( 'kathy_ctmzr_general_options_show_search_button', false ),
'enable_lightbox_wp_gallery' => get_theme_mod( 'kathy_ctmzr_general_options_enable_lightbox_wp_images', true ),
'lightbox_error_text' => esc_attr__( 'The requested content cannot be loaded. Please try again later.', 'kathy' ),
'lightbox_next_text' => esc_attr__( 'Next', 'kathy' ),
'lightbox_prev_text' => esc_attr__( 'Previous', 'kathy' ),
'lightbox_close_text' => esc_attr__( 'Close', 'kathy' ),
'lightbox_start_slide_text' => esc_attr__( 'Start slideshow', 'kathy' ),
'lightbox_pause_slide_text' => esc_attr__( 'Pause slideshow', 'kathy' ),
'lightbox_toggle_size_text' => esc_attr__( 'Toggle size', 'kathy' ),
);
wp_localize_script( 'kathy-theme', 'ThemeOptions', $params );
}
}
if ( ! function_exists( 'kathy_load_admin_assets' ) ) {
function kathy_load_admin_assets( $page ) {
wp_enqueue_style( 'kathy-google-fonts', kathy_get_google_fonts_url(), array(), null );
wp_enqueue_style( 'ionicon', get_template_directory_uri() . '/css/ionicons.min.css', array(), null );
if ( 'post.php' === $page || 'post-new.php' === $page ) {
wp_enqueue_style( 'kathy-admin', get_template_directory_uri() . '/css/admin.css', array(), null );
}
}
}
if ( ! function_exists( 'kathy_load_customizer_assets' ) ) {
function kathy_load_customizer_assets() {
wp_enqueue_style( 'kathy-customizer', get_template_directory_uri() . '/css/customizer.css', array(), null );
}
}