Skip to content

truongwp/customize-editor-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

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

About

Add WordPress editor control to Customize.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published