Ticket #27719: 27719.3.diff
| File 27719.3.diff, 7.1 KB (added by , 12 years ago) |
|---|
-
wp-includes/general-template.php
1520 1520 $the_time = get_post_time(get_option('time_format'), false, $post, true); 1521 1521 else 1522 1522 $the_time = get_post_time($d, false, $post, true); 1523 /** 1524 * Filter the date string returned by get_the_time() function. 1525 * 1526 * @since 1.5.2 1527 * 1528 * @param string $the_time The formatted time returned by get_the_time() function. 1529 * @param string $d The date and time format. 1530 * @param object $post The WP_Post object. 1531 */ 1523 1532 return apply_filters('get_the_time', $the_time, $d, $post); 1524 1533 } 1525 1534 … … 1544 1553 $time = $post->post_date; 1545 1554 1546 1555 $time = mysql2date($d, $time, $translate); 1556 /** 1557 * Filter the formatted date string returned by get_post_time() function. 1558 * 1559 * @since 2.6.0 1560 * 1561 * @param string $time The formatted date string. 1562 * @param string $d The date and time format. 1563 * @param boolean $gmt Whether to retrieve the GMT time. 1564 */ 1547 1565 return apply_filters('get_post_time', $time, $d, $gmt); 1548 1566 } 1549 1567 … … 1555 1573 * @param string $d Optional Either 'G', 'U', or php date format defaults to the value specified in the time_format option. 1556 1574 */ 1557 1575 function the_modified_time($d = '') { 1576 /** 1577 * Filter the time string returned by the_modified_time() function. 1578 * 1579 * @since 2.0.0 1580 * 1581 * @param string $modified_time Time and date returned by the_modified_time() function. 1582 * @param string $d The date and time format. 1583 */ 1558 1584 echo apply_filters('the_modified_time', get_the_modified_time($d), $d); 1559 1585 } 1560 1586 … … 1571 1597 $the_time = get_post_modified_time(get_option('time_format'), null, null, true); 1572 1598 else 1573 1599 $the_time = get_post_modified_time($d, null, null, true); 1600 /** 1601 * Filter the time string returned by the get_the_modified_time() function. 1602 * 1603 * @since 2.0.0 1604 * 1605 * @param string $the_time The time returned by the get_the_modified_time() function. 1606 * @param string $d The time and date format. 1607 */ 1574 1608 return apply_filters('get_the_modified_time', $the_time, $d); 1575 1609 } 1576 1610 … … 1594 1628 $time = $post->post_modified; 1595 1629 $time = mysql2date($d, $time, $translate); 1596 1630 1631 /** 1632 * Filter the time string returned by the get_post_modified_time() function. 1633 * 1634 * @since 2.8.0 1635 * 1636 * @param string $time Formatted time returned by the get_post_modified_time() function. 1637 * @param string $d The date and time format. 1638 * @param boolean $gmt Whether to return the GMT time. 1639 */ 1597 1640 return apply_filters('get_post_modified_time', $time, $d, $gmt); 1598 1641 } 1599 1642 … … 1607 1650 function the_weekday() { 1608 1651 global $wp_locale; 1609 1652 $the_weekday = $wp_locale->get_weekday( mysql2date( 'w', get_post()->post_date, false ) ); 1653 /** 1654 * Filter the weekday string echoed by the the_weekday() function. 1655 * 1656 * @since 1.2.1 1657 * 1658 * @param string $the_weekday The weekday echoed by the the_weekday() function. 1659 */ 1610 1660 $the_weekday = apply_filters('the_weekday', $the_weekday); 1611 1661 echo $the_weekday; 1612 1662 } … … 1631 1681 $the_weekday_date .= $after; 1632 1682 $previousweekday = $currentday; 1633 1683 } 1684 /** 1685 * Filter the weekday date HTML code echoed by the the_weekday_date() function. 1686 * 1687 * @since 1.2.1 1688 * 1689 * @param string $the_weekday_date The weekday date prepended and appended with $before and $after. 1690 * @param string $before Output before the date. 1691 * @param string $after Output after the date. 1692 */ 1634 1693 $the_weekday_date = apply_filters('the_weekday_date', $the_weekday_date, $before, $after); 1635 1694 echo $the_weekday_date; 1636 1695 } … … 1832 1891 } 1833 1892 } 1834 1893 1894 /** 1895 * Filter the boolean returned by user_can_richedit() function on whether the user should have a WYSIWIG editor. 1896 * 1897 * @since 2.1.0 1898 * 1899 * @param boolean $wp_rich_edit Whether the user should have a WYSIWYG editor. 1900 */ 1835 1901 return apply_filters('user_can_richedit', $wp_rich_edit); 1836 1902 } 1837 1903 … … 1851 1917 $ed = get_user_setting('editor', 'tinymce'); 1852 1918 $r = ( in_array($ed, array('tinymce', 'html', 'test') ) ) ? $ed : $r; 1853 1919 } 1920 /** 1921 * Filter the default editor string returned by wp_default_editor() function. 1922 * 1923 * @since 2.5.0 1924 * 1925 * @param string $r The default editor. 1926 */ 1854 1927 return apply_filters( 'wp_default_editor', $r ); // filter 1855 1928 } 1856 1929 … … 1894 1967 * @return string 1895 1968 */ 1896 1969 function get_search_query( $escaped = true ) { 1970 /** 1971 * Filter the search query returned by get_search_query() function. 1972 * 1973 * @since 2.3.0 1974 * 1975 * @param string $search_query The search WordPress query variable. 1976 */ 1897 1977 $query = apply_filters( 'get_search_query', get_query_var( 's' ) ); 1898 1978 if ( $escaped ) 1899 1979 $query = esc_attr( $query ); … … 1910 1990 * @since 2.1.0 1911 1991 */ 1912 1992 function the_search_query() { 1993 /** 1994 * Filter the search query echoed by the the_search_query() function. 1995 * 1996 * @since 2.3.0 1997 * 1998 * @param string $search_query Non-escaped search query. 1999 */ 1913 2000 echo esc_attr( apply_filters( 'the_search_query', get_search_query( false ) ) ); 1914 2001 } 1915 2002 … … 1939 2026 } 1940 2027 1941 2028 $output = implode(' ', $attributes); 2029 /** 2030 * Filter the HTML language attributes string returned by the language_attributes() function. 2031 * 2032 * @since 2.5.0 2033 * 2034 * @param string $output The type of html document - xhtml or html. 2035 */ 1942 2036 $output = apply_filters('language_attributes', $output); 1943 2037 echo $output; 1944 2038 } … … 2191 2285 } 2192 2286 $_file = add_query_arg( 'version', get_bloginfo( 'version' ), $_file ); 2193 2287 2288 /** 2289 * Filter the URL of WordPress admin CSS file returned by the wp_admin_css_uri() function. 2290 * 2291 * @since 2.3.0 2292 * 2293 * @param string $_file The URL of a WordPress admin CSS file. 2294 * @param string $file File relative to wp-admin without the ".css" extension. 2295 */ 2194 2296 return apply_filters( 'wp_admin_css_uri', $_file, $file ); 2195 2297 } 2196 2298 … … 2259 2361 * @since 2.5.0 2260 2362 */ 2261 2363 function wp_generator() { 2364 /** 2365 * Filter the markup type of the HTML meta generator tag. 2366 * 2367 * @since 2.5.0 2368 * 2369 * @param string $type The type of HTML markup. 2370 */ 2262 2371 the_generator( apply_filters( 'wp_generator_type', 'xhtml' ) ); 2263 2372 } 2264 2373 … … 2274 2383 * @param string $type The type of generator to output - (html|xhtml|atom|rss2|rdf|comment|export). 2275 2384 */ 2276 2385 function the_generator( $type ) { 2386 /** 2387 * Filter the HTML meta generator tag echoed by the the_generator() function. 2388 * 2389 * @since 2.5.0 2390 * 2391 * @param string $generator The HTML code of the generator meta tag. 2392 * @param string $type The type of generator to output. 2393 */ 2277 2394 echo apply_filters('the_generator', get_the_generator($type), $type) . "\n"; 2278 2395 } 2279 2396 … … 2340 2457 $gen = '<!-- generator="WordPress/' . get_bloginfo_rss('version') . '" created="'. date('Y-m-d H:i') . '" -->'; 2341 2458 break; 2342 2459 } 2460 /** 2461 * Filter the HTML meta generator string returned by the get_the_generator_$type function. 2462 * 2463 * @since 2.5.0 2464 * 2465 * @param string $gen The HTML generator meta tag. 2466 * @param string $type The type of generator to output. 2467 */ 2343 2468 return apply_filters( "get_the_generator_{$type}", $gen, $type ); 2344 2469 } 2345 2470
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)