Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: updated_{$meta_type}_meta

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

Line Code
239       * object type (comment, post, or user).
240       *
241       * @since 2.9.0
242       *
243       * @param int    $meta_id    ID of updated metadata entry.
244       * @param int    $object_id  Object ID.
245       * @param string $meta_key   Meta key.
246       * @param mixed  $meta_value Meta value.
247       */
248      do_action( "updated_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );
249
250      if ( 'post' == $meta_type ) {
251           /**
252            * Fires immediately after updating a post's metadata.
253            *
254            * @since 2.9.0
255            *
256            * @param int    $meta_id    ID of updated metadata entry.
257            * @param int    $object_id  Object ID.
 
Line Code
615           // Run the update query, all fields in $data are %s, $where is a %d.
616           $result = $wpdb->update( $table, $data, $where, '%s', '%d' );
617           if ( ! $result )
618                return false;
619
620           // Clear the caches.
621           wp_cache_delete($object_id, $meta_type . '_meta');
622
623           /** This action is documented in wp-includes/meta.php */
624           do_action( "updated_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );
625
626           if ( 'post' == $meta_type ) {
627                /** This action is documented in wp-includes/meta.php */
628                do_action( 'updated_postmeta', $meta_id, $object_id, $meta_key, $meta_value );
629           }
630
631           return true;
632      }
633