# install_plugins_favorites_form()

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

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

## Сигнатура

```php
install_plugins_favorites_form()
```

## Описание

Показывает форму ввода имени пользователя для страницы избранного.

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

Файл: `wp-admin/includes/plugin-install.php:366`

```php
function install_plugins_favorites_form() {
	$user   = get_user_option( 'wporg_favorites' );
	$action = 'save_wporg_username_' . get_current_user_id();
	?>
	<p><?php _e( 'If you have marked plugins as favorites on WordPress.org, you can browse them here.' ); ?></p>
	<form method="get">
		<input type="hidden" name="tab" value="favorites" />
		<p>
			<label for="user"><?php _e( 'Your WordPress.org username:' ); ?></label>
			<input type="search" id="user" name="user" value="<?php echo esc_attr( $user ); ?>" />
			<input type="submit" class="button" value="<?php esc_attr_e( 'Get Favorites' ); ?>" />
			<input type="hidden" id="wporg-username-nonce" name="_wpnonce" value="<?php echo esc_attr( wp_create_nonce( $action ) ); ?>" />
		</p>
	</form>
	<?php
}
```

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

- 3.5.0 — Introduced.

## Связанные

Использует: [`esc_attr_e`](https://chugunov.pro/api-wordpress/functions/esc_attr_e/), [`get_user_option`](https://chugunov.pro/api-wordpress/functions/get_user_option/), [`_e`](https://chugunov.pro/api-wordpress/functions/_e/), [`esc_attr`](https://chugunov.pro/api-wordpress/functions/esc_attr/), [`wp_create_nonce`](https://chugunov.pro/api-wordpress/functions/wp_create_nonce/), [`get_current_user_id`](https://chugunov.pro/api-wordpress/functions/get_current_user_id/).

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