Skip to content

Instantly share code, notes, and snippets.

@inc2734
Created January 29, 2017 06:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save inc2734/1a6a8a1e951cf54b179d936da3b6259b to your computer and use it in GitHub Desktop.
Save inc2734/1a6a8a1e951cf54b179d936da3b6259b to your computer and use it in GitHub Desktop.
Customizer Framework sample
<?php
$Customizer_Framework = new Customizer_Framework\Customizer_Framework();
$Panel = $Customizer_Framework->Panel( 'panel-name2', [
'title' => 'panel-name2',
] );
$Section = $Customizer_Framework->Section( 'section-name', [
'title' => 'section-name',
] );
$Section2 = $Customizer_Framework->Section( 'section-name2', [
'title' => 'section-name2',
] );
$Control = $Customizer_Framework->Control( 'header_textcolor', [
'label' => __( 'Header Color', 'mytheme' ),
'default' => '#f00',
] );
$Control2 = $Customizer_Framework->Control( 'header_textcolor2', [
'label' => __( 'Header Color2', 'mytheme' ),
'default' => '#0f0',
] );
$Section->add_control( $Control );
$Section2->add_control( $Control2 );
$Panel
->add_section( $Section )
->add_section( $Section2 );
$Customizer_Framework->add_panel( $Panel );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment