apply_filters( 'is_protected_meta', bool $protected , string $meta_key , string|null $meta_type )
Filters whether a meta key is considered protected.
Description
Parameters
- $protected
-
(bool) Whether the key is considered protected.
- $meta_key
-
(string) Meta key.
- $meta_type
-
(string|null) Type of object metadata is for (e.g., comment, post, term, or user).
Source
File: wp-includes/meta.php
Changelog
Version | Description |
---|---|
3.2.0 | Introduced. |
Example of 2 meta fields that you want to set as protected:
Expand full source codeCollapse full source code