Timber\Post::get_post_custom PHP Метод

get_post_custom() защищенный Метод

Used internally to fetch the metadata fields (wp_postmeta table) and attach them to our TimberPost object
protected get_post_custom ( integer $pid ) : array
$pid integer
Результат array
    protected function get_post_custom($pid)
    {
        apply_filters('timber_post_get_meta_pre', array(), $pid, $this);
        $customs = get_post_custom($pid);
        if (!is_array($customs) || empty($customs)) {
            return array();
        }
        foreach ($customs as $key => $value) {
            if (is_array($value) && count($value) == 1 && isset($value[0])) {
                $value = $value[0];
            }
            $customs[$key] = maybe_unserialize($value);
        }
        $customs = apply_filters('timber_post_get_meta', $customs, $pid, $this);
        return $customs;
    }