Skip to content
2 changes: 1 addition & 1 deletion src/wp-content/themes/twentyseventeen/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ function twentyseventeen_header_image_tag( $html, $header, $attr ) {
*
* @param string[] $attr Array of attribute values for the image markup, keyed by attribute name.
* See wp_get_attachment_image().
* @param WP_Post $attachment Image attachment post.
* @param WP_Post|null $attachment Image attachment post, or null if no post is found.
* @param string|int[] $size Requested image size. Can be any registered image size name, or
* an array of width and height values in pixels (in that order).
* @return string[] The filtered attributes for the image markup.
Expand Down
2 changes: 1 addition & 1 deletion src/wp-content/themes/twentysixteen/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ function twentysixteen_content_image_sizes_attr( $sizes, $size ) {
*
* @param string[] $attr Array of attribute values for the image markup, keyed by attribute name.
* See wp_get_attachment_image().
* @param WP_Post $attachment Image attachment post.
* @param WP_Post|null $attachment Image attachment post, or null if no post is found.
* @param string|int[] $size Requested image size. Can be any registered image size name, or
* an array of width and height values in pixels (in that order).
* @return string[] The filtered attributes for the image markup.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,9 @@ function twenty_twenty_one_print_first_instance_of_block( $block_name, $content
* @since Twenty Twenty-One 1.4 Corrected parameter name for `$output`,
* added the `$post` parameter.
*
* @param string $output The password form HTML output.
* @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
* @param string $output The password form HTML output.
* @param int|WP_Post|null $post Optional. Post ID or WP_Post object, or null if no post is found.
* Default is global $post.
* @return string HTML content for password form for password protected post.
*/
function twenty_twenty_one_password_form( $output, $post = 0 ) {
Expand All @@ -446,7 +447,7 @@ function twenty_twenty_one_password_form( $output, $post = 0 ) {
*
* @param string[] $attr Array of attribute values for the image markup, keyed by attribute name.
* See wp_get_attachment_image().
* @param WP_Post $attachment Image attachment post.
* @param WP_Post|null $attachment Image attachment post, or null if no post is found.
* @param string|int[] $size Requested image size. Can be any registered image size name, or
* an array of width and height values in pixels (in that order).
* @return string[] The filtered attributes for the image markup.
Expand Down
4 changes: 2 additions & 2 deletions src/wp-includes/abilities/class-wp-abilities-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -1549,8 +1549,8 @@ private function build_post_fields( WP_Post $post, array $fields, bool $can_edit
*
* @since 7.2.0
*
* @param mixed $required Whether the post currently requires a password.
* @param mixed $post The post being checked; a WP_Post when invoked by the core filter.
* @param bool $required Whether the post currently requires a password.
* @param WP_Post|null $post The post being checked, or null if no post is found.
* @return bool Whether the post still requires a password.
*/
private function allow_password_content( $required, $post ): bool {
Expand Down
10 changes: 5 additions & 5 deletions src/wp-includes/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -1275,7 +1275,7 @@ function wp_get_attachment_image( $attachment_id, $size = 'thumbnail', $icon = f
*
* @param string[] $attr Array of attribute values for the image markup, keyed by attribute name.
* See wp_get_attachment_image().
* @param WP_Post $attachment Image attachment post.
* @param WP_Post|null $attachment Image attachment post, or null if no post is found.
* @param string|int[] $size Requested image size. Can be any registered image size name, or
* an array of width and height values in pixels (in that order).
*/
Expand Down Expand Up @@ -5281,8 +5281,8 @@ function wp_enqueue_media( $args = array() ) {
*
* @since 3.5.0
*
* @param array $settings List of media view settings.
* @param WP_Post $post Post object.
* @param array $settings List of media view settings.
* @param WP_Post|null $post Post object, or null if the media modal is not for a specific post.
*/
$settings = apply_filters( 'media_view_settings', $settings, $post );

Expand All @@ -5291,8 +5291,8 @@ function wp_enqueue_media( $args = array() ) {
*
* @since 3.5.0
*
* @param string[] $strings Array of media view strings keyed by the name they'll be referenced by in JavaScript.
* @param WP_Post $post Post object.
* @param string[] $strings Array of media view strings keyed by the name they'll be referenced by in JavaScript.
* @param WP_Post|null $post Post object, or null if the media modal is not for a specific post.
*/
$strings = apply_filters( 'media_view_strings', $strings, $post );

Expand Down
12 changes: 6 additions & 6 deletions src/wp-includes/post-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -914,9 +914,9 @@ function post_password_required( $post = null ) {
*
* @since 4.7.0
*
* @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 object.
* @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|null $post Post object, or null if no post is found.
*/
return apply_filters( 'post_password_required', $required, $post );
}
Expand Down Expand Up @@ -1862,9 +1862,9 @@ function get_the_password_form( $post = 0 ) {
* @since 5.8.0 Added the `$post` parameter.
* @since 6.8.0 Added the `$invalid_password` parameter.
*
* @param string $output The password form HTML output.
* @param WP_Post $post Post object.
* @param string $invalid_password The invalid password message.
* @param string $output The password form HTML output.
* @param WP_Post|null $post Post object, or null if no post is found.
* @param string $invalid_password The invalid password message.
*/
return apply_filters( 'the_password_form', $output, $post, $invalid_password );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ public function get_items_permissions_check( $request ) {
*
* @since 5.7.1
*
* @param bool $required Whether the post requires a password check.
* @param WP_Post $post The post been password checked.
* @param bool $required Whether the post requires a password check.
* @param WP_Post|null $post The post being password checked, or null if no post is found.
* @return bool Result of password check taking into account REST API considerations.
*/
public function check_password_required( $required, $post ) {
Expand Down
Loading