Ticket #34027: 34027.patch
File 34027.patch, 1.7 KB (added by , 9 years ago) |
---|
-
src/wp-includes/widgets/class-wp-widget-text.php
16 16 */ 17 17 class WP_Widget_Text extends WP_Widget { 18 18 19 /** 20 * PHP5 constructor. 21 * 22 * @since 2.8.0 23 * @access public 24 */ 19 25 public function __construct() { 20 26 $widget_ops = array('classname' => 'widget_text', 'description' => __('Arbitrary text or HTML.')); 21 27 $control_ops = array('width' => 400, 'height' => 350); … … 61 67 } 62 68 63 69 /** 64 * @param array $new_instance 65 * @param array $old_instance 66 * @return array 70 * Updates a particular instance of a widget. 71 * 72 * This function should check that `$new_instance` is set correctly. The newly-calculated 73 * value of `$instance` should be returned. If false is returned, the instance won't be 74 * saved/updated. 75 * 76 * @since 2.8.0 77 * @access public 78 * 79 * @param array $new_instance New settings for this instance as input by the user via 80 * WP_Widget::form(). 81 * @param array $old_instance Old settings for this instance. 82 * @return array Settings to save or bool false to cancel saving. 67 83 */ 68 84 public function update( $new_instance, $old_instance ) { 69 85 $instance = $old_instance; … … 77 93 } 78 94 79 95 /** 80 * @param array $instance 96 * Outputs the settings update form. 97 * 98 * @since 2.8.0 99 * @access public 100 * 101 * @param array $instance Current settings. 81 102 */ 82 103 public function form( $instance ) { 83 104 $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'text' => '' ) );