| | |
| | | */ |
| | | class NewsRelationships |
| | | { |
| | | private string $table_name; |
| | | private Cache $cache; |
| | | private CustomTable $relationships; |
| | | protected Cache $cache; |
| | | |
| | | public function __construct() |
| | | { |
| | |
| | | */ |
| | | public function handleLinkChange(int $meta_id, int $object_id, string $meta_key, string|null $meta_value = null):void |
| | | { |
| | | // Only proceed for BASE.'link' meta key |
| | | // Only proceed for BASE.'profile_link' meta key |
| | | if ($meta_key !== BASE . 'link') { |
| | | return; |
| | | } |
| | |
| | | $wpdb->query("TRUNCATE TABLE {$this->table_name}"); |
| | | |
| | | |
| | | JVB()->queue()->queueOperation( |
| | | Queue::getInstance()->queueOperation( |
| | | 'rebuild_news', |
| | | 0, |
| | | [ |