Ticket #27719: 27719.2.diff
| File 27719.2.diff, 5.7 KB (added by , 12 years ago) |
|---|
-
wp-includes/general-template.php
216 216 else 217 217 $link = '<a href="' . esc_url( wp_logout_url($redirect) ) . '">' . __('Log out') . '</a>'; 218 218 219 if ( $echo ) 219 if ( $echo ) { 220 /** 221 * Filter the HTML Log In/Out link. 222 * 223 * @since 1.5.2 224 * 225 * @param string $link HTML link content for Log In/Out. 226 */ 220 227 echo apply_filters('loginout', $link); 221 else 228 } 229 else { 230 /** This filter is documented in wp-includes/general-template.php */ 222 231 return apply_filters('loginout', $link); 232 } 223 233 } 224 234 225 235 /** … … 529 539 $url = false; 530 540 531 541 if ( 'display' == $filter ) { 532 if ( $url ) 542 if ( $url ) { 543 /** 544 * Filter the URL returned by get_bloginfo(). 545 * 546 * @since 2.0.11 547 * 548 * @param string $output The URL returned by bloginfo(). 549 * @param string $show The keyword naming the information requested. 550 */ 533 551 $output = apply_filters('bloginfo_url', $output, $show); 534 else 552 } 553 else { 554 /** 555 * Filter the information returned by get_bloginfo(). 556 * 557 * @since 1.2.1 558 * 559 * @param string $output The non-URL information mentioned in $show. 560 * @param string $show The keyword naming the information requested. 561 */ 535 562 $output = apply_filters('bloginfo', $output, $show); 563 } 536 564 } 537 565 538 566 return $output; … … 795 823 if ( !$term ) 796 824 return; 797 825 798 if ( is_category() ) 826 if ( is_category() ) { 827 /** 828 * Filter the page title for category archive. 829 * 830 * @since 2.0.11 831 * 832 * @param string $term_name Name of the category whose archive is being displayed 833 */ 799 834 $term_name = apply_filters( 'single_cat_title', $term->name ); 800 elseif ( is_tag() ) 835 } 836 elseif ( is_tag() ) { 837 /** 838 * Filter the page title for tag archive. 839 * 840 * @since 2.3 841 * 842 * @param string $term_name Name of the category whose archive is being displayed 843 */ 801 844 $term_name = apply_filters( 'single_tag_title', $term->name ); 802 elseif ( is_tax() ) 845 } 846 elseif ( is_tax() ) { 847 /** 848 * Filter the page title for custom taxonomy archive page. 849 * 850 * @since 3.1 851 * 852 * @param string $term_name Name of the category whose archive is being displayed 853 */ 803 854 $term_name = apply_filters( 'single_term_title', $term->name ); 855 } 804 856 else 805 857 return; 806 858 … … 902 954 else // custom 903 955 $link_html = "\t$before<a href='$url'>$text</a>$after\n"; 904 956 957 /** 958 * Filter the HTML link content for archive. 959 * 960 * @since 2.6 961 * 962 * @param string HTML link content for archive. 963 */ 905 964 $link_html = apply_filters( 'get_archives_link', $link_html ); 906 965 907 966 return $link_html; … … 978 1037 $archive_week_end_date_format = get_option('date_format'); 979 1038 } 980 1039 1040 /** 1041 * Filter the SQL WHERE clause for retrieving archives. 1042 * 1043 * @since 2.2 1044 * 1045 * @param string $sql_where Portion of SQL query containing WHERE clause. 1046 * @param array $r The arguments of the wp_get_archives() function. 1047 */ 981 1048 $where = apply_filters( 'getarchives_where', "WHERE post_type = 'post' AND post_status = 'publish'", $r ); 982 1049 $join = apply_filters( 'getarchives_join', '', $r ); 983 1050 … … 1137 1204 if ( $cache = wp_cache_get( 'get_calendar', 'calendar' ) ) { 1138 1205 if ( is_array($cache) && isset( $cache[ $key ] ) ) { 1139 1206 if ( $echo ) { 1207 /** 1208 * Filter the HTML output of the get_calender_function. 1209 * 1210 * @since 3.0 1211 * 1212 * @param string $cache_key HTML output of the calendar. 1213 */ 1140 1214 echo apply_filters( 'get_calendar', $cache[$key] ); 1141 1215 return; 1142 1216 } else { 1217 /** This filter is documented in wp-includes/general-template.php */ 1143 1218 return apply_filters( 'get_calendar', $cache[$key] ); 1144 1219 } 1145 1220 } … … 1408 1483 $the_date = $before . get_the_date( $d ) . $after; 1409 1484 $previousday = $currentday; 1410 1485 1486 /** 1487 * Filter the date returned by the the_date() function. 1488 * 1489 * @since 1.2.1 1490 * 1491 * @param string $the_date The formatted date string. 1492 * @param string $d PHP date format. 1493 * @param string $before Output before the date. 1494 * @param string $after Output after the date. 1495 */ 1411 1496 $the_date = apply_filters( 'the_date', $the_date, $d, $before, $after ); 1412 1497 1413 1498 if ( $echo ) … … 1466 1551 function the_modified_date($d = '', $before='', $after='', $echo = true) { 1467 1552 1468 1553 $the_modified_date = $before . get_the_modified_date($d) . $after; 1554 /** 1555 * Filter the date on returned by the the_modified_date() function. 1556 * 1557 * @since 2.1.0 1558 * 1559 * @param string $the_modified_date The formatted date. 1560 * @param string $d PHP date format. 1561 * @param string $before Output before the date. 1562 * @param string $after Output after the date. 1563 */ 1469 1564 $the_modified_date = apply_filters('the_modified_date', $the_modified_date, $d, $before, $after); 1470 1565 1471 1566 if ( $echo ) … … 1488 1583 $the_time = get_post_modified_time(get_option('date_format'), null, null, true); 1489 1584 else 1490 1585 $the_time = get_post_modified_time($d, null, null, true); 1586 /** 1587 * Filter the date returned by the get_the_modified_date() function. 1588 * 1589 * @since 2.1.0 1590 * 1591 * @param string $the_time The formatted date. 1592 * @param string $d PHP date formate. 1593 */ 1491 1594 return apply_filters('get_the_modified_date', $the_time, $d); 1492 1595 } 1493 1596 … … 1499 1602 * @param string $d Either 'G', 'U', or php date format. 1500 1603 */ 1501 1604 function the_time( $d = '' ) { 1605 /** 1606 * Filter the time returned by the the_time() function. 1607 * 1608 * @since 1.2.1 1609 * 1610 * @param string $get_the_time The formatted date. 1611 * @param string $d PHP date format. 1612 */ 1502 1613 echo apply_filters('the_time', get_the_time( $d ), $d); 1503 1614 } 1504 1615
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)