function testChordShortcodeAJAX()
 {
     $chord = wl_shortcode_chord_get_relations(self::$FIRST_POST_ID, 10);
     // Check there is a result
     $this->assertNotEmpty($chord);
     $this->assertNotEmpty($chord['entities']);
     $this->assertNotEmpty($chord['relations']);
 }
/**
 * Retrieve related entities and output them in JSON.
 *
 * @uses wl_shortcode_chord_get_relations()
 * @uses wl_shortcode_chord_get_graph()
 */
function wl_shortcode_chord_ajax()
{
    $post_id = $_REQUEST['post_id'];
    $depth = $_REQUEST['depth'];
    $relations = wl_shortcode_chord_get_relations($post_id, $depth);
    $graph = wl_shortcode_chord_get_graph($relations);
    wl_core_send_json($graph);
}