]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-content/themes/twentythirteen/functions.php
WordPress 4.1
[autoinstalls/wordpress.git] / wp-content / themes / twentythirteen / functions.php
index 5474d07d3ab738f70bf0e2ba0a97bf76141573ea..5d0b0a38d8314e539d06f110405c7f5f36350964 100644 (file)
@@ -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( '<a href="%1$s" class="more-link">%2$s</a>',
+               esc_url( get_permalink( get_the_ID() ) ),
+                       /* translators: %s: Name of current post */
+                       sprintf( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentythirteen' ), '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' )
+               );
+       return ' &hellip; ' . $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' );