wp/wp-includes/widgets/class-wp-widget-search.php
changeset 9 177826044cd9
parent 7 cf61fcea0001
child 16 a86126ab1dd4
--- a/wp/wp-includes/widgets/class-wp-widget-search.php	Mon Oct 14 18:06:33 2019 +0200
+++ b/wp/wp-includes/widgets/class-wp-widget-search.php	Mon Oct 14 18:28:13 2019 +0200
@@ -23,8 +23,8 @@
 	 */
 	public function __construct() {
 		$widget_ops = array(
-			'classname' => 'widget_search',
-			'description' => __( 'A search form for your site.' ),
+			'classname'                   => 'widget_search',
+			'description'                 => __( 'A search form for your site.' ),
 			'customize_selective_refresh' => true,
 		);
 		parent::__construct( 'search', _x( 'Search', 'Search widget' ), $widget_ops );
@@ -64,10 +64,10 @@
 	 * @param array $instance Current settings.
 	 */
 	public function form( $instance ) {
-		$instance = wp_parse_args( (array) $instance, array( 'title' => '') );
-		$title = $instance['title'];
+		$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
+		$title    = $instance['title'];
 		?>
-		<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 esc_attr($title); ?>" /></label></p>
+		<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 esc_attr( $title ); ?>" /></label></p>
 		<?php
 	}
 
@@ -82,8 +82,8 @@
 	 * @return array Updated settings.
 	 */
 	public function update( $new_instance, $old_instance ) {
-		$instance = $old_instance;
-		$new_instance = wp_parse_args((array) $new_instance, array( 'title' => ''));
+		$instance          = $old_instance;
+		$new_instance      = wp_parse_args( (array) $new_instance, array( 'title' => '' ) );
 		$instance['title'] = sanitize_text_field( $new_instance['title'] );
 		return $instance;
 	}