Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/miya0001/theme_customizer_control
WordPress theme customizer custom control
https://github.com/miya0001/theme_customizer_control
Last synced: about 1 month ago
JSON representation
WordPress theme customizer custom control
- Host: GitHub
- URL: https://github.com/miya0001/theme_customizer_control
- Owner: miya0001
- Created: 2013-11-09T19:40:37.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-11-09T19:45:10.000Z (about 11 years ago)
- Last Synced: 2024-10-16T01:50:53.478Z (3 months ago)
- Language: PHP
- Size: 102 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Megumi_ThemeCustomizerControl() Class
Class for theme customizer custom control.
This class allows to use html brefore and after form fields.## How to install in your project.
### Add composer.json like below
{
"require": {
"megumi/theme_customizer_control": "dev-master"
}
}### Download this package in your project.
composer install
### Load this class.
require(dirname(__FILE__).'/vendor/autoload.php');
## Example
$wp_customize->add_section('themename_color_scheme', array(
'title' => __('Color Scheme', 'themename'),
'priority' => 120,
));$wp_customize->add_setting('setting_name', array(
'default' => 'This is default!',
'capability' => 'edit_theme_options',
'type' => 'option',
));$wp_customize->add_control(new Megumi_CustomizeControl(
$wp_customize,
'uniq_id_for_the_control',
array(
'settings' => 'setting_name',
'label' => 'This is label',
'section' => 'themename_color_scheme',
'type' => 'text',
'choices' => $themes,
'label_after' => 'This is label displayed after this control'
)
));## License
GPL2