Changeset 4775
- Timestamp:
- 07/22/2011 07:32:48 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-functions.php
r4709 r4775 706 706 707 707 // Require the notifications code so email notifications can be set on the 'bp_activity_posted_update' action. 708 require _once( BP_PLUGIN_DIR . '/bp-activity/bp-activity-notifications.php' );708 require( BP_PLUGIN_DIR . '/bp-activity/bp-activity-notifications.php' ); 709 709 710 710 do_action( 'bp_activity_posted_update', $content, $user_id, $activity_id ); … … 751 751 752 752 // Send an email notification if settings allow 753 require _once( BP_PLUGIN_DIR . '/bp-activity/bp-activity-notifications.php' );753 require( BP_PLUGIN_DIR . '/bp-activity/bp-activity-notifications.php' ); 754 754 bp_activity_new_comment_notification( $comment_id, $user_id, $params ); 755 755 -
trunk/bp-activity/bp-activity-loader.php
r4741 r4775 32 32 * Include files 33 33 */ 34 function _includes() {34 function includes() { 35 35 // Files to include 36 36 $includes = array( … … 44 44 ); 45 45 46 parent:: _includes( $includes );46 parent::includes( $includes ); 47 47 } 48 48 … … 56 56 * @global obj $bp 57 57 */ 58 function _setup_globals() {58 function setup_globals() { 59 59 global $bp; 60 60 … … 80 80 ); 81 81 82 parent:: _setup_globals( $globals );82 parent::setup_globals( $globals ); 83 83 } 84 84 … … 88 88 * @global obj $bp 89 89 */ 90 function _setup_nav() {90 function setup_nav() { 91 91 global $bp; 92 92 … … 174 174 } 175 175 176 parent:: _setup_nav( $main_nav, $sub_nav );176 parent::setup_nav( $main_nav, $sub_nav ); 177 177 } 178 178 … … 182 182 * @global obj $bp 183 183 */ 184 function _setup_admin_bar() {184 function setup_admin_bar() { 185 185 global $bp; 186 186 … … 250 250 } 251 251 252 parent:: _setup_admin_bar( $wp_admin_nav );252 parent::setup_admin_bar( $wp_admin_nav ); 253 253 } 254 254 … … 258 258 * @global obj $bp 259 259 */ 260 function _setup_title() {260 function setup_title() { 261 261 global $bp; 262 262 … … 274 274 } 275 275 276 parent:: _setup_title();276 parent::setup_title(); 277 277 } 278 278 } -
trunk/bp-blogs/bp-blogs-loader.php
r4773 r4775 17 17 * @since BuddyPress {unknown} 18 18 */ 19 function BP_Blogs_Component() {20 $this->__construct();21 }22 23 19 function __construct() { 24 20 parent::start( … … 38 34 * @global obj $bp 39 35 */ 40 function _setup_globals() {36 function setup_globals() { 41 37 global $bp; 42 38 … … 63 59 64 60 // Setup the globals 65 parent:: _setup_globals( $globals );61 parent::setup_globals( $globals ); 66 62 } 67 63 … … 69 65 * Include files 70 66 */ 71 function _includes() {67 function includes() { 72 68 // Files to include 73 69 $includes = array( … … 85 81 86 82 // Include the files 87 parent:: _includes( $includes );83 parent::includes( $includes ); 88 84 } 89 85 … … 93 89 * @global obj $bp 94 90 */ 95 function _setup_nav() {91 function setup_nav() { 96 92 global $bp; 97 93 … … 115 111 116 112 // Setup navigation 117 parent:: _setup_nav( $main_nav );113 parent::setup_nav( $main_nav ); 118 114 } 119 115 … … 123 119 * @global obj $bp 124 120 */ 125 function _setup_admin_bar() {121 function setup_admin_bar() { 126 122 global $bp; 127 123 … … 151 147 } 152 148 153 parent:: _setup_admin_bar( $wp_admin_nav );149 parent::setup_admin_bar( $wp_admin_nav ); 154 150 } 155 151 … … 159 155 * @global obj $bp 160 156 */ 161 function _setup_title() {157 function setup_title() { 162 158 global $bp; 163 159 … … 180 176 } 181 177 182 parent:: _setup_title();178 parent::setup_title(); 183 179 } 184 180 } -
trunk/bp-core/admin/bp-core-admin.php
r4667 r4775 179 179 if ( isset( $_POST['bp_components'] ) ) { 180 180 // Save settings and upgrade schema 181 require _once( BP_PLUGIN_DIR . '/bp-core/admin/bp-core-update.php' );181 require( BP_PLUGIN_DIR . '/bp-core/admin/bp-core-update.php' ); 182 182 $bp->active_components = stripslashes_deep( $_POST['bp_components'] ); 183 183 bp_core_install( $bp->active_components ); … … 330 330 global $bp_wizard; 331 331 332 require _once( BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php' );332 require( BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php' ); 333 333 334 334 $active_components = apply_filters( 'bp_active_components', bp_get_option( 'bp-active-components' ) ); -
trunk/bp-core/admin/bp-core-schema.php
r4559 r4775 1 1 <?php 2 require _once( BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php' );2 require( BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php' ); 3 3 4 4 function bp_core_set_charset() { 5 5 global $wpdb; 6 6 7 require _once( ABSPATH . 'wp-admin/includes/upgrade.php' );7 require( ABSPATH . 'wp-admin/includes/upgrade.php' ); 8 8 9 9 /* BuddyPress component DB schema */ -
trunk/bp-core/admin/bp-core-update.php
r4706 r4775 18 18 19 19 // Ensure that we have access to some utility functions 20 require _once( BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php' );20 require( BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php' ); 21 21 22 22 // Get current DB version … … 585 585 return false; 586 586 587 require _once( ABSPATH . WPINC . '/plugin.php' );587 require( ABSPATH . WPINC . '/plugin.php' ); 588 588 $installed_plugins = get_plugins(); 589 589 $installed_themes = get_themes(); … … 972 972 973 973 // Include 974 require _once( ABSPATH . WPINC . '/plugin.php' );974 require( ABSPATH . WPINC . '/plugin.php' ); 975 975 $installed_plugins = get_plugins(); 976 976 … … 1019 1019 1020 1020 // Load BP and hook the admin menu, so that the redirect is successful 1021 require _once( WP_PLUGIN_DIR . '/buddypress/bp-core/bp-core-loader.php' );1022 require _once( WP_PLUGIN_DIR . '/buddypress/bp-core/admin/bp-core-admin.php' );1021 require( WP_PLUGIN_DIR . '/buddypress/bp-core/bp-core-loader.php' ); 1022 require( WP_PLUGIN_DIR . '/buddypress/bp-core/admin/bp-core-admin.php' ); 1023 1023 bp_core_add_admin_menu(); 1024 1024 … … 1083 1083 $active_components = apply_filters( 'bp_active_components', bp_get_option( 'bp-active-components' ) ); 1084 1084 1085 require _once( dirname( __FILE__ ) . '/bp-core-schema.php' );1085 require( dirname( __FILE__ ) . '/bp-core-schema.php' ); 1086 1086 1087 1087 // Core DB Tables … … 1116 1116 global $wpdb; 1117 1117 1118 require _once( dirname( __FILE__ ) . '/bp-core-schema.php' );1118 require( dirname( __FILE__ ) . '/bp-core-schema.php' ); 1119 1119 } 1120 1120 … … 1262 1262 */ 1263 1263 function bp_core_update_get_page_meta() { 1264 require _once( BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php' );1264 require( BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php' ); 1265 1265 1266 1266 if ( !$page_ids = bp_get_option( 'bp-pages' ) ) -
trunk/bp-core/bp-core-component.php
r4631 r4775 69 69 * - query: The loop for this component (WP_Query) 70 70 * - current_id: The current ID of the queried object 71 * @uses bp_Component:: _setup_globals() Setup the globals needed72 * @uses bp_Component:: _includes() Include the required files73 * @uses bp_Component:: _setup_actions() Setup the hooks and actions71 * @uses bp_Component::setup_globals() Setup the globals needed 72 * @uses bp_Component::includes() Include the required files 73 * @uses bp_Component::setup_actions() Setup the hooks and actions 74 74 */ 75 75 function start( $id, $name, $path ) { … … 84 84 85 85 // Move on to the next step 86 $this-> _setup_actions();86 $this->setup_actions(); 87 87 } 88 88 … … 98 98 * @param arr $args Used to 99 99 */ 100 function _setup_globals( $args = '' ) {100 function setup_globals( $args = '' ) { 101 101 global $bp; 102 102 … … 135 135 136 136 // Call action 137 do_action( 'bp_' . $this->id . ' _setup_globals' );137 do_action( 'bp_' . $this->id . 'setup_globals' ); 138 138 } 139 139 … … 144 144 * @access private 145 145 * 146 * @uses do_action() Calls 'bp_{@link bp_Component::name} _includes'147 */ 148 function _includes( $includes = '' ) {146 * @uses do_action() Calls 'bp_{@link bp_Component::name}includes' 147 */ 148 function includes( $includes = '' ) { 149 149 if ( empty( $includes ) ) 150 150 return; … … 155 155 // Check path + file 156 156 if ( @is_file( $this->path . '/' . $file ) ) 157 require _once( $this->path . '/' . $file );157 require( $this->path . '/' . $file ); 158 158 159 159 // Check path + /bp-component/ + file 160 160 elseif ( @is_file( $this->path . '/bp-' . $this->id . '/' . $file ) ) 161 require _once( $this->path . '/bp-' . $this->id . '/' . $file );161 require( $this->path . '/bp-' . $this->id . '/' . $file ); 162 162 163 163 // Check buddypress/bp-component/bp-component-$file.php 164 164 elseif ( @is_file( $this->path . '/bp-' . $this->id . '/bp-' . $this->id . '-' . $file . '.php' ) ) 165 require _once( $this->path . '/bp-' . $this->id . '/bp-' . $this->id . '-' . $file . '.php' );165 require( $this->path . '/bp-' . $this->id . '/bp-' . $this->id . '-' . $file . '.php' ); 166 166 167 167 } 168 168 169 169 // Call action 170 do_action( 'bp_' . $this->id . ' _includes' );170 do_action( 'bp_' . $this->id . 'includes' ); 171 171 } 172 172 … … 178 178 * 179 179 * @uses add_action() To add various actions 180 * @uses do_action() Calls 'bp_{@link BP_Component::name} _setup_actions'181 */ 182 function _setup_actions() {183 // Register post types 184 add_action( 'bp_setup_globals', array ( $this, ' _setup_globals'), 10 );180 * @uses do_action() Calls 'bp_{@link BP_Component::name}setup_actions' 181 */ 182 function setup_actions() { 183 // Register post types 184 add_action( 'bp_setup_globals', array ( $this, 'setup_globals' ), 10 ); 185 185 186 186 // Include required files. Called early to ensure that BP core components are … … 188 188 // the default priority of 10. This is for backwards compatibility; henceforth, 189 189 // plugins should register themselves by extending this base class. 190 add_action( 'bp_include', array ( $this, ' _includes'), 8 );191 192 // Register post types 193 add_action( 'bp_setup_nav', array ( $this, ' _setup_nav'), 10 );194 195 // Register post types 196 add_action( 'bp_setup_admin_bar', array ( $this, ' _setup_admin_bar'), 10 );197 198 // Register post types 199 add_action( 'bp_setup_title', array ( $this, ' _setup_title'), 10 );190 add_action( 'bp_include', array ( $this, 'includes' ), 8 ); 191 192 // Register post types 193 add_action( 'bp_setup_nav', array ( $this, 'setup_nav' ), 10 ); 194 195 // Register post types 196 add_action( 'bp_setup_admin_bar', array ( $this, 'setup_admin_bar' ), 10 ); 197 198 // Register post types 199 add_action( 'bp_setup_title', array ( $this, 'setup_title' ), 10 ); 200 200 201 201 // Register post types … … 212 212 213 213 // Additional actions can be attached here 214 do_action( 'bp_' . $this->id . ' _setup_actions' );214 do_action( 'bp_' . $this->id . 'setup_actions' ); 215 215 } 216 216 … … 221 221 * @param arr $sub_nav Optional 222 222 */ 223 function _setup_nav( $main_nav = '', $sub_nav = '' ) {223 function setup_nav( $main_nav = '', $sub_nav = '' ) { 224 224 225 225 // No sub nav items without a main nav item … … 236 236 237 237 // Call action 238 do_action( 'bp_' . $this->id . ' _setup_nav' );238 do_action( 'bp_' . $this->id . 'setup_nav' ); 239 239 } 240 240 … … 245 245 * @param array $wp_admin_menus 246 246 */ 247 function _setup_admin_bar( $wp_admin_nav = '' ) {247 function setup_admin_bar( $wp_admin_nav = '' ) { 248 248 249 249 // Bail if this is an ajax request … … 270 270 271 271 // Call action 272 do_action( 'bp_' . $this->id . ' _setup_admin_bar' );272 do_action( 'bp_' . $this->id . 'setup_admin_bar' ); 273 273 } 274 274 … … 278 278 * @since Buddypress {unknown} 279 279 * 280 * @uses do_action() Calls 'bp_{@link bp_Component::name} _setup_title'281 */ 282 function _setup_title( ) {283 do_action( 'bp_' . $this->id . ' _setup_title' );280 * @uses do_action() Calls 'bp_{@link bp_Component::name}setup_title' 281 */ 282 function setup_title( ) { 283 do_action( 'bp_' . $this->id . 'setup_title' ); 284 284 } 285 285 -
trunk/bp-core/bp-core-loader.php
r4586 r4775 2 2 3 3 // Require all of the BuddyPress core libraries 4 require _once( BP_PLUGIN_DIR . '/bp-core/bp-core-cache.php' );5 require _once( BP_PLUGIN_DIR . '/bp-core/bp-core-hooks.php' );6 require _once( BP_PLUGIN_DIR . '/bp-core/bp-core-cssjs.php' );7 require _once( BP_PLUGIN_DIR . '/bp-core/bp-core-classes.php' );8 require _once( BP_PLUGIN_DIR . '/bp-core/bp-core-filters.php' );9 require _once( BP_PLUGIN_DIR . '/bp-core/bp-core-avatars.php' );10 require _once( BP_PLUGIN_DIR . '/bp-core/bp-core-widgets.php' );11 require _once( BP_PLUGIN_DIR . '/bp-core/bp-core-template.php' );12 require _once( BP_PLUGIN_DIR . '/bp-core/bp-core-buddybar.php' );13 require _once( BP_PLUGIN_DIR . '/bp-core/bp-core-catchuri.php' );14 require _once( BP_PLUGIN_DIR . '/bp-core/bp-core-component.php' );15 require _once( BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php' );4 require( BP_PLUGIN_DIR . '/bp-core/bp-core-cache.php' ); 5 require( BP_PLUGIN_DIR . '/bp-core/bp-core-hooks.php' ); 6 require( BP_PLUGIN_DIR . '/bp-core/bp-core-cssjs.php' ); 7 require( BP_PLUGIN_DIR . '/bp-core/bp-core-classes.php' ); 8 require( BP_PLUGIN_DIR . '/bp-core/bp-core-filters.php' ); 9 require( BP_PLUGIN_DIR . '/bp-core/bp-core-avatars.php' ); 10 require( BP_PLUGIN_DIR . '/bp-core/bp-core-widgets.php' ); 11 require( BP_PLUGIN_DIR . '/bp-core/bp-core-template.php' ); 12 require( BP_PLUGIN_DIR . '/bp-core/bp-core-buddybar.php' ); 13 require( BP_PLUGIN_DIR . '/bp-core/bp-core-catchuri.php' ); 14 require( BP_PLUGIN_DIR . '/bp-core/bp-core-component.php' ); 15 require( BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php' ); 16 16 17 17 // Load deprecated functions 18 require _once( BP_PLUGIN_DIR . '/bp-core/deprecated/1.3.php' );18 require( BP_PLUGIN_DIR . '/bp-core/deprecated/1.3.php' ); 19 19 20 20 // Load the WP admin bar. 21 21 if ( !defined( 'BP_DISABLE_ADMIN_BAR' ) ) 22 require _once( BP_PLUGIN_DIR . '/bp-core/bp-core-adminbar.php' );22 require( BP_PLUGIN_DIR . '/bp-core/bp-core-adminbar.php' ); 23 23 24 24 // Move active components from sitemeta, if necessary … … 30 30 31 31 class BP_Core extends BP_Component { 32 33 function BP_Core() {34 $this->__construct();35 }36 32 37 33 function __construct() { … … 42 38 ); 43 39 44 $this-> _bootstrap();45 } 46 47 function _bootstrap() {40 $this->bootstrap(); 41 } 42 43 private function bootstrap() { 48 44 global $bp; 49 45 … … 123 119 } 124 120 125 function _setup_globals() {121 function setup_globals() { 126 122 global $bp; 127 123 … … 198 194 bp_update_is_item_mod( false, 'core' ); 199 195 200 do_action( 'bp_core _setup_globals' );201 } 202 203 function _setup_nav() {196 do_action( 'bp_coresetup_globals' ); 197 } 198 199 function setup_nav() { 204 200 global $bp; 205 201 -
trunk/bp-core/bp-core-template.php
r4723 r4775 3 3 /** 4 4 * Uses the $bp->bp_options_nav global to render out the sub navigation for the current component. 5 * Each component adds to its sub navigation array within its own [component_name]_setup_nav() function.5 * Each component adds to its sub navigation array within its own setup_nav() function. 6 6 * 7 7 * This sub navigation array is the secondary level navigation, so for profile it contains: -
trunk/bp-forums/bp-forums-bbpress-sa.php
r4602 r4775 17 17 define( 'BB_INC', 'bb-includes/' ); 18 18 19 require _once( BB_PATH . BB_INC . 'class.bb-query.php' );20 require _once( BB_PATH . BB_INC . 'class.bb-walker.php' );21 22 require _once( BB_PATH . BB_INC . 'functions.bb-core.php' );23 require _once( BB_PATH . BB_INC . 'functions.bb-forums.php' );24 require _once( BB_PATH . BB_INC . 'functions.bb-topics.php' );25 require _once( BB_PATH . BB_INC . 'functions.bb-posts.php' );26 require _once( BB_PATH . BB_INC . 'functions.bb-topic-tags.php' );27 require _once( BB_PATH . BB_INC . 'functions.bb-capabilities.php' );28 require _once( BB_PATH . BB_INC . 'functions.bb-meta.php' );29 require _once( BB_PATH . BB_INC . 'functions.bb-pluggable.php' );30 require _once( BB_PATH . BB_INC . 'functions.bb-formatting.php' );31 require _once( BB_PATH . BB_INC . 'functions.bb-template.php' );32 33 require _once( BACKPRESS_PATH . 'class.wp-taxonomy.php' );34 require _once( BB_PATH . BB_INC . 'class.bb-taxonomy.php' );35 36 require _once( BB_PATH . 'bb-admin/includes/functions.bb-admin.php' );19 require( BB_PATH . BB_INC . 'class.bb-query.php' ); 20 require( BB_PATH . BB_INC . 'class.bb-walker.php' ); 21 22 require( BB_PATH . BB_INC . 'functions.bb-core.php' ); 23 require( BB_PATH . BB_INC . 'functions.bb-forums.php' ); 24 require( BB_PATH . BB_INC . 'functions.bb-topics.php' ); 25 require( BB_PATH . BB_INC . 'functions.bb-posts.php' ); 26 require( BB_PATH . BB_INC . 'functions.bb-topic-tags.php' ); 27 require( BB_PATH . BB_INC . 'functions.bb-capabilities.php' ); 28 require( BB_PATH . BB_INC . 'functions.bb-meta.php' ); 29 require( BB_PATH . BB_INC . 'functions.bb-pluggable.php' ); 30 require( BB_PATH . BB_INC . 'functions.bb-formatting.php' ); 31 require( BB_PATH . BB_INC . 'functions.bb-template.php' ); 32 33 require( BACKPRESS_PATH . 'class.wp-taxonomy.php' ); 34 require( BB_PATH . BB_INC . 'class.bb-taxonomy.php' ); 35 36 require( BB_PATH . 'bb-admin/includes/functions.bb-admin.php' ); 37 37 38 38 $bb = new stdClass(); 39 require _once( $bp->forums->bbconfig );39 require( $bp->forums->bbconfig ); 40 40 41 41 // Setup the global database connection … … 88 88 // Check if the tables are installed, if not, install them 89 89 if ( !$tables_installed = (boolean) $bbdb->get_results( 'DESCRIBE `' . $bbdb->forums . '`;', ARRAY_A ) ) { 90 require _once( BB_PATH . 'bb-admin/includes/defaults.bb-schema.php' );90 require( BB_PATH . 'bb-admin/includes/defaults.bb-schema.php' ); 91 91 92 92 // Backticks and "IF NOT EXISTS" break the dbDelta function. 93 93 bp_bb_dbDelta( str_replace( ' IF NOT EXISTS', '', str_replace( '`', '', $bb_queries ) ) ); 94 94 95 require _once( BB_PATH . 'bb-admin/includes/functions.bb-upgrade.php' );95 require( BB_PATH . 'bb-admin/includes/functions.bb-upgrade.php' ); 96 96 bb_update_db_version(); 97 97 … … 145 145 146 146 $args = func_get_args(); 147 $args = call_user_func_array( array( &$this, ' _init' ), $args );147 $args = call_user_func_array( array( &$this, 'init' ), $args ); 148 148 149 149 if ( $args['host'] ) … … 169 169 * Based on, and taken from, the BackPress class in turn taken from the 1.0 branch of bbPress. 170 170 */ 171 function _init( $args ) 172 { 171 function init( $args ) { 173 172 if ( 4 == func_num_args() ) { 174 173 $args = array( -
trunk/bp-forums/bp-forums-loader.php
r4586 r4775 17 17 * @since BuddyPress {unknown} 18 18 */ 19 function BP_Forums_Component() {20 $this->__construct();21 }22 23 19 function __construct() { 24 20 parent::start( … … 38 34 * @global obj $bp 39 35 */ 40 function _setup_globals() {36 function setup_globals() { 41 37 global $bp; 42 38 … … 62 58 ); 63 59 64 parent:: _setup_globals( $globals );60 parent::setup_globals( $globals ); 65 61 } 66 62 … … 68 64 * Include files 69 65 */ 70 function _includes() {66 function includes() { 71 67 72 68 // Files to include … … 88 84 $includes[] = 'bbpress-sa'; 89 85 90 parent:: _includes( $includes );86 parent::includes( $includes ); 91 87 } 92 88 … … 96 92 * @global obj $bp 97 93 */ 98 function _setup_nav() {94 function setup_nav() { 99 95 global $bp; 100 96 … … 166 162 */ 167 163 168 parent:: _setup_nav( $main_nav, $sub_nav );164 parent::setup_nav( $main_nav, $sub_nav ); 169 165 } 170 166 … … 174 170 * @global obj $bp 175 171 */ 176 function _setup_admin_bar() {172 function setup_admin_bar() { 177 173 global $bp; 178 174 … … 218 214 } 219 215 220 parent:: _setup_admin_bar( $wp_admin_nav );216 parent::setup_admin_bar( $wp_admin_nav ); 221 217 } 222 218 … … 226 222 * @global obj $bp 227 223 */ 228 function _setup_title() {224 function setup_title() { 229 225 global $bp; 230 226 … … 242 238 } 243 239 244 parent:: _setup_title();240 parent::setup_title(); 245 241 } 246 242 } -
trunk/bp-friends/bp-friends-functions.php
r4770 r4775 35 35 36 36 // Send the email notification 37 require _once( BP_PLUGIN_DIR . '/bp-friends/bp-friends-notifications.php' );37 require( BP_PLUGIN_DIR . '/bp-friends/bp-friends-notifications.php' ); 38 38 friends_notification_new_request( $friendship->id, $friendship->initiator_user_id, $friendship->friend_user_id ); 39 39 … … 108 108 109 109 // Send the email notification 110 require _once( BP_PLUGIN_DIR . '/bp-friends/bp-friends-notifications.php' );110 require( BP_PLUGIN_DIR . '/bp-friends/bp-friends-notifications.php' ); 111 111 friends_notification_accepted_request( $friendship->id, $friendship->initiator_user_id, $friendship->friend_user_id ); 112 112 -
trunk/bp-friends/bp-friends-loader.php
r4741 r4775 17 17 * @since BuddyPress {unknown} 18 18 */ 19 function BP_Friends_Component() {20 $this->__construct();21 }22 23 19 function __construct() { 24 20 parent::start( … … 32 28 * Include files 33 29 */ 34 function _includes() {30 function includes() { 35 31 // Files to include 36 32 $includes = array( … … 45 41 ); 46 42 47 parent:: _includes( $includes );43 parent::includes( $includes ); 48 44 } 49 45 … … 57 53 * @global obj $bp 58 54 */ 59 function _setup_globals() {55 function setup_globals() { 60 56 global $bp; 61 57 … … 82 78 ); 83 79 84 parent:: _setup_globals( $globals );80 parent::setup_globals( $globals ); 85 81 } 86 82 … … 90 86 * @global obj $bp 91 87 */ 92 function _setup_nav() {88 function setup_nav() { 93 89 global $bp; 94 90 … … 126 122 ); 127 123 128 parent:: _setup_nav( $main_nav, $sub_nav );124 parent::setup_nav( $main_nav, $sub_nav ); 129 125 } 130 126 … … 134 130 * @global obj $bp 135 131 */ 136 function _setup_admin_bar() {132 function setup_admin_bar() { 137 133 global $bp; 138 134 … … 179 175 } 180 176 181 parent:: _setup_admin_bar( $wp_admin_nav );177 parent::setup_admin_bar( $wp_admin_nav ); 182 178 } 183 179 … … 187 183 * @global obj $bp 188 184 */ 189 function _setup_title() {185 function setup_title() { 190 186 global $bp; 191 187 … … 203 199 } 204 200 205 parent:: _setup_title();201 parent::setup_title(); 206 202 } 207 203 } -
trunk/bp-groups/bp-groups-functions.php
r4770 r4775 124 124 125 125 if ( $notify_members ) { 126 require _once( BP_PLUGIN_DIR . '/bp-groups/bp-groups-notifications.php' );126 require ( BP_PLUGIN_DIR . '/bp-groups/bp-groups-notifications.php' ); 127 127 groups_notification_group_updated( $group->id ); 128 128 } … … 523 523 // Require the notifications code so email notifications can be set on 524 524 // the 'bp_activity_posted_update' action. 525 require _once( BP_PLUGIN_DIR . '/bp-groups/bp-groups-notifications.php' );525 require( BP_PLUGIN_DIR . '/bp-groups/bp-groups-notifications.php' ); 526 526 527 527 groups_update_groupmeta( $group_id, 'last_activity', bp_core_current_time() ); … … 636 636 global $bp; 637 637 638 require _once( BP_PLUGIN_DIR . '/bp-groups/bp-groups-notifications.php' );638 require ( BP_PLUGIN_DIR . '/bp-groups/bp-groups-notifications.php' ); 639 639 640 640 if ( !$user_id ) … … 776 776 $admins = groups_get_group_admins( $group_id ); 777 777 778 require _once( BP_PLUGIN_DIR . '/bp-groups/bp-groups-notifications.php' );778 require ( BP_PLUGIN_DIR . '/bp-groups/bp-groups-notifications.php' ); 779 779 780 780 // Saved okay, now send the email notification … … 821 821 822 822 // Send a notification to the user. 823 require _once( BP_PLUGIN_DIR . '/bp-groups/bp-groups-notifications.php' );823 require ( BP_PLUGIN_DIR . '/bp-groups/bp-groups-notifications.php' ); 824 824 groups_notification_membership_request_completed( $membership->user_id, $membership->group_id, true ); 825 825 … … 834 834 835 835 // Send a notification to the user. 836 require _once( BP_PLUGIN_DIR . '/bp-groups/bp-groups-notifications.php' );836 require ( BP_PLUGIN_DIR . '/bp-groups/bp-groups-notifications.php' ); 837 837 groups_notification_membership_request_completed( $membership->user_id, $membership->group_id, false ); 838 838 -
trunk/bp-groups/bp-groups-loader.php
r4743 r4775 20 20 * @since BuddyPress {unknown} 21 21 */ 22 function BP_Groups_Component() {23 $this->__construct();24 }25 26 22 function __construct() { 27 23 parent::start( … … 35 31 * Include files 36 32 */ 37 function _includes() {33 function includes() { 38 34 $includes = array( 39 35 'cache', … … 51 47 'notifications' 52 48 ); 53 parent:: _includes( $includes );49 parent::includes( $includes ); 54 50 } 55 51 … … 63 59 * @global obj $bp 64 60 */ 65 function _setup_globals() {61 function setup_globals() { 66 62 global $bp; 67 63 … … 87 83 ); 88 84 89 parent:: _setup_globals( $globals );85 parent::setup_globals( $globals ); 90 86 91 87 /** Single Group Globals **********************************************/ … … 220 216 * @global obj $bp 221 217 */ 222 function _setup_nav() {218 function setup_nav() { 223 219 global $bp; 224 220 … … 257 253 ); 258 254 259 parent:: _setup_nav( $main_nav, $sub_nav );255 parent::setup_nav( $main_nav, $sub_nav ); 260 256 261 257 if ( bp_is_groups_component() && bp_is_single_item() ) { … … 355 351 } 356 352 357 parent:: _setup_nav( $main_nav, $sub_nav );353 parent::setup_nav( $main_nav, $sub_nav ); 358 354 } 359 355 360 356 if ( isset( $this->current_group->user_has_access ) ) 361 do_action( 'groups _setup_nav', $this->current_group->user_has_access );357 do_action( 'groupssetup_nav', $this->current_group->user_has_access ); 362 358 else 363 do_action( 'groups _setup_nav');359 do_action( 'groupssetup_nav'); 364 360 } 365 361 … … 369 365 * @global obj $bp 370 366 */ 371 function _setup_admin_bar() {367 function setup_admin_bar() { 372 368 global $bp; 373 369 … … 416 412 } 417 413 418 parent:: _setup_admin_bar( $wp_admin_nav );414 parent::setup_admin_bar( $wp_admin_nav ); 419 415 } 420 416 … … 424 420 * @global obj $bp 425 421 */ 426 function _setup_title() {422 function setup_title() { 427 423 global $bp; 428 424 … … 457 453 } 458 454 459 parent:: _setup_title();455 parent::setup_title(); 460 456 } 461 457 } -
trunk/bp-loader.php
r4633 r4775 24 24 // '/plugins/bp-custom.php' and it will be loaded before anything else. 25 25 if ( file_exists( WP_PLUGIN_DIR . '/bp-custom.php' ) ) 26 require _once( WP_PLUGIN_DIR . '/bp-custom.php' );26 require( WP_PLUGIN_DIR . '/bp-custom.php' ); 27 27 28 28 // Define on which blog ID BuddyPress should run … … 63 63 64 64 // Load the WP abstraction file so BuddyPress can run on all WordPress setups. 65 require _once( BP_PLUGIN_DIR . '/bp-core/bp-core-wpabstraction.php' );65 require( BP_PLUGIN_DIR . '/bp-core/bp-core-wpabstraction.php' ); 66 66 67 67 // Test to see whether this is a new installation or an upgraded version of BuddyPress … … 77 77 if ( empty( $bp->database_version ) ) { 78 78 $bp->maintenance_mode = 'install'; 79 require _once( WP_PLUGIN_DIR . '/buddypress/bp-core/admin/bp-core-update.php' );79 require( WP_PLUGIN_DIR . '/buddypress/bp-core/admin/bp-core-update.php' ); 80 80 81 81 // There is a previous installation 82 82 } else { 83 83 // Load core 84 require _once( WP_PLUGIN_DIR . '/buddypress/bp-core/bp-core-loader.php' );84 require( WP_PLUGIN_DIR . '/buddypress/bp-core/bp-core-loader.php' ); 85 85 86 86 // Check if an update is required 87 87 if ( (int)$bp->database_version < (int)constant( 'BP_DB_VERSION' ) || isset( $bp->is_network_activate ) ) { 88 88 $bp->maintenance_mode = 'update'; 89 require _once( WP_PLUGIN_DIR . '/buddypress/bp-core/admin/bp-core-update.php' );89 require( WP_PLUGIN_DIR . '/buddypress/bp-core/admin/bp-core-update.php' ); 90 90 } 91 91 } -
trunk/bp-members/bp-members-actions.php
r4606 r4775 37 37 // Get the functions file 38 38 if ( is_multisite() ) 39 require _once( ABSPATH . 'wp-admin/includes/ms.php' );39 require( ABSPATH . 'wp-admin/includes/ms.php' ); 40 40 41 41 if ( 'mark-spammer' == $bp->current_action ) -
trunk/bp-members/bp-members-functions.php
r4650 r4775 605 605 if ( is_multisite() ) { 606 606 if ( $wp_version >= '3.0' ) 607 require _once( ABSPATH . '/wp-admin/includes/ms.php' );607 require( ABSPATH . '/wp-admin/includes/ms.php' ); 608 608 else 609 require _once( ABSPATH . '/wp-admin/includes/mu.php' );610 611 require _once( ABSPATH . '/wp-admin/includes/user.php' );609 require( ABSPATH . '/wp-admin/includes/mu.php' ); 610 611 require( ABSPATH . '/wp-admin/includes/user.php' ); 612 612 613 613 return wpmu_delete_user( $user_id ); … … 615 615 // Single site user deletion 616 616 } else { 617 require _once( ABSPATH . '/wp-admin/includes/user.php' );617 require( ABSPATH . '/wp-admin/includes/user.php' ); 618 618 return wp_delete_user( $user_id ); 619 619 } -
trunk/bp-members/bp-members-loader.php
r4488 r4775 17 17 * @since BuddyPress {unknown} 18 18 */ 19 function BP_Members_Component() {20 $this->__construct();21 }22 23 19 function __construct() { 24 20 parent::start( … … 34 30 * @global obj $bp 35 31 */ 36 function _includes() {32 function includes() { 37 33 $includes = array( 38 34 'signup', … … 46 42 'notifications', 47 43 ); 48 parent:: _includes( $includes );44 parent::includes( $includes ); 49 45 } 50 46 … … 58 54 * @global obj $bp 59 55 */ 60 function _setup_globals() {56 function setup_globals() { 61 57 global $bp, $current_user, $displayed_user_id; 62 58 … … 71 67 ); 72 68 73 parent:: _setup_globals( $globals );69 parent::setup_globals( $globals ); 74 70 75 71 /** Logged in user ****************************************************/ … … 129 125 * @global obj $bp 130 126 */ 131 function _setup_nav() {127 function setup_nav() { 132 128 global $bp; 133 129 … … 158 154 ); 159 155 160 parent:: _setup_nav( $main_nav, $sub_nav );156 parent::setup_nav( $main_nav, $sub_nav ); 161 157 } 162 158 } … … 167 163 * @global obj $bp 168 164 */ 169 function _setup_title() {165 function setup_title() { 170 166 global $bp; 171 167 … … 180 176 } 181 177 182 parent:: _setup_title();178 parent::setup_title(); 183 179 } 184 180 -
trunk/bp-members/bp-members-template.php
r4678 r4775 609 609 /** 610 610 * Uses the $bp->bp_nav global to render out the navigation within a BuddyPress install. 611 * Each component adds to this navigation array within its own [component_name] _setup_nav() function.611 * Each component adds to this navigation array within its own [component_name]setup_nav() function. 612 612 * 613 613 * This navigation array is the top level navigation, so it contains items such as: -
trunk/bp-messages/bp-messages-functions.php
r4770 r4775 94 94 95 95 if ( $message->send() ) { 96 require _once( BP_PLUGIN_DIR . '/bp-messages/bp-messages-notifications.php' );96 require( BP_PLUGIN_DIR . '/bp-messages/bp-messages-notifications.php' ); 97 97 98 98 // Send screen notifications to the recipients -
trunk/bp-messages/bp-messages-loader.php
r4741 r4775 17 17 * @since BuddyPress {unknown} 18 18 */ 19 function BP_Messages_Component() {20 $this->__construct();21 }22 23 19 function __construct() { 24 20 parent::start( … … 32 28 * Include files 33 29 */ 34 function _includes() {30 function includes() { 35 31 // Files to include 36 32 $includes = array( … … 45 41 ); 46 42 47 parent:: _includes( $includes );43 parent::includes( $includes ); 48 44 } 49 45 … … 57 53 * @global obj $bp 58 54 */ 59 function _setup_globals() {55 function setup_globals() { 60 56 global $bp; 61 57 … … 82 78 $this->autocomplete_all = defined( 'BP_MESSAGES_AUTOCOMPLETE_ALL' ); 83 79 84 parent:: _setup_globals( $globals );80 parent::setup_globals( $globals ); 85 81 } 86 82 … … 90 86 * @global obj $bp 91 87 */ 92 function _setup_nav() {88 function setup_nav() { 93 89 global $bp; 94 90 … … 156 152 } 157 153 158 parent:: _setup_nav( $main_nav, $sub_nav );154 parent::setup_nav( $main_nav, $sub_nav ); 159 155 } 160 156 … … 164 160 * @global obj $bp 165 161 */ 166 function _setup_admin_bar() {162 function setup_admin_bar() { 167 163 global $bp; 168 164 … … 225 221 } 226 222 227 parent:: _setup_admin_bar( $wp_admin_nav );223 parent::setup_admin_bar( $wp_admin_nav ); 228 224 } 229 225 … … 233 229 * @global obj $bp 234 230 */ 235 function _setup_title() {231 function setup_title() { 236 232 global $bp; 237 233 … … 248 244 } 249 245 250 parent:: _setup_title();246 parent::setup_title(); 251 247 } 252 248 } -
trunk/bp-settings/bp-settings-loader.php
r4642 r4775 8 8 * @since BuddyPress {unknown} 9 9 */ 10 function BP_Settings_Component() {11 $this->__construct();12 }13 14 10 function __construct() { 15 11 parent::start( … … 25 21 * @global obj $bp 26 22 */ 27 function _includes() {23 function includes() { 28 24 // Files to include 29 25 $includes = array( … … 34 30 ); 35 31 36 parent:: _includes( $includes );32 parent::includes( $includes ); 37 33 } 38 34 … … 46 42 * @global obj $bp 47 43 */ 48 function _setup_globals() {44 function setup_globals() { 49 45 global $bp; 50 46 … … 58 54 ); 59 55 60 parent:: _setup_globals( $globals );56 parent::setup_globals( $globals ); 61 57 } 62 58 … … 66 62 * @global obj $bp 67 63 */ 68 function _setup_nav() {64 function setup_nav() { 69 65 global $bp; 70 66 … … 116 112 } 117 113 118 parent:: _setup_nav( $main_nav, $sub_nav );114 parent::setup_nav( $main_nav, $sub_nav ); 119 115 } 120 116 … … 124 120 * @global obj $bp 125 121 */ 126 function _setup_admin_bar() {122 function setup_admin_bar() { 127 123 global $bp; 128 124 … … 169 165 } 170 166 171 parent:: _setup_admin_bar( $wp_admin_nav );167 parent::setup_admin_bar( $wp_admin_nav ); 172 168 } 173 169 } -
trunk/bp-themes/bp-default/_inc/css/default.css
r4769 r4775 2225 2225 font-weight: bold; 2226 2226 } 2227 table#message-threads tr.unread td span.activity {2228 background: #fff;2229 }2230 2227 li span.unread-count, 2231 2228 tr.unread span.unread-count { -
trunk/bp-themes/bp-default/functions.php
r4727 r4775 62 62 63 63 // Load the AJAX functions for the theme 64 require _once( TEMPLATEPATH . '/_inc/ajax.php' );64 require( TEMPLATEPATH . '/_inc/ajax.php' ); 65 65 66 66 // This theme styles the visual editor with editor-style.css to match the theme style. -
trunk/bp-xprofile/bp-xprofile-loader.php
r4586 r4775 18 18 * @since BuddyPress {unknown} 19 19 */ 20 function BP_XProfile_Component() {21 $this->__construct();22 }23 24 20 function __construct() { 25 21 parent::start( … … 33 29 * Include files 34 30 */ 35 function _includes() {31 function includes() { 36 32 $includes = array( 37 33 'cssjs', … … 50 46 $includes[] = 'admin'; 51 47 52 parent:: _includes( $includes );48 parent::includes( $includes ); 53 49 } 54 50 … … 62 58 * @global obj $bp 63 59 */ 64 function _setup_globals() {60 function setup_globals() { 65 61 global $bp; 66 62 … … 100 96 ); 101 97 102 parent:: _setup_globals( $globals );98 parent::setup_globals( $globals ); 103 99 } 104 100 … … 108 104 * @global obj $bp 109 105 */ 110 function _setup_nav() {106 function setup_nav() { 111 107 global $bp; 112 108 … … 153 149 ); 154 150 155 parent:: _setup_nav( $main_nav, $sub_nav );151 parent::setup_nav( $main_nav, $sub_nav ); 156 152 } 157 153 … … 161 157 * @global obj $bp 162 158 */ 163 function _setup_admin_bar() {159 function setup_admin_bar() { 164 160 global $bp; 165 161 … … 204 200 } 205 201 206 parent:: _setup_admin_bar( $wp_admin_nav );202 parent::setup_admin_bar( $wp_admin_nav ); 207 203 } 208 204 … … 212 208 * @global obj $bp 213 209 */ 214 function _setup_title() {210 function setup_title() { 215 211 global $bp; 216 212 … … 227 223 } 228 224 229 parent:: _setup_title();225 parent::setup_title(); 230 226 } 231 227 }
Note: See TracChangeset
for help on using the changeset viewer.