Changeset 8432
- Timestamp:
- 05/20/2014 03:33:49 PM (10 years ago)
- Location:
- trunk/src/bp-members
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/admin/css/admin-rtl.css
r8386 r8432 6 6 7 7 div#profile-page.wrap form#your-profile h3:first-of-type { 8 margin-top: 6em;8 margin-top:5em; 9 9 } 10 10 11 div#profile-page.wrap form#your-profile ul#profile-nav { 12 position:absolute; 13 top:-6em; 14 border-bottom:solid 1px #ccc; 15 width:100%; 11 div#profile-page.wrap form#your-profile #profile-nav { 12 position: absolute; 13 top: -3.65em; 14 width: 97%; 16 15 } 17 16 18 div#community-profile-page ul#profile-nav { 19 border-bottom:solid 1px #ccc; 20 width:100%; 21 margin-top:1em; 22 margin-bottom:1em; 23 padding:1em 0; 24 padding-bottom: 0; 25 height:2.4em; 17 div#community-profile-page #profile-nav { 18 margin-bottom: 1em; 26 19 } 27 20 28 form#your-profile ul#profile-nav li, 29 div#community-profile-page ul#profile-nav li { 30 margin-right:0.4em; 31 float:right; 32 font-weight: bold; 33 font-size: 15px; 34 line-height: 24px; 21 #bp_members_admin_user_stats ul { 22 margin-bottom: 0; 35 23 } 36 37 form#your-profile ul#profile-nav li a,38 div#community-profile-page ul#profile-nav li a {39 text-decoration: none;40 color:#888;41 }42 43 form#your-profile ul#profile-nav li a:hover,44 form#your-profile ul#profile-nav li.nav-tab-active a,45 div#community-profile-page ul#profile-nav li a:hover,46 div#community-profile-page ul#profile-nav li.nav-tab-active a {47 text-decoration: none;48 color:#000;49 }50 51 24 div#community-profile-page li.bp-members-profile-stats:before, 52 25 div#community-profile-page li.bp-friends-profile-stats:before, … … 54 27 div#community-profile-page li.bp-blogs-profile-stats:before, 55 28 div#community-profile-page a.bp-xprofile-avatar-user-admin:before { 56 font-family: 'dashicons'; 57 font-size: 18px; 58 vertical-align: bottom; 59 margin-left:5px; 29 font: normal 20px/1 'dashicons'; 30 speak: none; 31 display: inline-block; 32 padding: 0 0 0 2px; 33 top: 0; 34 right: -1px; 35 position: relative; 36 vertical-align: top; 37 -webkit-font-smoothing: antialiased; 38 -moz-osx-font-smoothing: grayscale; 39 text-decoration: none !important; 40 color: #888; 60 41 } 61 42 -
trunk/src/bp-members/admin/css/admin.css
r8246 r8432 6 6 7 7 div#profile-page.wrap form#your-profile h3:first-of-type { 8 margin-top: 6em;8 margin-top:5em; 9 9 } 10 10 11 div#profile-page.wrap form#your-profile ul#profile-nav { 12 position:absolute; 13 top:-6em; 14 border-bottom:solid 1px #ccc; 15 width:100%; 11 div#profile-page.wrap form#your-profile #profile-nav { 12 position: absolute; 13 top: -3.65em; 14 width: 97%; 16 15 } 17 16 18 div#community-profile-page ul#profile-nav { 19 border-bottom:solid 1px #ccc; 20 width:100%; 21 margin-top:1em; 22 margin-bottom:1em; 23 padding:1em 0; 24 padding-bottom: 0; 25 height:2.4em; 17 div#community-profile-page #profile-nav { 18 margin-bottom: 1em; 26 19 } 27 20 28 form#your-profile ul#profile-nav li, 29 div#community-profile-page ul#profile-nav li { 30 margin-left:0.4em; 31 float:left; 32 font-weight: bold; 33 font-size: 15px; 34 line-height: 24px; 21 #bp_members_admin_user_stats ul { 22 margin-bottom: 0; 35 23 } 36 37 form#your-profile ul#profile-nav li a,38 div#community-profile-page ul#profile-nav li a {39 text-decoration: none;40 color:#888;41 }42 43 form#your-profile ul#profile-nav li a:hover,44 form#your-profile ul#profile-nav li.nav-tab-active a,45 div#community-profile-page ul#profile-nav li a:hover,46 div#community-profile-page ul#profile-nav li.nav-tab-active a {47 text-decoration: none;48 color:#000;49 }50 51 24 div#community-profile-page li.bp-members-profile-stats:before, 52 25 div#community-profile-page li.bp-friends-profile-stats:before, … … 54 27 div#community-profile-page li.bp-blogs-profile-stats:before, 55 28 div#community-profile-page a.bp-xprofile-avatar-user-admin:before { 56 font-family: 'dashicons'; 57 font-size: 18px; 58 vertical-align: bottom; 59 margin-right:5px; 29 font: normal 20px/1 'dashicons'; 30 speak: none; 31 display: inline-block; 32 padding: 0 2px 0 0; 33 top: 0; 34 left: -1px; 35 position: relative; 36 vertical-align: top; 37 -webkit-font-smoothing: antialiased; 38 -moz-osx-font-smoothing: grayscale; 39 text-decoration: none !important; 40 color: #888; 60 41 } 61 42 -
trunk/src/bp-members/bp-members-admin.php
r8318 r8432 318 318 } ?> 319 319 320 < ulid="profile-nav" class="nav-tab-wrapper">320 <h2 id="profile-nav" class="nav-tab-wrapper"> 321 321 <?php 322 322 /** … … 326 326 */ 327 327 ?> 328 <?php if ( current_user_can( 'edit_user' ) ) :?> 329 <li class="nav-tab<?php echo esc_attr( $wp_active ); ?>"><a href="<?php echo esc_url( $wordpress_url );?>"><?php _e( 'Profile', 'buddypress' ); ?></a></li> 330 <?php endif ;?> 331 <li class="nav-tab<?php echo esc_attr( $bp_active ); ?>"><a href="<?php echo esc_url( $community_url );?>"><?php _e( 'Extended Profile', 'buddypress' ); ?></a></li> 332 333 <?php do_action( 'bp_members_admin_profile_nav', $active, $user ); ?> 334 </ul> 328 <?php if ( current_user_can( 'edit_user' ) ) : ?> 329 <a class="nav-tab<?php echo esc_attr( $wp_active ); ?>" href="<?php echo esc_url( $wordpress_url );?>"><?php _e( 'Profile', 'buddypress' ); ?></a> 330 <?php endif; ?> 331 <a class="nav-tab<?php echo esc_attr( $bp_active ); ?>" href="<?php echo esc_url( $community_url );?>"><?php _e( 'Extended Profile', 'buddypress' ); ?></a> 332 </h2> 335 333 336 334 <?php … … 351 349 if ( ! $user_id = intval( $_GET['user_id'] ) ) { 352 350 wp_die( __( 'No users were found', 'buddypress' ) ); 353 }354 355 // only edit others profile356 if ( get_current_user_id() == $user_id ) {357 bp_core_redirect( get_edit_user_link( $user_id ) );358 351 } 359 352 … … 632 625 <div id="misc-publishing-actions"> 633 626 <?php 627 628 // Get the spam status once here to compare against below 629 $is_spammer = bp_is_user_spammer( $user->ID ); 630 634 631 /** 635 * In configs where BuddyPress is not network activated, regular admins 636 * cannot mark a user as a spammer on front end. This prevent them to do 637 * it in backend. 632 * In configs where BuddyPress is not network activated, 633 * regular admins cannot mark a user as a spammer on front 634 * end. This prevent them to do it in backend. 635 * 636 * Also prevent admins from marking themselves or other 637 * admins as spammers. 638 638 */ 639 ?> 640 <?php if ( empty( $this->subsite_activated ) || ( ! empty( $this->subsite_activated ) && current_user_can( 'manage_network_users' ) ) ) : ?> 639 if ( ( get_current_user_id() !== $user->ID ) && ( ! in_array( $user->user_login, get_super_admins() ) ) && empty( $this->subsite_activated ) || ( ! empty( $this->subsite_activated ) && current_user_can( 'manage_network_users' ) ) ) : ?> 641 640 <div class="misc-pub-section" id="comment-status-radio"> 642 <label class="approved"><input type="radio" name="user_status" value="ham" <?php checked( bp_is_user_spammer( $user->ID ), false ); ?>><?php esc_html_e( 'Active', 'buddypress' ); ?></label><br />643 <label class="spam"><input type="radio" name="user_status" value="spam" <?php checked( bp_is_user_spammer( $user->ID ), true ); ?>><?php esc_html_e( 'Spammer', 'buddypress' ); ?></label>641 <label class="approved"><input type="radio" name="user_status" value="ham" <?php checked( $is_spammer, false ); ?>><?php esc_html_e( 'Active', 'buddypress' ); ?></label><br /> 642 <label class="spam"><input type="radio" name="user_status" value="spam" <?php checked( $is_spammer, true ); ?>><?php esc_html_e( 'Spammer', 'buddypress' ); ?></label> 644 643 </div> 645 644 <?php endif ;?> … … 737 736 */ 738 737 public function row_actions( $actions = '', $user = null ) { 739 // only edit others profile740 if ( get_current_user_id() == $user->ID ) {741 return $actions;742 }743 744 // Prevent a regular admin to edit a super admin745 if( in_array( $user->user_login, get_super_admins() ) ) {746 return $actions;747 }748 738 749 739 $edit_profile = add_query_arg( array( … … 752 742 ), $this->edit_profile_url ); 753 743 754 $edit_profile_link = '<a href="' . esc_url( $edit_profile ) . '">' . esc_html__( 'Extended Profile', 'buddypress' ) . '</a>';744 $edit_profile_link = sprintf( '<a href="%1$s">%2$s</a>', esc_url( $edit_profile ), esc_html__( 'Extended', 'buddypress' ) ); 755 745 756 746 /**
Note: See TracChangeset
for help on using the changeset viewer.