Skip to content

Commit 625154b

Browse files
authored
Merge pull request #247 from nabrown/dynamic-status-list
Validate against all available post statuses.
2 parents 0487e1b + 8ffb116 commit 625154b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

display-posts-shortcode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ function be_display_posts_shortcode( $atts ) {
356356
// Post Status.
357357
$post_status = be_dps_explode( $post_status );
358358
$validated = array();
359-
$available = array( 'publish', 'pending', 'draft', 'auto-draft', 'future', 'private', 'inherit', 'trash', 'any' );
359+
$available = get_post_stati();
360360
foreach ( $post_status as $unvalidated ) {
361361
if ( in_array( $unvalidated, $available, true ) ) {
362362
$validated[] = $unvalidated;

0 commit comments

Comments
 (0)