| 1 | <?php
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 | /*
|
|---|
| 5 | Plugin Name: Customizer Test 1
|
|---|
| 6 | Plugin URI:
|
|---|
| 7 | Description:
|
|---|
| 8 | Author:
|
|---|
| 9 | Version: 1.0
|
|---|
| 10 | Author URI:
|
|---|
| 11 | */
|
|---|
| 12 |
|
|---|
| 13 | if ( 1 == 1 ) {
|
|---|
| 14 | add_action( 'customize_register', 'my_customizer' );
|
|---|
| 15 | function my_customizer( $wp_customize ) {
|
|---|
| 16 |
|
|---|
| 17 | $wp_customize->add_section(
|
|---|
| 18 | 'my_custom_setting',
|
|---|
| 19 | array(
|
|---|
| 20 | 'title' => 'My custom setting',
|
|---|
| 21 | 'description' => ''
|
|---|
| 22 | )
|
|---|
| 23 | );
|
|---|
| 24 |
|
|---|
| 25 | $wp_customize->add_setting( 'name', array( 'default' => '' ) );
|
|---|
| 26 | $wp_customize->add_control(
|
|---|
| 27 | 'name',
|
|---|
| 28 | array(
|
|---|
| 29 | 'label' => 'Name',
|
|---|
| 30 | 'section' => 'my_custom_setting',
|
|---|
| 31 | 'type' => 'text',
|
|---|
| 32 | )
|
|---|
| 33 | );
|
|---|
| 34 | }
|
|---|
| 35 | }
|
|---|