wp_link_query_args WordPress Filter Hook
The wp_link_query_args hook allows you to modify the link query arguments. This hook is useful for adding custom arguments to the link query. For example, you could use this hook to add a custom argument that would display a link to a specific post. This hook is triggered when the link query is being generated.
apply_filters( 'wp_link_query_args', array $query ) #
Filters the link query arguments.
Description
Allows modification of the link query arguments before querying.
See also
- WP_Query: for a full list of arguments
Parameters
- $query
(array)An array of WP_Query arguments.
More Information
The “wp_link_query_args
” filter is used to filter the array of arguments passed to the wp_link_query
function which is responsible for building the list of linkable content in the modal window that displays when you insert a link. wp_link_query_args
allows you to alter the query before the list is rendered on the page.
Source
Changelog
Version | Description |
---|---|
3.7.0 | Introduced. |