Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/21/2014 11:08:04 PM (11 years ago)
Author:
johnjamesjacoby
Message:

First pass at Profile Settings for improved profile field visibility UX:

  • Adds /members/single/settings/profile.php template to bp-legacy and bp-default.
  • Introduces bp-xprofile.settings.php for Settings specific functionality going forward.
  • Introduces actions & screens for handling output and saving of profile visibility data.
  • Introduces _is_ function for identifying the new component/action URL.
  • See #5352. (still more @todo...)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile/bp-xprofile-loader.php

    r7862 r7960  
    6060            'classes',
    6161            'filters',
     62            'settings',
    6263            'template',
    6364            'buddybar',
     
    220221        }
    221222
     223        // Privacy Settings
     224        if ( bp_is_active( 'settings' ) ) {
     225
     226            // Get the settings slug
     227            $settings_slug = bp_get_settings_slug();
     228
     229            // Add the sub-navigation
     230            $sub_nav[] = array(
     231                'name'            => __( 'Profile', 'buddypress' ),
     232                'slug'            => 'profile',
     233                'parent_url'      => trailingslashit( $user_domain . $settings_slug ),
     234                'parent_slug'     => $settings_slug,
     235                'screen_function' => 'bp_xprofile_screen_settings',
     236                'position'        => 30,
     237                'user_has_access' => bp_core_can_edit_settings()
     238            );
     239        }
     240
    222241        parent::setup_nav( $main_nav, $sub_nav );
    223242    }
     
    272291            }
    273292
     293            // Privacy Settings
     294            if ( bp_is_active( 'settings' ) ) {
     295
     296                // Setup the logged in user variables
     297                $settings_link = trailingslashit( bp_loggedin_user_domain() . bp_get_settings_slug() );
     298
     299                // Add main Settings menu
     300                $wp_admin_nav[] = array(
     301                    'parent' => 'my-account-' . $bp->settings->id,
     302                    'id'     => 'my-account-' . $bp->settings->id . '-profile',
     303                    'title'  => __( 'Profile', 'buddypress' ),
     304                    'href'   => trailingslashit( $settings_link . 'profile' )
     305                );
     306            }
    274307        }
    275308
Note: See TracChangeset for help on using the changeset viewer.