wp/wp-includes/widgets/class-wp-widget-calendar.php
changeset 16 a86126ab1dd4
parent 9 177826044cd9
child 18 be944660c56a
equal deleted inserted replaced
15:3d4e9c994f10 16:a86126ab1dd4
    29 	 * @since 2.8.0
    29 	 * @since 2.8.0
    30 	 */
    30 	 */
    31 	public function __construct() {
    31 	public function __construct() {
    32 		$widget_ops = array(
    32 		$widget_ops = array(
    33 			'classname'                   => 'widget_calendar',
    33 			'classname'                   => 'widget_calendar',
    34 			'description'                 => __( 'A calendar of your site’s Posts.' ),
    34 			'description'                 => __( 'A calendar of your site’s posts.' ),
    35 			'customize_selective_refresh' => true,
    35 			'customize_selective_refresh' => true,
    36 		);
    36 		);
    37 		parent::__construct( 'calendar', __( 'Calendar' ), $widget_ops );
    37 		parent::__construct( 'calendar', __( 'Calendar' ), $widget_ops );
    38 	}
    38 	}
    39 
    39 
    93 	 * @param array $instance Current settings.
    93 	 * @param array $instance Current settings.
    94 	 */
    94 	 */
    95 	public function form( $instance ) {
    95 	public function form( $instance ) {
    96 		$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
    96 		$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
    97 		?>
    97 		?>
    98 		<p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label>
    98 		<p>
    99 		<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( $instance['title'] ); ?>" /></p>
    99 			<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label>
       
   100 			<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( $instance['title'] ); ?>" />
       
   101 		</p>
   100 		<?php
   102 		<?php
   101 	}
   103 	}
   102 }
   104 }