2767 | | foreach ( get_post_stati() as $status ) { |
2768 | | if ( in_array( $status, $q_status ) ) { |
2769 | | if ( 'private' == $status ) |
2770 | | $p_status[] = "$wpdb->posts.post_status = '$status'"; |
2771 | | else |
2772 | | $r_status[] = "$wpdb->posts.post_status = '$status'"; |
| 2767 | $stati = get_post_stati(); |
| 2768 | if ( empty( $stati ) ) { |
| 2769 | $r_status[] = "$wpdb->posts.post_status = 'publish'"; |
| 2770 | } else { |
| 2771 | foreach ( get_post_stati() as $status ) { |
| 2772 | if ( in_array( $status, $q_status ) ) { |
| 2773 | if ( 'private' == $status ) |
| 2774 | $p_status[] = "$wpdb->posts.post_status = '$status'"; |
| 2775 | else |
| 2776 | $r_status[] = "$wpdb->posts.post_status = '$status'"; |
| 2777 | } |