is_protected_meta

Advertisement

Summery Summery

Determines whether a meta key is considered protected.

Syntax Syntax

is_protected_meta( string $meta_key, string $meta_type = '' )

Parameters Parameters

$meta_key

(string) (Required) Metadata key.

$meta_type

(string) (Optional) Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user', or any other object type with an associated meta table.

Default value: ''

Return Return

(bool) Whether the meta key is considered protected.

Source Source

File: wp-includes/meta.php

			$non_cached_ids[] = $id;
		} else {
			$cache[ $id ] = $cached_object;
		}
	}

	if ( empty( $non_cached_ids ) ) {
		return $cache;
	}

	// Get meta info.
	$id_list   = join( ',', $non_cached_ids );
	$id_column = ( 'user' === $meta_type ) ? 'umeta_id' : 'meta_id';

	$meta_list = $wpdb->get_results( "SELECT $column, meta_key, meta_value FROM $table WHERE $column IN ($id_list) ORDER BY $id_column ASC", ARRAY_A );

Advertisement

Changelog Changelog

Changelog
Version Description
3.1.3 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.