Skip to:
Content

BuddyPress.org

Changeset 1017 for trunk/bp-core.php


Ignore:
Timestamp:
02/04/2009 12:29:21 AM (15 years ago)
Author:
matt
Message:

Minor cleanups, mods, and todos.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core.php

    r1012 r1017  
    5555require_once( 'bp-core/bp-core-activation.php' );
    5656
    57 /* Define the slug for member pages and the members directory (e.g. domain.com/[members] ) */
     57/* Define the slug for member pages and the members directory (e.g. example.com/[members] ) */
    5858define( 'MEMBERS_SLUG', apply_filters( 'bp_members_slug', 'members' ) );
    5959
     
    103103    $bp['current_userid'] = $current_userid;
    104104   
    105     /* The domain for the user currently logged in. eg: http://domain.com/members/andy */
     105    /* The domain for the user currently logged in. eg: http://example.com/members/andy */
    106106    $bp['loggedin_domain'] = bp_core_get_user_domain($current_user->ID);
    107107   
     
    109109    $bp['current_domain'] = bp_core_get_user_domain($current_userid);
    110110   
    111     /* The component being used eg: http://andy.domain.com/ [profile] */
     111    /* The component being used eg: http://andy.example.com/ [profile] */
    112112    $bp['current_component'] = $current_component; // type: string
    113113   
    114     /* The current action for the component eg: http://andy.domain.com/profile/ [edit] */
     114    /* The current action for the component eg: http://andy.example.com/profile/ [edit] */
    115115    $bp['current_action'] = $current_action; // type: string
    116116   
    117     /* The action variables for the current action eg: http://andy.domain.com/profile/edit/ [group] / [6] */
     117    /* The action variables for the current action eg: http://andy.example.com/profile/edit/ [group] / [6] */
    118118    $bp['action_variables'] = $action_variables; // type: array
    119119   
    120     /* Only used where a component has a sub item, e.g. groups: http://andy.domain.com/groups/ [my-group] / home - manipulated in the actual component not in catch uri code.*/
     120    /* Only used where a component has a sub item, e.g. groups: http://andy.example.com/groups/ [my-group] / home - manipulated in the actual component not in catch uri code.*/
    121121    $bp['current_item'] = ''; // type: string
    122122
    123     /* The default component to use if none are set and someone visits: http://andy.domain.com/ */
     123    /* The default component to use if none are set and someone visits: http://andy.example.com/ */
    124124    $bp['default_component'] = 'profile';
    125125   
     
    197197                user_id int(11) NOT NULL,
    198198                item_id int(11) NOT NULL,
    199                 secondary_item_id int(11),
     199                secondary_item_id int(11) NOT NULL,
    200200                component_name varchar(75) NOT NULL,
    201201                component_action varchar(75) NOT NULL,
     
    241241    if ( is_site_admin() ) {
    242242        /* Need to check db tables exist, activate hook no-worky in mu-plugins folder. */
    243         if ( ( $wpdb->get_var("show tables like '%" . $bp['core']['table_name_notifications'] . "%'") == false ) || ( get_site_option('bp-core-db-version') < BP_CORE_DB_VERSION )  )
     243        if ( ( $wpdb->get_var("SHOW TABLES LIKE '%" . $bp['core']['table_name_notifications'] . "%'") == false ) || ( get_site_option('bp-core-db-version') < BP_CORE_DB_VERSION )  )
    244244            bp_core_install();
    245245    }
     
    263263    if ( is_site_admin() ) {
    264264        /* Add the administration tab under the "Site Admin" tab for site administrators */
    265         add_submenu_page( 'wpmu-admin.php', __("BuddyPress", 'buddypress'), __("BuddyPress", 'buddypress'), 1, "bp_core_admin_settings", "bp_core_admin_settings" );
     265        add_submenu_page( 'wpmu-admin.php', __('BuddyPress', 'buddypress'), __('BuddyPress', 'buddypress'), 1, 'bp_core_admin_settings', 'bp_core_admin_settings' );
    266266    }
    267267}
     
    272272 *
    273273 * Checks to see if a component's URL should be in the root, not under a member page:
    274  * eg: http://domain.com/groups/the-group NOT http://domain.com/members/andy/groups/the-group
     274 * eg: http://example.com/groups/the-group NOT http://example.com/members/andy/groups/the-group
    275275 *
    276276 * @package BuddyPress Core
     
    326326 *
    327327 * Returns the domain for the passed user:
    328  * e.g. http://domain.com/members/andy/
     328 * e.g. http://example.com/members/andy/
    329329 *
    330330 * @package BuddyPress Core
     
    338338    if ( !$user_id ) return;
    339339   
    340     $ud = get_userdata($user_id);
     340    $ud = get_userdata( $user_id );
    341341   
    342342    return $bp['root_domain'] . '/' . MEMBERS_SLUG . '/' . $ud->user_login . '/';
     
    347347 *
    348348 * Returns the domain for the root blog.
    349  * eg: http://domain.com/ OR https://domain.com
     349 * eg: http://example.com/ OR https://example.com
    350350 *
    351351 * @package BuddyPress Core
     
    367367 *
    368368 * Returns the user id for the user that is currently being viewed.
    369  * eg: http://andy.domain.com/ or http://domain.com/andy/
     369 * eg: http://andy.example.com/ or http://example.com/andy/
    370370 *
    371371 * @package BuddyPress Core
     
    527527 *
    528528 * Example of a root component:
    529  *  Groups: http://domain.com/groups/group-name
    530  *          http://community.domain.com/groups/group-name
    531  *          http://domain.com/wpmu/groups/group-name
     529 *  Groups: http://example.com/groups/group-name
     530 *          http://community.example.com/groups/group-name
     531 *          http://example.com/wpmu/groups/group-name
    532532 *
    533533 * Example of a component that is NOT a root component:
    534  *  Friends: http://domain.com/members/andy/friends
    535  *           http://community.domain.com/members/andy/friends
    536  *           http://domain.com/wpmu/members/andy/friends
     534 *  Friends: http://example.com/members/andy/friends
     535 *           http://community.example.com/members/andy/friends
     536 *           http://example.com/wpmu/members/andy/friends
    537537 *
    538538 * @package BuddyPress Core
     
    670670 *
    671671 * Returns a HTML formatted link for a user with the user's full name as the link text.
    672  * eg: <a href="http://andy.domain.com/">Andy Peatling</a>
     672 * eg: <a href="http://andy.example.com/">Andy Peatling</a>
    673673 * Optional parameters will return just the name, or just the URL, or disable "You" text when
    674674 * user matches the logged in user.
Note: See TracChangeset for help on using the changeset viewer.