Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/YOURLS/YOURLS.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbluemorbo <bluemorbo@gmail.com>2019-10-14 13:39:43 +0300
committer྅༻ Ǭɀħ ༄༆ཉ <ozh@ozh.org>2019-10-14 13:39:43 +0300
commit80256f457b33beb448d31220893c16f686b93e55 (patch)
tree5d87e157375c2288ed11154def8d3d9099552820 /yourls-api.php
parentfbba93d25a7e8a6364881f3c57dcaba37fbc9566 (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.php2
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' );