Changeset 842809
- Timestamp:
- 01/22/2014 02:14:01 AM (12 years ago)
- Location:
- wp-user-avatar
- Files:
-
- 3 edited
-
tags/1.7.2/readme.txt (modified) (2 diffs)
-
tags/1.7.2/wp-user-avatar.php (modified) (3 diffs)
-
trunk/wp-user-avatar.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-user-avatar/tags/1.7.2/readme.txt
r841199 r842809 261 261 Then, 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: 262 262 263 ` if(!is_admin()){263 `function my_avatar_filter(){ 264 264 // Remove from show_user_profile hook 265 265 remove_action('show_user_profile', array('wp_user_avatar', 'wpua_action_show_user_profile')); … … 273 273 add_action('edit_user_avatar', array('wp_user_avatar', 'wpua_action_show_user_profile')); 274 274 add_action('edit_user_avatar', array('wp_user_avatar', 'wpua_media_upload_scripts')); 275 } 276 // Loads only outside of administration panel 277 if(!is_admin()){ 278 add_action('plugins_loaded','my_avatar_filter');` 275 279 }` 276 280 -
wp-user-avatar/tags/1.7.2/wp-user-avatar.php
r841199 r842809 367 367 } 368 368 // Add to edit user profile 369 function wpua_action_show_user_profile($user){369 public static function wpua_action_show_user_profile($user){ 370 370 global $blog_id, $current_user, $post, $show_avatars, $wpdb, $wpua_allow_upload, $wpua_edit_avatar, $wpua_upload_size_limit_with_units; 371 371 // Get WPUA attachment ID … … 555 555 556 556 // Media uploader 557 function wpua_media_upload_scripts($user=""){557 public static function wpua_media_upload_scripts($user=""){ 558 558 global $mustache_admin, $pagenow, $show_avatars, $wpua_upload_size_limit; 559 559 wp_enqueue_script('jquery'); … … 561 561 wp_enqueue_script('admin-bar'); 562 562 wp_enqueue_media(); 563 wp_enqueue_script('wp-user-avatar', WPUA_URLPATH.'js/wp-user-avatar.js', array('jquery' ), WPUA_VERSION, true);563 wp_enqueue_script('wp-user-avatar', WPUA_URLPATH.'js/wp-user-avatar.js', array('jquery','media-editor'), WPUA_VERSION, true); 564 564 } else { 565 565 wp_enqueue_script('wp-user-avatar', WPUA_URLPATH.'js/wp-user-avatar-user.js', array('jquery'), WPUA_VERSION, true); -
wp-user-avatar/trunk/wp-user-avatar.php
r841199 r842809 367 367 } 368 368 // Add to edit user profile 369 function wpua_action_show_user_profile($user){369 public static function wpua_action_show_user_profile($user){ 370 370 global $blog_id, $current_user, $post, $show_avatars, $wpdb, $wpua_allow_upload, $wpua_edit_avatar, $wpua_upload_size_limit_with_units; 371 371 // Get WPUA attachment ID … … 555 555 556 556 // Media uploader 557 function wpua_media_upload_scripts($user=""){557 public static function wpua_media_upload_scripts($user=""){ 558 558 global $mustache_admin, $pagenow, $show_avatars, $wpua_upload_size_limit; 559 559 wp_enqueue_script('jquery'); … … 561 561 wp_enqueue_script('admin-bar'); 562 562 wp_enqueue_media(); 563 wp_enqueue_script('wp-user-avatar', WPUA_URLPATH.'js/wp-user-avatar.js', array('jquery' ), WPUA_VERSION, true);563 wp_enqueue_script('wp-user-avatar', WPUA_URLPATH.'js/wp-user-avatar.js', array('jquery','media-editor'), WPUA_VERSION, true); 564 564 } else { 565 565 wp_enqueue_script('wp-user-avatar', WPUA_URLPATH.'js/wp-user-avatar-user.js', array('jquery'), WPUA_VERSION, true);
Note: See TracChangeset
for help on using the changeset viewer.