# get_links_list()

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

Тип: функция.
Появился в версии: 1.0.1.

> Устаревший элемент. Помечен устаревшим с версии 2.1.0.

## Сигнатура

```php
get_links_list( string $order = 'name' )
```

## Описание

Выводит список всех ссылок, сгруппированных по категориям, используя настройки в $wpdb->linkcategories, в виде вложенного HTML-списка (unordered list).
См. alsowp_list_bookmarks()

## Параметры

- `$order` `string` — необязательный, по умолчанию `'name'`. Сортировать категории ссылок по 'name' или 'id'.

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

Файл: `wp-includes/deprecated.php:1042`

```php
function get_links_list($order = 'name') {
	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_bookmarks()' );

	$order = strtolower($order);

	// Handle link category sorting.
	$direction = 'ASC';
	if ( str_starts_with( $order, '_' ) ) {
		$direction = 'DESC';
		$order = substr($order,1);
	}

	if ( !isset($direction) )
		$direction = '';

	$cats = get_categories(array('type' => 'link', 'orderby' => $order, 'order' => $direction, 'hierarchical' => 0));

	// Display each category.
	if ( $cats ) {
		foreach ( (array) $cats as $cat ) {
			// Handle each category.

			// Display the category name.
			/** This filter is documented in wp-includes/bookmark-template.php */
			echo '  <li id="linkcat-' . $cat->term_id . '" class="linkcat"><h2>' . apply_filters('link_category', $cat->name ) . "</h2>\n\t<ul>\n";
			// Call get_links() with all the appropriate params.
			get_links($cat->term_id, '<li>', "</li>", "\n", true, 'name', false);

			// Close the last category.
			echo "\n\t</ul>\n</li>\n";
		}
	}
}
```

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

- 2.1.0 — Deprecated. Use wp_list_bookmarks()
- 1.0.1 — Introduced.

## Связанные

Использует: [`get_links`](https://chugunov.pro/api-wordpress/functions/get_links/), [`get_categories`](https://chugunov.pro/api-wordpress/functions/get_categories/), [`_deprecated_function`](https://chugunov.pro/api-wordpress/functions/_deprecated_function/), [`apply_filters`](https://chugunov.pro/api-wordpress/functions/apply_filters/).

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