Make WordPress Core


Ignore:
Timestamp:
11/01/2014 08:19:26 PM (10 years ago)
Author:
wonderboymusic
Message:

Improve some post_status-related documentation.

Props ericlewis.
See #30230.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit.php

    r29989 r30155  
    6363
    6464    if ( 'delete_all' == $doaction ) {
     65        // Prepare for deletion of all posts with a specified post status (i.e. Empty trash).
    6566        $post_status = preg_replace('/[^a-z0-9_-]+/i', '', $_REQUEST['post_status']);
    66         if ( get_post_status_object($post_status) ) // Check the post status exists first
     67        // Validate the post status exists.
     68        if ( get_post_status_object( $post_status ) ) {
    6769            $post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type=%s AND post_status = %s", $post_type, $post_status ) );
     70        }
    6871        $doaction = 'delete';
    6972    } elseif ( isset( $_REQUEST['media'] ) ) {
Note: See TracChangeset for help on using the changeset viewer.