Make WordPress Core

Ticket #5113: 5113.diff

File 5113.diff, 1.7 KB (added by Denis-de-Bernardy, 17 years ago)

updated patch for wp 2.8

  • Users/denis/Sites/sem-pro/wp-includes/default-widgets.php

     
    334334                $text = apply_filters( 'widget_text', $instance['text'] );
    335335                echo $before_widget;
    336336                if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?>
    337                         <div class="textwidget"><?php echo $text; ?></div>
     337                        <div class="textwidget"><?php echo $instance['filter'] ? wpautop($text) : $text; ?></div>
    338338                <?php
    339339                echo $after_widget;
    340340        }
     
    346346                        $instance['text'] =  $new_instance['text'];
    347347                else
    348348                        $instance['text'] = wp_filter_post_kses( $new_instance['text'] );
     349                $instance['filter'] = isset($new_instance['filter']);
    349350                return $instance;
    350351        }
    351352
     
    356357?>
    357358                        <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
    358359                        <textarea class="widefat" rows="16" cols="20" id="<?php echo $this->get_field_id('text'); ?>" name="<?php echo $this->get_field_name('text'); ?>"><?php echo $text; ?></textarea>
     360                        <p><label for="<?php echo $this->get_field_id('filter'); ?>"><input id="<?php echo $this->get_field_id('filter'); ?>" name="<?php echo $this->get_field_name('filter'); ?>" type="checkbox" <?php checked($instance['filter']); ?> />&nbsp;<?php _e('Automatically add paragraphs.') ?></label></p>
    359361<?php
    360362        }
    361363}