Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 14:08
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
A bare minimum example of leveraging the Iron Ajax plugin. Recommended locations for this code in order by my personal preference: mu-plugins file, a plugin, or the theme functions.php.
/* Modify the entries_count
* i.e. the number of entries that need
* to be processed
function examp_iajx_entries_count( $count ) {
// generally you'll perform some lookup
// to determine the total number of entries
// $count = my_function_to_determine_count();
return $count;
/* Process each entry
10, 3
function examp_iajx_process( $response, $index, $persist ) {
// add code here to process based on $index
// e.g. process the row at $index in a csv
// my_function_to_process_one_item( $index );
return $response;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment