Inventory_Presser_Fuel_Economy_Widget::form( array $instance )

form

Description Description

Outputs the widget settings form that is shown in the dashboard.


Top ↑

Parameters Parameters

$instance

(array) (Required)


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/widget/class-widget-fuel-economy.php

	public function form( $instance ) {
		$title = ( isset( $instance['title'] ) ? $instance['title'] : '' );
		?>
		<p>
			<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'inventory-presser' ); ?></label>
			<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>" />
		</p><p>
			<input type="checkbox" id="<?php echo $this->get_field_id( 'include_annual_stats' ); ?>" name="<?php echo $this->get_field_name( 'include_annual_stats' ); ?>" value="true"<?php checked( 'true', ( isset( $instance['include_annual_stats'] ) ? $instance['include_annual_stats'] : '' ) ); ?>>
			<label for="<?php echo $this->get_field_id( 'include_annual_stats' ); ?>"><?php _e( 'Include annual consumption, cost &amp; emissions', 'inventory-presser' ); ?></label>
		</p>
		<?php
	}