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 |
---|---|
1779 | * |
1780 | * Allows modification of the link query arguments before querying. |
1781 | * |
1782 | * @see WP_Query for a full list of arguments |
1783 | * |
1784 | * @since 3.7.0 |
1785 | * |
1786 | * @param array $query An array of WP_Query arguments. |
1787 | */ |
1788 | $query = apply_filters( 'wp_link_query_args', $query ); |
1789 |
|
1790 | // Do main query. |
1791 | $get_posts = new WP_Query; |
1792 | $posts = $get_posts->query( $query ); |
1793 |
|
1794 | // Build results. |
1795 | $results = array(); |
1796 | foreach ( $posts as $post ) { |
1797 | if ( 'post' === $post->post_type ) { |