Skip to main content

get_serialized_meta()

public function get_serialized_meta( $key )

This method allows you to quickly retrieve and unserialize serialized post meta for the current post. If the meta key doesn't exist, or is empty, the method returns false. To retrieve post meta that does not need to be unserialized, use the get_meta() method.

Only Pass Trusted Input

Please be aware that the value of the requested meta key will be passed through the maybe_unserialize() function.


Arguments#

  • $key
    (string) (required) The meta key to pull from the $meta property and unserialize (where all meta for the current post is stored)