| | |
| | | <?php |
| | | namespace JVBase\meta; |
| | | |
| | | use JVBase\base\options; |
| | | use JVBase\base\Options; |
| | | use JVBase\managers\Cache; |
| | | use JVBase\registrar\Registrar; |
| | | |
| | |
| | | } |
| | | } |
| | | if ($this->objectType === 'options' && !isset(self::$options)) { |
| | | self::$options = options::getInstance(); |
| | | self::$options = Options::getInstance(); |
| | | } |
| | | |
| | | if ($this->objectType === 'post' && function_exists('wc_get_product') && in_array($this->content, ['product', 'product_variation'], true)) { |
| | |
| | | ***************************************************************************/ |
| | | public function set(string $name, mixed $value): bool { |
| | | $field = $this->getFieldConfig($name); |
| | | |
| | | if ($field) { |
| | | if (array_key_exists('type', $field)) { |
| | | if ($field['type'] === 'repeater' && str_contains($name, ':')) { |
| | |
| | | 'post' => Cache::clearPost($this->ID), |
| | | 'term' => Cache::clearTerm($this->ID), |
| | | 'user' => Cache::clearUser($this->ID), |
| | | default => Options::clear() |
| | | }; |
| | | } |
| | | protected function isTaxonomy(array $field):bool |