Relocate hook docs so they directly precede the hook lines moved into foreach statements in [30140].

It's necessary for hook docs to directly precede hook lines so the parser can correctly match them up. This change relocates hook docs for `update_{$meta_type}_meta`, `update_postmeta`, `updated_{$meta_type}_meta`, and `updated_postmeta`.

Fixes #11683.

Built from https://develop.svn.wordpress.org/trunk@30149


git-svn-id: http://core.svn.wordpress.org/trunk@30149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Drew Jaynes 2014-11-01 04:18:23 +00:00
parent 8b18debcd0
commit a929ac44e1
2 changed files with 38 additions and 38 deletions

View File

@ -212,35 +212,35 @@ function update_metadata($meta_type, $object_id, $meta_key, $meta_value, $prev_v
$where['meta_value'] = $prev_value;
}
/**
* Fires immediately before updating metadata of a specific type.
*
* The dynamic portion of the hook, $meta_type, refers to the meta
* object type (comment, post, or user).
*
* @since 2.9.0
*
* @param int $meta_id ID of the metadata entry to update.
* @param int $object_id Object ID.
* @param string $meta_key Meta key.
* @param mixed $meta_value Meta value.
*/
foreach ( $meta_ids as $meta_id ) {
do_action( "update_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );
}
if ( 'post' == $meta_type ) {
/**
* Fires immediately before updating a post's metadata.
* Fires immediately before updating metadata of a specific type.
*
* The dynamic portion of the hook, $meta_type, refers to the meta
* object type (comment, post, or user).
*
* @since 2.9.0
*
* @param int $meta_id ID of metadata entry to update.
* @param int $meta_id ID of the metadata entry to update.
* @param int $object_id Object ID.
* @param string $meta_key Meta key.
* @param mixed $meta_value Meta value.
*/
do_action( "update_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );
}
if ( 'post' == $meta_type ) {
foreach ( $meta_ids as $meta_id ) {
/**
* 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 Object ID.
* @param string $meta_key Meta key.
* @param mixed $meta_value Meta value.
*/
do_action( 'update_postmeta', $meta_id, $object_id, $meta_key, $meta_value );
}
}
@ -251,26 +251,12 @@ function update_metadata($meta_type, $object_id, $meta_key, $meta_value, $prev_v
wp_cache_delete($object_id, $meta_type . '_meta');
/**
* Fires immediately after updating metadata of a specific type.
*
* The dynamic portion of the hook, $meta_type, refers to the meta
* object type (comment, post, or user).
*
* @since 2.9.0
*
* @param int $meta_id ID of updated metadata entry.
* @param int $object_id Object ID.
* @param string $meta_key Meta key.
* @param mixed $meta_value Meta value.
*/
foreach ( $meta_ids as $meta_id ) {
do_action( "updated_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );
}
if ( 'post' == $meta_type ) {
/**
* Fires immediately after updating a post's metadata.
* Fires immediately after updating metadata of a specific type.
*
* The dynamic portion of the hook, $meta_type, refers to the meta
* object type (comment, post, or user).
*
* @since 2.9.0
*
@ -279,7 +265,21 @@ function update_metadata($meta_type, $object_id, $meta_key, $meta_value, $prev_v
* @param string $meta_key Meta key.
* @param mixed $meta_value Meta value.
*/
do_action( "updated_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );
}
if ( 'post' == $meta_type ) {
foreach ( $meta_ids as $meta_id ) {
/**
* Fires immediately after updating a post's metadata.
*
* @since 2.9.0
*
* @param int $meta_id ID of updated metadata entry.
* @param int $object_id Object ID.
* @param string $meta_key Meta key.
* @param mixed $meta_value Meta value.
*/
do_action( 'updated_postmeta', $meta_id, $object_id, $meta_key, $meta_value );
}
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.1-alpha-30148';
$wp_version = '4.1-alpha-30149';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.