WordPress.org

Make WordPress Core

Changeset 50791


Ignore:
Timestamp:
04/26/2021 03:36:55 PM (7 months ago)
Author:
SergeyBiryukov
Message:

Posts, Post Types: Pass the post object to the_password_form filter.

Props silb3r.
Fixes #29008.

File:
1 edited

Legend:

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

    r50396 r50791  
    877877     * @param bool    $required Whether the user needs to supply a password. True if password has not been
    878878     *                          provided or is incorrect, false if password has been supplied or is not required.
    879      * @param WP_Post $post     Post data.
     879     * @param WP_Post $post     Post object.
    880880     */
    881881    return apply_filters( 'post_password_required', $required, $post );
     
    16441644     *
    16451645     * @since 2.7.0
    1646      * @since 5.1.0 Added the $attr parameter.
     1646     * @since 5.1.0 Added the `$attr` parameter.
    16471647     *
    16481648     * @param string       $link_html The page link HTML output.
     
    17351735     *
    17361736     * @since 2.7.0
    1737      *
    1738      * @param string $output The password form HTML output.
     1737     * @since 5.8.0 Added the `$post` parameter.
     1738     *
     1739     * @param string  $output The password form HTML output.
     1740     * @param WP_Post $post   Post object.
    17391741     */
    1740     return apply_filters( 'the_password_form', $output );
     1742    return apply_filters( 'the_password_form', $output, $post );
    17411743}
    17421744
Note: See TracChangeset for help on using the changeset viewer.