Ticket #14804: 14804.2.diff

File 14804.2.diff, 1.2 KB (added by coffee2code, 13 months ago)

Refresh patch to apply cleanly against trunk.

  • wp-includes/post-template.php

     
    6161 * an array. See the function for what can be override in the $args parameter. 
    6262 * 
    6363 * The title before it is displayed will have the tags stripped and {@link 
    64  * esc_attr()} before it is passed to the user or displayed. The default 
     64 * esc_attr()} before it is passed to the user or displayed. The default, 
    6565 * as with {@link the_title()}, is to display the title. 
    6666 * 
    6767 * @since 2.3.0 
     
    7070 * @return string|null Null on failure or display. String when echo is false. 
    7171 */ 
    7272function the_title_attribute( $args = '' ) { 
    73         $title = get_the_title(); 
     73        $defaults = array( 'before' => '', 'after' =>  '', 'echo' => true, 'post' => 0 ); 
     74        $r = wp_parse_args( $args, $defaults ); 
     75        extract( $r, EXTR_SKIP ); 
    7476 
     77        $title = get_the_title( $post ); 
     78 
    7579        if ( strlen($title) == 0 ) 
    7680                return; 
    7781 
    78         $defaults = array('before' => '', 'after' =>  '', 'echo' => true); 
    79         $r = wp_parse_args($args, $defaults); 
    80         extract( $r, EXTR_SKIP ); 
    81  
    8282        $title = $before . $title . $after; 
    8383        $title = esc_attr(strip_tags($title)); 
    8484