Make WordPress Core


Ignore:
Timestamp:
03/03/2014 04:20:12 PM (11 years ago)
Author:
markjaquith
Message:

Eliminate some of our last remaining create_function() instances

  • Moved some into private function callbacks
  • Eliminated some that weren't necessary anymore

props obenland, markjaquith, nacin. fixes #14424

File:
1 edited

Legend:

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

    r27261 r27373  
    935935
    936936    if ( isset($q['detached']) )
    937         add_filter('posts_where', '_edit_attachments_query_helper');
     937        $q['post_parent'] = 0;
    938938
    939939    wp( $q );
    940940
    941     if ( isset($q['detached']) )
    942         remove_filter('posts_where', '_edit_attachments_query_helper');
    943 
    944941    return array($post_mime_types, $avail_post_mime_types);
    945 }
    946 
    947 function _edit_attachments_query_helper($where) {
    948     global $wpdb;
    949     return $where .= " AND {$wpdb->posts}.post_parent < 1";
    950942}
    951943
Note: See TracChangeset for help on using the changeset viewer.