# wp_link_query

URL: https://chugunov.pro/api-wordpress/filters/wp_link_query/
Проверено на WordPress 6.9, обновлено 06.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией WordPress.

Тип: хук-фильтр.
Появился в версии: 3.7.0.

## Сигнатура

```php
apply_filters( 'wp_link_query', array $results, array $query )
```

## Описание

Позволяет изменить возвращаемые результаты запроса ссылок.
См. также 'wp_link_query_args': фильтр

## Параметры

- `$results` `array` — обязательный. An array of associative arrays of query results.
  
  - `...$0` array
  
  - `ID` int Post ID.
  
  - `title` string The trimmed, escaped post title.
  
  - `permalink` string Post permalink.
  
  - `info` string A `'Y/m/d'`-formatted date for `'post'` post type, the `'singular_name'` post type label otherwise.
  
  `$query`array An array of [WP_Query](https://developer.wordpress.org/reference/classes/wp_query/) arguments.
  
  [Source](#source)
  
  ```
  $results = apply_filters( 'wp_link_query', $results, $query );
  ```
  
  [View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-editor.php/) [View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/class-wp-editor.php#L1858) [View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/class-wp-editor.php#L1858-L1858)
  
  [Related](#related) Used by | Description |
  [_WP_Editors::wp_link_query()](https://developer.wordpress.org/reference/classes/_wp_editors/wp_link_query/)`wp-includes/class-wp-editor.php` | Performs post queries for internal linking.
  |
  
  [Changelog](#changelog) Version | Description |
  [3.7.0](https://developer.wordpress.org/reference/since/3.7.0/) | Introduced. |

## Фильтруемое значение

An array of associative arrays of query results.

- `...$0` array

- `ID` int Post ID.

- `title` string The trimmed, escaped post title.

- `permalink` string Post permalink.

- `info` string A `'Y/m/d'`-formatted date for `'post'` post type, the `'singular_name'` post type label otherwise.

`$query`array An array of [WP_Query](https://developer.wordpress.org/reference/classes/wp_query/) arguments.

[Source](#source)

```
$results = apply_filters( 'wp_link_query', $results, $query );
```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-editor.php/) [View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/class-wp-editor.php#L1858) [View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/class-wp-editor.php#L1858-L1858)

[Related](#related) Used by | Description |
[_WP_Editors::wp_link_query()](https://developer.wordpress.org/reference/classes/_wp_editors/wp_link_query/)`wp-includes/class-wp-editor.php` | Performs post queries for internal linking.
|

[Changelog](#changelog) Version | Description |
[3.7.0](https://developer.wordpress.org/reference/since/3.7.0/) | Introduced. |

## Исходный код

Файл: `wp-includes/class-wp-editor.php:1858`

```php
$results = apply_filters( 'wp_link_query', $results, $query );
```

## История изменений

- 3.7.0 — Introduced.

## Связанные

Используется в: `_WP_Editors::wp_link_query`.

Оригинал в официальной документации: https://developer.wordpress.org/reference/hooks/wp_link_query/
