Advertisement
Guest User

Untitled

a guest
Aug 15th, 2012
355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.25 KB | None | 0 0
  1.     <div id="user-avatar-display" class="submitbox" >
  2.     <h3 ><?php _e('Profile Picture','user-avatar'); ?></h3>
  3.     <p id="user-avatar-display-image"><?php echo user_avatar_get_avatar($current_user->ID, 150); ?></p>
  4.     <a id="user-avatar-link" class="button-primary thickbox" href="<?php echo admin_url('admin-ajax.php'); ?>?action=user_avatar_add_photo&step=1&uid=<?php echo $current_user->ID; ?>&TB_iframe=true&width=720&height=450" title="<?php _e('Upload and Crop an Image to be Displayed','user-avatar'); ?>" ><?php _e('Update Picture','user-avatar'); ?></a>
  5.    
  6.     <?php
  7.         // Remove the User-Avatar button if there is no uploaded image
  8.        
  9.        
  10.         $remove_url = admin_url('admin.php?page=my_plugin_page')."?own_delete_avatar=true&_nononce=". wp_create_nonce('own_user_avatar')."&u=".$current_user->ID;//here I don't get it.
  11.        
  12.         if ( user_avatar_avatar_exists($current_user->ID) ):?>
  13.             <a id="user-avatar-remove" class="submitdelete deleteaction" href="<?php echo esc_url_raw($remove_url); ?>" title="<?php _e('Remove Profile Image','user-avatar'); ?>" ><?php _e('Remove','user-avatar'); ?></a>
  14.             <?php
  15.         endif;
  16.     ?>
  17.     </div>
  18.     <script type="text/javascript">
  19.    
  20.     function user_avatar_refresh_image(img){
  21.      jQuery('#user-avatar-display-image').html(img);
  22.     }
  23.     </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement