Skip to content

Commit

Permalink
Add "Private" status in Content Board #1671
Browse files Browse the repository at this point in the history
  • Loading branch information
olatechpro committed Jul 24, 2024
1 parent a7ad49b commit 9457ef1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions modules/content-board/content-board.php
Original file line number Diff line number Diff line change
Expand Up @@ -2593,6 +2593,16 @@ public function printPostForPostType($postType)
'position' => count($post_statuses) + 1
];
}
if (!in_array('private', $post_statuses_slugs)) {
// Add Private status
$post_statuses[] = (object) [
'label' => __('Private', 'publishpress'),
'description' => '',
'name' => 'private',
'slug' => 'private',
'position' => count($post_statuses) + 1
];
}

// Group posts by status
$grouped_posts = array_reduce($posts, function($result, $post) {
Expand Down

0 comments on commit 9457ef1

Please sign in to comment.