making sense of admin-ajax

The function that returns the contents of that ajax request will not be in admin-ajax.php. That is the core WordPress file that handles ajax requests, but it is not used for specifying the data returned by ajax functions in themes / plugins.

In the theme (somewhere), will be a line that looks like this:

add_action('wp_ajax_myajax-submit', 'some_function_name_here');

The function called “some_function_name_here” (which will be named something different than some_function_name_here, as this is just an example) is what determines the data returned to jQuery.

Do a search in the theme files for “add_action(‘wp_ajax_myajax-submit'” and you should be able to find it.

If you don’t find it with that search, then look for

“add_action(‘wp_ajax_no_priv_myajax-submit'”