You are here

function mediafront_get_playlist_json in MediaFront 6.2

Same name and namespace in other branches
  1. 6 mediafront.module \mediafront_get_playlist_json()
  2. 7.2 mediafront.module \mediafront_get_playlist_json()
  3. 7 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 340

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 mediafront_json_encode(mediafront_get_playlist($playlist, $limit, $page, $args));
}