update_postmeta

update_postmeta

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

See hook in core

Displaying hooks found in version: wordpress-6.7.2

do_action('update_postmeta') is found 2 times:

  • /wp-includes/meta.php line 304
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
             * @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 946
    942
    943
    944
    945
    946
    947
    948
    949
    950
    951
    952
    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;