Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Post_Model::is_meta_value_same_as_stored_value( string $key, mixed $stored_value, mixed $new_value )

Checks if the user provided value is equivalent to a stored value for the given meta key.

Description Description


Top ↑

Parameters Parameters


(string) (Required) The un-prefixed meta key being checked.


(mixed) (Required) The currently stored value retrieved from get_metadata().


(mixed) (Required) The new value.

Top ↑

Return Return


Top ↑

Source Source

File: includes/abstracts/

	private function is_meta_value_same_as_stored_value( $key, $stored_value, $new_value ) {

		$sanitized = sanitize_meta( $this->meta_prefix . $key, $new_value, 'post', $this->db_post_type );

		// The return value of get_metadata will always be a string for scalar types.
		$scalar_types = array(

		if ( in_array( $this->get_property_type( $key ), $scalar_types, true ) ) {
			$sanitized = (string) $sanitized;

		return $sanitized === $stored_value;

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.