Changeset 18244 for trunk/wp-content/themes/twentyeleven/functions.php
- Timestamp:
- 06/10/2011 09:57:18 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentyeleven/functions.php
r18140 r18244 301 301 $style = ' style="color:#' . get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ) . ';"'; 302 302 ?> 303 <h1><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo home_url( '/'); ?>"><?php bloginfo( 'name' ); ?></a></h1>303 <h1><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1> 304 304 <div id="desc"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></div> 305 305 <?php $header_image = get_header_image(); … … 326 326 */ 327 327 function twentyeleven_continue_reading_link() { 328 return ' <a href="'. get_permalink() . '">' . __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) . '</a>';328 return ' <a href="'. esc_url( get_permalink() ) . '">' . __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) . '</a>'; 329 329 } 330 330 … … 560 560 } 561 561 endif; // ends check for twentyeleven_comment() 562 563 if ( ! function_exists( 'twentyeleven_posted_on' ) ) : 564 /** 565 * Prints HTML with meta information for the current post-date/time and author. 566 * 567 * @since Twenty Eleven 1.0 568 */ 569 function twentyeleven_posted_on() { 570 printf( __( '<span class="sep">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s" pubdate>%4$s</time></a><span class="by-author"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a></span></span>', 'twentyeleven' ), 571 esc_url( get_permalink() ), 572 esc_attr( get_the_time() ), 573 esc_attr( get_the_date( 'c' ) ), 574 esc_html( get_the_date() ), 575 esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), 576 sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ), 577 esc_html( get_the_author() ) 578 ); 579 } 580 endif; 581 582 /** 583 * Adds Twenty Eleven author class to the array of body classes. 584 * 585 * @since Twenty Eleven 1.0 586 */ 587 function twentyeleven_author_class( $classes ) { 588 589 if ( ! is_multi_author() ) { 590 $classes[] = 'single-author'; 591 } 592 593 return $classes; 594 } 595 add_filter( 'body_class', 'twentyeleven_author_class' );
Note: See TracChangeset
for help on using the changeset viewer.