2017 © Pedro Peláez
 

library theme_customizer_control

WordPress theme customizer custom control

image

megumi/theme_customizer_control

WordPress theme customizer custom control

  • Saturday, November 9, 2013
  • by miya0001
  • Repository
  • 2 Watchers
  • 1 Stars
  • 164 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Megumi_ThemeCustomizerControl() Class

Class for theme customizer custom control.
This class allows to use html brefore and after form fields., (*1)

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, (*2)

The Versions

09/11 2013

dev-master

9999999-dev

WordPress theme customizer custom control

  Sources   Download

GPL2

The Requires

  • php >=5.3

 

wordpress theme