Filter hook 'wp_link_query_args'

in WP Core File wp-includes/class-wp-editor.php at line 1813

View Source

wp_link_query_args

Filter Hook
Description
Filters the link query arguments. Allows modification of the link query arguments before querying.

Hook Information

File Location wp-includes/class-wp-editor.php View on GitHub
Hook Type Filter
Line Number 1813

Hook Parameters

Type Name Description
array $query An array of WP_Query arguments.

Usage Examples

Basic Usage
<?php
// Hook into wp_link_query_args
add_filter('wp_link_query_args', 'my_custom_filter', 10, 1);

function my_custom_filter($query) {
    // Your custom filtering logic here
    return $query;
}

Source Code Context

wp-includes/class-wp-editor.php:1813 - How this hook is used in WordPress core
<?php
1808  		 *
1809  		 * @since 3.7.0
1810  		 *
1811  		 * @param array $query An array of WP_Query arguments.
1812  		 */
1813  		$query = apply_filters( 'wp_link_query_args', $query );
1814  
1815  		// Do main query.
1816  		$get_posts = new WP_Query();
1817  		$posts     = $get_posts->query( $query );
1818  

PHP Documentation

<?php
/**
		 * Filters the link query arguments.
		 *
		 * Allows modification of the link query arguments before querying.
		 *
		 * @see WP_Query for a full list of arguments
		 *
		 * @since 3.7.0
		 *
		 * @param array $query An array of WP_Query arguments.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/class-wp-editor.php
Related Hooks

Related hooks will be displayed here in future updates.