Hi guys,
Recently I got an soft reject for including jQuery library
(There is no need to use the function wp_enqueue_script just to insert jQuery, since jQuery can be called for those scripts which need it passing the argument array(‘jquery’).
Actually I loaded default WP jQuery adding this
wp_enqueue_script('jquery', false, array(), false, false);
and I don’t understand what is the reason for the issue.
To be more clear my all code for this looks like this
[code] function twice_register_scripts() {
// Register scripts
// Load jquery UI
wp_enqueue_script(‘jqueryui’, “http” . ($_SERVER[‘SERVER_PORT’] == 443 ? “s” : “”) . “://ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js”);
// Load jquery easing
wp_enqueue_script(‘jqueryeasing’, “http” . ($_SERVER[‘SERVER_PORT’] == 443 ? “s” : “”) . “://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js”);
// Load google maps
wp_enqueue_script(‘googlemaps’, “http” . ($_SERVER[‘SERVER_PORT’] == 443 ? “s” : “”) . “://maps.googleapis.com/maps/api/js?key=AIzaSyBRCgZMCcdX8MRtcwXtO82MagwRvWBb3RY”);
/* Load comments script */
if ( is_singular() && comments_open() && get_option(‘thread_comments’) )
wp_enqueue_script(‘comment-reply’);
wp_enqueue_script(‘jquery’, false, array(), false, false);
/* Media element & player script /
wp_enqueue_script(‘html5media’, get_template_directory_uri() . ‘/js/mediaelement-and-player.min.js’);
/ Masonry script /
wp_enqueue_script(‘masonry’, get_template_directory_uri() . ‘/js/jquery.masonry.min.js’);
/ ImagesLoaded script /
wp_enqueue_script(‘imagesloaded’, get_template_directory_uri() . ‘/js/imagesloaded.js’);
/ Bootstrap script */
wp_enqueue_script(‘bootstrapjs’, get_template_directory_uri() . ‘/js/bootstrap.min.js’);
}
add_action(‘wp_enqueue_scripts’,‘twice_register_scripts’);
[/code]
Thanks