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 |
---|---|
1114 | /** |
1115 | * Filters the query_vars used in get_items() for the constructed query. |
1116 | * |
1117 | * The dynamic portion of the hook name, `$key`, refers to the query_var key. |
1118 | * |
1119 | * @since 4.7.0 |
1120 | * |
1121 | * @param string $value The query_var value. |
1122 | */ |
1123 | $query_args[ $key ] = apply_filters( "rest_query_var-{$key}", $value ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
1124 | } |
1125 |
|
1126 | if ( 'post' !== $this->post_type || ! isset( $query_args['ignore_sticky_posts'] ) ) { |
1127 | $query_args['ignore_sticky_posts'] = true; |
1128 | } |
1129 |
|
1130 | // Map to proper WP_Query orderby param. |
1131 | if ( isset( $query_args['orderby'] ) && isset( $request['orderby'] ) ) { |
1132 | $orderby_mappings = array( |