Determines whether a meta key is considered protected.
Détermine si une clé méta est considérée comme protégée.
$meta_key, $meta_type = ''
Sortie :
@param string $meta_key Metadata key. @param string $meta_type Optional. Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', @return bool Whether the meta key is considered protected.
add_filter('is_protected_meta', 'protect_custom_meta', 10, 2);
function protect_custom_meta($protected, $meta_key) {
if ($meta_key === '_my_protected') return true;
return $protected;
}
Chargement des actualités...