Changeset 3443
- Timestamp:
- 11/18/2010 09:31:44 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core.php
r3442 r3443 73 73 $current_user = wp_get_current_user(); 74 74 75 / * Get the base database prefix */75 // Get the base database prefix 76 76 $bp->table_prefix = bp_core_get_table_prefix(); 77 77 78 / * The domain for the root of the site where the main blog resides */78 // The domain for the root of the site where the main blog resides 79 79 $bp->root_domain = bp_core_get_root_domain(); 80 80 81 / * The names of the core WordPress pages used to display BuddyPress content */81 // The names of the core WordPress pages used to display BuddyPress content 82 82 $bp->pages = $bp_pages; 83 83 84 / * Set up the members id and active components entry */84 // Set up the members id and active components entry 85 85 $bp->members->id = 'members'; 86 86 $bp->members->slug = $bp->pages->members->slug; 87 87 $bp->active_components[$bp->members->slug] = $bp->members->id; 88 88 89 / * The user ID of the user who is currently logged in. */89 // The user ID of the user who is currently logged in. 90 90 $bp->loggedin_user->id = $current_user->ID; 91 91 92 / * The domain for the user currently logged in. eg: http://domain.com/members/andy */92 // The domain for the user currently logged in. eg: http://domain.com/members/andy 93 93 $bp->loggedin_user->domain = bp_core_get_user_domain( $bp->loggedin_user->id ); 94 94 95 / * The core userdata of the user who is currently logged in. */95 // The core userdata of the user who is currently logged in. 96 96 $bp->loggedin_user->userdata = bp_core_get_core_userdata( $bp->loggedin_user->id ); 97 97 98 / * is_super_admin() hits the DB on single WP installs, so we need to get this separately so we can call it in a loop. */98 // is_super_admin() hits the DB on single WP installs, so we need to get this separately so we can call it in a loop. 99 99 $bp->loggedin_user->is_super_admin = is_super_admin(); 100 100 $bp->loggedin_user->is_site_admin = $bp->loggedin_user->is_super_admin; // deprecated 1.2.6 101 101 102 / * The user id of the user currently being viewed, set in /bp-core/bp-core-catchuri.php */102 // The user id of the user currently being viewed, set in /bp-core/bp-core-catchuri.php 103 103 $bp->displayed_user->id = $displayed_user_id; 104 104 105 / * The domain for the user currently being displayed */105 // The domain for the user currently being displayed 106 106 $bp->displayed_user->domain = bp_core_get_user_domain( $bp->displayed_user->id ); 107 107 108 / * The core userdata of the user who is currently being displayed */108 // The core userdata of the user who is currently being displayed 109 109 $bp->displayed_user->userdata = bp_core_get_core_userdata( $bp->displayed_user->id ); 110 110 111 / * The component being used eg: http://domain.com/members/andy/ [profile] */111 // The component being used eg: http://domain.com/members/andy/ [profile] 112 112 $bp->current_component = $current_component; // type: string 113 113 114 / * The current action for the component eg: http://domain.com/members/andy/profile/ [edit] */114 // The current action for the component eg: http://domain.com/members/andy/profile/ [edit] 115 115 $bp->current_action = $current_action; // type: string 116 116 117 / * The action variables for the current action eg: http://domain.com/members/andy/profile/edit/ [group] / [6] */117 // The action variables for the current action eg: http://domain.com/members/andy/profile/edit/ [group] / [6] 118 118 $bp->action_variables = $action_variables; // type: array 119 119 120 / * Only used where a component has a sub item, e.g. groups: http://domain.com/members/andy/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://domain.com/members/andy/groups/ [my-group] / home - manipulated in the actual component not in catch uri code. 121 121 $bp->current_item = ''; // type: string 122 122 123 / * Used for overriding the 2nd level navigation menu so it can be used to display custom navigation for an item (for example a group) */123 // Used for overriding the 2nd level navigation menu so it can be used to display custom navigation for an item (for example a group) 124 124 $bp->is_single_item = false; 125 125 126 / * The default component to use if none are set and someone visits: http://domain.com/members/andy */126 // The default component to use if none are set and someone visits: http://domain.com/members/andy 127 127 if ( !defined( 'BP_DEFAULT_COMPONENT' ) ) { 128 128 if ( isset( $bp->pages->activity ) ) … … 134 134 } 135 135 136 / * Fetches all of the core database based BuddyPress settings in one foul swoop */136 // Fetches all of the core database based BuddyPress settings in one foul swoop 137 137 $bp->site_options = bp_core_get_site_options(); 138 138 139 / * Sets up the array container for the component navigation rendered by bp_get_nav() */139 // Sets up the array container for the component navigation rendered by bp_get_nav() 140 140 $bp->bp_nav = array(); 141 141 142 / * Sets up the array container for the component options navigation rendered by bp_get_options_nav() */142 // Sets up the array container for the component options navigation rendered by bp_get_options_nav() 143 143 $bp->bp_options_nav = array(); 144 144 145 / * Contains an array of all the active components. The key is the slug, value the internal ID of the component */145 // Contains an array of all the active components. The key is the slug, value the internal ID of the component 146 146 $bp->active_components = array(); 147 147 148 /* Fetches the default Gravatar image to use if the user/group/blog has no avatar or gravatar */ 149 $default_grav = isset( $bp->site_options['user-avatar-default'] ) ? $bp->site_options['user-avatar-default'] : 'wavatar'; 150 $bp->grav_default->user = apply_filters( 'bp_user_gravatar_default', $default_grav ); 151 $bp->grav_default->group = apply_filters( 'bp_group_gravatar_default', 'identicon' ); 152 $bp->grav_default->blog = apply_filters( 'bp_blog_gravatar_default', 'identicon' ); 153 154 /* Fetch the full name for the logged in and current user */ 148 // Fetches the default Gravatar image to use if the user/group/blog has no avatar or gravatar 149 $bp->grav_default->user = apply_filters( 'bp_user_gravatar_default', $bp->site_options['avatar_default'] ); 150 $bp->grav_default->group = apply_filters( 'bp_group_gravatar_default', $bp->grav_default->user ); 151 $bp->grav_default->blog = apply_filters( 'bp_blog_gravatar_default', $bp->grav_default->user ); 152 153 // Fetch the full name for the logged in and current user 155 154 $bp->loggedin_user->fullname = bp_core_get_user_displayname( $bp->loggedin_user->id ); 156 155 $bp->displayed_user->fullname = bp_core_get_user_displayname( $bp->displayed_user->id ); … … 162 161 $bp->is_item_admin = bp_user_has_access(); 163 162 164 / * Used to determine if the logged in user is a moderator for the current content. */163 // Used to determine if the logged in user is a moderator for the current content. 165 164 $bp->is_item_mod = false; 166 165 … … 1583 1582 'hide-loggedout-adminbar', 1584 1583 1585 / * Useful WordPress settings used often */1586 ' user-avatar-default',1584 // Useful WordPress settings used often 1585 'avatar_default', 1587 1586 'tags_blog_id', 1588 1587 'registration', -
trunk/bp-core/admin/bp-core-admin.php
r3369 r3443 124 124 </tr> 125 125 <?php endif; ?> 126 127 <tr>128 <th scope="row"><?php _e( 'Default User Avatar', 'buddypress' ) ?></th>129 <td>130 <p><?php _e( 'For users without a custom avatar of their own, you can either display a generic logo or a generated one based on their email address', 'buddypress' ) ?></p>131 132 <label><input name="bp-admin[user-avatar-default]" id="avatar_mystery" value="mystery" type="radio" <?php if ( get_site_option( 'user-avatar-default' ) == 'mystery' ) : ?> checked="checked"<?php endif; ?> /> <img alt="" src="http://www.gravatar.com/avatar/<?php md5( $ud->user_email ) ?>&?s=32&d=<?php echo BP_PLUGIN_URL . '/bp-core/images/mystery-man.jpg' ?>&r=PG&forcedefault=1" class="avatar avatar-32" height="32" width="32"> <?php _e( 'Mystery Man', 'buddypress' ) ?></label><br>133 <label><input name="bp-admin[user-avatar-default]" id="avatar_identicon" value="identicon" type="radio" <?php if ( get_site_option( 'user-avatar-default' ) == 'identicon' ) : ?> checked="checked"<?php endif; ?> /> <img alt="" src="http://www.gravatar.com/avatar/<?php md5( $ud->user_email ) ?>?s=32&d=identicon&r=PG&forcedefault=1" class="avatar avatar-32" height="32" width="32"> <?php _e( 'Identicon (Generated)', 'buddypress' ) ?></label><br>134 <label><input name="bp-admin[user-avatar-default]" id="avatar_wavatar" value="wavatar" type="radio" <?php if ( get_site_option( 'user-avatar-default' ) == 'wavatar' ) : ?> checked="checked"<?php endif; ?> /> <img alt="" src="http://www.gravatar.com/avatar/<?php md5( $ud->user_email ) ?>?s=32&d=wavatar&r=PG&forcedefault=1" class="avatar avatar-32" height="32" width="32"> <?php _e( 'Wavatar (Generated)', 'buddypress' ) ?> </label><br>135 <label><input name="bp-admin[user-avatar-default]" id="avatar_monsterid" value="monsterid" type="radio" <?php if ( get_site_option( 'user-avatar-default' ) == 'monsterid' ) : ?> checked="checked"<?php endif; ?> /> <img alt="" src="http://www.gravatar.com/avatar/<?php md5( $ud->user_email ) ?>?s=32&d=monsterid&r=PG&forcedefault=1" class="avatar avatar-32" height="32" width="32"> <?php _e( 'MonsterID (Generated)', 'buddypress' ) ?></label>136 </td>137 </tr>138 126 139 127 <?php do_action( 'bp_core_admin_screen_fields' ) ?>
Note: See TracChangeset
for help on using the changeset viewer.