我需要修改此代码以显示所有帖子状态,而不仅仅是发布状态。有什么想法吗?
$post_types = get_post_types(array(\'public\'=>true),\'names\');
$post_type = !empty($_REQUEST[\'type\']) && in_array($_REQUEST[\'type\'], $post_types) ? $_REQUEST[\'type\']:get_option(\'wpfc_default_type\');
$args[\'post_type\'] = $post_type;
$args[\'post_status\'] = \'publish\'; // need modifi here?
$args[\'posts_per_page\'] = -1;
if( $args[\'post_type\'] == \'attachment\' ) $args[\'post_status\'] = \'inherit\';
$args[\'tax_query\'] = array();
foreach( get_object_taxonomies($post_type) as $taxonomy_name ){
if( !empty($_REQUEST[$taxonomy_name]) ){
$args[\'tax_query\'][] = array(
\'taxonomy\' => $taxonomy_name,
\'field\' => \'id\',
\'terms\' => $_REQUEST[$taxonomy_name]
);
}
}