An open API service indexing awesome lists of open source software.

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.

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/)