Jake Vanderwerf
2 days ago 235ce5716edc2f7cbe80fdccf26eac7269587839
inc/managers/queue/executors/UploadExecutor.php
@@ -329,6 +329,7 @@
            $postID = wp_get_post_parent_id($attachmentId);
            if ($postID && !in_array($postID, $postsAttachedTo)){
               $postsAttachedTo[] = $postID;
               //TODO: is there a better way?
            }
         }
@@ -681,14 +682,7 @@
   private function updateTimelineMetadata(int $parentId): void
   {
      // Get all child posts
      $children = get_children([
         'post_parent' => $parentId,
         'post_type' => get_post_type($parentId),
         'post_status' => ['publish', 'draft'],
         'orderby' => 'date',
         'order' => 'DESC',
         'fields' => 'ids'
      ]);
      $children = jvbTimelinePoints($parentId, get_post_type($parentId), ['any']);
      // Count includes parent + children
      $number = count($children) + 1;