echo $before_widget; ?>
echo $before_title ?>
echo $title; ?>
';
echo $after_widget;
do_action( 'Show_Hide_tinymce_after_widget', $args, $instance );
}
/**
* Update widget data
*
* @uses current_user_can()
* @uses wp_filter_post_kses()
* @uses apply_filters()
*
* @param mixed[] $new_instance
* @param mixed[] $old_instance
* @return mixed[]
* @since 0.5
*/
public function update( $new_instance, $old_instance ) {
$instance = $old_instance;
$instance['title'] = strip_tags( $new_instance['title'] );
if ( current_user_can( 'unfiltered_html' ) ) {
$instance['text'] = $new_instance['text'];
}
else {
$instance['text'] = stripslashes( wp_filter_post_kses( addslashes( $new_instance['text'] ) ) ); // wp_filter_post_kses() expects slashed
}
$instance['type'] = strip_tags( $new_instance['type'] );
$instance['startOpen'] = strip_tags( $new_instance['startOpen'] );
$instance['filter'] = strip_tags( $new_instance['filter'] );
$instance = apply_filters( 'Show_Hide_tinymce_widget_update', $instance, $this );
return $instance;
}
/**
* Output widget form
*
* @uses wp_parse_args()
* @uses apply_filters()
* @uses esc_attr()
* @uses esc_textarea()
* @uses WP_Widget::get_field_id()
* @uses WP_Widget::get_field_name()
* @uses _e()
* @uses do_action()
* @uses apply_filters()
*
* @param mixed[] $instance
* @return void
* @since 0.5
*/
public function form( $instance ) {
global $wp_customize;
$instance = wp_parse_args( (array) $instance, array( 'title' => '', 'text' => '', 'type' => 'visual' ) );
// Force Visual mode in Customizer (to avoid glitches)
if ( $wp_customize ) {
$instance['type'] = 'visual';
}
// Guess (wpautop) filter value for widgets created with previous version
if ( ! isset( $instance['filter'] ) ) {
$instance['filter'] = $instance['type'] == 'visual' && substr( $instance['text'], 0, 3 ) != '
' ? 1 : 0; } $title = strip_tags( $instance['title'] ); do_action( 'Show_Hide_tinymce_before_editor' ); ?>
echo $before_widget; ?>
echo $before_title ?>
echo $title; ?>
';
echo $after_widget;
do_action( 'Show_Hide_tinymce_after_widget', $args, $instance );
}
/**
* Update widget data
*
* @uses current_user_can()
* @uses wp_filter_post_kses()
* @uses apply_filters()
*
* @param mixed[] $new_instance
* @param mixed[] $old_instance
* @return mixed[]
* @since 0.5
*/
public function update( $new_instance, $old_instance ) {
$instance = $old_instance;
$instance['title'] = strip_tags( $new_instance['title'] );
if ( current_user_can( 'unfiltered_html' ) ) {
$instance['text'] = $new_instance['text'];
}
else {
$instance['text'] = stripslashes( wp_filter_post_kses( addslashes( $new_instance['text'] ) ) ); // wp_filter_post_kses() expects slashed
}
$instance['type'] = strip_tags( $new_instance['type'] );
$instance['startOpen'] = strip_tags( $new_instance['startOpen'] );
$instance['filter'] = strip_tags( $new_instance['filter'] );
$instance = apply_filters( 'Show_Hide_tinymce_widget_update', $instance, $this );
return $instance;
}
/**
* Output widget form
*
* @uses wp_parse_args()
* @uses apply_filters()
* @uses esc_attr()
* @uses esc_textarea()
* @uses WP_Widget::get_field_id()
* @uses WP_Widget::get_field_name()
* @uses _e()
* @uses do_action()
* @uses apply_filters()
*
* @param mixed[] $instance
* @return void
* @since 0.5
*/
public function form( $instance ) {
global $wp_customize;
$instance = wp_parse_args( (array) $instance, array( 'title' => '', 'text' => '', 'type' => 'visual' ) );
// Force Visual mode in Customizer (to avoid glitches)
if ( $wp_customize ) {
$instance['type'] = 'visual';
}
// Guess (wpautop) filter value for widgets created with previous version
if ( ! isset( $instance['filter'] ) ) {
$instance['filter'] = $instance['type'] == 'visual' && substr( $instance['text'], 0, 3 ) != '
' ? 1 : 0; } $title = strip_tags( $instance['title'] ); do_action( 'Show_Hide_tinymce_before_editor' ); ?>