Skip to content

Commit

Permalink
xtec-widget-data-users: Fixed some warnings (they appear enabling debug)
Browse files Browse the repository at this point in the history
  • Loading branch information
sarjona committed Nov 15, 2016
1 parent 52decfa commit 1712e3b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 5 additions & 0 deletions src/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ Release notes for XTECBlocs (http://blocs.xtec.cat)
More information on each of the fixes can be found in the project
development home at https://github.com/projectestac/xtecblocs

Changes in progress
---------------------------------------------------------------------------------------
- xtec-widget-data-users: Fixed some warnings (they appear enabling debug)


16.11.14
---------------------------------------------------------------------------------------
- Dashboard: Reviewed access to menu options in dashboard for roles xtec_teacher and contributor (Trello #1354)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function users_data_widget() {
'classname' => 'xtec_user_data_widget',
'description' => __('Widget to add data users','xtec-widget-users-data')
);
$this->WP_Widget('users_data_widget', __('Users information','xtec-widget-users-data'), $options);
$this->__construct('users_data_widget', __('Users information','xtec-widget-users-data'), $options);

add_action('admin_enqueue_scripts', array($this, 'upload_scripts'));
}
Expand All @@ -51,12 +51,11 @@ function form( $instance ) {

// Default image
$imageBase64 = plugins_url() . '/xtec-widget-data-users/assets/images/user_default.png';
$defaults = array( 'image_uri' => $imageBase64 );
$defaults = array( 'name' => '', 'description' => '', 'email' => '', 'web' => '', 'twitter'=> '', 'image_uri' => $imageBase64 );

$instance = wp_parse_args( ( array ) $instance, $defaults);
$image_uri = $instance['image_uri'];
$name = $instance['name'];
//$firstname = $instance['firstname'];
$description = $instance['description'];
$email = $instance['email'];
$web = $instance['web'];
Expand All @@ -77,7 +76,7 @@ function form( $instance ) {
</div>
<div style="clear:both"></div>
<input type="hidden" class="widefat custom_media_url widget-image-url" name="<?php echo $this->get_field_name('image_uri'); ?>" value="<?php echo $instance['image_uri']; ?>" >
<input type="button" class="button button-primary custom_media_button" id="custom_media_button_<?php echo $random; ?>" name="button_<?php echo $this->get_field_name('image_uri'); ?>" value="<?php _e('Upload Image','xtec-widget-users-data'); ?>" style="margin-top:5px;" />
<input type="button" class="button button-primary custom_media_button" id="custom_media_button_<?php echo rand(); ?>" name="button_<?php echo $this->get_field_name('image_uri'); ?>" value="<?php _e('Upload Image','xtec-widget-users-data'); ?>" style="margin-top:5px;" />
</p>
<p>
<?php _e('Name and surnames','xtec-widget-users-data'); ?>:
Expand Down

0 comments on commit 1712e3b

Please sign in to comment.