Index: trunk/extensions/PatchOutputMobile/PatchOutputMobile.php |
— | — | @@ -39,7 +39,7 @@ |
40 | 40 | 'onOutputPageBeforeHTML' ); |
41 | 41 | |
42 | 42 | class ExtPatchOutputMobile { |
43 | | - const VERSION = '0.4.3'; |
| 43 | + const VERSION = '0.4.4'; |
44 | 44 | |
45 | 45 | private $doc; |
46 | 46 | |
— | — | @@ -386,7 +386,16 @@ |
387 | 387 | $json_data = array(); |
388 | 388 | $json_data['title'] = $title; |
389 | 389 | $json_data['html'] = $contentHtml; |
390 | | - return json_encode( $json_data ); |
| 390 | + |
| 391 | + $callback = isset( $_GET['callback'] ) ? $_GET['callback'] : ''; |
| 392 | + |
| 393 | + $json = json_encode( $json_data ); |
| 394 | + |
| 395 | + if ( !empty( $callback ) ) { |
| 396 | + $json = urlencode( $callback ) . '(' . $json . ')'; |
| 397 | + } |
| 398 | + |
| 399 | + return $json; |
391 | 400 | } |
392 | 401 | |
393 | 402 | return $applicationHtml; |