WordPress at a glance

is_protected_meta() WP 1.0

Determine whether a meta key is protected.

✈ 1 time = 0.00001s = speed of light | 50000 times = 0.03s = speed of light PHP 7.0.8, WP 4.6
Hooks from function:
Return

true/false. True if the key is protected, false otherwise.

Usage

is_protected_meta( $meta_key, $meta_type );
$meta_key(string) (required)
Meta key
$meta_type(string/null)

Default: null

Code of is_protected_meta: wp-includes/meta.php VER 4.9.8

<?php
function is_protected_meta( $meta_key, $meta_type = null ) {
	$protected = ( '_' == $meta_key[0] );

	/**
	 * Filters whether a meta key is protected.
	 *
	 * @since 3.2.0
	 *
	 * @param bool   $protected Whether the key is protected. Default false.
	 * @param string $meta_key  Meta key.
	 * @param string $meta_type Meta type.
	 */
	return apply_filters( 'is_protected_meta', $protected, $meta_key, $meta_type );
}

Related Functions

From tag: Metadatas (any)

No comments
    Hello, !     Log In . Register