apply_filters( 'wp_link_query', array $results, array $query )
- Since
- 3.7.0
Filters the link query results.
Description
Allows modification of the returned link query results.
Compatibility
- WordPress
- since 3.7.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$resultsarray- { An array of associative arrays of query results.
@type array ...$0 { @type int $ID Post ID.
@type string $title The trimmed, escaped post title.
@type string $permalink Post permalink.
@type string $info A 'Y/m/d'-formatted date for 'post' post type, the 'singular_name' post type label otherwise.
} }...$0array@type int $ID Post ID.$titlestringThe trimmed, escaped post title.$permalinkstringPost permalink.$infostringA 'Y/m/d'-formatted date for 'post' post type, the 'singular_name' post type label otherwise.
$queryarray- An array of WP_Query arguments.
Where this hook fires · 1
wp-includes/class-wp-editor.php:1858_WP_Editors::wp_link_query()
Source code
* @type string $info A 'Y/m/d'-formatted date for 'post' post type, * the 'singular_name' post type label otherwise. * } * } * @param array $query An array of WP_Query arguments. */ $results = apply_filters( 'wp_link_query', $results, $query ); return ! empty( $results ) ? $results : false; } /** * Dialog for internal linking.Changelog
Introduced in 3.7.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.9.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.