WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 126 | |
| 127 | if ( ! isset( $_GET['paged'] ) || $_GET['paged'] < 1 ) |
| 128 | $_GET['paged'] = 1; |
| 129 | |
| 130 | if ( isset($_GET['detached']) ) { |
| 131 | |
| 132 | $media_per_page = (int) get_user_option( 'upload_per_page' ); |
| 133 | if ( empty($media_per_page) || $media_per_page < 1 ) |
| 134 | $media_per_page = 20; |
| 135 | $media_per_page = apply_filters( 'upload_per_page', $media_per_page ); |
| 136 | |
| 137 | if ( !empty($lost) ) { |
| 138 | $start = ( (int) $_GET['paged'] - 1 ) * $media_per_page; |
| 139 | $page_links_total = ceil(count($lost) / $media_per_page); |
| 140 | $lost = implode(',', $lost); |
| 141 | |
| 142 | $orphans = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE post_type = 'attachment' AND ID IN (%s) LIMIT %d, %d", $lost, $start, $media_per_page ) ); |
| 143 | } else { |
| 144 | $start = ( (int) $_GET['paged'] - 1 ) * $media_per_page; |