CodeExplorer get_available_post_statuses example
$q['m'
] =
isset( $q['m'
] ) ?
(int) $q['m'
] : 0;
$q['cat'
] =
isset( $q['cat'
] ) ?
(int) $q['cat'
] : 0;
$post_stati =
get_post_stati();
if ( isset( $q['post_type'
] ) &&
in_array( $q['post_type'
],
get_post_types(), true
) ) { $post_type =
$q['post_type'
];
} else { $post_type = 'post';
} $avail_post_stati =
get_available_post_statuses( $post_type );
$post_status = '';
$perm = '';
if ( isset( $q['post_status'
] ) &&
in_array( $q['post_status'
],
$post_stati, true
) ) { $post_status =
$q['post_status'
];
$perm = 'readable';
} $orderby = '';
if ( isset( $q['orderby'
] ) ) {