Core::getRequest( $key = '*', $default = null, $type = null )
Get the request from $_POST, $_GET, or $_REQUEST with default fallback
Description
Source
File: bp-integrations/learndash/core/Core.php
public function getRequest($key = '*', $default = null, $type = null) {
if ($type) {
return $key == '*'? $$type : (isset($$type[$key])? $$type[$key] : $default);
}
$merged = array_merge($_GET, $_POST, $_REQUEST);
return $key == '*'? $merged : (isset($merged[$key])? $merged[$key] : $default);
}
Changelog
| Version | Description |
|---|---|
| BuddyBoss 1.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.