Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/09/2011 09:10:47 PM (15 years ago)
Author:
johnjamesjacoby
Message:

Add missing _is_ functions for Settings component and introduce fallback template file in /bp-default/members/single/.

Fix issue where BuddyBar Settings links were incorrectly using displayed_user, even when no user was displayed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-template.php

    r5111 r5134  
    12441244}
    12451245
     1246/**
     1247 * Is this a user's settings page?
     1248 *
     1249 * @package BuddyPress
     1250 *
     1251 * @return bool
     1252 */
     1253function bp_is_user_settings() {
     1254        if ( bp_is_user() && bp_is_settings_component() )
     1255                return true;
     1256
     1257        return false;
     1258}
     1259
     1260/**
     1261 * Is this a user's General Settings page?
     1262 *
     1263 * @package BuddyPress
     1264 * @since 1.5
     1265 *
     1266 * @return bool
     1267 */
     1268function bp_is_user_settings_general() {
     1269        if ( bp_is_user_settings() && bp_is_current_action( 'general' ) )
     1270                return true;
     1271
     1272        return false;
     1273}
     1274
     1275/**
     1276 * Is this a user's Notification Settings page?
     1277 *
     1278 * @package BuddyPress
     1279 * @since 1.5
     1280 *
     1281 * @return bool
     1282 */
     1283function bp_is_user_settings_notifications() {
     1284        if ( bp_is_user_settings() && bp_is_current_action( 'notifications' ) )
     1285                return true;
     1286
     1287        return false;
     1288}
     1289
     1290/**
     1291 * Is this a user's Account Deletion page?
     1292 *
     1293 * @package BuddyPress
     1294 * @since 1.5
     1295 *
     1296 * @return bool
     1297 */
     1298function bp_is_user_settings_account_delete() {
     1299        if ( bp_is_user_settings() && bp_is_current_action( 'delete-account' ) )
     1300                return true;
     1301
     1302        return false;
     1303}
     1304
     1305
    12461306/** Groups ******************************************************************/
    12471307
Note: See TracChangeset for help on using the changeset viewer.