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 |
---|---|
268 | } |
269 | } |
270 |
|
271 | // For backward-compatibility, 'date' needs to resolve to 'date ID'. |
272 | if ( isset( $args['orderby'] ) && 'date' === $args['orderby'] ) { |
273 | $args['orderby'] = 'date ID'; |
274 | } |
275 |
|
276 | /** This filter is documented in wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php */ |
277 | $args = apply_filters( 'rest_revision_query', $args, $request ); |
278 | $query_args = $this->prepare_items_query( $args, $request ); |
279 |
|
280 | $revisions_query = new WP_Query(); |
281 | $revisions = $revisions_query->query( $query_args ); |
282 | $offset = isset( $query_args['offset'] ) ? (int) $query_args['offset'] : 0; |
283 | $page = (int) $query_args['paged']; |
284 | $total_revisions = $revisions_query->found_posts; |
285 |
|
286 | if ( $total_revisions < 1 ) { |