Changeset 9759
- Timestamp:
- 04/16/2015 10:54:11 PM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/admin/css/admin-rtl.css
r8958 r9759 26 26 div#community-profile-page li.bp-groups-profile-stats:before, 27 27 div#community-profile-page li.bp-blogs-profile-stats:before, 28 div#community-profile-page a.bp-xprofile-avatar-user-admin:before { 28 div#community-profile-page a.bp-xprofile-avatar-user-admin:before, 29 div#community-profile-page a.bp-xprofile-avatar-user-edit:before { 29 30 font: normal 20px/1 'dashicons'; 30 31 speak: none; … … 59 60 div#community-profile-page a.bp-xprofile-avatar-user-admin:before { 60 61 content:"\f182"; 62 } 63 64 div#community-profile-page a.bp-xprofile-avatar-user-edit:before { 65 content: "\f107"; 61 66 } 62 67 -
trunk/src/bp-members/admin/css/admin.css
r8958 r9759 26 26 div#community-profile-page li.bp-groups-profile-stats:before, 27 27 div#community-profile-page li.bp-blogs-profile-stats:before, 28 div#community-profile-page a.bp-xprofile-avatar-user-admin:before { 28 div#community-profile-page a.bp-xprofile-avatar-user-admin:before, 29 div#community-profile-page a.bp-xprofile-avatar-user-edit:before { 29 30 font: normal 20px/1 'dashicons'; 30 31 speak: none; … … 59 60 div#community-profile-page a.bp-xprofile-avatar-user-admin:before { 60 61 content:"\f182"; 62 } 63 64 div#community-profile-page a.bp-xprofile-avatar-user-edit:before { 65 content: "\f107"; 61 66 } 62 67 -
trunk/src/bp-members/bp-members-admin.php
r9665 r9759 218 218 */ 219 219 private function get_user_id() { 220 $user_id = get_current_user_id(); 221 222 // We'll need a user ID when not on the user admin 220 if ( ! empty( $this->user_id ) ) { 221 return $this->user_id; 222 } 223 224 $this->user_id = (int) get_current_user_id(); 225 226 // We'll need a user ID when not on self profile 223 227 if ( ! empty( $_GET['user_id'] ) ) { 224 $ user_id =$_GET['user_id'];225 } 226 227 return intval( $user_id );228 $this->user_id = (int) $_GET['user_id']; 229 } 230 231 return $this->user_id; 228 232 } 229 233 -
trunk/src/bp-xprofile/bp-xprofile-admin.php
r9691 r9759 674 674 */ 675 675 private function setup_actions() { 676 // Enqueue scripts 677 add_action( 'bp_members_admin_enqueue_scripts', array( $this, 'enqueue_scripts' ), 10, 1 ); 676 678 677 679 // Register the metabox in Member's community admin profile … … 680 682 // Saves the profile actions for user ( avatar, profile fields ) 681 683 add_action( 'bp_members_admin_update_user', array( $this, 'user_admin_load' ), 10, 4 ); 684 } 685 686 /** 687 * Enqueue needed scripts. 688 * 689 * @access public 690 * @since BuddyPress (2.3.0) 691 */ 692 public function enqueue_scripts( $screen_id ) { 693 if ( ( false === strpos( $screen_id, 'users_page_bp-profile-edit' ) && false === strpos( $screen_id, 'profile_page_bp-profile-edit' ) ) || bp_core_get_root_option( 'bp-disable-avatar-uploads' ) ) { 694 return; 695 } 696 697 /** 698 * Get Thickbox 699 * 700 * We cannot simply use add_thickbox() here as WordPress is not playing 701 * nice with Thickbox width/height see https://core.trac.wordpress.org/ticket/17249 702 * Using media-upload might be interesting in the future for the send to editor stuff 703 * and we make sure the tb_window is wide enougth 704 */ 705 wp_enqueue_style ( 'thickbox' ); 706 wp_enqueue_script( 'media-upload' ); 707 708 // Get Avatar Uploader 709 bp_attachments_enqueue_scripts( 'BP_Attachment_Avatar' ); 682 710 } 683 711 … … 1038 1066 <a href="<?php echo esc_url( $delete_link ); ?>" title="<?php esc_attr_e( 'Delete Profile Photo', 'buddypress' ); ?>" class="bp-xprofile-avatar-user-admin"><?php esc_html_e( 'Delete Profile Photo', 'buddypress' ); ?></a></li> 1039 1067 1068 <?php endif; 1069 1070 // Load the Avatar UI templates if user avatar uploads are enabled 1071 if ( ! bp_core_get_root_option( 'bp-disable-avatar-uploads' ) ) : ?> 1072 <a href="#TB_inline?width=800px&height=400px&inlineId=bp-xprofile-avatar-editor" title="<?php esc_attr_e( 'Edit Profile Photo', 'buddypress' );?>" class="thickbox bp-xprofile-avatar-user-edit"><?php esc_html_e( 'Edit Profile Photo', 'buddypress' ); ?></a> 1073 <div id="bp-xprofile-avatar-editor" style="display:none;"> 1074 <?php bp_attachments_get_template_part( 'avatars/index' ); ?> 1075 </div> 1040 1076 <?php endif; ?> 1041 1077
Note: See TracChangeset
for help on using the changeset viewer.