Docs: Docblock corrections relating to `WP_Post` objects.
See #51373, #50768 Built from https://develop.svn.wordpress.org/trunk@49544 git-svn-id: http://core.svn.wordpress.org/trunk@49282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
847a2e22a0
commit
34765ddb64
|
@ -141,8 +141,8 @@ function get_comment_to_edit( $id ) {
|
|||
*
|
||||
* @global wpdb $wpdb WordPress database abstraction object.
|
||||
*
|
||||
* @param int|array $post_id Either a single Post ID or an array of Post IDs
|
||||
* @return int|array Either a single Posts pending comments as an int or an array of ints keyed on the Post IDs
|
||||
* @param int|int[] $post_id Either a single Post ID or an array of Post IDs
|
||||
* @return int|int[] Either a single Posts pending comments as an int or an array of ints keyed on the Post IDs
|
||||
*/
|
||||
function get_pending_comments_num( $post_id ) {
|
||||
global $wpdb;
|
||||
|
|
|
@ -1346,9 +1346,9 @@ function postbox_classes( $box_id, $screen_id ) {
|
|||
*
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @param int $id Post ID or post object.
|
||||
* @param string $title Optional. Title to override the post's current title when generating the post name. Default null.
|
||||
* @param string $name Optional. Name to override the post name. Default null.
|
||||
* @param int|WP_Post $id Post ID or post object.
|
||||
* @param string $title Optional. Title to override the post's current title when generating the post name. Default null.
|
||||
* @param string $name Optional. Name to override the post name. Default null.
|
||||
* @return array {
|
||||
* Array containing the sample permalink with placeholder for the post name, and the post name.
|
||||
*
|
||||
|
@ -1596,7 +1596,7 @@ function _wp_post_thumbnail_html( $thumbnail_id = null, $post = null ) {
|
|||
*
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @param int $post_id ID of the post to check for editing.
|
||||
* @param int|WP_Post $post_id ID or object of the post to check for editing.
|
||||
* @return int|false ID of the user with lock. False if the post does not exist, post is not locked,
|
||||
* the user with lock does not exist, or the post is locked by current user.
|
||||
*/
|
||||
|
@ -1634,7 +1634,7 @@ function wp_check_post_lock( $post_id ) {
|
|||
*
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @param int $post_id ID of the post being edited.
|
||||
* @param int|WP_Post $post_id ID or object of the post being edited.
|
||||
* @return array|false Array of the lock time and user ID. False if the post does not exist, or
|
||||
* there is no current user.
|
||||
*/
|
||||
|
|
|
@ -352,7 +352,7 @@ final class WP_Post {
|
|||
* @since 3.5.0
|
||||
*
|
||||
* @param string $filter Filter.
|
||||
* @return array|bool|object|WP_Post
|
||||
* @return WP_Post
|
||||
*/
|
||||
public function filter( $filter ) {
|
||||
if ( $this->filter === $filter ) {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param int|object|null $post Optional. Post ID or post object. Defaults to the current post in the loop.
|
||||
* @param int|WP_Post|null $post Optional. Post ID or post object. Defaults to the current post in the loop.
|
||||
* @return string|false The format if successful. False otherwise.
|
||||
*/
|
||||
function get_post_format( $post = null ) {
|
||||
|
|
|
@ -2323,7 +2323,7 @@ function is_sticky( $post_id = 0 ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sanitize every post field.
|
||||
* Sanitizes every post field.
|
||||
*
|
||||
* If the context is 'raw', then the post object or array will get minimal
|
||||
* sanitization of the integer fields.
|
||||
|
@ -2332,12 +2332,12 @@ function is_sticky( $post_id = 0 ) {
|
|||
*
|
||||
* @see sanitize_post_field()
|
||||
*
|
||||
* @param object|WP_Post|array $post The Post Object or Array
|
||||
* @param object|WP_Post|array $post The post object or array
|
||||
* @param string $context Optional. How to sanitize post fields.
|
||||
* Accepts 'raw', 'edit', 'db', or 'display'.
|
||||
* Default 'display'.
|
||||
* @return object|WP_Post|array The now sanitized Post Object or Array (will be the
|
||||
* same type as $post).
|
||||
* @return object|WP_Post|array The now sanitized post object or array (will be the
|
||||
* same type as `$post`).
|
||||
*/
|
||||
function sanitize_post( $post, $context = 'display' ) {
|
||||
if ( is_object( $post ) ) {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.6-beta3-49543';
|
||||
$wp_version = '5.6-beta3-49544';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue