Timber\User::get_custom PHP Метод

get_custom() публичный Метод

public get_custom ( ) : array | null
Результат array | null
    public function get_custom()
    {
        if ($this->ID) {
            $um = array();
            $um = apply_filters('timber_user_get_meta_pre', $um, $this->ID, $this);
            if (empty($um)) {
                $um = get_user_meta($this->ID);
            }
            $custom = array();
            foreach ($um as $key => $value) {
                if (is_array($value) && count($value) == 1) {
                    $value = $value[0];
                }
                $custom[$key] = maybe_unserialize($value);
            }
            $custom = apply_filters('timber_user_get_meta', $custom, $this->ID, $this);
            return $custom;
        }
        return null;
    }