WordPress.org

Make WordPress Core

Ticket #20230: 20230.diff

File 20230.diff, 514 bytes (added by jeremyfelt, 3 years ago)

Additional filter for post_gallery_results in media.php

  • media.php

     
    819819                return $output; 
    820820        } 
    821821 
     822        // Allow plugins/themes to override the default gallery template but maintain the same query. 
     823        $output = apply_filters( 'post_gallery_results', '', $attachments ); 
     824        if ( $output != '' ) 
     825                return $output; 
     826 
    822827        $itemtag = tag_escape($itemtag); 
    823828        $captiontag = tag_escape($captiontag); 
    824829        $columns = intval($columns);