diff --git a/wp-content/themes/twentyten/functions.php b/wp-content/themes/twentyten/functions.php index 3e8fd3bd26..77d7b0a11a 100644 --- a/wp-content/themes/twentyten/functions.php +++ b/wp-content/themes/twentyten/functions.php @@ -215,6 +215,27 @@ function twentyten_admin_header_style() { } endif; +/** + * Enqueue scripts and styles. + * + * Hooked on priority 0 to make sure they are enqueued prior to dependent + * scripts/styles. This is only necessary because they were previously enqueued + * prior to wp_head() running, and we want to provide maximum + * backwards compatibility. + * + * @since Twenty Ten 1.6 + */ +function twentyten_scripts() { + wp_enqueue_style( 'twentyten', get_stylesheet_uri() ); + + /* We add some JavaScript to pages with the comment form + * to support sites with threaded comments (when in use). + */ + if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) + wp_enqueue_script( 'comment-reply' ); +} +add_action( 'wp_enqueue_scripts', 'twentyten_scripts', 0 ); + /** * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link. * diff --git a/wp-content/themes/twentyten/header.php b/wp-content/themes/twentyten/header.php index 41eaea52f1..f45c34b02b 100644 --- a/wp-content/themes/twentyten/header.php +++ b/wp-content/themes/twentyten/header.php @@ -14,15 +14,8 @@ <?php wp_title( '|', true, 'right' ); ?> - * tag of your theme, or you will break many plugins, which * generally use this hook to add elements to such