Changeset 2168 for trunk/bp-core.php
- Timestamp:
- 12/14/2009 03:24:05 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core.php
r2128 r2168 43 43 require ( BP_PLUGIN_DIR . '/bp-core/bp-core-adminbar.php' ); 44 44 45 /* If BP_IGNORE_DEPRECATED is defined, do not load any deprecated functions for backwards support */46 if ( !defined( 'BP_IGNORE_DEPRECATED' ) )47 require ( BP_PLUGIN_DIR . '/bp-core/deprecated/bp-core-deprecated.php' );48 49 45 /* Define the slug for member pages and the members directory (e.g. domain.com/[members] ) */ 50 46 if ( !defined( 'BP_MEMBERS_SLUG' ) ) … … 66 62 if ( !defined( 'BP_HOME_BLOG_SLUG' ) ) 67 63 define( 'BP_HOME_BLOG_SLUG', 'blog' ); 68 69 /* Register BuddyPress themes contained within the theme folder */70 if ( function_exists( 'register_theme_folder' ) )71 register_theme_folder( 'buddypress/bp-themes' );72 64 73 65 /* Register BuddyPress themes contained within the theme folder */ … … 381 373 382 374 /******************************************************************************** 383 * Screen Functions384 *385 * Screen functions are the controllers of BuddyPress. They will execute when their386 * specific URL is caught. They will first save or manipulate data using business387 * functions, then pass on the user to a template file.388 */389 390 391 /********************************************************************************392 375 * Action Functions 393 376 * … … 397 380 */ 398 381 399 400 382 /** 401 383 * bp_core_action_directory_members() … … 416 398 417 399 do_action( 'bp_core_action_directory_members' ); 418 bp_core_load_template( apply_filters( 'bp_core_template_directory_members', ' directories/members/index' ) );400 bp_core_load_template( apply_filters( 'bp_core_template_directory_members', 'members/index' ) ); 419 401 } 420 402 } … … 653 635 * looking at their own profile, don't create the nav item. 654 636 */ 655 if ( !$show_for_displayed_user && !bp_is_ home() )637 if ( !$show_for_displayed_user && !bp_is_my_profile() ) 656 638 return false; 657 639 … … 1176 1158 $user_id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM " . CUSTOM_USER_TABLE . " WHERE user_login = %s", $username ) ); 1177 1159 return apply_filters( 'bp_core_get_userlink_by_username', bp_core_get_userlink( $user_id, false, false, true ) ); 1160 } 1161 1162 /** 1163 * bp_core_get_total_member_count() 1164 * 1165 * Returns the total number of members for the installation. 1166 * 1167 * @package BuddyPress Core 1168 * @return int The total number of members. 1169 */ 1170 function bp_core_get_total_member_count() { 1171 global $wpdb; 1172 1173 $count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(ID) FROM " . CUSTOM_USER_TABLE . " WHERE spam = 0" ) ); 1174 return apply_filters( 'bp_core_get_total_member_count', (int)$count ); 1178 1175 } 1179 1176 … … 1760 1757 * bp_core_boot_spammer() 1761 1758 * 1762 * When a user logs in, check if they have been marked as a spammer. If then simply1759 * When a user logs in, check if they have been marked as a spammer. If yes then simply 1763 1760 * redirect them to the home page and stop them from logging in. 1764 1761 * … … 1831 1828 } 1832 1829 add_action( 'in_plugin_update_message-buddypress/bp-loader.php', 'bp_core_update_message' ); 1830 1831 /** 1832 * bp_core_filter_template_paths() 1833 * 1834 * Add fallback for the bp-sn-parent theme template locations used in BuddyPress versions 1835 * older than 1.2. 1836 * 1837 * @package BuddyPress Core 1838 */ 1839 function bp_core_filter_template_paths() { 1840 if ( 'bp-sn-parent' != basename( TEMPLATEPATH ) && !defined( 'BP_CLASSIC_TEMPLATE_STRUCTURE' ) ) 1841 return false; 1842 1843 add_filter( 'bp_core_template_directory_members', create_function( '', 'return "directories/members/index";' ) ); 1844 add_filter( 'bp_core_template_plugin', create_function( '', 'return "plugin-template";' ) ); 1845 } 1846 add_action( 'init', 'bp_core_filter_template_paths' ); 1833 1847 1834 1848 /**
Note: See TracChangeset
for help on using the changeset viewer.