Make WordPress Core

Ticket #40076: 40076.patch

File 40076.patch, 698 bytes (added by subrataemfluence, 9 years ago)
  • .php

    old new  
    131131                        );
    132132                }
    133133
     134                /* New filter Attached added to dropdown */
     135
     136                $type_links['attached'] = '<option value="attached"' . ( $this->attached ? ' selected="selected"' : '' ) . '>' . __( 'Attached' ) . '</option>';
     137
     138                if ( $this->is_trash || ( defined( 'MEDIA_TRASH') && MEDIA_TRASH ) ) {
     139                        $type_links['trash'] = sprintf(
     140                                '<option value="trash"%s>%s</option>',
     141                                selected( 'trash' === $filter, true, false ),
     142                                _x( 'Trash', 'attachment filter' )
     143                        );
     144                }
     145
     146                /* Ends Attached filter */
     147
    134148                return $type_links;
    135149        }
    136150