From bb5bbfa16e45ef921deeeabddd22ea9bfdd2e4a8 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Mon, 23 Feb 2026 06:30:44 +0000 Subject: [PATCH] Docs: Improve accuracy of `@return` type and description for `get_post_custom()`. Developed in https://github.com/WordPress/wordpress-develop/pull/10996 Follow-up to [52795]. Props ravikhadka, westonruter, swissspidy, roytanck. See #64224, #55249. Fixes #60646. Built from https://develop.svn.wordpress.org/trunk@61718 git-svn-id: http://core.svn.wordpress.org/trunk@61026 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 8 +++++--- wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index eefdaafb0f..c9759d1363 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -2828,9 +2828,11 @@ function unregister_post_meta( $post_type, $meta_key ) { * @since 1.2.0 * * @param int $post_id Optional. Post ID. Default is the ID of the global `$post`. - * @return mixed An array of values. - * False for an invalid `$post_id` (non-numeric, zero, or negative value). - * An empty string if a valid but non-existing post ID is passed. + * @return array>|false Array of post meta values keyed by meta key, or false on failure. + * Post meta values will always be strings, even for values which would + * otherwise be retrieved individually as arrays or objects via + * {@see get_post_meta()}. An empty array is returned if the post has + * no post meta. */ function get_post_custom( $post_id = 0 ) { $post_id = absint( $post_id ); diff --git a/wp-includes/version.php b/wp-includes/version.php index e54a296120..f2ae786a0c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '7.0-beta1-61717'; +$wp_version = '7.0-beta1-61718'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.