| | |
| | | return []; |
| | | } |
| | | |
| | | $children = get_children([ |
| | | 'post_parent' => $parentID, |
| | | 'posts_per_page' => -1, |
| | | 'post_status' => ['publish', 'draft'], |
| | | ]); |
| | | |
| | | $children = jvbTimelinePoints($parentID, $parent->post_type, ['publish', 'draft']); |
| | | |
| | | if (count($children) === 0) { |
| | | return []; |
| | |
| | | } |
| | | } |
| | | } |
| | | $isUpdate = $meta->get('is_update'); |
| | | if (!(bool) $isUpdate) { |
| | | $meta->set('number', $index); |
| | | } |
| | | |
| | | if ($lastKey === $index) { |
| | | $latestTimestamp = strtotime($post->post_date); |
| | |
| | | $meta = Meta::forPost($parentID); |
| | | $values = $meta->getAll($shared); |
| | | |
| | | $children = get_children([ |
| | | 'post_parent' => $parentID, |
| | | 'posts_per_page' => -1, |
| | | 'fields' => 'ids', |
| | | ]); |
| | | $children = jvbTimelinePoints($parentID, get_post_type($parentID), ['any']); |
| | | |
| | | if (empty($children)) { |
| | | continue; |
| | |
| | | }); |
| | | |
| | | foreach ($updates as $parentID => $status) { |
| | | $children = get_children([ |
| | | 'post_parent' => $parentID, |
| | | 'posts_per_page' => -1, |
| | | 'fields' => 'ids' |
| | | ]); |
| | | $children = jvbTimelinePoints($parentID, get_post_type($parentID), ['any']); |
| | | |
| | | if (!empty($children)) { |
| | | foreach($children as $child) { |
| | | if ($status === 'trash') { |