Skip to:
Content

BuddyPress.org

Changeset 4775


Ignore:
Timestamp:
07/22/2011 07:32:48 AM (15 years ago)
Author:
johnjamesjacoby
Message:

Prebeta code clean-up - see #3367:

  • Remove PHP4 constructors on loader classes
  • Remove class functions that start with underscores
  • Use require() rather than require_once() where appropriate
  • Remove background color on messages activity time
Location:
trunk
Files:
26 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-functions.php

    r4709 r4775  
    706706
    707707        // 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' );
    709709
    710710        do_action( 'bp_activity_posted_update', $content, $user_id, $activity_id );
    … …  
    751751
    752752        // 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' );
    754754        bp_activity_new_comment_notification( $comment_id, $user_id, $params );
    755755
  • trunk/bp-activity/bp-activity-loader.php

    r4741 r4775  
    3232         * Include files
    3333         */
    34         function _includes() {
     34        function includes() {
    3535                // Files to include
    3636                $includes = array(
    … …  
    4444                );
    4545
    46                 parent::_includes( $includes );
     46                parent::includes( $includes );
    4747        }
    4848
    … …  
    5656         * @global obj $bp
    5757         */
    58         function _setup_globals() {
     58        function setup_globals() {
    5959                global $bp;
    6060
    … …  
    8080                );
    8181
    82                 parent::_setup_globals( $globals );
     82                parent::setup_globals( $globals );
    8383        }
    8484
    … …  
    8888         * @global obj $bp
    8989         */
    90         function _setup_nav() {
     90        function setup_nav() {
    9191                global $bp;
    9292
    … …  
    174174                }
    175175
    176                 parent::_setup_nav( $main_nav, $sub_nav );
     176                parent::setup_nav( $main_nav, $sub_nav );
    177177        }
    178178
    … …  
    182182         * @global obj $bp
    183183         */
    184         function _setup_admin_bar() {
     184        function setup_admin_bar() {
    185185                global $bp;
    186186
    … …  
    250250                }
    251251
    252                 parent::_setup_admin_bar( $wp_admin_nav );
     252                parent::setup_admin_bar( $wp_admin_nav );
    253253        }
    254254
    … …  
    258258         * @global obj $bp
    259259         */
    260         function _setup_title() {
     260        function setup_title() {
    261261                global $bp;
    262262
    … …  
    274274                }
    275275
    276                 parent::_setup_title();
     276                parent::setup_title();
    277277        }
    278278}
  • trunk/bp-blogs/bp-blogs-loader.php

    r4773 r4775  
    1717         * @since BuddyPress {unknown}
    1818         */
    19         function BP_Blogs_Component() {
    20                 $this->__construct();
    21         }
    22 
    2319        function __construct() {
    2420                parent::start(
    … …  
    3834         * @global obj $bp
    3935         */
    40         function _setup_globals() {
     36        function setup_globals() {
    4137                global $bp;
    4238
    … …  
    6359
    6460                // Setup the globals
    65                 parent::_setup_globals( $globals );
     61                parent::setup_globals( $globals );
    6662        }
    6763
    … …  
    6965         * Include files
    7066         */
    71         function _includes() {
     67        function includes() {
    7268                // Files to include
    7369                $includes = array(
    … …  
    8581
    8682                // Include the files
    87                 parent::_includes( $includes );
     83                parent::includes( $includes );
    8884        }
    8985
    … …  
    9389         * @global obj $bp
    9490         */
    95         function _setup_nav() {
     91        function setup_nav() {
    9692                global $bp;
    9793
    … …  
    115111
    116112                // Setup navigation
    117                 parent::_setup_nav( $main_nav );
     113                parent::setup_nav( $main_nav );
    118114        }
    119115
    … …  
    123119         * @global obj $bp
    124120         */
    125         function _setup_admin_bar() {
     121        function setup_admin_bar() {
    126122                global $bp;
    127123
    … …  
    151147                }
    152148
    153                 parent::_setup_admin_bar( $wp_admin_nav );
     149                parent::setup_admin_bar( $wp_admin_nav );
    154150        }
    155151
    … …  
    159155         * @global obj $bp
    160156         */
    161         function _setup_title() {
     157        function setup_title() {
    162158                global $bp;
    163159
    … …  
    180176                }
    181177
    182                 parent::_setup_title();
     178                parent::setup_title();
    183179        }
    184180}
  • trunk/bp-core/admin/bp-core-admin.php

    r4667 r4775  
    179179                if ( isset( $_POST['bp_components'] ) ) {
    180180                        // 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' );
    182182                        $bp->active_components = stripslashes_deep( $_POST['bp_components'] );
    183183                        bp_core_install( $bp->active_components );
    … …  
    330330        global $bp_wizard;
    331331                       
    332         require_once( BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php' );
     332        require( BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php' );
    333333
    334334        $active_components = apply_filters( 'bp_active_components', bp_get_option( 'bp-active-components' ) );
  • trunk/bp-core/admin/bp-core-schema.php

    r4559 r4775  
    11<?php
    2 require_once( BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php' );
     2require( BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php' );
    33 
    44function bp_core_set_charset() {
    55        global $wpdb;
    66
    7         require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
     7        require( ABSPATH . 'wp-admin/includes/upgrade.php' );
    88
    99        /* BuddyPress component DB schema */
  • trunk/bp-core/admin/bp-core-update.php

    r4706 r4775  
    1818
    1919                // 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' );
    2121
    2222                // Get current DB version
    … …  
    585585                        return false;
    586586
    587                 require_once( ABSPATH . WPINC . '/plugin.php' );
     587                require( ABSPATH . WPINC . '/plugin.php' );
    588588                $installed_plugins = get_plugins();
    589589                $installed_themes  = get_themes();
    … …  
    972972
    973973                                        // Include
    974                                         require_once( ABSPATH . WPINC . '/plugin.php' );
     974                                        require( ABSPATH . WPINC . '/plugin.php' );
    975975                                        $installed_plugins = get_plugins();
    976976
    … …  
    10191019
    10201020                        // 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' );
    10231023                        bp_core_add_admin_menu();
    10241024
    … …  
    10831083                $active_components = apply_filters( 'bp_active_components', bp_get_option( 'bp-active-components' ) );
    10841084
    1085         require_once( dirname( __FILE__ ) . '/bp-core-schema.php' );
     1085        require( dirname( __FILE__ ) . '/bp-core-schema.php' );
    10861086
    10871087        // Core DB Tables
    … …  
    11161116        global $wpdb;
    11171117
    1118         require_once( dirname( __FILE__ ) . '/bp-core-schema.php' );
     1118        require( dirname( __FILE__ ) . '/bp-core-schema.php' );
    11191119}
    11201120
    … …  
    12621262 */
    12631263function 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' );
    12651265       
    12661266        if ( !$page_ids = bp_get_option( 'bp-pages' ) )
  • trunk/bp-core/bp-core-component.php

    r4631 r4775  
    6969         *  - query: The loop for this component (WP_Query)
    7070         *  - current_id: The current ID of the queried object
    71          * @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
     71         * @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
    7474         */
    7575        function start( $id, $name, $path ) {
    … …  
    8484
    8585                // Move on to the next step
    86                 $this->_setup_actions();
     86                $this->setup_actions();
    8787        }
    8888
    … …  
    9898         * @param arr $args Used to
    9999         */
    100         function _setup_globals( $args = '' ) {
     100        function setup_globals( $args = '' ) {
    101101                global $bp;
    102102
    … …  
    135135
    136136                // Call action
    137                 do_action( 'bp_' . $this->id . '_setup_globals' );
     137                do_action( 'bp_' . $this->id . 'setup_globals' );
    138138        }
    139139
    … …  
    144144         * @access private
    145145         *
    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 = '' ) {
    149149                if ( empty( $includes ) )
    150150                        return;
    … …  
    155155                        // Check path + file
    156156                        if ( @is_file( $this->path . '/' . $file ) )
    157                                 require_once( $this->path . '/' . $file );
     157                                require( $this->path . '/' . $file );
    158158
    159159                        // Check path + /bp-component/ + file
    160160                        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 );
    162162
    163163                        // Check buddypress/bp-component/bp-component-$file.php
    164164                        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' );
    166166
    167167                }
    168168
    169169                // Call action
    170                 do_action( 'bp_' . $this->id . '_includes' );
     170                do_action( 'bp_' . $this->id . 'includes' );
    171171        }
    172172
    … …  
    178178         *
    179179         * @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 );
    185185
    186186                // Include required files. Called early to ensure that BP core components are
    … …  
    188188                // the default priority of 10. This is for backwards compatibility; henceforth,
    189189                // 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 );
    200200
    201201                // Register post types
    … …  
    212212
    213213                // Additional actions can be attached here
    214                 do_action( 'bp_' . $this->id . '_setup_actions' );
     214                do_action( 'bp_' . $this->id . 'setup_actions' );
    215215        }
    216216
    … …  
    221221         * @param arr $sub_nav Optional
    222222         */
    223         function _setup_nav( $main_nav = '', $sub_nav = '' ) {
     223        function setup_nav( $main_nav = '', $sub_nav = '' ) {
    224224
    225225                // No sub nav items without a main nav item
    … …  
    236236
    237237                // Call action
    238                 do_action( 'bp_' . $this->id . '_setup_nav' );
     238                do_action( 'bp_' . $this->id . 'setup_nav' );
    239239        }
    240240
    … …  
    245245         * @param array $wp_admin_menus
    246246         */
    247         function _setup_admin_bar( $wp_admin_nav = '' ) {
     247        function setup_admin_bar( $wp_admin_nav = '' ) {
    248248
    249249                // Bail if this is an ajax request
    … …  
    270270
    271271                // Call action
    272                 do_action( 'bp_' . $this->id . '_setup_admin_bar' );
     272                do_action( 'bp_' . $this->id . 'setup_admin_bar' );
    273273        }
    274274
    … …  
    278278         * @since Buddypress {unknown}
    279279         *
    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' );
    284284        }
    285285
  • trunk/bp-core/bp-core-loader.php

    r4586 r4775  
    22
    33// 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' );
     4require( BP_PLUGIN_DIR . '/bp-core/bp-core-cache.php'     );
     5require( BP_PLUGIN_DIR . '/bp-core/bp-core-hooks.php'     );
     6require( BP_PLUGIN_DIR . '/bp-core/bp-core-cssjs.php'     );
     7require( BP_PLUGIN_DIR . '/bp-core/bp-core-classes.php'   );
     8require( BP_PLUGIN_DIR . '/bp-core/bp-core-filters.php'   );
     9require( BP_PLUGIN_DIR . '/bp-core/bp-core-avatars.php'   );
     10require( BP_PLUGIN_DIR . '/bp-core/bp-core-widgets.php'   );
     11require( BP_PLUGIN_DIR . '/bp-core/bp-core-template.php'  );
     12require( BP_PLUGIN_DIR . '/bp-core/bp-core-buddybar.php'  );
     13require( BP_PLUGIN_DIR . '/bp-core/bp-core-catchuri.php'  );
     14require( BP_PLUGIN_DIR . '/bp-core/bp-core-component.php' );
     15require( BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php' );
    1616
    1717// Load deprecated functions
    18 require_once( BP_PLUGIN_DIR . '/bp-core/deprecated/1.3.php'    );
     18require( BP_PLUGIN_DIR . '/bp-core/deprecated/1.3.php'    );
    1919
    2020// Load the WP admin bar.
    2121if ( !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'  );
    2323
    2424// Move active components from sitemeta, if necessary
    … …  
    3030
    3131class BP_Core extends BP_Component {
    32 
    33         function BP_Core() {
    34                 $this->__construct();
    35         }
    3632
    3733        function __construct() {
    … …  
    4238                );
    4339
    44                 $this->_bootstrap();
    45         }
    46 
    47         function _bootstrap() {
     40                $this->bootstrap();
     41        }
     42
     43        private function bootstrap() {
    4844                global $bp;
    4945
    … …  
    123119        }
    124120
    125         function _setup_globals() {
     121        function setup_globals() {
    126122                global $bp;
    127123
    … …  
    198194                bp_update_is_item_mod( false,                  'core' );
    199195
    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() {
    204200                global $bp;
    205201
  • trunk/bp-core/bp-core-template.php

    r4723 r4775  
    33/**
    44 * 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.
    66 *
    77 * This sub navigation array is the secondary level navigation, so for profile it contains:
  • trunk/bp-forums/bp-forums-bbpress-sa.php

    r4602 r4775  
    1717        define( 'BB_INC', 'bb-includes/' );
    1818
    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' );
    3737
    3838        $bb = new stdClass();
    39         require_once( $bp->forums->bbconfig );
     39        require( $bp->forums->bbconfig );
    4040
    4141        // Setup the global database connection
    … …  
    8888        // Check if the tables are installed, if not, install them
    8989        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' );
    9191
    9292                // Backticks and "IF NOT EXISTS" break the dbDelta function.
    9393                bp_bb_dbDelta( str_replace( ' IF NOT EXISTS', '', str_replace( '`', '', $bb_queries ) ) );
    9494
    95                 require_once( BB_PATH . 'bb-admin/includes/functions.bb-upgrade.php' );
     95                require( BB_PATH . 'bb-admin/includes/functions.bb-upgrade.php' );
    9696                bb_update_db_version();
    9797
    … …  
    145145
    146146                $args = func_get_args();
    147                 $args = call_user_func_array( array( &$this, '_init' ), $args );
     147                $args = call_user_func_array( array( &$this, 'init' ), $args );
    148148
    149149                if ( $args['host'] )
    … …  
    169169         * Based on, and taken from, the BackPress class in turn taken from the 1.0 branch of bbPress.
    170170         */
    171         function _init( $args )
    172         {
     171        function init( $args ) {
    173172                if ( 4 == func_num_args() ) {
    174173                        $args = array(
  • trunk/bp-forums/bp-forums-loader.php

    r4586 r4775  
    1717         * @since BuddyPress {unknown}
    1818         */
    19         function BP_Forums_Component() {
    20                 $this->__construct();
    21         }
    22 
    2319        function __construct() {
    2420                parent::start(
    … …  
    3834         * @global obj $bp
    3935         */
    40         function _setup_globals() {
     36        function setup_globals() {
    4137                global $bp;
    4238
    … …  
    6258                );
    6359
    64                 parent::_setup_globals( $globals );
     60                parent::setup_globals( $globals );
    6561        }
    6662
    … …  
    6864         * Include files
    6965         */
    70         function _includes() {
     66        function includes() {
    7167
    7268                // Files to include
    … …  
    8884                        $includes[] = 'bbpress-sa';
    8985
    90                 parent::_includes( $includes );
     86                parent::includes( $includes );
    9187        }
    9288
    … …  
    9692         * @global obj $bp
    9793         */
    98         function _setup_nav() {
     94        function setup_nav() {
    9995                global $bp;
    10096
    … …  
    166162                */
    167163
    168                 parent::_setup_nav( $main_nav, $sub_nav );
     164                parent::setup_nav( $main_nav, $sub_nav );
    169165        }
    170166
    … …  
    174170         * @global obj $bp
    175171         */
    176         function _setup_admin_bar() {
     172        function setup_admin_bar() {
    177173                global $bp;
    178174
    … …  
    218214                }
    219215
    220                 parent::_setup_admin_bar( $wp_admin_nav );
     216                parent::setup_admin_bar( $wp_admin_nav );
    221217        }
    222218
    … …  
    226222         * @global obj $bp
    227223         */
    228         function _setup_title() {
     224        function setup_title() {
    229225                global $bp;
    230226
    … …  
    242238                }
    243239
    244                 parent::_setup_title();
     240                parent::setup_title();
    245241        }
    246242}
  • trunk/bp-friends/bp-friends-functions.php

    r4770 r4775  
    3535
    3636                        // 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' );
    3838                        friends_notification_new_request( $friendship->id, $friendship->initiator_user_id, $friendship->friend_user_id );
    3939
    … …  
    108108
    109109                // 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' );
    111111                friends_notification_accepted_request( $friendship->id, $friendship->initiator_user_id, $friendship->friend_user_id );
    112112
  • trunk/bp-friends/bp-friends-loader.php

    r4741 r4775  
    1717         * @since BuddyPress {unknown}
    1818         */
    19         function BP_Friends_Component() {
    20                 $this->__construct();
    21         }
    22 
    2319        function __construct() {
    2420                parent::start(
    … …  
    3228         * Include files
    3329         */
    34         function _includes() {
     30        function includes() {
    3531                // Files to include
    3632                $includes = array(
    … …  
    4541                );
    4642
    47                 parent::_includes( $includes );
     43                parent::includes( $includes );
    4844        }
    4945
    … …  
    5753         * @global obj $bp
    5854         */
    59         function _setup_globals() {
     55        function setup_globals() {
    6056                global $bp;
    6157
    … …  
    8278                );
    8379
    84                 parent::_setup_globals( $globals );
     80                parent::setup_globals( $globals );
    8581        }
    8682
    … …  
    9086         * @global obj $bp
    9187         */
    92         function _setup_nav() {
     88        function setup_nav() {
    9389                global $bp;
    9490
    … …  
    126122                );
    127123
    128                 parent::_setup_nav( $main_nav, $sub_nav );
     124                parent::setup_nav( $main_nav, $sub_nav );
    129125        }
    130126
    … …  
    134130         * @global obj $bp
    135131         */
    136         function _setup_admin_bar() {
     132        function setup_admin_bar() {
    137133                global $bp;
    138134
    … …  
    179175                }
    180176
    181                 parent::_setup_admin_bar( $wp_admin_nav );
     177                parent::setup_admin_bar( $wp_admin_nav );
    182178        }
    183179
    … …  
    187183         * @global obj $bp
    188184         */
    189         function _setup_title() {
     185        function setup_title() {
    190186                global $bp;
    191187
    … …  
    203199                }
    204200
    205                 parent::_setup_title();
     201                parent::setup_title();
    206202        }
    207203}
  • trunk/bp-groups/bp-groups-functions.php

    r4770 r4775  
    124124
    125125        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' );
    127127                groups_notification_group_updated( $group->id );
    128128        }
    … …  
    523523        // Require the notifications code so email notifications can be set on
    524524        // 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' );
    526526
    527527        groups_update_groupmeta( $group_id, 'last_activity', bp_core_current_time() );
    … …  
    636636        global $bp;
    637637
    638         require_once ( BP_PLUGIN_DIR . '/bp-groups/bp-groups-notifications.php' );
     638        require ( BP_PLUGIN_DIR . '/bp-groups/bp-groups-notifications.php' );
    639639
    640640        if ( !$user_id )
    … …  
    776776                $admins = groups_get_group_admins( $group_id );
    777777
    778                 require_once ( BP_PLUGIN_DIR . '/bp-groups/bp-groups-notifications.php' );
     778                require ( BP_PLUGIN_DIR . '/bp-groups/bp-groups-notifications.php' );
    779779
    780780                // Saved okay, now send the email notification
    … …  
    821821
    822822        // 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' );
    824824        groups_notification_membership_request_completed( $membership->user_id, $membership->group_id, true );
    825825
    … …  
    834834
    835835        // 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' );
    837837        groups_notification_membership_request_completed( $membership->user_id, $membership->group_id, false );
    838838
  • trunk/bp-groups/bp-groups-loader.php

    r4743 r4775  
    2020         * @since BuddyPress {unknown}
    2121         */
    22         function BP_Groups_Component() {
    23                 $this->__construct();
    24         }
    25 
    2622        function __construct() {
    2723                parent::start(
    … …  
    3531         * Include files
    3632         */
    37         function _includes() {
     33        function includes() {
    3834                $includes = array(
    3935                        'cache',
    … …  
    5147                        'notifications'
    5248                );
    53                 parent::_includes( $includes );
     49                parent::includes( $includes );
    5450        }
    5551
    … …  
    6359         * @global obj $bp
    6460         */
    65         function _setup_globals() {
     61        function setup_globals() {
    6662                global $bp;
    6763
    … …  
    8783                );
    8884
    89                 parent::_setup_globals( $globals );
     85                parent::setup_globals( $globals );
    9086
    9187                /** Single Group Globals **********************************************/
    … …  
    220216         * @global obj $bp
    221217         */
    222         function _setup_nav() {
     218        function setup_nav() {
    223219                global $bp;
    224220
    … …  
    257253                );
    258254
    259                 parent::_setup_nav( $main_nav, $sub_nav );
     255                parent::setup_nav( $main_nav, $sub_nav );
    260256
    261257                if ( bp_is_groups_component() && bp_is_single_item() ) {
    … …  
    355351                        }
    356352
    357                         parent::_setup_nav( $main_nav, $sub_nav );
     353                        parent::setup_nav( $main_nav, $sub_nav );
    358354                }
    359355
    360356                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 );
    362358                else
    363                         do_action( 'groups_setup_nav');
     359                        do_action( 'groupssetup_nav');
    364360        }
    365361
    … …  
    369365         * @global obj $bp
    370366         */
    371         function _setup_admin_bar() {
     367        function setup_admin_bar() {
    372368                global $bp;
    373369
    … …  
    416412                }
    417413
    418                 parent::_setup_admin_bar( $wp_admin_nav );
     414                parent::setup_admin_bar( $wp_admin_nav );
    419415        }
    420416
    … …  
    424420         * @global obj $bp
    425421         */
    426         function _setup_title() {
     422        function setup_title() {
    427423                global $bp;
    428424
    … …  
    457453                }
    458454
    459                 parent::_setup_title();
     455                parent::setup_title();
    460456        }
    461457}
  • trunk/bp-loader.php

    r4633 r4775  
    2424// '/plugins/bp-custom.php' and it will be loaded before anything else.
    2525if ( 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' );
    2727
    2828// Define on which blog ID BuddyPress should run
    … …  
    6363
    6464// 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' );
     65require( BP_PLUGIN_DIR . '/bp-core/bp-core-wpabstraction.php' );
    6666
    6767// Test to see whether this is a new installation or an upgraded version of BuddyPress
    … …  
    7777if ( empty( $bp->database_version ) ) {
    7878        $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' );
    8080
    8181// There is a previous installation
    8282} else {
    8383        // 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' );
    8585
    8686        // Check if an update is required
    8787        if ( (int)$bp->database_version < (int)constant( 'BP_DB_VERSION' ) || isset( $bp->is_network_activate ) ) {
    8888                $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' );
    9090        }
    9191}
  • trunk/bp-members/bp-members-actions.php

    r4606 r4775  
    3737                // Get the functions file
    3838                if ( is_multisite() )
    39                         require_once( ABSPATH . 'wp-admin/includes/ms.php' );
     39                        require( ABSPATH . 'wp-admin/includes/ms.php' );
    4040
    4141                if ( 'mark-spammer' == $bp->current_action )
  • trunk/bp-members/bp-members-functions.php

    r4650 r4775  
    605605        if ( is_multisite() ) {
    606606                if ( $wp_version >= '3.0' )
    607                         require_once( ABSPATH . '/wp-admin/includes/ms.php' );
     607                        require( ABSPATH . '/wp-admin/includes/ms.php' );
    608608                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' );
    612612
    613613                return wpmu_delete_user( $user_id );
    … …  
    615615        // Single site user deletion
    616616        } else {
    617                 require_once( ABSPATH . '/wp-admin/includes/user.php' );
     617                require( ABSPATH . '/wp-admin/includes/user.php' );
    618618                return wp_delete_user( $user_id );
    619619        }
  • trunk/bp-members/bp-members-loader.php

    r4488 r4775  
    1717         * @since BuddyPress {unknown}
    1818         */
    19         function BP_Members_Component() {
    20                 $this->__construct();
    21         }
    22 
    2319        function __construct() {
    2420                parent::start(
    … …  
    3430         * @global obj $bp
    3531         */
    36         function _includes() {
     32        function includes() {
    3733                $includes = array(
    3834                        'signup',
    … …  
    4642                        'notifications',
    4743                );
    48                 parent::_includes( $includes );
     44                parent::includes( $includes );
    4945        }
    5046
    … …  
    5854         * @global obj $bp
    5955         */
    60         function _setup_globals() {
     56        function setup_globals() {
    6157                global $bp, $current_user, $displayed_user_id;
    6258
    … …  
    7167                );
    7268
    73                 parent::_setup_globals( $globals );
     69                parent::setup_globals( $globals );
    7470
    7571                /** Logged in user ****************************************************/
    … …  
    129125         * @global obj $bp
    130126         */
    131         function _setup_nav() {
     127        function setup_nav() {
    132128                global $bp;
    133129
    … …  
    158154                        );
    159155
    160                         parent::_setup_nav( $main_nav, $sub_nav );
     156                        parent::setup_nav( $main_nav, $sub_nav );
    161157                }
    162158        }
    … …  
    167163         * @global obj $bp
    168164         */
    169         function _setup_title() {
     165        function setup_title() {
    170166                global $bp;
    171167
    … …  
    180176                }
    181177
    182                 parent::_setup_title();
     178                parent::setup_title();
    183179        }
    184180
  • trunk/bp-members/bp-members-template.php

    r4678 r4775  
    609609/**
    610610 * 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.
    612612 *
    613613 * This navigation array is the top level navigation, so it contains items such as:
  • trunk/bp-messages/bp-messages-functions.php

    r4770 r4775  
    9494
    9595        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' );
    9797
    9898                // Send screen notifications to the recipients
  • trunk/bp-messages/bp-messages-loader.php

    r4741 r4775  
    1717         * @since BuddyPress {unknown}
    1818         */
    19         function BP_Messages_Component() {
    20                 $this->__construct();
    21         }
    22 
    2319        function __construct() {
    2420                parent::start(
    … …  
    3228         * Include files
    3329         */
    34         function _includes() {
     30        function includes() {
    3531                // Files to include
    3632                $includes = array(
    … …  
    4541                );
    4642
    47                 parent::_includes( $includes );
     43                parent::includes( $includes );
    4844        }
    4945
    … …  
    5753         * @global obj $bp
    5854         */
    59         function _setup_globals() {
     55        function setup_globals() {
    6056                global $bp;
    6157
    … …  
    8278                $this->autocomplete_all = defined( 'BP_MESSAGES_AUTOCOMPLETE_ALL' );
    8379
    84                 parent::_setup_globals( $globals );
     80                parent::setup_globals( $globals );
    8581        }
    8682
    … …  
    9086         * @global obj $bp
    9187         */
    92         function _setup_nav() {
     88        function setup_nav() {
    9389                global $bp;
    9490
    … …  
    156152                }
    157153
    158                 parent::_setup_nav( $main_nav, $sub_nav );
     154                parent::setup_nav( $main_nav, $sub_nav );
    159155        }
    160156
    … …  
    164160         * @global obj $bp
    165161         */
    166         function _setup_admin_bar() {
     162        function setup_admin_bar() {
    167163                global $bp;
    168164
    … …  
    225221                }
    226222
    227                 parent::_setup_admin_bar( $wp_admin_nav );
     223                parent::setup_admin_bar( $wp_admin_nav );
    228224        }
    229225
    … …  
    233229         * @global obj $bp
    234230         */
    235         function _setup_title() {
     231        function setup_title() {
    236232                global $bp;
    237233
    … …  
    248244                }
    249245
    250                 parent::_setup_title();
     246                parent::setup_title();
    251247        }
    252248}
  • trunk/bp-settings/bp-settings-loader.php

    r4642 r4775  
    88         * @since BuddyPress {unknown}
    99         */
    10         function BP_Settings_Component() {
    11                 $this->__construct();
    12         }
    13 
    1410        function __construct() {
    1511                parent::start(
    … …  
    2521         * @global obj $bp
    2622         */
    27         function _includes() {
     23        function includes() {
    2824                // Files to include
    2925                $includes = array(
    … …  
    3430                );
    3531
    36                 parent::_includes( $includes );
     32                parent::includes( $includes );
    3733        }
    3834
    … …  
    4642         * @global obj $bp
    4743         */
    48         function _setup_globals() {
     44        function setup_globals() {
    4945                global $bp;
    5046
    … …  
    5854                );
    5955
    60                 parent::_setup_globals( $globals );
     56                parent::setup_globals( $globals );
    6157        }
    6258
    … …  
    6662         * @global obj $bp
    6763         */
    68         function _setup_nav() {
     64        function setup_nav() {
    6965                global $bp;
    7066
    … …  
    116112                }
    117113
    118                 parent::_setup_nav( $main_nav, $sub_nav );
     114                parent::setup_nav( $main_nav, $sub_nav );
    119115        }
    120116
    … …  
    124120         * @global obj $bp
    125121         */
    126         function _setup_admin_bar() {
     122        function setup_admin_bar() {
    127123                global $bp;
    128124
    … …  
    169165                }
    170166
    171                 parent::_setup_admin_bar( $wp_admin_nav );
     167                parent::setup_admin_bar( $wp_admin_nav );
    172168        }
    173169}
  • trunk/bp-themes/bp-default/_inc/css/default.css

    r4769 r4775  
    22252225        font-weight: bold;
    22262226}
    2227 table#message-threads tr.unread td span.activity {
    2228         background: #fff;
    2229 }
    22302227li span.unread-count,
    22312228tr.unread span.unread-count {
  • trunk/bp-themes/bp-default/functions.php

    r4727 r4775  
    6262
    6363        // Load the AJAX functions for the theme
    64         require_once( TEMPLATEPATH . '/_inc/ajax.php' );
     64        require( TEMPLATEPATH . '/_inc/ajax.php' );
    6565
    6666        // This theme styles the visual editor with editor-style.css to match the theme style.
  • trunk/bp-xprofile/bp-xprofile-loader.php

    r4586 r4775  
    1818         * @since BuddyPress {unknown}
    1919         */
    20         function BP_XProfile_Component() {
    21                 $this->__construct();
    22         }
    23 
    2420        function __construct() {
    2521                parent::start(
    … …  
    3329         * Include files
    3430         */
    35         function _includes() {
     31        function includes() {
    3632                $includes = array(
    3733                        'cssjs',
    … …  
    5046                        $includes[] = 'admin';
    5147
    52                 parent::_includes( $includes );
     48                parent::includes( $includes );
    5349        }
    5450
    … …  
    6258         * @global obj $bp
    6359         */
    64         function _setup_globals() {
     60        function setup_globals() {
    6561                global $bp;
    6662
    … …  
    10096                );
    10197
    102                 parent::_setup_globals( $globals );
     98                parent::setup_globals( $globals );
    10399        }
    104100
    … …  
    108104         * @global obj $bp
    109105         */
    110         function _setup_nav() {
     106        function setup_nav() {
    111107                global $bp;
    112108
    … …  
    153149                );
    154150
    155                 parent::_setup_nav( $main_nav, $sub_nav );
     151                parent::setup_nav( $main_nav, $sub_nav );
    156152        }
    157153
    … …  
    161157         * @global obj $bp
    162158         */
    163         function _setup_admin_bar() {
     159        function setup_admin_bar() {
    164160                global $bp;
    165161
    … …  
    204200                }
    205201
    206                 parent::_setup_admin_bar( $wp_admin_nav );
     202                parent::setup_admin_bar( $wp_admin_nav );
    207203        }
    208204
    … …  
    212208         * @global obj $bp
    213209         */
    214         function _setup_title() {
     210        function setup_title() {
    215211                global $bp;
    216212
    … …  
    227223                }
    228224
    229                 parent::_setup_title();
     225                parent::setup_title();
    230226        }
    231227}
Note: See TracChangeset for help on using the changeset viewer.