From f1426cb10b28723da2b03a5b3d53528e91ca2c62 Mon Sep 17 00:00:00 2001 From: olatechpro Date: Thu, 16 May 2024 12:55:10 +0100 Subject: [PATCH] Change schedule position --- modules/content-board/content-board.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/modules/content-board/content-board.php b/modules/content-board/content-board.php index be3ddfa3..a503926f 100644 --- a/modules/content-board/content-board.php +++ b/modules/content-board/content-board.php @@ -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' @@ -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