Options, Meta APIs: Correct docs for `$_meta_value` parameter in `xxx_{$meta_type}_meta` hooks.
In `add_{$meta_type}_meta`, `added_{$meta_type}_meta`, `update_{$meta_type}_meta`, `updated_{$meta_type}_meta`, `delete_{$meta_type}_meta`, and `deleted_{$meta_type}_meta` hooks, the `$_meta_value` parameter was documented as "Serialized if non-scalar". However, `$_meta_value` is a copy of the raw meta value before `maybe_serialize` is run and is not serialized. This change updates each of the above hooks' docblocks to remove "Serialized if non-scalar" from the `$_meta_value` parameter description. Props pputzer, hasanuzzamanshamim. Fixes #53102. Built from https://develop.svn.wordpress.org/trunk@52140 git-svn-id: http://core.svn.wordpress.org/trunk@51732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
356fe8c2dd
commit
841e45a864
|
@ -110,7 +110,7 @@ function add_metadata( $meta_type, $object_id, $meta_key, $meta_value, $unique =
|
|||
*
|
||||
* @param int $object_id ID of the object metadata is for.
|
||||
* @param string $meta_key Metadata key.
|
||||
* @param mixed $_meta_value Metadata value. Serialized if non-scalar.
|
||||
* @param mixed $_meta_value Metadata value.
|
||||
*/
|
||||
do_action( "add_{$meta_type}_meta", $object_id, $meta_key, $_meta_value );
|
||||
|
||||
|
@ -149,7 +149,7 @@ function add_metadata( $meta_type, $object_id, $meta_key, $meta_value, $unique =
|
|||
* @param int $mid The meta ID after successful update.
|
||||
* @param int $object_id ID of the object metadata is for.
|
||||
* @param string $meta_key Metadata key.
|
||||
* @param mixed $_meta_value Metadata value. Serialized if non-scalar.
|
||||
* @param mixed $_meta_value Metadata value.
|
||||
*/
|
||||
do_action( "added_{$meta_type}_meta", $mid, $object_id, $meta_key, $_meta_value );
|
||||
|
||||
|
@ -283,7 +283,7 @@ function update_metadata( $meta_type, $object_id, $meta_key, $meta_value, $prev_
|
|||
* @param int $meta_id ID of the metadata entry to update.
|
||||
* @param int $object_id ID of the object metadata is for.
|
||||
* @param string $meta_key Metadata key.
|
||||
* @param mixed $_meta_value Metadata value. Serialized if non-scalar.
|
||||
* @param mixed $_meta_value Metadata value.
|
||||
*/
|
||||
do_action( "update_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );
|
||||
|
||||
|
@ -329,7 +329,7 @@ function update_metadata( $meta_type, $object_id, $meta_key, $meta_value, $prev_
|
|||
* @param int $meta_id ID of updated metadata entry.
|
||||
* @param int $object_id ID of the object metadata is for.
|
||||
* @param string $meta_key Metadata key.
|
||||
* @param mixed $_meta_value Metadata value. Serialized if non-scalar.
|
||||
* @param mixed $_meta_value Metadata value.
|
||||
*/
|
||||
do_action( "updated_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );
|
||||
|
||||
|
@ -471,7 +471,7 @@ function delete_metadata( $meta_type, $object_id, $meta_key, $meta_value = '', $
|
|||
* @param string[] $meta_ids An array of metadata entry IDs to delete.
|
||||
* @param int $object_id ID of the object metadata is for.
|
||||
* @param string $meta_key Metadata key.
|
||||
* @param mixed $_meta_value Metadata value. Serialized if non-scalar.
|
||||
* @param mixed $_meta_value Metadata value.
|
||||
*/
|
||||
do_action( "delete_{$meta_type}_meta", $meta_ids, $object_id, $meta_key, $_meta_value );
|
||||
|
||||
|
@ -521,7 +521,7 @@ function delete_metadata( $meta_type, $object_id, $meta_key, $meta_value = '', $
|
|||
* @param string[] $meta_ids An array of metadata entry IDs to delete.
|
||||
* @param int $object_id ID of the object metadata is for.
|
||||
* @param string $meta_key Metadata key.
|
||||
* @param mixed $_meta_value Metadata value. Serialized if non-scalar.
|
||||
* @param mixed $_meta_value Metadata value.
|
||||
*/
|
||||
do_action( "deleted_{$meta_type}_meta", $meta_ids, $object_id, $meta_key, $_meta_value );
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.9-alpha-52139';
|
||||
$wp_version = '5.9-alpha-52140';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue