Skip to content

Instantly share code, notes, and snippets.

@Fanckler
Created February 8, 2018 20:30
Show Gist options
  • Save Fanckler/3a3607fbb0cd23a5311d50cdf42a0e55 to your computer and use it in GitHub Desktop.
Save Fanckler/3a3607fbb0cd23a5311d50cdf42a0e55 to your computer and use it in GitHub Desktop.
customizer2.php
if ( ! class_exists( 'WP_Customize_Control' ) )
return NULL;
/**
* Class to create a custom tags control
*/
class Text_Editor_Custom_Control1 extends WP_Customize_Control
{
/**
* Render the content on the theme customizer page
*/
public function render_content()
{
?>
<label>
<span class="customize-text_editor"><?php echo esc_html( $this->label ); ?></span>
<?php
$settings = array(
'textarea_name' => $this->id
);
wp_editor($this->value(), $this->id, $settings );
?>
</label>
<?php
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment