Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/23/2012 06:18:39 AM (12 years ago)
Author:
johnjamesjacoby
Message:

First pass at adding user capabilities screen and action to settings component:

  • Add capabilities template
  • Unhook core spammer and deleted user actions and move to settings
  • Route admin bar links appropriately to new locations
  • Allow delete-account to be accessed by super admins in place of broken alerts
  • Improve general settings feedback
  • @todo - backpat post mortem
  • See #4038
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-settings/bp-settings-screens.php

    r5690 r5829  
    55 *
    66 * @package BuddyPress
    7  * @subpackage SettingsFunctions
     7 * @subpackage SettingsScreens
    88 */
    99
     
    1111if ( !defined( 'ABSPATH' ) ) exit;
    1212
     13/**
     14 * Show the general settings template
     15 *
     16 * @since BuddyPress (1.5)
     17 *
     18 * @return If we shouldn't be here
     19 */
     20function bp_settings_screen_general() {
     21
     22    if ( bp_action_variables() ) {
     23        bp_do_404();
     24        return;
     25    }
     26
     27    bp_core_load_template( apply_filters( 'bp_settings_screen_general_settings', 'members/single/settings/general' ) );
     28}
     29
     30/**
     31 * Show the notifications settings template
     32 *
     33 * @since BuddyPress (1.5)
     34 *
     35 * @return If we shouldn't be here
     36 */
     37function bp_settings_screen_notification() {
     38
     39    if ( bp_action_variables() ) {
     40        bp_do_404();
     41        return;
     42    }
     43
     44    bp_core_load_template( apply_filters( 'bp_settings_screen_notification_settings', 'members/single/settings/notifications' ) );
     45}
     46
     47/**
     48 * Show the delete-account settings template
     49 *
     50 * @since BuddyPress (1.5)
     51 *
     52 * @return If we shouldn't be here
     53 */
     54function bp_settings_screen_delete_account() {
     55
     56    if ( bp_action_variables() ) {
     57        bp_do_404();
     58        return;
     59    }
     60
     61    // Load the template
     62    bp_core_load_template( apply_filters( 'bp_settings_screen_delete_account', 'members/single/settings/delete-account' ) );
     63}
     64
     65/**
     66 * Show the capabilities settings template
     67 *
     68 * @since BuddyPress (1.6)
     69 *
     70 * @return If we shouldn't be here
     71 */
     72function bp_settings_screen_capabilities() {
     73
     74    if ( bp_action_variables() ) {
     75        bp_do_404();
     76        return;
     77    }
     78
     79    // Load the template
     80    bp_core_load_template( apply_filters( 'bp_settings_screen_capabilities', 'members/single/settings/capabilities' ) );
     81}
     82
    1383?>
Note: See TracChangeset for help on using the changeset viewer.