Changeset 11858 for trunk/src/bp-settings/bp-settings-actions.php
- Timestamp:
- 02/15/2018 03:52:40 PM (8 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-settings/bp-settings-actions.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-settings/bp-settings-actions.php
r11705 r11858 28 28 */ 29 29 function bp_settings_action_general() { 30 31 // Bail if not a POST action. 32 if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) ) 33 return; 30 if ( ! bp_is_post_request() ) { 31 return; 32 } 34 33 35 34 // Bail if no submit action. 36 if ( ! isset( $_POST['submit'] ) ) 37 return; 35 if ( ! isset( $_POST['submit'] ) ) { 36 return; 37 } 38 38 39 39 // Bail if not in settings. 40 if ( ! bp_is_settings_component() || ! bp_is_current_action( 'general' ) ) 41 return; 40 if ( ! bp_is_settings_component() || ! bp_is_current_action( 'general' ) ) { 41 return; 42 } 42 43 43 44 // 404 if there are any additional action variables attached … … 260 261 */ 261 262 function bp_settings_action_notifications() { 262 263 // Bail if not a POST action. 264 if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) ) 265 return; 263 if ( ! bp_is_post_request() ) { 264 return; 265 } 266 266 267 267 // Bail if no submit action. 268 if ( ! isset( $_POST['submit'] ) ) 269 return; 268 if ( ! isset( $_POST['submit'] ) ) { 269 return; 270 } 270 271 271 272 // Bail if not in settings. 272 if ( ! bp_is_settings_component() || ! bp_is_current_action( 'notifications' ) ) 273 if ( ! bp_is_settings_component() || ! bp_is_current_action( 'notifications' ) ) { 273 274 return false; 275 } 274 276 275 277 // 404 if there are any additional action variables attached … … 307 309 */ 308 310 function bp_settings_action_capabilities() { 309 310 // Bail if not a POST action. 311 if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) ) 312 return; 311 if ( ! bp_is_post_request() ) { 312 return; 313 } 313 314 314 315 // Bail if no submit action. 315 if ( ! isset( $_POST['capabilities-submit'] ) ) 316 return; 316 if ( ! isset( $_POST['capabilities-submit'] ) ) { 317 return; 318 } 317 319 318 320 // Bail if not in settings. 319 if ( ! bp_is_settings_component() || ! bp_is_current_action( 'capabilities' ) ) 321 if ( ! bp_is_settings_component() || ! bp_is_current_action( 'capabilities' ) ) { 320 322 return false; 323 } 321 324 322 325 // 404 if there are any additional action variables attached … … 381 384 */ 382 385 function bp_settings_action_delete_account() { 383 384 // Bail if not a POST action. 385 if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) ) 386 return; 386 if ( ! bp_is_post_request() ) { 387 return; 388 } 387 389 388 390 // Bail if no submit action. 389 if ( ! isset( $_POST['delete-account-understand'] ) ) 390 return; 391 if ( ! isset( $_POST['delete-account-understand'] ) ) { 392 return; 393 } 391 394 392 395 // Bail if not in settings. 393 if ( ! bp_is_settings_component() || ! bp_is_current_action( 'delete-account' ) ) 396 if ( ! bp_is_settings_component() || ! bp_is_current_action( 'delete-account' ) ) { 394 397 return false; 398 } 395 399 396 400 // 404 if there are any additional action variables attached
Note: See TracChangeset
for help on using the changeset viewer.