https://github.com/themeplate/customizer
https://github.com/themeplate/customizer
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/themeplate/customizer
- Owner: ThemePlate
- License: gpl-3.0
- Created: 2023-01-27T11:23:20.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-02T15:49:57.000Z (over 1 year ago)
- Last Synced: 2025-03-02T16:34:05.634Z (over 1 year ago)
- Language: PHP
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ThemePlate Customizer
## Usage
```php
use ThemePlate\Customizer\CustomSection;
( new CustomSection( 'My Section' ) )->fields( $list )->location( 'panel' )->create();
```
```php
use ThemePlate\Customizer\CustomSection;
add_action( 'customize_register', function( $customizer ) {
$customizer->add_panel( 'my-panel', array( 'title' => 'My Panel' ) );
/** https://developer.wordpress.org/reference/classes/wp_customize_section/__construct/#parameters */
$args = array(
'panel' => 'my-panel',
'description' => 'This is an example.',
);
$section = new CustomSection( 'Another Section', $args );
$section->fields( $list )->hook( $customizer );
} );
```