You are here

function _oembedprovider_formats_jsonp in oEmbed 7.0

Same name and namespace in other branches
  1. 8 modules/oembedprovider/oembedprovider.inc \_oembedprovider_formats_jsonp()
  2. 6.0 oembedprovider.inc \_oembedprovider_formats_jsonp()
  3. 7 modules/oembedprovider/oembedprovider.inc \_oembedprovider_formats_jsonp()

JSONP formatter

2 string references to '_oembedprovider_formats_jsonp'
hook_oembedprovider_formats_alter in ./oembed.api.php
Modify the provider's set of supported oEmbed response formats.
oembedprovider_formats in oembedprovider/oembedprovider.inc
Returns all the registered response formats

File

oembedprovider/oembedprovider.inc, line 144
Functions for the oEmbed provider

Code

function _oembedprovider_formats_jsonp($page_callback_result) {
  $callback = filter_has_var(INPUT_GET, 'callback') ? filter_input(INPUT_GET, 'callback') : 'callback';
  return sprintf('%s(%s)', $callback, drupal_json_encode($page_callback_result));
}