$q =
$_GET;
$q['posts_per_page'
] = 10;
$q['paged'
] =
isset( $q['paged'
] ) ?
(int) $q['paged'
] : 0;
if ( $q['paged'
] < 1
) { $q['paged'
] = 1;
} $q['offset'
] =
( $q['paged'
] - 1
) * 10;
if ( $q['offset'
] < 1
) { $q['offset'
] = 0;
} list
($post_mime_types,
$avail_post_mime_types) =
wp_edit_attachments_query( $q );
?>
<form id="filter" method="get">
<input type="hidden" name="type" value="<?php
echo esc_attr( $type ); ?>" />
<input type="hidden" name="tab" value="<?php
echo esc_attr( $tab ); ?>" />
<input type="hidden" name="post_id" value="<?php
echo (int) $post_id; ?>" />
<input type="hidden" name="post_mime_type" value="<?php
echo isset( $_GET['post_mime_type'
] ) ?
esc_attr( $_GET['post_mime_type'
] ) : ''; ?>" />
<input type="hidden" name="context" value="<?php
echo isset( $_GET['context'
] ) ?
esc_attr( $_GET['context'
] ) : ''; ?>" />
<p id="media-search" class="search-box">
<label class="screen-reader-text" for="media-search-input">