X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/4713a14935b83517997f3c88f808eb41da55033d..caeaf8dc94b5e3f75dc98ec92dc7b76049cdddb6:/wp-content/themes/twentythirteen/functions.php diff --git a/wp-content/themes/twentythirteen/functions.php b/wp-content/themes/twentythirteen/functions.php index 2cfd20fe..5d0b0a38 100644 --- a/wp-content/themes/twentythirteen/functions.php +++ b/wp-content/themes/twentythirteen/functions.php @@ -72,7 +72,7 @@ function twentythirteen_setup() { * This theme styles the visual editor to resemble the theme style, * specifically font, colors, icons, and column width. */ - add_editor_style( array( 'css/editor-style.css', 'fonts/genericons.css', twentythirteen_fonts_url() ) ); + add_editor_style( array( 'css/editor-style.css', 'genericons/genericons.css', twentythirteen_fonts_url() ) ); // Adds RSS feed links to for posts and comments. add_theme_support( 'automatic-feed-links' ); @@ -170,13 +170,13 @@ function twentythirteen_scripts_styles() { wp_enqueue_script( 'jquery-masonry' ); // Loads JavaScript file with functionality specific to Twenty Thirteen. - wp_enqueue_script( 'twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '2014-03-18', true ); + wp_enqueue_script( 'twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '2014-06-08', true ); // Add Source Sans Pro and Bitter fonts, used in the main stylesheet. wp_enqueue_style( 'twentythirteen-fonts', twentythirteen_fonts_url(), array(), null ); // Add Genericons font, used in the main stylesheet. - wp_enqueue_style( 'genericons', get_template_directory_uri() . '/fonts/genericons.css', array(), '2.09' ); + wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.03' ); // Loads our main stylesheet. wp_enqueue_style( 'twentythirteen-style', get_stylesheet_uri(), array(), '2013-07-18' ); @@ -214,7 +214,7 @@ function twentythirteen_wp_title( $title, $sep ) { $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', 'twentythirteen' ), max( $paged, $page ) ); return $title; @@ -461,6 +461,27 @@ function twentythirteen_get_link_url() { return ( $has_url ) ? $has_url : apply_filters( 'the_permalink', get_permalink() ); } +if ( ! function_exists( 'twentythirteen_excerpt_more' ) && ! is_admin() ) : +/** + * Replaces "[...]" (appended to automatically generated excerpts) with ... + * and a Continue reading link. + * + * @since Twenty Thirteen 1.4 + * + * @param string $more Default Read More excerpt link. + * @return string Filtered Read More excerpt link. + */ +function twentythirteen_excerpt_more( $more ) { + $link = sprintf( '%2$s', + esc_url( get_permalink( get_the_ID() ) ), + /* translators: %s: Name of current post */ + sprintf( __( 'Continue reading %s ', 'twentythirteen' ), '' . get_the_title( get_the_ID() ) . '' ) + ); + return ' … ' . $link; +} +add_filter( 'excerpt_more', 'twentythirteen_excerpt_more' ); +endif; + /** * Extend the default WordPress body classes. * @@ -526,6 +547,6 @@ add_action( 'customize_register', 'twentythirteen_customize_register' ); * @since Twenty Thirteen 1.0 */ function twentythirteen_customize_preview_js() { - wp_enqueue_script( 'twentythirteen-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20130226', true ); + wp_enqueue_script( 'twentythirteen-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20141120', true ); } add_action( 'customize_preview_init', 'twentythirteen_customize_preview_js' );