| | |
| | | <?php |
| | | namespace JVBase\managers; |
| | | |
| | | use JVBase\Instance; |
| | | use JVBase\registrar\Registrar; |
| | | use WP_Post; |
| | | use WP_Error; |
| | |
| | | } |
| | | class UserTermsManager |
| | | { |
| | | private Cache $cache; |
| | | |
| | | use Instance; |
| | | protected CustomTable $index; |
| | | |
| | | public function __construct() |
| | | private function __construct() |
| | | { |
| | | $this->defineTables(); |
| | | $this->cache = Cache::for('term_ids')->connect('user'); |
| | | |
| | | // Register hooks |
| | | add_action('set_object_terms', [$this, 'handleTermAssignment'], 10, 6); |
| | |
| | | ]; |
| | | } |
| | | |
| | | JVB()->queue()->queueOperation( |
| | | Queue::getInstance()->queueOperation( |
| | | 'rebuild_user_term_index', |
| | | 0, |
| | | [ |
| | |
| | | ]; |
| | | } |
| | | |
| | | JVB()->queue()->queueOperation( |
| | | Queue::getInstance()->queueOperation( |
| | | 'rebuild_user_term_index', |
| | | 0, |
| | | [ |