Skip to content

Instantly share code, notes, and snippets.

@domantasg
Last active June 17, 2017 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save domantasg/acec3cd781affd8115c322c9bcf8e738 to your computer and use it in GitHub Desktop.
Save domantasg/acec3cd781affd8115c322c9bcf8e738 to your computer and use it in GitHub Desktop.
public function form( $instance ) {
if ( isset( $instance[ 'title' ] ) )
$title = $instance[ 'title' ];
else
$title = __( 'Default Title', 'hstngr_widget_domain' );
?>
<p>
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></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 esc_attr( $title ); ?>" />
</p>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment