| | |
| | | */ |
| | | protected string $type; |
| | | /** |
| | | * @var string the full slug, with BASE |
| | | * @var ?string the full slug, with BASE |
| | | */ |
| | | protected string $slug; |
| | | protected ?string $slug; |
| | | |
| | | protected string $contentType; |
| | | protected Item $item; |
| | |
| | | protected Validator $validator; |
| | | protected Sanitizer $sanitizer; |
| | | protected array $fields; |
| | | protected WP_Post|WP_Term|WP_User|null $wpObject; |
| | | protected WP_Post|WP_Term|WP_User|false|null $wpObject; |
| | | protected int|string $ID; |
| | | protected MetaTypeManager $typeManager; |
| | | protected static array $instances = ['post' => [],'term' => [], 'user'=>[],'options'=>[]]; |
| | |
| | | |
| | | |
| | | |
| | | $registrar = Registrar::getInstance($this->slug); |
| | | $registrar = !is_null($this->slug) ? Registrar::getInstance($this->slug) : false; |
| | | $fields = $registrar ? $registrar->getFields() : []; |
| | | $meta = match($type) { |
| | | 'post' => get_post_meta($id), |