wp/wp-includes/widgets/class-wp-widget-search.php
changeset 16 a86126ab1dd4
parent 9 177826044cd9
child 18 be944660c56a
equal deleted inserted replaced
15:3d4e9c994f10 16:a86126ab1dd4
    48 		echo $args['before_widget'];
    48 		echo $args['before_widget'];
    49 		if ( $title ) {
    49 		if ( $title ) {
    50 			echo $args['before_title'] . $title . $args['after_title'];
    50 			echo $args['before_title'] . $title . $args['after_title'];
    51 		}
    51 		}
    52 
    52 
    53 		// Use current theme search form if it exists
    53 		// Use current theme search form if it exists.
    54 		get_search_form();
    54 		get_search_form();
    55 
    55 
    56 		echo $args['after_widget'];
    56 		echo $args['after_widget'];
    57 	}
    57 	}
    58 
    58 
    65 	 */
    65 	 */
    66 	public function form( $instance ) {
    66 	public function form( $instance ) {
    67 		$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
    67 		$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
    68 		$title    = $instance['title'];
    68 		$title    = $instance['title'];
    69 		?>
    69 		?>
    70 		<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>
    70 		<p>
       
    71 			<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label>
       
    72 			<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 ); ?>" />
       
    73 		</p>
    71 		<?php
    74 		<?php
    72 	}
    75 	}
    73 
    76 
    74 	/**
    77 	/**
    75 	 * Handles updating settings for the current Search widget instance.
    78 	 * Handles updating settings for the current Search widget instance.