# install_search_form()

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

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

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

## Сигнатура

```php
install_search_form( bool $deprecated = true )
```

## Описание

Отображает форму для поиска плагинов.

## Параметры

- `$deprecated` `bool` — необязательный, по умолчанию `true`. Не используется.

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

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

```php
function install_search_form( $deprecated = true ) {
	$type = isset( $_REQUEST['type'] ) ? wp_unslash( $_REQUEST['type'] ) : 'term';
	$term = isset( $_REQUEST['s'] ) ? urldecode( wp_unslash( $_REQUEST['s'] ) ) : '';
	?>
	<form class="search-form search-plugins" method="get">
		<input type="hidden" name="tab" value="search" />
		<label for="search-plugins"><?php _e( 'Search Plugins' ); ?></label>
		<input type="search" name="s" id="search-plugins" value="<?php echo esc_attr( $term ); ?>" class="wp-filter-search" />
		<label class="screen-reader-text" for="typeselector">
			<?php
			/* translators: Hidden accessibility text. */
			_e( 'Search plugins by:' );
			?>
		</label>
		<select name="type" id="typeselector">
			<option value="term"<?php selected( 'term', $type ); ?>><?php _e( 'Keyword' ); ?></option>
			<option value="author"<?php selected( 'author', $type ); ?>><?php _e( 'Author' ); ?></option>
			<option value="tag"<?php selected( 'tag', $type ); ?>><?php _ex( 'Tag', 'Plugin Installer' ); ?></option>
		</select>
		<?php submit_button( __( 'Search Plugins' ), 'hide-if-js', false, false, array( 'id' => 'search-submit' ) ); ?>
	</form>
	<?php
}
```

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

- 4.6.0 — The $type_selector parameter was deprecated.
- 2.7.0 — Introduced.

## Связанные

Использует: [`submit_button`](https://chugunov.pro/api-wordpress/functions/submit_button/), [`_ex`](https://chugunov.pro/api-wordpress/functions/_ex/), [`selected`](https://chugunov.pro/api-wordpress/functions/selected/), [`_e`](https://chugunov.pro/api-wordpress/functions/_e/), [`__`](https://chugunov.pro/api-wordpress/functions/__/), [`wp_unslash`](https://chugunov.pro/api-wordpress/functions/wp_unslash/), [`esc_attr`](https://chugunov.pro/api-wordpress/functions/esc_attr/).
Используется в: `WP_Plugin_Install_List_Table::views`.

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