Skip to:
Content

BuddyPress.org

Ticket #6043: 6043.patch

File 6043.patch, 1.1 KB (added by imath, 10 years ago)
  • src/bp-core/bp-core-functions.php

    diff --git src/bp-core/bp-core-functions.php src/bp-core/bp-core-functions.php
    index d4e0877..03b787b 100644
    function bp_core_get_packaged_component_ids() { 
    376376 */
    377377function bp_core_get_directory_page_ids() {
    378378        $page_ids = bp_get_option( 'bp-pages' );
     379        $register_pages = array_fill_keys( array( 'register', 'activate' ) , bp_get_signup_allowed() );
    379380
    380381        // Ensure that empty indexes are unset. Should only matter in edge cases
    381382        if ( !empty( $page_ids ) && is_array( $page_ids ) ) {
    function bp_core_get_directory_page_ids() { 
    384385                                unset( $page_ids[ $component_name ] );
    385386                        }
    386387
     388                        if ( isset( $register_pages[ $component_name ] ) ) {
     389                                continue;
     390                        }
     391
    387392                        if ( ! bp_is_active( $component_name ) || 'trash' == get_post_status( $page_id ) ) {
    388393                                unset( $page_ids[ $component_name ] );
    389394                        }
    function bp_core_get_suggestions( $args ) { 
    20572062        }
    20582063
    20592064        return apply_filters( 'bp_core_get_suggestions', $retval, $args );
    2060 }
    2061  No newline at end of file
     2065}