WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/30/2014 06:56:19 AM (7 years ago)
Author:
SergeyBiryukov
Message:

Pass the $adjacent parameter to the "{$adjacent}_post_link" filter.

props ankit.gade@…, kpdesign.
fixes #30440.

File:
1 edited

Legend:

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

    r30823 r31000  
    18661866     *
    18671867     * @since 2.6.0
    1868      *
    1869      * @param string  $output The adjacent post link.
    1870      * @param string  $format Link anchor format.
    1871      * @param string  $link   Link permalink format.
    1872      * @param WP_Post $post   The adjacent post.
    1873      */
    1874     return apply_filters( "{$adjacent}_post_link", $output, $format, $link, $post );
     1868     * @since 4.2.0 Added the `$adjacent` parameter.
     1869     *
     1870     * @param string  $output   The adjacent post link.
     1871     * @param string  $format   Link anchor format.
     1872     * @param string  $link     Link permalink format.
     1873     * @param WP_Post $post     The adjacent post.
     1874     * @param string  $adjacent Whether the post is previous or next.
     1875     */
     1876    return apply_filters( "{$adjacent}_post_link", $output, $format, $link, $post, $adjacent );
    18751877}
    18761878
Note: See TracChangeset for help on using the changeset viewer.