Actions & Filters

Josh Eaton edited this page Sep 20, 2016 · 3 revisions

Actions

  • add_batch_processes

    • Parameters:
      • None.
    • Info:
      • The plugin relies on this action to load in the batches that you registered.
  • _rkv_batch_{$batch_process_slug}

    • Parameters:
      • $step: The current step that the batch is on.
    • Info:
      • This is the action that the entire plugin revolves around. When you tell a batch to run, it calls this hook and sends the current step of the process (1 if it's the initial run) and that tells the plugin to run whatever callback you registered for that batch.
  • _rkv_batch_{$batch_process_slug}_reset

    • Parameters:
      • None.
    • Info:
      • This is the action that gets run when you reset a batch process.
  • _rkv_batch_{$batch_process_slug}_update_result_status

    • Parameters:
      • $result: The result which is getting a status update.
      • $status: The status that is getting set on that result.
    • Info:
      • This action gets run when a status for a result is about to get set.
  • _rkv_batch_{$batch_process_slug}_get_result_status

    • Parameters:
      • $result: The result which the status is being retrieved for.
    • Info:
      • This action gets run when a status for a result is being retrieved.

Filters

  • _rkv_batch_{$batch_process_slug}_per_page

    • Parameters:
      • int $per_page: The number of results per page.
    • Info:
      • Filter the per_page number used to calculate total number of steps. You would get use out of this if you had a custom $wpdb query that didn't paginate in one of the default ways supported by the plugin.
  • _rkv_batch_{$batch_process_slug}_success_status

    • Parameters:
      • string $string_text: Default: 'success'
    • Info:
      • The key used to define the status of whether or not a result was processed successfully.
  • _rkv_batch_{$batch_process_slug}_failed_status

    • Parameters:
      • string $string_text: Default: 'failed'
    • Info:
      • The key used to define the status of whether or not a result was able to be processed.
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.