Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/09/2013 01:30:04 PM (12 years ago)
Author:
johnjamesjacoby
Message:

Port request helper functions from bbPress, to be used as part of rewrite rules integration in a future release.

File:
1 edited

Legend:

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

    r7541 r7542  
    14721472}
    14731473
     1474/** Requests ******************************************************************/
     1475
     1476/**
     1477 * Return true|false if this is a POST request
     1478 *
     1479 * @since BuddyPress (1.9.0)
     1480 * @return bool
     1481 */
     1482function bp_is_post_request() {
     1483    return (bool) ( 'POST' === strtoupper( $_SERVER['REQUEST_METHOD'] ) );
     1484}
     1485
     1486/**
     1487 * Return true|false if this is a GET request
     1488 *
     1489 * @since BuddyPress (1.9.0)
     1490 * @return bool
     1491 */
     1492function bp_is_get_request() {
     1493    return (bool) ( 'GET' === strtoupper( $_SERVER['REQUEST_METHOD'] ) );
     1494}
     1495
     1496
    14741497/** Miscellaneous hooks *******************************************************/
    14751498
Note: See TracChangeset for help on using the changeset viewer.