Ticket #34021: 34021.2.patch
File 34021.2.patch, 2.2 KB (added by , 9 years ago) |
---|
-
src/wp-includes/widgets/class-wp-widget-pages.php
16 16 */ 17 17 class WP_Widget_Pages extends WP_Widget { 18 18 19 /** 20 * Creates a new Pages widget instance. 21 * 22 * @since 2.8.0 23 * @access public 24 */ 19 25 public function __construct() { 20 26 $widget_ops = array('classname' => 'widget_pages', 'description' => __( 'A list of your site’s Pages.') ); 21 27 parent::__construct('pages', __('Pages'), $widget_ops); … … 22 28 } 23 29 24 30 /** 25 * @param array $args 26 * @param array $instance 31 * Echoes the current Pages widget instance content. 32 * 33 * @since 2.8.0 34 * @access public 35 * 36 * @param array $args Display arguments including 'before_title', 'after_title', 37 * 'before_widget', and 'after_widget'. 38 * @param array $instance The settings for the particular instance of the widget. 27 39 */ 28 40 public function widget( $args, $instance ) { 29 41 … … 75 87 } 76 88 77 89 /** 78 * @param array $new_instance 79 * @param array $old_instance 80 * @return array 90 * Handles updating settings for the current Pages widget instance. 91 * 92 * This function should check that `$new_instance` is set correctly. The newly-calculated 93 * value of `$instance` should be returned. If false is returned, the instance won't be 94 * saved/updated. 95 * 96 * @since 2.8.0 97 * @access public 98 * 99 * @param array $new_instance New settings for this instance as input by the user via 100 * WP_Widget::form(). 101 * @param array $old_instance Old settings for this instance. 102 * @return array Settings to save or bool false to cancel saving. 81 103 */ 82 104 public function update( $new_instance, $old_instance ) { 83 105 $instance = $old_instance; … … 94 116 } 95 117 96 118 /** 97 * @param array $instance 119 * Outputs the current Pages widget instance settings update form. 120 * 121 * @since 2.8.0 122 * @access public 123 * 124 * @param array $instance Current settings. 98 125 */ 99 126 public function form( $instance ) { 100 127 //Defaults