You are here

function mediafront_get_node_json in MediaFront 6.2

Same name and namespace in other branches
  1. 6 mediafront.module \mediafront_get_node_json()
  2. 7 mediafront.module \mediafront_get_node_json()

Gets a node in JSON format

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

File

./mediafront.module, line 403

Code

function mediafront_get_node_json($node = null, $args = null) {
  $params = mediafront_parse_params($_POST['params']);
  $node = $node ? check_plain($node) : check_plain(trim($params[1]));
  $args = $args ? check_plain($args) : check_plain(trim($params[2]));
  print mediafront_json_encode(mediafront_get_node($node, $args));
}