Skip to:
Content

BuddyPress.org

Ticket #7935: 7935.02.patch

File 7935.02.patch, 1.5 KB (added by r-a-y, 8 years ago)
  • src/bp-core/bp-core-buddybar.php

     
    342342                // No subnav item has been requested in the URL, so set a new nav default.
    343343                if ( empty( $unfiltered_action ) ) {
    344344                        if ( ! bp_is_current_action( $r['subnav_slug'] ) ) {
     345                                /*
     346                                 * If the screen function isn't available, attempt to find it.
     347                                 *
     348                                 * This is due to our conditional-loading code since v3.0.0.
     349                                 */
     350                                if ( ! is_callable( $r['screen_function'] ) ) {
     351                                        $file = $bp->core->path . 'bp-' . $parent_nav->css_id . '/screens/' . $r['subnav_slug'] . '.php';
     352                                        // Found the file, so require it.
     353                                        if ( file_exists( $file ) ) {
     354                                                require_once $file;
     355                                        }
     356                                }
     357
    345358                                if ( is_callable( $r['screen_function'] ) ) {
    346359                                        add_action( 'bp_screens', $r['screen_function'], 3 );
    347360                                }
  • src/bp-settings/classes/class-bp-settings-component.php

     
    144144                        'position'                => 100,
    145145                        'show_for_displayed_user' => $access,
    146146                        'screen_function'         => 'bp_settings_screen_general',
    147                         'default_subnav_slug'     => 'general'
     147                        'default_subnav_slug'     => 'general',
     148                        'item_css_id'             => $this->id
    148149                );
    149150
    150151                // Add General Settings nav item.