apply_filters( 'is_protected_meta', bool $protected , string $meta_key , string $meta_type )
Filters whether a meta key is considered protected.
Parameters
-
$protected
bool -
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.
Source
File: wp-includes/meta.php
.
View all references
return apply_filters( 'is_protected_meta', $protected, $meta_key, $meta_type );
Changelog
Version | Description |
---|---|
3.2.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.
Example of 2 meta fields that you want to set as protected: