diff --git a/src/wp-includes/meta.php b/src/wp-includes/meta.php index 0942a5a0db..64a4b5ea90 100644 --- a/src/wp-includes/meta.php +++ b/src/wp-includes/meta.php @@ -1051,7 +1051,8 @@ function is_protected_meta( $meta_key, $meta_type = null ) { * * @param string $meta_key Meta key. * @param mixed $meta_value Meta value to sanitize. - * @param string $object_type Type of object the meta is registered to. + * @param string $object_type Type of object this meta is registered to. Accepts any value with an associated meta table. + * (e.g. comment, post, term, user, my_custom_meta) * @param string $object_subtype Optional. The subtype of the object type. * * @return mixed Sanitized $meta_value. @@ -1070,7 +1071,8 @@ function sanitize_meta( $meta_key, $meta_value, $object_type, $object_subtype = * * @param mixed $meta_value Meta value to sanitize. * @param string $meta_key Meta key. - * @param string $object_type Object type. + * @param string $object_type Type of object this meta is registered to. Accepts any value with an associated meta table. + * (e.g. comment, post, term, user, my_custom_meta) * @param string $object_subtype Object subtype. */ return apply_filters( "sanitize_{$object_type}_meta_{$meta_key}_for_{$object_subtype}", $meta_value, $meta_key, $object_type, $object_subtype ); @@ -1087,7 +1089,8 @@ function sanitize_meta( $meta_key, $meta_value, $object_type, $object_subtype = * * @param mixed $meta_value Meta value to sanitize. * @param string $meta_key Meta key. - * @param string $object_type Object type. + * @param string $object_type Type of object this meta is registered to. Accepts any value with an associated meta table. + * (e.g. comment, post, term, user, my_custom_meta) */ return apply_filters( "sanitize_{$object_type}_meta_{$meta_key}", $meta_value, $meta_key, $object_type ); } @@ -1108,7 +1111,8 @@ function sanitize_meta( $meta_key, $meta_value, $object_type, $object_subtype = * `$sanitize_callback` and `$auth_callback` have been folded into this array. * @since 4.9.8 The `$object_subtype` argument was added to the arguments array. * - * @param string $object_type Type of object this meta is registered to. + * @param string $object_type Type of object this meta is registered to. Accepts any value with an associated meta table. + * (e.g. comment, post, term, user, my_custom_meta) * @param string $meta_key Meta key to register. * @param array $args { * Data used to describe the meta key when registered. @@ -1172,7 +1176,8 @@ function register_meta( $object_type, $meta_key, $args, $deprecated = null ) { * * @param array $args Array of meta registration arguments. * @param array $defaults Array of default arguments. - * @param string $object_type Object type. + * @param string $object_type Type of object this meta is registered to. Accepts any value with an associated meta table. + * (e.g. comment, post, term, user, my_custom_meta) * @param string $meta_key Meta key. */ $args = apply_filters( 'register_meta_args', $args, $defaults, $object_type, $meta_key ); @@ -1224,7 +1229,8 @@ function register_meta( $object_type, $meta_key, $args, $deprecated = null ) { * @since 4.6.0 * @since 4.9.8 The `$object_subtype` parameter was added. * - * @param string $object_type The type of object. + * @param string $object_type Type of object this meta is registered to. Accepts any value with an associated meta table. + * (e.g. comment, post, term, user, my_custom_meta) * @param string $meta_key The meta key. * @param string $object_subtype Optional. The subtype of the object type. * @@ -1243,7 +1249,8 @@ function registered_meta_key_exists( $object_type, $meta_key, $object_subtype = * @since 4.6.0 * @since 4.9.8 The `$object_subtype` parameter was added. * - * @param string $object_type The type of object. + * @param string $object_type Type of object this meta is registered to. Accepts any value with an associated meta table. + * (e.g. comment, post, term, user, my_custom_meta) * @param string $meta_key The meta key. * @param string $object_subtype Optional. The subtype of the object type. * @return bool True if successful. False if the meta key was not registered. @@ -1292,7 +1299,8 @@ function unregister_meta_key( $object_type, $meta_key, $object_subtype = '' ) { * @since 4.6.0 * @since 4.9.8 The `$object_subtype` parameter was added. * - * @param string $object_type The type of object. Post, comment, user, term. + * @param string $object_type Type of object this meta is registered to. Accepts any value with an associated meta table. + * (e.g. comment, post, term, user, my_custom_meta) * @param string $object_subtype Optional. The subtype of the object type. * @return array List of registered meta keys. */ @@ -1314,7 +1322,8 @@ function get_registered_meta_keys( $object_type, $object_subtype = '' ) { * * @since 4.6.0 * - * @param string $object_type Type of object to request metadata for. (e.g. comment, post, term, user) + * @param string $object_type Type of object this meta is registered to. Accepts any value with an associated meta table. + * (e.g. comment, post, term, user, my_custom_meta) * @param int $object_id ID of the object the metadata is for. * @param string $meta_key Optional. Registered metadata key. If not specified, retrieve all registered * metadata for the specified object. @@ -1376,7 +1385,8 @@ function _wp_register_meta_args_whitelist( $args, $default_args ) { * * @since 4.9.8 * - * @param string $object_type Type of object to request metadata for. (e.g. comment, post, term, user) + * @param string $object_type Type of object this meta is registered to. Accepts any value with an associated meta table. + * (e.g. comment, post, term, user, my_custom_meta) * @param int $object_id ID of the object to retrieve its subtype. * @return string The object subtype or an empty string if unspecified subtype. */