diff -r 346c88efed21 -r 5e2f62d02dcd wp/wp-content/themes/twentytwelve/functions.php --- a/wp/wp-content/themes/twentytwelve/functions.php Mon Jun 08 16:11:51 2015 +0000 +++ b/wp/wp-content/themes/twentytwelve/functions.php Tue Jun 09 03:35:32 2015 +0200 @@ -6,8 +6,8 @@ * in the theme as custom template tags. Others are attached to action and * filter hooks in WordPress to change core functionality. * - * When using a child theme (see http://codex.wordpress.org/Theme_Development and - * http://codex.wordpress.org/Child_Themes), you can override certain functions + * When using a child theme (see https://codex.wordpress.org/Theme_Development and + * https://codex.wordpress.org/Child_Themes), you can override certain functions * (those wrapped in a function_exists() call) by defining them first in your child theme's * functions.php file. The child theme's functions.php file is included before the parent * theme's file, so the child theme functions would be used. @@ -15,7 +15,7 @@ * Functions that are not pluggable (not wrapped in function_exists()) are instead attached * to a filter or action hook. * - * For more information on hooks, actions, and filters, @link http://codex.wordpress.org/Plugin_API + * For more information on hooks, actions, and filters, @link https://codex.wordpress.org/Plugin_API * * @package WordPress * @subpackage Twenty_Twelve @@ -128,8 +128,6 @@ * Enqueue scripts and styles for front-end. * * @since Twenty Twelve 1.0 - * - * @return void */ function twentytwelve_scripts_styles() { global $wp_styles; @@ -142,7 +140,7 @@ wp_enqueue_script( 'comment-reply' ); // Adds JavaScript for handling the navigation menu hide-and-show behavior. - wp_enqueue_script( 'twentytwelve-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '1.0', true ); + wp_enqueue_script( 'twentytwelve-navigation', get_template_directory_uri() . '/js/navigation.js', array( 'jquery' ), '20140711', true ); $font_url = twentytwelve_get_font_url(); if ( ! empty( $font_url ) ) @@ -203,7 +201,7 @@ return $title; // Add the site name. - $title .= get_bloginfo( 'name' ); + $title .= get_bloginfo( 'name', 'display' ); // Add the site description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); @@ -211,7 +209,7 @@ $title = "$title $sep $site_description"; // Add a page number if necessary. - if ( $paged >= 2 || $page >= 2 ) + if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) $title = "$title $sep " . sprintf( __( 'Page %s', 'twentytwelve' ), max( $paged, $page ) ); return $title; @@ -281,14 +279,12 @@ function twentytwelve_content_nav( $html_id ) { global $wp_query; - $html_id = esc_attr( $html_id ); - if ( $wp_query->max_num_pages > 1 ) : ?> - get_setting( 'blogname' )->transport = 'postMessage'; @@ -501,10 +490,8 @@ * Binds JS handlers to make the Customizer preview reload changes asynchronously. * * @since Twenty Twelve 1.0 - * - * @return void */ function twentytwelve_customize_preview_js() { - wp_enqueue_script( 'twentytwelve-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20130301', true ); + wp_enqueue_script( 'twentytwelve-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20141120', true ); } add_action( 'customize_preview_init', 'twentytwelve_customize_preview_js' );