is_protected_meta filter-hookWP 3.2.0

Filters whether a meta key is considered protected.

Usage

add_filter( 'is_protected_meta', 'wp_kama_is_protected_meta_filter', 10, 3 );

/**
 * Function for `is_protected_meta` filter-hook.
 * 
 * @param bool   $protected Whether the key is considered protected.
 * @param string $meta_key  Metadata key.
 * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user', or any other object type with an associated meta table.
 *
 * @return bool
 */
function wp_kama_is_protected_meta_filter( $protected, $meta_key, $meta_type ){

	// filter...
	return $protected;
}
$protected(true|false)
Whether the key is considered protected.
$meta_key(string)
Metadata key.
$meta_type(string)
Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user', or any other object type with an associated meta table.

Changelog

Since 3.2.0 Introduced.

Where the hook is called

is_protected_meta()
is_protected_meta
wp-includes/meta.php 1299
return apply_filters( 'is_protected_meta', $protected, $meta_key, $meta_type );

Where the hook is used in WordPress

Usage not found.