Skip to content

Commit

Permalink
Change schedule position
Browse files Browse the repository at this point in the history
  • Loading branch information
olatechpro committed May 16, 2024
1 parent cb63ee8 commit f1426cb
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions modules/content-board/content-board.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function __construct()
'content_board_custom_columns' => '',
'content_board_filters' => '',
'content_board_custom_filters' => '',

'content_board_scheduled_date' => [
'number' => 1,
'period' => 'weeks'
Expand Down Expand Up @@ -2548,20 +2548,13 @@ public function printPostForPostType($postType)
$post_statuses_slugs = array_column($post_statuses, 'slug');
if (!in_array('future', $post_statuses_slugs)) {
// Add Scheduled status
/*$post_statuses[] = (object) [
'label' => __('Scheduled', 'publishpress'),
'description' => '',
'name' => 'future',
'slug' => 'future',
'position' => count($post_statuses) + 1
];*/
$post_statuses = array_merge([(object) [
$post_statuses[] = (object) [
'label' => __('Scheduled', 'publishpress'),
'description' => '',
'name' => 'future',
'slug' => 'future',
'position' => count($post_statuses) + 1
]], $post_statuses);
];
}

// Group posts by status
Expand Down

0 comments on commit f1426cb

Please sign in to comment.