WordPress customizer_register TinyMCE control
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function register_theme_customizer() { | |
$wp_customize->add_section( 'editor', array( | |
'title' => 'Editeur', | |
'description' => 'Editeur TinyMCE', | |
'priority' => 300 | |
) ); | |
$wp_customize->add_setting( 'theme[editor_content]', array( | |
'default' => '', | |
'transport' => 'postMessage', | |
'sanitize_callback' => 'wp_kses_post' | |
) ); | |
$wp_customize->add_control( new Text_Editor_Custom_Control( $wp_customize, 'editor_content', array( | |
'label' => 'Contenu', | |
'section' => 'editor', | |
'settings' => 'cornettes[editor_content]', | |
'type' => 'textarea' | |
) ) ); | |
} | |
add_action ( 'customize_register', 'register_theme_customizer' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment