Plugin Directory

Changeset 842701


Ignore:
Timestamp:
01/21/2014 10:06:19 PM (12 years ago)
Author:
bangbay
Message:

Update readme.txt.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-user-avatar/trunk/readme.txt

    r841199 r842701  
    261261Then, to add WP User Avatar to that hook and remove it from the other hooks outside of the administration panel, you would add this code to the <code>functions.php</code> file of your theme:
    262262
    263 `if(!is_admin()){
     263`function my_avatar_filter(){
    264264  // Remove from show_user_profile hook
    265265  remove_action('show_user_profile', array('wp_user_avatar', 'wpua_action_show_user_profile'));
     
    273273  add_action('edit_user_avatar', array('wp_user_avatar', 'wpua_action_show_user_profile'));
    274274  add_action('edit_user_avatar', array('wp_user_avatar', 'wpua_media_upload_scripts'));
     275}
     276// Loads only outside of administration panel
     277if(!is_admin()){
     278  add_action('plugins_loaded','my_avatar_filter');`
    275279}`
    276280
Note: See TracChangeset for help on using the changeset viewer.