update_postmeta

update_postmeta

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: wordpress-6.5.2

do_action('update_postmeta') is found 2 times:

  • /wp-includes/meta.php line 304
    			 * @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.
    			 */
    			do_action( 'update_postmeta', $meta_id, $object_id, $meta_key, $meta_value );
    		}
    	}
    
    	$result = $wpdb->update( $table, $data, $where );
    	if ( ! $result ) {
    		return false;
    
  • /wp-includes/meta.php line 945
    		do_action( "update_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );
    
    		if ( 'post' === $meta_type ) {
    			/** This action is documented in wp-includes/meta.php */
    			do_action( 'update_postmeta', $meta_id, $object_id, $meta_key, $meta_value );
    		}
    
    		// Run the update query, all fields in $data are %s, $where is a %d.
    		$result = $wpdb->update( $table, $data, $where, '%s', '%d' );
    		if ( ! $result ) {
    			return false;