https://github.com/truongwp/customize-editor-control
Add WordPress editor control to Customize.
https://github.com/truongwp/customize-editor-control
customize customizer editor wordpress wysiwyg
Last synced: 27 days ago
JSON representation
Add WordPress editor control to Customize.
- Host: GitHub
- URL: https://github.com/truongwp/customize-editor-control
- Owner: truongwp
- Created: 2017-09-09T18:38:58.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-11T02:26:55.000Z (over 7 years ago)
- Last Synced: 2025-02-25T00:38:39.973Z (2 months ago)
- Topics: customize, customizer, editor, wordpress, wysiwyg
- Language: PHP
- Size: 48.8 KB
- Stars: 5
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Customize Editor Control
This plugin provides WordPress editor (WYSIWYG) to Customize. It's easy to use like core controls and works well in both `refresh` and `postMessage` transport.
## Usage
Add this code to your `functions.php` file:
```php
function themeslug_customize_register( $wp_customize ) {
$wp_customize->add_setting( 'example', array(
'transport' => 'postMessage',
'default' => 'Lotem ipsum',
) );$wp_customize->add_control( new WP_Customize_Editor_Control( $wp_customize, 'example', array(
'label' => __( 'Example editor', 'textdomain' ),
'section' => 'title_tagline',
'editor_settings' => array(
'quicktags' => true,
'tinymce' => true,
),
) ) );
}
add_action( 'customize_register', 'themeslug_customize_register' );
```More about WordPress Customize, read [Customize handbook](https://developer.wordpress.org/themes/customize-api/)