| | |
| | | private static array $instances = []; |
| | | |
| | | protected string $based; |
| | | |
| | | |
| | | protected static array $processing = ['terms'=>[],'posts'=>[],'users' =>[]]; |
| | | private function __construct(string $slug, string $singular, string $plural, string $type) { |
| | | $this->slug = $slug; |
| | | $this->based = jvbCheckBase($slug); |
| | |
| | | } |
| | | public function addTermUpdatedMeta(int $termId):void |
| | | { |
| | | |
| | | static $processing = []; |
| | | if (isset($processing[$termId])) return; |
| | | $processing[$termId] = true; |
| | | if (self::$processing['terms'][$termId]) return; |
| | | self::$processing['terms'][$termId] = true; |
| | | |
| | | update_term_meta($termId, BASE . 'date_modified', date('Y-m-d H:i:s')); |
| | | |
| | | unset($processing[$termId]); |
| | | unset(self::$processing['terms'][$termId]); |
| | | } |
| | | |
| | | public function renderContent(string $content, array $block):string |