Ticket #14804: 14804.2.diff
| File 14804.2.diff, 1.2 KB (added by coffee2code, 13 months ago) |
|---|
-
wp-includes/post-template.php
61 61 * an array. See the function for what can be override in the $args parameter. 62 62 * 63 63 * 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, 65 65 * as with {@link the_title()}, is to display the title. 66 66 * 67 67 * @since 2.3.0 … … 70 70 * @return string|null Null on failure or display. String when echo is false. 71 71 */ 72 72 function 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 ); 74 76 77 $title = get_the_title( $post ); 78 75 79 if ( strlen($title) == 0 ) 76 80 return; 77 81 78 $defaults = array('before' => '', 'after' => '', 'echo' => true);79 $r = wp_parse_args($args, $defaults);80 extract( $r, EXTR_SKIP );81 82 82 $title = $before . $title . $after; 83 83 $title = esc_attr(strip_tags($title)); 84 84
