Ticket #34015: 34015.patch
File 34015.patch, 2.1 KB (added by , 9 years ago) |
---|
-
src/wp-includes/widgets/class-wp-nav-menu-widget.php
16 16 */ 17 17 class WP_Nav_Menu_Widget 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( 'description' => __('Add a custom menu to your sidebar.') ); 21 27 parent::__construct( 'nav_menu', __('Custom Menu'), $widget_ops ); … … 22 28 } 23 29 24 30 /** 25 * @param array $args 26 * @param array $instance 31 * Echoes the widget 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 // Get menu … … 65 77 } 66 78 67 79 /** 68 * @param array $new_instance 69 * @param array $old_instance 70 * @return array 80 * Updates a particular instance of a widget. 81 * 82 * This function should check that `$new_instance` is set correctly. The newly-calculated 83 * value of `$instance` should be returned. If false is returned, the instance won't be 84 * saved/updated. 85 * 86 * @since 2.8.0 87 * @access public 88 * 89 * @param array $new_instance New settings for this instance as input by the user via 90 * WP_Widget::form(). 91 * @param array $old_instance Old settings for this instance. 92 * @return array Settings to save or bool false to cancel saving. 71 93 */ 72 94 public function update( $new_instance, $old_instance ) { 73 95 $instance = array(); … … 81 103 } 82 104 83 105 /** 84 * @param array $instance 106 * Outputs the settings update form. 107 * 108 * @since 2.8.0 109 * @access public 110 * 111 * @param array $instance Current settings. 85 112 */ 86 113 public function form( $instance ) { 87 114 $title = isset( $instance['title'] ) ? $instance['title'] : '';