diff --git wp-includes/meta.php wp-includes/meta.php
index 4066781..c55290d 100644
--- wp-includes/meta.php
+++ wp-includes/meta.php
@@ -47,6 +47,21 @@ function add_metadata($meta_type, $object_id, $meta_key, $meta_value, $unique =
 	$meta_value = wp_unslash($meta_value);
 	$meta_value = sanitize_meta( $meta_key, $meta_value, $meta_type );
 
+	/**
+	 * Filter to apply before adding the metadata to the database to allow overriding what is
+	 * returned by add_metadata().
+	 *
+	 * @since 3.1.0
+	 *
+	 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user).
+	 * @param int|null null The value add_metadata() should return. The meta ID on successful update, false on failure.
+	 * @param int $object_id ID of the object metadata is for.
+	 * @param string $meta_key Metadata key.
+	 * @param mixed $meta_value Metadata value. Must be serializable if non-scalar.
+	 * @param bool $unique Optional, default is false. Whether the specified metadata key should be
+	 * 		unique for the object. If true, and the object already has a value for the specified
+	 * 		metadata key, no change will be made.
+	 */
 	$check = apply_filters( "add_{$meta_type}_metadata", null, $object_id, $meta_key, $meta_value, $unique );
 	if ( null !== $check )
 		return $check;
@@ -59,6 +74,16 @@ function add_metadata($meta_type, $object_id, $meta_key, $meta_value, $unique =
 	$_meta_value = $meta_value;
 	$meta_value = maybe_serialize( $meta_value );
 
+	/**
+	 * Fires before adding metadata to the database.
+	 *
+	 * @since 3.1.0
+	 *
+	 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user).
+	 * @param int $object_id ID of the object metadata is for.
+	 * @param string $meta_key Metadata key.
+	 * @param mixed $_meta_value Metadata value.
+	 */
 	do_action( "add_{$meta_type}_meta", $object_id, $meta_key, $_meta_value );
 
 	$result = $wpdb->insert( $table, array(
@@ -74,6 +99,17 @@ function add_metadata($meta_type, $object_id, $meta_key, $meta_value, $unique =
 
 	wp_cache_delete($object_id, $meta_type . '_meta');
 
+	/**
+	 * Fires after adding metadata to the database.
+	 *
+	 * @since 2.9.0
+	 *
+	 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user).
+	 * @param int $object_id ID of the object metadata is for.
+	 * @param string $meta_key Metadata key.
+	 * @param mixed $_meta_value Metadata value.
+	 * @param int $mid The meta ID after successful update.
+	 */
 	do_action( "added_{$meta_type}_meta", $mid, $object_id, $meta_key, $_meta_value );
 
 	return $mid;
@@ -119,6 +155,19 @@ function update_metadata($meta_type, $object_id, $meta_key, $meta_value, $prev_v
 	$meta_value = wp_unslash($meta_value);
 	$meta_value = sanitize_meta( $meta_key, $meta_value, $meta_type );
 
+	/**
+	 * Filter before updating the metadata in the database to allow overriding what is returned by update_metadata().
+	 *
+	 * @since 3.1.0
+	 *
+	 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user).
+	 * @param bool|null null The value update_metadata() should return. True on successful update, false on failure.
+	 * @param int $object_id ID of the object metadata is for.
+	 * @param string $meta_key Metadata key.
+	 * @param mixed $meta_value Metadata value. Must be serializable if non-scalar.
+	 * @param mixed $prev_value Optional. If specified, only update existing metadata entries with
+	 * 		the specified value. Otherwise, update all entries.
+	 */
 	$check = apply_filters( "update_{$meta_type}_metadata", null, $object_id, $meta_key, $meta_value, $prev_value );
 	if ( null !== $check )
 		return (bool) $check;
@@ -146,9 +195,30 @@ function update_metadata($meta_type, $object_id, $meta_key, $meta_value, $prev_v
 		$where['meta_value'] = $prev_value;
 	}
 
+	/**
+	 * Fires before updating metadata in the database.
+	 *
+	 * @since 2.9.0
+	 *
+	 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user).
+	 * @param int $meta_id of metadata entry to update
+	 * @param int $object_id ID of the object metadata is for
+	 * @param string $meta_key Metadata key
+	 * @param mixed $_meta_value Metadata value.
+	 */
 	do_action( "update_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );
 
 	if ( 'post' == $meta_type )
+		/**
+		 * Fires before updating metadata in the database when Meta Type is 'post'.
+		 *
+		 * @since 3.3.0
+		 *
+		 * @param int $meta_id of metadata entry to update
+		 * @param int $object_id ID of the object metadata is for
+		 * @param string $meta_key Metadata key
+		 * @param mixed $meta_value Metadata value.
+		 */
 		do_action( 'update_postmeta', $meta_id, $object_id, $meta_key, $meta_value );
 
 	$result = $wpdb->update( $table, $data, $where );
@@ -157,9 +227,30 @@ function update_metadata($meta_type, $object_id, $meta_key, $meta_value, $prev_v
 
 	wp_cache_delete($object_id, $meta_type . '_meta');
 
+	/**
+	 * Fires after updating metadata in the database.
+	 *
+	 * @since 2.9.0
+	 *
+	 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user).
+	 * @param int $meta_id of updated metadata entry.
+	 * @param int $object_id ID of the object metadata is for.
+	 * @param string $meta_key Metadata key.
+	 * @param mixed $_meta_value Metadata value.
+	 */
 	do_action( "updated_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );
 
 	if ( 'post' == $meta_type )
+		/**
+		 * Fires after updating metadata in the database when meta type is 'post'.
+		 *
+		 * @since 3.3.0
+		 *
+		 * @param int $meta_id of updated metadata entry.
+		 * @param int $object_id ID of the object metadata is for.
+		 * @param string $meta_key Metadata key.
+		 * @param mixed $meta_value Metadata value.
+		 */
 		do_action( 'updated_postmeta', $meta_id, $object_id, $meta_key, $meta_value );
 
 	return true;
@@ -201,6 +292,21 @@ function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '', $d
 	$meta_key = wp_unslash($meta_key);
 	$meta_value = wp_unslash($meta_value);
 
+	/**
+	 * Filter before deleting the metadata from the database. If filter is applied, delete_metadata()
+	 * immediately returns the value returned by the filter and does not delete metadata from database.
+	 *
+	 * @since 3.1.0
+	 *
+	 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user).
+	 * @param bool|null null The value delete_metadata() should return.
+	 * @param int $object_id ID of the object metadata is for.
+	 * @param string $meta_key Metadata key.
+	 * @param mixed $meta_value Metadata value. Must be serializable if non-scalar.
+	 * @param bool $delete_all Optional, default is false. If true, delete matching metadata entries
+	 * 		for all objects, ignoring the specified object_id. Otherwise, only delete matching
+	 * 		metadata entries for the specified object_id.
+	 */
 	$check = apply_filters( "delete_{$meta_type}_metadata", null, $object_id, $meta_key, $meta_value, $delete_all );
 	if ( null !== $check )
 		return (bool) $check;
@@ -223,10 +329,28 @@ function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '', $d
 	if ( $delete_all )
 		$object_ids = $wpdb->get_col( $wpdb->prepare( "SELECT $type_column FROM $table WHERE meta_key = %s", $meta_key ) );
 
+	/**
+	 * Fires before deleting metadata from the database.
+	 *
+	 * @since 3.1.0
+	 *
+	 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user).
+	 * @param array $meta_ids Array of metadata entry IDs to delete.
+	 * @param int $object_id ID of the object metadata is for.
+	 * @param string $meta_key Metadata key.
+	 * @param mixed $_meta_value Metadata value.
+	 */
 	do_action( "delete_{$meta_type}_meta", $meta_ids, $object_id, $meta_key, $_meta_value );
 
 	// Old-style action.
 	if ( 'post' == $meta_type )
+		/**
+		 * Fires before deleting metadata from the database when meta type is 'post'.
+		 *
+		 * @since 3.3.0
+		 *
+		 * @param array $meta_ids Array of metadata entry IDs to delete.
+		 */
 		do_action( 'delete_postmeta', $meta_ids );
 
 	$query = "DELETE FROM $table WHERE $id_column IN( " . implode( ',', $meta_ids ) . " )";
@@ -244,10 +368,28 @@ function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '', $d
 		wp_cache_delete($object_id, $meta_type . '_meta');
 	}
 
+	/**
+	 * Fires after deleting metadata from the database.
+	 *
+	 * @since 2.9.0
+	 *
+	 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user).
+	 * @param array $meta_ids Array of deleted metadata entries.
+	 * @param int $object_id ID of the object metadata is for.
+	 * @param string $meta_key Metadata key.
+	 * @param mixed $_meta_value Metadata value.
+	 */
 	do_action( "deleted_{$meta_type}_meta", $meta_ids, $object_id, $meta_key, $_meta_value );
 
 	// Old-style action.
 	if ( 'post' == $meta_type )
+		/**
+		 * Fires after deleting metadata from the database when meta type is 'post'.
+		 *
+		 * @since 3.3.0
+		 *
+		 * @param array $meta_ids Array of deleted metadata entry IDs.
+		 */
 		do_action( 'deleted_postmeta', $meta_ids );
 
 	return true;
@@ -273,6 +415,17 @@ function get_metadata($meta_type, $object_id, $meta_key = '', $single = false) {
 	if ( !$object_id = absint($object_id) )
 		return false;
 
+	/**
+	 * Filter metadata retrieval.
+	 *
+	 * @since 3.1.0
+	 *
+	 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user).
+	 * @param string|array|null null The value get_metadata() should return. Single metadata value, or array of values.
+	 * @param int $object_id ID of the object metadata is for.
+	 * @param string $meta_key Metadata key.
+	 * @param string|array Single metadata value, or array of values
+	 */
 	$check = apply_filters( "get_{$meta_type}_metadata", null, $object_id, $meta_key, $single );
 	if ( null !== $check ) {
 		if ( $single && is_array( $check ) )
@@ -321,6 +474,17 @@ function metadata_exists( $meta_type, $object_id, $meta_key ) {
 	if ( ! $object_id = absint( $object_id ) )
 		return false;
 
+	/**
+	 * Filter the check if metadata exists. If non-null is returned, metadata_exists() returns true.
+	 *
+	 * @since 3.1.0
+	 *
+	 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user).
+	 * @param bool|null null The value returned by metadata_exists(); if non-null, true is returned.
+	 * @param int $object_id ID of the object metadata is for.
+	 * @param string $meta_key Metadata key.
+	 * @param boolean true if the key is set, false if not.
+	 */
 	$check = apply_filters( "get_{$meta_type}_metadata", null, $object_id, $meta_key, true );
 	if ( null !== $check )
 		return true;
@@ -431,9 +595,30 @@ function update_metadata_by_mid( $meta_type, $meta_id, $meta_value, $meta_key =
 		$where = array();
 		$where[$id_column] = $meta_id;
 
+		/**
+		 * Fires before updating metadata in the database.
+		 *
+		 * @since 2.9.0
+		 *
+		 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user).
+		 * @param int $meta_id of metadata entry to update
+		 * @param int $object_id ID of the object metadata is for
+		 * @param string $meta_key Metadata key
+		 * @param mixed $_meta_value Metadata value.
+		 */
 		do_action( "update_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );
 
 		if ( 'post' == $meta_type )
+			/**
+			 * Fires before updating metadata in the database when Meta Type is 'post'.
+			 *
+			 * @since 3.3.0
+			 *
+			 * @param int $meta_id of metadata entry to update
+			 * @param int $object_id ID of the object metadata is for
+			 * @param string $meta_key Metadata key
+			 * @param mixed $meta_value Metadata value.
+			 */
 			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.
@@ -444,9 +629,30 @@ function update_metadata_by_mid( $meta_type, $meta_id, $meta_value, $meta_key =
 		// Clear the caches.
 		wp_cache_delete($object_id, $meta_type . '_meta');
 
+		/**
+		 * Fires after updating metadata in the database.
+		 *
+		 * @since 2.9.0
+		 *
+		 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user).
+		 * @param int $meta_id of updated metadata entry.
+		 * @param int $object_id ID of the object metadata is for.
+		 * @param string $meta_key Metadata key.
+		 * @param mixed $_meta_value Metadata value.
+		 */
 		do_action( "updated_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );
 
 		if ( 'post' == $meta_type )
+			/**
+			 * Fires after updating metadata in the database when meta type is 'post'.
+			 *
+			 * @since 3.3.0
+			 *
+			 * @param int $meta_id of updated metadata entry.
+			 * @param int $object_id ID of the object metadata is for.
+			 * @param string $meta_key Metadata key.
+			 * @param mixed $meta_value Metadata value.
+			 */
 			do_action( 'updated_postmeta', $meta_id, $object_id, $meta_key, $meta_value );
 
 		return true;
@@ -489,10 +695,28 @@ function delete_metadata_by_mid( $meta_type, $meta_id ) {
 	if ( $meta = get_metadata_by_mid( $meta_type, $meta_id ) ) {
 		$object_id = $meta->{$column};
 
+		/**
+		 * Fires before deleting metadata from the database.
+		 *
+		 * @since 3.1.0
+		 *
+		 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user).
+		 * @param array $meta_id Array with single metadata entry ID to delete.
+		 * @param int $object_id ID of the object metadata is for.
+		 * @param string $meta->meta_key Metadata key.
+		 * @param mixed $meta->meta_value Metadata value.
+		 */
 		do_action( "delete_{$meta_type}_meta", (array) $meta_id, $object_id, $meta->meta_key, $meta->meta_value );
 
 		// Old-style action.
 		if ( 'post' == $meta_type || 'comment' == $meta_type )
+			/**
+			 * Fires before deleting metadata from the database when meta type is 'post'.
+			 *
+			 * @since 3.3.0
+			 *
+			 * @param int $meta_id ID of metadata entry to delete.
+			 */
 			do_action( "delete_{$meta_type}meta", $meta_id );
 
 		// Run the query, will return true if deleted, false otherwise
@@ -501,10 +725,28 @@ function delete_metadata_by_mid( $meta_type, $meta_id ) {
 		// Clear the caches.
 		wp_cache_delete($object_id, $meta_type . '_meta');
 
+		/**
+		 * Fires after deleting metadata from the database.
+		 *
+		 * @since 2.9.0
+		 *
+		 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user).
+		 * @param array $meta_id Array with single deleted metadata entry ID.
+		 * @param int $object_id ID of the object metadata is for.
+		 * @param string $meta->meta_key Metadata key.
+		 * @param mixed $meta->meta_value Metadata value.
+		 */
 		do_action( "deleted_{$meta_type}_meta", (array) $meta_id, $object_id, $meta->meta_key, $meta->meta_value );
 
 		// Old-style action.
 		if ( 'post' == $meta_type || 'comment' == $meta_type )
+			/**
+			 * Fires after deleting metadata from the database when meta type is 'post'.
+			 *
+			 * @since 3.3.0
+			 *
+			 * @param array $meta_ids ID of deleted metadata entry.
+			 */
 			do_action( "deleted_{$meta_type}meta", $meta_id );
 
 		return $result;
@@ -859,6 +1101,23 @@ class WP_Meta_Query {
 		if ( ! empty( $join ) )
 			$join = ' ' . $join;
 
+		/**
+		 * Filter the generated SQL clauses to be appended to a main query.
+		 *
+		 * @since 3.1.0
+		 *
+		 * @param array $args {
+		 *     Short description about this hash.
+		 *
+		 *     @type type $var Description.
+		 *     @type type $var Description.
+		 *     @param string $type Type of meta
+		 *     @param string $primary_table
+		 *     @param string $primary_id_column
+		 *     @param object $context (optional) The main query object
+		 *     @return array( 'join' => $join_sql, 'where' => $where_sql
+		 * }
+		 */
 		return apply_filters_ref_array( 'get_meta_sql', array( compact( 'join', 'where' ), $this->queries, $type, $primary_table, $primary_id_column, $context ) );
 	}
 }
@@ -894,6 +1153,15 @@ function _get_meta_table($type) {
 function is_protected_meta( $meta_key, $meta_type = null ) {
 	$protected = ( '_' == $meta_key[0] );
 
+	/**
+	 * Filter whether a meta key is protected.
+	 *
+	 * @since 3.2.0
+	 *
+	 * @param bool $protected True if the key is protected, false otherwise.
+	 * @param string $meta_key Meta key.
+	 * @param string $meta_type Type of meta.
+	 */
 	return apply_filters( 'is_protected_meta', $protected, $meta_key, $meta_type );
 }
 
@@ -908,6 +1176,15 @@ function is_protected_meta( $meta_key, $meta_type = null ) {
  * @return mixed Sanitized $meta_value
  */
 function sanitize_meta( $meta_key, $meta_value, $meta_type ) {
+	/**
+	 * Filter meta sanitation.
+	 *
+	 * @since 3.3.0
+	 *
+	 * @param string $meta_type Type of meta.
+	 * @param string $meta_key Meta key.
+	 * @param mixed $meta_value Meta value to sanitize.
+	 */
 	return apply_filters( "sanitize_{$meta_type}_meta_{$meta_key}", $meta_value, $meta_key, $meta_type );
 }
 
