01.
add_action(
'wp_enqueue_scripts'
,
'generate_scripts'
);
02.
function
generate_scripts() {
03.
04.
05.
wp_enqueue_style(
'generate-style-grid'
, get_template_directory_uri() .
'/css/structure.css'
, false, GENERATE_VERSION,
'all'
);
06.
wp_enqueue_style(
'generate-style'
, get_template_directory_uri() .
'/style.css'
, false, GENERATE_VERSION,
'all'
);
07.
wp_enqueue_style(
'generate-mobile-style'
, get_template_directory_uri() .
'/css/mobile.css'
, false, GENERATE_VERSION,
'all'
);
08.
wp_add_inline_style(
'generate-style'
, generate_base_css() );
09.
if
( is_child_theme() ) :
10.
wp_enqueue_style(
'generate-child'
, get_stylesheet_uri(), true, GENERATE_VERSION,
'all'
);
11.
endif
;
12.
wp_enqueue_style(
'superfish'
, get_template_directory_uri() .
'/css/superfish.css'
, false, GENERATE_VERSION,
'all'
);
13.
wp_enqueue_style(
'fontawesome'
,
'//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css'
);
14.
15.
16.
wp_enqueue_script(
'generate-navigation'
, get_template_directory_uri() .
'/js/navigation.js'
,
array
(), GENERATE_VERSION, true );
17.
wp_enqueue_script(
'superfish'
, get_template_directory_uri() .
'/js/superfish.js'
,
array
(
'jquery'
), GENERATE_VERSION, true );
18.
wp_enqueue_script(
'hoverIntent'
, get_template_directory_uri() .
'/js/hoverIntent.js'
,
array
(
'superfish'
), GENERATE_VERSION, true );
19.
wp_enqueue_script(
'scripts'
, get_template_directory_uri() .
'/js/scripts.js'
,
array
(
'jquery'
), GENERATE_VERSION, true );
20.
21.
if
( is_singular() && comments_open() && get_option(
'thread_comments'
) ) {
22.
wp_enqueue_script(
'comment-reply'
);
23.
}
24.
25.
if
( is_singular() && wp_attachment_is_image() ) {
26.
wp_enqueue_script(
'generate-keyboard-image-navigation'
, get_template_directory_uri() .
'/js/keyboard-image-navigation.js'
,
array
(
'jquery'
),
'20120202'
);
27.
}
28.
}