mustartt/searchable-dropdown-control
Composer 安装命令:
composer require mustartt/searchable-dropdown-control
包简介
WordPress Customizer Searchable Dropdown Control adds a searchable dropdown
README 文档
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' ) ) ) );
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2021-07-14