Changeset 10240 for branches/2.7/wp-includes/link-template.php
- Timestamp:
- 12/22/2008 07:33:50 PM (17 years ago)
- File:
-
- 1 edited
-
branches/2.7/wp-includes/link-template.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/2.7/wp-includes/link-template.php
r10214 r10240 1246 1246 1247 1247 /** 1248 * Displaylink to next comments pages.1249 * 1250 * @since 2.7. 01248 * Return the link to next comments pages. 1249 * 1250 * @since 2.7.1 1251 1251 * 1252 1252 * @param string $label Optional. Label for link text. 1253 1253 * @param int $max_page Optional. Max page. 1254 */ 1255 function next_comments_link($label='', $max_page = 0) { 1254 * @return string|null 1255 */ 1256 function get_next_comments_link( $label = '', $max_page = 0 ) { 1256 1257 global $wp_query; 1257 1258 … … 1278 1279 $label = __('Newer Comments »'); 1279 1280 1280 echo '<a href="' . clean_url( get_comments_pagenum_link( $nextpage, $max_page ) ); 1281 $attr = apply_filters( 'next_comments_link_attributes', '' ); 1282 echo "\" $attr>". preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'</a>'; 1283 } 1284 1285 /** 1286 * Display the previous comments page link. 1281 return '<a href="' . clean_url( get_comments_pagenum_link( $nextpage, $max_page ) ) . '" ' . apply_filters( 'next_comments_link_attributes', '' ) . '>'. preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'</a>'; 1282 } 1283 1284 /** 1285 * Display the link to next comments pages. 1287 1286 * 1288 1287 * @since 2.7.0 1289 1288 * 1289 * @param string $label Optional. Label for link text. 1290 * @param int $max_page Optional. Max page. 1291 */ 1292 function next_comments_link( $label = '', $max_page = 0 ) { 1293 echo get_next_comments_link( $label, $max_page ); 1294 } 1295 1296 /** 1297 * Return the previous comments page link. 1298 * 1299 * @since 2.7.1 1300 * 1290 1301 * @param string $label Optional. Label for comments link text. 1291 * /1292 function previous_comments_link($label='') { 1293 1302 * @return string|null 1303 */ 1304 function get_previous_comments_link( $label = '' ) { 1294 1305 if ( !is_singular() ) 1295 1306 return; … … 1308 1319 $label = __('« Older Comments'); 1309 1320 1310 echo '<a href="' . clean_url(get_comments_pagenum_link($prevpage)); 1311 $attr = apply_filters( 'previous_comments_link_attributes', '' ); 1312 echo "\" $attr>". preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'</a>'; 1321 return '<a href="' . clean_url( get_comments_pagenum_link( $prevpage ) ) . '" ' . apply_filters( 'previous_comments_link_attributes', '' ) . '>' . preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'</a>'; 1322 } 1323 1324 /** 1325 * Display the previous comments page link. 1326 * 1327 * @since 2.7.0 1328 * 1329 * @param string $label Optional. Label for comments link text. 1330 */ 1331 function previous_comments_link( $label = '' ) { 1332 echo get_previous_comments_link( $label ); 1313 1333 } 1314 1334
Note: See TracChangeset
for help on using the changeset viewer.