You are here

function mediafront_get_playlist_json in MediaFront 7

Same name and namespace in other branches
  1. 6.2 mediafront.module \mediafront_get_playlist_json()
  2. 6 mediafront.module \mediafront_get_playlist_json()
  3. 7.2 mediafront.module \mediafront_get_playlist_json()

Gets a playlist in JSON format.

1 string reference to 'mediafront_get_playlist_json'
mediafront_menu in ./mediafront.module
Implements hook_menu().

File

./mediafront.module, line 295

Code

function mediafront_get_playlist_json($playlist = null, $limit = null, $page = null, $args = null) {
  $params = mediafront_parse_params($_POST['params']);
  $playlist = $playlist ? check_plain($playlist) : $params[1];
  $limit = $limit ? check_plain($limit) : $params[2];
  $page = $page ? check_plain($page) : $params[3];
  $args = $args ? $args : mediafront_parse_params($params[4]);
  print drupal_json_encode(mediafront_get_playlist($playlist, $limit, $page, $args));
}