is_legacy_instance example


    public function form( $instance ) {
        $instance = wp_parse_args(
            (array) $instance,
            array(
                'title' => '',
                'text'  => '',
            )
        );
        ?> <?php if ( ! $this->is_legacy_instance( $instance ) ) : ?> <?php
            if ( user_can_richedit() ) {
                add_filter( 'the_editor_content', 'format_for_editor', 10, 2 );
                $default_editor = 'tinymce';
            } else {
                $default_editor = 'html';
            }

            /** This filter is documented in wp-includes/class-wp-editor.php */
            $text = apply_filters( 'the_editor_content', $instance['text']$default_editor );

            
Home | Imprint | This part of the site doesn't use cookies.