Changeset 3734
- Timestamp:
- 01/18/2011 09:17:21 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core.php
r3728 r3734 293 293 } 294 294 295 /** 296 * Creates a default component slug from a WP page root_slug 297 * 295 /** 296 * Creates a default component slug from a WP page root_slug 297 * 298 298 * Since 1.3, BP components get their root_slug (the slug used immediately 299 299 * following the root domain) from the slug of a corresponding WP page. 300 * 300 * 301 301 * E.g. if your BP installation at example.com has its members page at 302 302 * example.com/community/people, $bp->members->root_slug will be 'community/people'. … … 305 305 * use elsewhere in the URL, by returning the content after the final '/' 306 306 * in the root_slug ('people' in the example above). 307 * 307 * 308 308 * Filter on 'bp_core_component_slug_from_root_slug' to override this method 309 309 * in general, or define a specific component slug constant (e.g. BP_MEMBERS_SLUG) 310 310 * to override specific component slugs. 311 * 312 * @package BuddyPress Core 313 * @since 1.3 314 * 315 * @param str $root_slug The root slug, which comes from $bp->pages->[component]->slug 316 * @return str $slug The short slug for use in the middle of URLs 317 */ 318 function bp_core_component_slug_from_root_slug( $root_slug ) { 319 $slug_chunks = explode( '/', $root_slug ); 311 * 312 * @package BuddyPress Core 313 * @since 1.3 314 * 315 * @param str $root_slug The root slug, which comes from $bp->pages->[component]->slug 316 * @return str $slug The short slug for use in the middle of URLs 317 */ 318 function bp_core_component_slug_from_root_slug( $root_slug ) { 319 $slug_chunks = explode( '/', $root_slug ); 320 320 $slug = array_pop( $slug_chunks ); 321 322 return apply_filters( 'bp_core_component_slug_from_root_slug', $slug, $root_slug ); 323 } 321 322 return apply_filters( 'bp_core_component_slug_from_root_slug', $slug, $root_slug ); 323 } 324 324 325 325 /** … … 854 854 'screen_function' => &$screen_function 855 855 ); 856 856 857 857 if ( ( $bp->current_action == $slug && $bp->current_component == $parent_slug ) && $user_has_access ) { 858 858 if ( !is_object( $screen_function[0] ) ) … … 1797 1797 1798 1798 if ( ( is_multisite() && (int)$user->spam ) || 1 == (int)$user->user_status ) 1799 bp_core_redirect( $bp->root_domain);1799 return new WP_Error( 'invalid_username', __( '<strong>ERROR</strong>: Your account has been marked as a spammer.', 'buddypress' ) ); 1800 1800 else 1801 1801 return $auth_obj; 1802 1802 } 1803 add_filter( 'authenticate', 'bp_core_boot_spammer', 11, 2 );1803 add_filter( 'authenticate', 'bp_core_boot_spammer', 30, 2 ); 1804 1804 1805 1805 /** -
trunk/bp-core/bp-core-signup.php
r3718 r3734 602 602 603 603 if ( 2 == $user_status ) 604 bp_core_redirect( $bp->root_domain);604 return new WP_Error( 'bp_account_not_activated', __( '<strong>ERROR</strong>: Your account has not been activated. Check your email for the activation link.', 'buddypress' ) ); 605 605 else 606 606 return $auth_obj; 607 607 } 608 add_filter( 'authenticate', 'bp_core_signup_disable_inactive', 11, 2 );608 add_filter( 'authenticate', 'bp_core_signup_disable_inactive', 30, 2 ); 609 609 610 610 /* Kill the wp-signup.php if custom registration signup templates are present */
Note: See TracChangeset
for help on using the changeset viewer.