Jake Vanderwerf
2026-08-29 f859e64a57c624ff2daa2b21355f65a49fd4807d
inc/managers/TaxonomyRelationships.php
@@ -3,6 +3,7 @@
use Exception;
use JVBase\Instance;
use JVBase\managers\queue\Queue;
use WP_Error;
use WP_Post;
use WP_Query;
@@ -79,14 +80,12 @@
        add_filter(BASE.'handle_bulk_operation', [$this, 'processOperation'], 10, 3);
    }
    // Update relationships for a post
    /**
     * @param int $post_id
     *
     * @return void
     */
   /**
    * Update relationships for a post
    * @param int $post_id
    * @param WP_Post $post
    * @return void
    */
    public function updatePostRelationships(int $post_id, WP_Post $post):void
    {
      // Skip autosaves and revisions
@@ -197,7 +196,7 @@
    {
        $term_posts = $this->cache->remember(
         $this->cache->generateKey(['id' => $term_id, 'taxonomy' => $taxonomy]),
         ['id' => $term_id, 'taxonomy' => $taxonomy],
         function () use ($term_id, $taxonomy) {
            global $wpdb;
            return $wpdb->get_col($wpdb->prepare(
@@ -212,7 +211,7 @@
        $related_term_posts = $this->cache->remember(
         $this->cache->generateKey(['id' => $related_term_id, 'taxonomy' => $related_taxonomy]),
         ['id' => $related_term_id, 'taxonomy' => $related_taxonomy],
         function () use($related_term_id, $related_taxonomy) {
            global $wpdb;
            return $wpdb->get_col($wpdb->prepare(