/** * Twitter search callback. */ public function twitter_search_callback() { global $current_user; $action = $_POST['action_type']; $term = $_POST['term']; $postId = $_POST['post_id']; check_ajax_referer('twitter_search_term'); if (Collaboration::twitter_search($action, $postId, $current_user->ID, $term)) { echo '{"success":"OK"}'; } else { echo '{"errors":"FAIL"}'; } die; }
/** * Twitter search callback. */ public function twitter_search_callback() { global $current_user; $action = $_POST["action_type"]; $term = $_POST["term"]; $postId = $_POST["post_id"]; check_ajax_referer('twitter_search_term'); if (Collaboration::twitter_search($action, $postId, $current_user->ID, $term)) { echo "{\"success\":\"OK\"}"; } else { echo "{\"errors\":\"FAIL\"}"; } die; }