WordPress.org

Make WordPress Core

Ticket #24285: ajax-actions.patch

File ajax-actions.patch, 796 bytes (added by alex-ye, 2 years ago)

First Draft

  • wp-admin/includes/ajax-actions.php

    # This patch file was generated by NetBeans IDE
    # Following Index: paths are relative to: \wp-admin\includes
    # It uses platform neutral UTF-8 encoding and \n newlines.
    # Above lines and this line are ignored by the patching process.
     
    18501850        if ( current_user_can( get_post_type_object( 'attachment' )->cap->read_private_posts ) ) 
    18511851                $query['post_status'] .= ',private'; 
    18521852 
    1853         $query = new WP_Query( $query ); 
     1853        $query = new WP_Query( apply_filters( 'ajax_attachments_query_args', $query ) ); 
    18541854 
    18551855        $posts = array_map( 'wp_prepare_attachment_for_js', $query->posts ); 
    18561856        $posts = array_filter( $posts );