Skip to content

Commit

Permalink
Merge pull request #1710 from publishpress/feature/#1671-Add-Private-…
Browse files Browse the repository at this point in the history
…status-in-Content-Board

feature/#1671-Add-Private-status-in-Content-Board
  • Loading branch information
olatechpro authored Jul 24, 2024
2 parents a7ad49b + 9457ef1 commit 1c6d723
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 1c6d723

Please sign in to comment.