mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Posts, Post Types: Pass the post object to the_password_form
filter.
Props silb3r. Fixes #29008. Built from https://develop.svn.wordpress.org/trunk@50791 git-svn-id: http://core.svn.wordpress.org/trunk@50400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
de519f9dfe
commit
b2117d7299
@ -876,7 +876,7 @@ function post_password_required( $post = null ) {
|
||||
*
|
||||
* @param bool $required Whether the user needs to supply a password. True if password has not been
|
||||
* provided or is incorrect, false if password has been supplied or is not required.
|
||||
* @param WP_Post $post Post data.
|
||||
* @param WP_Post $post Post object.
|
||||
*/
|
||||
return apply_filters( 'post_password_required', $required, $post );
|
||||
}
|
||||
@ -1643,7 +1643,7 @@ function wp_get_attachment_link( $id = 0, $size = 'thumbnail', $permalink = fals
|
||||
* Filters a retrieved attachment page link.
|
||||
*
|
||||
* @since 2.7.0
|
||||
* @since 5.1.0 Added the $attr parameter.
|
||||
* @since 5.1.0 Added the `$attr` parameter.
|
||||
*
|
||||
* @param string $link_html The page link HTML output.
|
||||
* @param int $id Post ID.
|
||||
@ -1734,10 +1734,12 @@ function get_the_password_form( $post = 0 ) {
|
||||
* size attribute in the form input.
|
||||
*
|
||||
* @since 2.7.0
|
||||
* @since 5.8.0 Added the `$post` parameter.
|
||||
*
|
||||
* @param string $output The password form HTML output.
|
||||
* @param string $output The password form HTML output.
|
||||
* @param WP_Post $post Post object.
|
||||
*/
|
||||
return apply_filters( 'the_password_form', $output );
|
||||
return apply_filters( 'the_password_form', $output, $post );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.8-alpha-50790';
|
||||
$wp_version = '5.8-alpha-50791';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user