Make WordPress Core

Ticket #27719: 27719.3.diff

File 27719.3.diff, 7.1 KB (added by jesin, 12 years ago)

Docs for get_the_time, get_post_time, the_modified_time, get_the_modified_time, get_post_modified_time, the_weekday, the_weekday_date, user_can_richedit, wp_default_editor, get_search_query, the_search_query, language_attributes, wp_admin_css_uri, wp_generator_type, the_generator, get_the_generator_{$type}

  • wp-includes/general-template.php

     
    15201520                $the_time = get_post_time(get_option('time_format'), false, $post, true);
    15211521        else
    15221522                $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         */
    15231532        return apply_filters('get_the_time', $the_time, $d, $post);
    15241533}
    15251534
     
    15441553                $time = $post->post_date;
    15451554
    15461555        $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         */
    15471565        return apply_filters('get_post_time', $time, $d, $gmt);
    15481566}
    15491567
     
    15551573 * @param string $d Optional Either 'G', 'U', or php date format defaults to the value specified in the time_format option.
    15561574 */
    15571575function 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         */
    15581584        echo apply_filters('the_modified_time', get_the_modified_time($d), $d);
    15591585}
    15601586
     
    15711597                $the_time = get_post_modified_time(get_option('time_format'), null, null, true);
    15721598        else
    15731599                $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         */
    15741608        return apply_filters('get_the_modified_time', $the_time, $d);
    15751609}
    15761610
     
    15941628                $time = $post->post_modified;
    15951629        $time = mysql2date($d, $time, $translate);
    15961630
     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         */
    15971640        return apply_filters('get_post_modified_time', $time, $d, $gmt);
    15981641}
    15991642
     
    16071650function the_weekday() {
    16081651        global $wp_locale;
    16091652        $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         */
    16101660        $the_weekday = apply_filters('the_weekday', $the_weekday);
    16111661        echo $the_weekday;
    16121662}
     
    16311681                $the_weekday_date .= $after;
    16321682                $previousweekday = $currentday;
    16331683        }
     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         */
    16341693        $the_weekday_date = apply_filters('the_weekday_date', $the_weekday_date, $before, $after);
    16351694        echo $the_weekday_date;
    16361695}
     
    18321891                }
    18331892        }
    18341893
     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         */
    18351901        return apply_filters('user_can_richedit', $wp_rich_edit);
    18361902}
    18371903
     
    18511917                $ed = get_user_setting('editor', 'tinymce');
    18521918                $r = ( in_array($ed, array('tinymce', 'html', 'test') ) ) ? $ed : $r;
    18531919        }
     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         */
    18541927        return apply_filters( 'wp_default_editor', $r ); // filter
    18551928}
    18561929
     
    18941967 * @return string
    18951968 */
    18961969function 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         */
    18971977        $query = apply_filters( 'get_search_query', get_query_var( 's' ) );
    18981978        if ( $escaped )
    18991979                $query = esc_attr( $query );
     
    19101990 * @since 2.1.0
    19111991 */
    19121992function 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         */
    19132000        echo esc_attr( apply_filters( 'the_search_query', get_search_query( false ) ) );
    19142001}
    19152002
     
    19392026        }
    19402027
    19412028        $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         */
    19422036        $output = apply_filters('language_attributes', $output);
    19432037        echo $output;
    19442038}
     
    21912285        }
    21922286        $_file = add_query_arg( 'version', get_bloginfo( 'version' ),  $_file );
    21932287
     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         */
    21942296        return apply_filters( 'wp_admin_css_uri', $_file, $file );
    21952297}
    21962298
     
    22592361 * @since 2.5.0
    22602362 */
    22612363function 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         */
    22622371        the_generator( apply_filters( 'wp_generator_type', 'xhtml' ) );
    22632372}
    22642373
     
    22742383 * @param string $type The type of generator to output - (html|xhtml|atom|rss2|rdf|comment|export).
    22752384 */
    22762385function 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         */
    22772394        echo apply_filters('the_generator', get_the_generator($type), $type) . "\n";
    22782395}
    22792396
     
    23402457                        $gen = '<!-- generator="WordPress/' . get_bloginfo_rss('version') . '" created="'. date('Y-m-d H:i') . '" -->';
    23412458                        break;
    23422459        }
     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         */
    23432468        return apply_filters( "get_the_generator_{$type}", $gen, $type );
    23442469}
    23452470