/** * Adds comment reply and navigation menu scripts to the head of the document. * * Child themes should use wp_dequeue_scripts to remove individual scripts. * Larger changes can be made using the override. * * Override: childtheme_override_head_scripts <br> * * For Reference: {@link http://users.tpg.com.au/j_birch/plugins/superfish/#getting-started Superfish Jquery Plugin} * * @since 1.0 */ function thematic_head_scripts() { // load comment reply script on posts and pages when option is set and check for deprecated filter if (is_singular() && comments_open() && get_option('thread_comments')) { has_filter('thematic_show_commentreply') ? thematic_show_commentreply() : wp_enqueue_script('comment-reply'); } // load jquery and superfish associated plugins when theme support is active if (current_theme_supports('thematic_superfish')) { $scriptdir = get_template_directory_uri(); $scriptdir .= '/library/scripts/'; wp_enqueue_script('jquery'); wp_deregister_script('hoverIntent'); wp_enqueue_script('hoverIntent', includes_url('js/hoverIntent.js'), array('jquery'), false, true); wp_enqueue_script('superfish', $scriptdir . 'superfish.js', array('jquery'), '1.4.8', true); wp_enqueue_script('supersubs', $scriptdir . 'supersubs.js', array('jquery'), '0.2b', true); wp_enqueue_script('thematic-dropdowns', apply_filters('thematic_dropdown_options', $scriptdir . 'thematic-dropdowns.js'), array('jquery', 'superfish'), '1.0', true); } }
// Creating the robots tags thematic_show_robots(); // Creating the canonical URL thematic_canonical_url(); // Loading the stylesheet thematic_create_stylesheet(); if (THEMATIC_COMPATIBLE_FEEDLINKS) { // Creating the internal RSS links thematic_show_rss(); // Creating the comments RSS links thematic_show_commentsrss(); } // Creating the pingback adress thematic_show_pingback(); // Enables comment threading thematic_show_commentreply(); // Calling WordPress' header action hook wp_head(); ?> </head> <?php thematic_body(); // action hook for placing content before opening #wrapper thematic_before(); if (apply_filters('thematic_open_wrapper', true)) { echo '<div id="wrapper" class="hfeed">'; } // action hook for placing content above the theme header thematic_aboveheader();
/** * Adds comment reply and navigation menu scripts to the head of the document. * * Child themes should use wp_dequeue_scripts to remove individual scripts. * Larger changes can be made using the override. * * Override: childtheme_override_head_scripts <br> * * For Reference: {@link http://users.tpg.com.au/j_birch/plugins/superfish/#getting-started Superfish Jquery Plugin} * * @since 1.0.0 */ function thematic_head_scripts() { $template = wp_get_theme('thematic'); // load comment reply script on posts and pages when option is set and check for deprecated filter if (is_singular() && comments_open() && get_option('thread_comments')) { has_filter('thematic_show_commentreply') ? thematic_show_commentreply() : wp_enqueue_script('comment-reply'); } // load jquery and superfish associated plugins when theme support is active if (current_theme_supports('thematic_superfish')) { wp_enqueue_script('superfish', get_template_directory_uri() . '/library/js/superfish.min.js', array('jquery', 'hoverIntent'), '1.7.4', true); } // load theme javascript in footer wp_enqueue_script('thematic-js', get_template_directory_uri() . '/library/js/thematic.js', array('jquery'), $template->Version, true); $thematic_javascript_options = array('mobileMenuBreakpoint' => 600, 'superfish' => array('animation' => array('opacity' => 'show', 'height' => 'show'), 'hoverClass' => 'sfHover', 'pathClass' => 'overideThisToUse', 'pathLevels' => 1, 'delay' => 400, 'speed' => 'slow', 'cssArrows' => false, 'disableHI' => false)); /** * Filter the variables sent to wp_localize_script * * @since 2.0.0 * * @param array $thematic_javascript_options */ $thematic_javascript_options = apply_filters('thematic_javascript_options', $thematic_javascript_options); wp_localize_script('thematic-js', 'thematicOptions', $thematic_javascript_options); }