diff options
author | bluemorbo <bluemorbo@gmail.com> | 2019-10-14 13:39:43 +0300 |
---|---|---|
committer | ྅༻ Ǭɀħ ༄༆ཉ <ozh@ozh.org> | 2019-10-14 13:39:43 +0300 |
commit | 80256f457b33beb448d31220893c16f686b93e55 (patch) | |
tree | 5d87e157375c2288ed11154def8d3d9099552820 /yourls-api.php | |
parent | fbba93d25a7e8a6364881f3c57dcaba37fbc9566 (diff) |
Add jsonp parameter in API as a fallback to match documentation (#2567)
* Add jsonp parameter as fallback to match API documentation
* Correct alignment to match standards
Fixes #2566
Diffstat (limited to 'yourls-api.php')
-rw-r--r-- | yourls-api.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/yourls-api.php b/yourls-api.php index 45d8b7d3..413abad5 100644 --- a/yourls-api.php +++ b/yourls-api.php @@ -43,6 +43,8 @@ if ( false === $return ) { if( isset( $_REQUEST['callback'] ) ) $return['callback'] = $_REQUEST['callback']; +elseif ( isset( $_REQUEST['jsonp'] ) ) + $return['callback'] = $_REQUEST['jsonp']; $format = ( isset( $_REQUEST['format'] ) ? $_REQUEST['format'] : 'xml' ); |