* Enqueue scripts and styles for front-end.
*
* @since Twenty Twelve 1.0
- *
- * @return void
*/
function twentytwelve_scripts_styles() {
global $wp_styles;
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 ) )
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' );
$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;
* Used as a callback by wp_list_comments() for displaying the comments.
*
* @since Twenty Twelve 1.0
- *
- * @return void
*/
function twentytwelve_comment( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
* Create your own twentytwelve_entry_meta() to override in a child theme.
*
* @since Twenty Twelve 1.0
- *
- * @return void
*/
function twentytwelve_entry_meta() {
// Translators: used between list items, there is a space after the comma.
* templates, and when there are no active widgets in the sidebar.
*
* @since Twenty Twelve 1.0
- *
- * @return void
*/
function twentytwelve_content_width() {
if ( is_page_template( 'page-templates/full-width.php' ) || is_attachment() || ! is_active_sidebar( 'sidebar-1' ) ) {
* @since Twenty Twelve 1.0
*
* @param WP_Customize_Manager $wp_customize Customizer object.
- * @return void
*/
function twentytwelve_customize_register( $wp_customize ) {
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
* 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 );