Changeset 1017 for trunk/bp-xprofile.php
- Timestamp:
- 02/04/2009 12:29:21 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile.php
r974 r1017 182 182 global $wpdb, $bp; 183 183 184 if ( is_site_admin() ) { 185 wp_enqueue_script( 'jquery.tablednd', site_url( MUPLUGINDIR . '/bp-core/js/jquery/jquery.tablednd.js' ), array( 'jquery' ), '0.4' ); 186 187 /* Add the administration tab under the "Site Admin" tab for site administrators */ 188 add_submenu_page( 'wpmu-admin.php', __("Profile Fields", 'buddypress'), __("Profile Fields", 'buddypress'), 1, "xprofile_settings", "xprofile_admin" ); 189 190 /* Need to check db tables exist, activate hook no-worky in mu-plugins folder. */ 191 if ( ( $wpdb->get_var("show tables like '%" . $bp['profile']['table_name_groups'] . "%'") == false ) || ( get_site_option('bp-xprofile-db-version') < BP_XPROFILE_DB_VERSION ) ) 192 xprofile_install(); 193 194 if ( ( function_exists('bp_wire_install') && $wpdb->get_var("show tables like '%" . $bp['profile']['table_name_wire'] . "%'") == false ) || ( get_site_option('bp-xprofile-db-version') < BP_XPROFILE_DB_VERSION ) ) 195 xprofile_wire_install(); 196 } 184 if ( !is_site_admin() ) 185 return false; 186 187 /* Add the administration tab under the "Site Admin" tab for site administrators */ 188 add_submenu_page( 'wpmu-admin.php', __("Profile Fields", 'buddypress'), __("Profile Fields", 'buddypress'), 1, "xprofile_settings", "xprofile_admin" ); 189 190 /* Need to check db tables exist, activate hook no-worky in mu-plugins folder. */ 191 if ( ( $wpdb->get_var("SHOW TABLES LIKE '%" . $bp['profile']['table_name_groups'] . "%'") == false ) || ( get_site_option('bp-xprofile-db-version') < BP_XPROFILE_DB_VERSION ) ) 192 xprofile_install(); 193 194 if ( ( function_exists('bp_wire_install') && $wpdb->get_var("SHOW TABLES LIKE '%" . $bp['profile']['table_name_wire'] . "%'") == false ) || ( get_site_option('bp-xprofile-db-version') < BP_XPROFILE_DB_VERSION ) ) 195 xprofile_wire_install(); 197 196 } 198 197 add_action( 'admin_menu', 'xprofile_add_admin_menu' ); … … 334 333 * 335 334 * This function runs when an action is set for a screen: 336 * domain.com/members/andy/profile/change-avatar/ [delete-avatar]335 * example.com/members/andy/profile/change-avatar/ [delete-avatar] 337 336 * 338 337 * The function will delete the active avatar for a user. … … 347 346 global $bp; 348 347 349 if ( $bp['current_action'] != 'delete-avatar')348 if ( 'delete-avatar' != $bp['current_action'] ) 350 349 return false; 351 350 … … 375 374 return false; 376 375 377 if ( $bp['current_action'] != 'post')376 if ( 'post' != $bp['current_action'] ) 378 377 return false; 379 378 … … 381 380 bp_core_add_message( __('Wire message could not be posted. Please try again.', 'buddypress'), 'error' ); 382 381 } else { 383 bp_core_add_message( __('Wire message successfully posted.', 'buddypress' ) );384 382 bp_core_add_message( __('Wire message successfully posted.', 'buddypress' ) ); 383 385 384 do_action( 'xprofile_new_wire_post', $wire_post_id ); 386 385 }
Note: See TracChangeset
for help on using the changeset viewer.