mustartt / searchable-dropdown-control
WordPress Customizer Searchable Dropdown Control adds a searchable dropdown
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:wordpress-dropin
Requires
- php: >=5.6
This package is auto-updated.
Last update: 2025-06-15 04:28:39 UTC
README
A searchable dropdown for wordpress customizer control
Installation
composer require mustartt/searchable-dropdown-control
Or specify custom install location
"require": { "mustartt/searchable-dropdown-control": "v1.0" }, ... "extra": { "installer-paths": { "inc/{$name}": [ "mustartt/searchable-dropdown-control" ] } }
and run
composer update
Screenshot
What it looks like in the Wordpress Customizer
Example Usage
Include in functions.php
if the package is installed under inc
if ( class_exists( 'WP_Customize_Control' ) ) { require_once dirname( __FILE__ ) . '/inc/searchable-dropdown-control/searchable-dropdown-control.php'; }
Usage for customizer.php
$wp_customize->add_setting( 'font', array( 'default' => 'Roboto', 'sanitize_callback' => function ( $value ) { return $value; } ) ); $wp_customize->add_control( new Customizer_Searchable_Dropdown_Control( $wp_customize, 'font', array( 'label' => 'Select Font', 'section' => 'fonts', 'settings' => 'font', 'options' => array( 'Roboto', 'Arial', 'Helvetica', 'Calibri' ) ) ) );