Ticket #3450: wp_return2.diff
| File wp_return2.diff, 3.9 KB (added by , 19 years ago) |
|---|
-
wp-includes/post-template.php
20 20 $title = get_the_title(); 21 21 if ( strlen($title) > 0 ) { 22 22 $title = apply_filters('the_title', $before . $title . $after, $before, $after); 23 if ( $echo ) 24 echo $title; 25 else 26 return $title; 23 return wp_return($title, $echo); 27 24 } 28 25 } 29 26 … … 187 184 } 188 185 } 189 186 190 if ( $echo ) 191 echo $output; 192 193 return $output; 187 return wp_return($output, $echo); 194 188 } 195 189 196 190 … … 256 250 257 251 $output = apply_filters('wp_dropdown_pages', $output); 258 252 259 if ( $echo ) 260 echo $output; 261 262 return $output; 253 return wp_return($output, $echo); 263 254 } 264 255 265 256 function wp_list_pages($args = '') { -
wp-includes/general-template.php
661 661 $previousday = $day; 662 662 } 663 663 $the_date = apply_filters('the_date', $the_date, $d, $before, $after); 664 if ( $echo ) 665 echo $the_date; 666 else 667 return $the_date; 664 665 return wp_return($the_date, $echo); 668 666 } 669 667 670 668 -
wp-includes/deprecated.php
44 44 $categories = get_the_category(); 45 45 $cat = $categories[0]->cat_ID; 46 46 47 if ( $echo ) 48 echo $cat; 49 50 return $cat; 47 return wp_return($cat, $echo); 51 48 } 52 49 53 50 // Deprecated. … … 481 478 function get_author_link($echo = false, $author_id, $author_nicename = '') { 482 479 $link = get_author_posts_url($author_id, $author_nicename); 483 480 484 if ( $echo ) 485 echo $link; 486 return $link; 481 return wp_return($link, $echo); 487 482 } 488 483 489 484 function link_pages($before='<br />', $after='<br />', $next_or_number='number', $nextpagelink='next page', $previouspagelink='previous page', $pagelink='%', $more_file='') { -
wp-includes/feed.php
120 120 121 121 $link = apply_filters('author_feed_link', $link); 122 122 123 if ( $echo ) 124 echo $link; 125 return $link; 123 return wp_return($link, $echo); 126 124 } 127 125 128 126 … … 138 136 139 137 $link = apply_filters('category_feed_link', $link); 140 138 141 if ( $echo ) 142 echo $link; 143 return $link; 139 return wp_return($link, $echo); 144 140 } 145 141 146 142 -
wp-includes/functions.php
498 498 return $headers; 499 499 } 500 500 501 // Implementation within function: return wp_return($func_data, $echo_flag); 502 function wp_return($data, $echo = true) { 503 echo ( $echo ) ? $data : ''; 504 return $data; 505 } 506 501 507 function is_new_day() { 502 508 global $day, $previousday; 503 509 if ( $day != $previousday ) { -
wp-includes/bookmark-template.php
140 140 $output .= "$after\n"; 141 141 } // end while 142 142 143 if ( !$echo ) 144 return $output; 145 echo $output; 143 return wp_return($output, $echo); 146 144 } 147 145 148 146 function get_linkrating($link) { … … 351 349 } 352 350 } 353 351 354 if ( !$echo ) 355 return $output; 356 echo $output; 352 return wp_return($output, $echo); 357 353 } 358 354 359 355 ?> -
wp-includes/category-template.php
203 203 204 204 $output = apply_filters('wp_dropdown_cats', $output); 205 205 206 if ( $echo ) 207 echo $output; 208 209 return $output; 206 return wp_return($output, $echo); 210 207 } 211 208 212 209 function wp_list_categories($args = '') {