WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/11/2019 05:20:51 PM (4 months ago)
Author:
SergeyBiryukov
Message:

Docs: Improve documentation for various feed link functions and filters.

Props atachibana, SergeyBiryukov.
Fixes #47862.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/link-template.php

    r45739 r45781  
    585585 *
    586586 * @param string $anchor The link's anchor text.
    587  * @param string $feed   Optional. Feed type. Default empty.
     587 * @param string $feed   Optional. Feed type. Possible values include 'rss2', 'atom'.
     588 *                       Default is the value of get_default_feed().
    588589 */
    589590function the_feed_link( $anchor, $feed = '' ) {
     
    596597     *
    597598     * @param string $link The complete anchor tag for a feed link.
    598      * @param string $feed The feed type, or an empty string for the
    599      *                     default feed type.
     599     * @param string $feed The feed type. Possible values include 'rss2', 'atom',
     600     *                     or an empty string for the default feed type.
    600601     */
    601602    echo apply_filters( 'the_feed_link', $link, $feed );
     
    609610 * @global WP_Rewrite $wp_rewrite WordPress rewrite component.
    610611 *
    611  * @param string $feed Optional. Feed type. Default empty.
     612 * @param string $feed Optional. Feed type. Possible values include 'rss2', 'atom'.
     613 *                     Default is the value of get_default_feed().
    612614 * @return string The feed permalink.
    613615 */
     
    647649     *
    648650     * @param string $output The feed permalink.
    649      * @param string $feed   Feed type.
     651     * @param string $feed   The feed type. Possible values include 'rss2', 'atom',
     652     *                       or an empty string for the default feed type.
    650653     */
    651654    return apply_filters( 'feed_link', $output, $feed );
     
    658661 *
    659662 * @param int    $post_id Optional. Post ID. Default is the ID of the global `$post`.
    660  * @param string $feed    Optional. Feed type. Default empty.
     663 * @param string $feed    Optional. Feed type. Possible values include 'rss2', 'atom'.
     664 *                        Default is the value of get_default_feed().
    661665 * @return string The permalink for the comments feed for the given post.
    662666 */
     
    744748 * @param string $link_text Optional. Descriptive link text. Default 'Comments Feed'.
    745749 * @param int    $post_id   Optional. Post ID. Default is the ID of the global `$post`.
    746  * @param string $feed      Optional. Feed format. Default empty.
     750 * @param string $feed      Optional. Feed type. Possible values include 'rss2', 'atom'.
     751 *                          Default is the value of get_default_feed().
    747752 */
    748753function post_comments_feed_link( $link_text = '', $post_id = '', $feed = '' ) {
     
    760765     * @param string $link    The complete anchor tag for the comment feed link.
    761766     * @param int    $post_id Post ID.
    762      * @param string $feed    The feed type, or an empty string for the default feed type.
     767     * @param string $feed    The feed type. Possible values include 'rss2', 'atom',
     768     *                        or an empty string for the default feed type.
    763769     */
    764770    echo apply_filters( 'post_comments_feed_link_html', $link, $post_id, $feed );
     
    774780 *
    775781 * @param int    $author_id Author ID.
    776  * @param string $feed      Optional. Feed type. Default empty.
     782 * @param string $feed      Optional. Feed type. Possible values include 'rss2', 'atom'.
     783 *                          Default is the value of get_default_feed().
    777784 * @return string Link to the feed for the author specified by $author_id.
    778785 */
     
    804811     *
    805812     * @param string $link The author feed link.
    806      * @param string $feed Feed type.
     813     * @param string $feed Feed type. Possible values include 'rss2', 'atom'.
    807814     */
    808815    $link = apply_filters( 'author_feed_link', $link, $feed );
     
    820827 *
    821828 * @param int    $cat_id Category ID.
    822  * @param string $feed   Optional. Feed type. Default empty.
     829 * @param string $feed   Optional. Feed type. Possible values include 'rss2', 'atom'.
     830 *                       Default is the value of get_default_feed().
    823831 * @return string Link to the feed for the category specified by $cat_id.
    824832 */
     
    837845 * @param int    $term_id  Term ID.
    838846 * @param string $taxonomy Optional. Taxonomy of `$term_id`. Default 'category'.
    839  * @param string $feed     Optional. Feed type. Default empty.
     847 * @param string $feed     Optional. Feed type. Possible values include 'rss2', 'atom'.
     848 *                         Default is the value of get_default_feed().
    840849 * @return string|false Link to the feed for the term specified by $term_id and $taxonomy.
    841850 */
     
    882891         *
    883892         * @param string $link The category feed link.
    884          * @param string $feed Feed type.
     893         * @param string $feed Feed type. Possible values include 'rss2', 'atom'.
    885894         */
    886895        $link = apply_filters( 'category_feed_link', $link, $feed );
     
    892901         *
    893902         * @param string $link The tag feed link.
    894          * @param string $feed Feed type.
     903         * @param string $feed Feed type. Possible values include 'rss2', 'atom'.
    895904         */
    896905        $link = apply_filters( 'tag_feed_link', $link, $feed );
     
    901910         * @since 3.0.0
    902911         *
    903          * @param string $link The taxonomy feed link.
    904          * @param string $feed Feed type.
     912         * @param string $link     The taxonomy feed link.
     913         * @param string $feed     Feed type. Possible values include 'rss2', 'atom'.
    905914         * @param string $taxonomy The taxonomy name.
    906915         */
     
    917926 *
    918927 * @param int    $tag_id Tag ID.
    919  * @param string $feed   Optional. Feed type. Default empty.
     928 * @param string $feed   Optional. Feed type. Possible values include 'rss2', 'atom'.
     929 *                       Default is the value of get_default_feed().
    920930 * @return string The feed permalink for the given tag.
    921931 */
     
    11211131 *
    11221132 * @param string $search_query Optional. Search query. Default empty.
    1123  * @param string $feed         Optional. Feed type. Default empty.
     1133 * @param string $feed         Optional. Feed type. Possible values include 'rss2', 'atom'.
     1134 *                             Default is the value of get_default_feed().
    11241135 * @return string The search results feed permalink.
    11251136 */
     
    11471158     *
    11481159     * @param string $link Search feed link.
    1149      * @param string $feed Feed type.
     1160     * @param string $feed Feed type. Possible values include 'rss2', 'atom'.
    11501161     * @param string $type The search type. One of 'posts' or 'comments'.
    11511162     */
     
    11611172 *
    11621173 * @param string $search_query Optional. Search query. Default empty.
    1163  * @param string $feed         Optional. Feed type. Default empty.
     1174 * @param string $feed         Optional. Feed type. Possible values include 'rss2', 'atom'.
     1175 *                             Default is the value of get_default_feed().
    11641176 * @return string The comments feed search results permalink.
    11651177 */
     
    12501262 *
    12511263 * @param string $post_type Post type
    1252  * @param string $feed      Optional. Feed type. Default empty.
     1264 * @param string $feed      Optional. Feed type. Possible values include 'rss2', 'atom'.
     1265 *                          Default is the value of get_default_feed().
    12531266 * @return string|false The post type feed permalink.
    12541267 */
     
    12811294     *
    12821295     * @param string $link The post type archive feed link.
    1283      * @param string $feed Feed type.
     1296     * @param string $feed Feed type. Possible values include 'rss2', 'atom'.
    12841297     */
    12851298    return apply_filters( 'post_type_archive_feed_link', $link, $feed );
Note: See TracChangeset for help on using the changeset viewer.