Changeset 2798 for trunk/bp-xprofile.php
- Timestamp:
- 03/03/2010 06:53:59 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/bp-xprofile.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile.php
r2797 r2798 1 1 <?php 2 define ( 'BP_XPROFILE_DB_VERSION', '1 850' );2 define ( 'BP_XPROFILE_DB_VERSION', '1950' ); 3 3 4 4 /* Define the slug for the component */ … … 38 38 name varchar(150) NOT NULL, 39 39 description mediumtext NOT NULL, 40 group_order bigint(20) NOT NULL DEFAULT '0', 40 41 can_delete tinyint(1) NOT NULL, 41 42 KEY can_delete (can_delete) … … 86 87 87 88 require_once( ABSPATH . 'wp-admin/upgrade-functions.php' ); 88 dbDelta( $sql);89 dbDelta( $sql ); 89 90 90 91 do_action( 'xprofile_install' ); … … 153 154 154 155 /* Add the administration tab under the "Site Admin" tab for site administrators */ 155 add_submenu_page( 'bp-general-settings', __( "Profile Field Setup", 'buddypress'), __("Profile Field Setup", 'buddypress'), 'manage_options', 'bp-profile-setup', "xprofile_admin");156 add_submenu_page( 'bp-general-settings', __( 'Profile Field Setup', 'buddypress' ), __( 'Profile Field Setup', 'buddypress' ), 'manage_options', 'bp-profile-setup', 'xprofile_admin' ); 156 157 157 158 /* Need to check db tables exist, activate hook no-worky in mu-plugins folder. */ … … 215 216 /* Don't show this menu to non site admins or if you're viewing your own profile */ 216 217 if ( !is_site_admin() || bp_is_my_profile() ) 217 return false; 218 ?> 218 return false; ?> 219 219 220 <li id="bp-adminbar-adminoptions-menu"> 220 221 <a href=""><?php _e( 'Admin Options', 'buddypress' ) ?></a> … … 223 224 <li><a href="<?php echo $bp->displayed_user->domain . $bp->profile->slug ?>/edit/"><?php printf( __( "Edit %s's Profile", 'buddypress' ), attribute_escape( $bp->displayed_user->fullname ) ) ?></a></li> 224 225 <li><a href="<?php echo $bp->displayed_user->domain . $bp->profile->slug ?>/change-avatar/"><?php printf( __( "Edit %s's Avatar", 'buddypress' ), attribute_escape( $bp->displayed_user->fullname ) ) ?></a></li> 225 226 <?php if ( !bp_core_is_user_spammer( $bp->displayed_user->id ) ) : ?> 227 <li><a href="<?php echo wp_nonce_url( $bp->displayed_user->domain . 'admin/mark-spammer/', 'mark-unmark-spammer' ) ?>" class="confirm"><?php _e( "Mark as Spammer", 'buddypress' ) ?></a></li> 228 <?php else : ?> 229 <li><a href="<?php echo wp_nonce_url( $bp->displayed_user->domain . 'admin/unmark-spammer/', 'mark-unmark-spammer' ) ?>" class="confirm"><?php _e( "Not a Spammer", 'buddypress' ) ?></a></li> 230 <?php endif; ?> 226 <?php if ( !bp_core_is_user_spammer( $bp->displayed_user->id ) ) : ?> 227 228 <li><a href="<?php echo wp_nonce_url( $bp->displayed_user->domain . 'admin/mark-spammer/', 'mark-unmark-spammer' ) ?>" class="confirm"><?php _e( "Mark as Spammer", 'buddypress' ) ?></a></li> 229 <?php else : ?> 230 231 <li><a href="<?php echo wp_nonce_url( $bp->displayed_user->domain . 'admin/unmark-spammer/', 'mark-unmark-spammer' ) ?>" class="confirm"><?php _e( "Not a Spammer", 'buddypress' ) ?></a></li> 232 <?php endif; ?> 231 233 232 234 <li><a href="<?php echo wp_nonce_url( $bp->displayed_user->domain . 'admin/delete-user/', 'delete-user' ) ?>" class="confirm"><?php printf( __( "Delete %s", 'buddypress' ), attribute_escape( $bp->displayed_user->fullname ) ) ?></a></li> 233 234 <?php do_action( 'xprofile_adminbar_menu_items' ) ?> 235 <?php do_action( 'xprofile_adminbar_menu_items' ) ?> 236 235 237 </ul> 236 238 </li> 237 <?php239 <?php 238 240 } 239 241 add_action( 'bp_adminbar_menus', 'xprofile_setup_adminbar_menu', 20 ); … … 578 580 $field_group = new BP_XProfile_Group( $field_group_id ); 579 581 return $field_group->delete(); 582 } 583 584 function xprofile_update_field_group_position( $field_group_id, $position ) { 585 return BP_XProfile_Group::update_position( $field_group_id, $position ); 580 586 } 581 587 … … 851 857 852 858 function xprofile_update_field_position( $field_id, $position ) { 853 return BP_XProfile_Field::update_position( $field_id, $position );859 return BP_XProfile_Field::update_position( $field_id, $position ); 854 860 } 855 861 … … 953 959 BP_XProfile_ProfileData::delete_data_for_user( $user_id ); 954 960 955 / / delete any avatar files.961 /* delete any avatar files. */ 956 962 @unlink( get_usermeta( $user_id, 'bp_core_avatar_v1_path' ) ); 957 963 @unlink( get_usermeta( $user_id, 'bp_core_avatar_v2_path' ) ); 958 964 959 / / unset the usermeta for avatars from the usermeta table.965 /* unset the usermeta for avatars from the usermeta table. */ 960 966 delete_usermeta( $user_id, 'bp_core_avatar_v1' ); 961 967 delete_usermeta( $user_id, 'bp_core_avatar_v1_path' ); … … 995 1001 } 996 1002 997 / / List actions to clear object caches on1003 /* List actions to clear object caches on */ 998 1004 add_action( 'xprofile_groups_deleted_group', 'xprofile_clear_profile_groups_object_cache' ); 999 1005 add_action( 'xprofile_groups_saved_group', 'xprofile_clear_profile_groups_object_cache' ); 1000 1006 add_action( 'xprofile_updated_profile', 'xprofile_clear_profile_data_object_cache' ); 1001 1007 1002 / / List actions to clear super cached pages on, if super cache is installed1008 /* List actions to clear super cached pages on, if super cache is installed */ 1003 1009 add_action( 'xprofile_updated_profile', 'bp_core_clear_cache' ); 1004 1010
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)