WordPress Hooks Explorer

Listing all hooks extracted WordPress Core


Details about update_postmeta

Back to home

Files

Filename Hook Type Line Number PHP Doc
wp-includes/meta.php do_action 302 /**
* Fires immediately before updating a post's metadata.
*
* @since 2.9.0
*
* @param int $meta_id ID of metadata entry to update.
* @param int $object_id Post ID.
* @param string $meta_key Metadata key.
* @param mixed $meta_value Metadata value. This will be a PHP-serialized string representation of the value
* if the value is an array, an object, or itself a PHP-serialized string.
*/
wp-includes/meta.php do_action 940 /**
* Short-circuits updating metadata of a specific type by meta ID.
*
* The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
* (post, comment, term, user, or any other type with an associated meta table).
* Returning a non-null value will effectively short-circuit the function.
*
* Possible hook names include:
*
* - `update_post_metadata_by_mid`
* - `update_comment_metadata_by_mid`
* - `update_term_metadata_by_mid`
* - `update_user_metadata_by_mid`
*
* @since 5.0.0
*
* @param null|bool $check Whether to allow updating metadata for the given type.
* @param int $meta_id Meta ID.
* @param mixed $meta_value Meta value. Must be serializable if non-scalar.
* @param string|false $meta_key Meta key, if provided.
*/

Hook Parameters

Parameter Type Name Description
int $meta_id ID of metadata entry to update.
int $object_id Post ID.
string $meta_key Metadata key.
mixed $meta_value Metadata value. This will be a PHP-serialized string representation of the value
int $meta_id ID of metadata entry to update.
int $object_id Post ID.
string $meta_key Metadata key.
mixed $meta_value Metadata value. This will be a PHP-serialized string representation of the value