Action
rpress_recount_tool_options
Fires inside the repair tool dropdown to add extra options.
Runs inside the select element of the Repair Restaurant Stats form, between the built-in recalculation options and the Reset Restaurant Data option. Echo option elements with a data-type attribute and a value containing the batch processor class name. A matching batch class and its registration are needed for the option to do anything.
Example#
function my_recount_tool_options() {
echo '<option data-type="my-recount" value="My_Recount_Batch">' . esc_html__( 'Recalculate My Data', 'my-plugin' ) . '</option>';
}
add_action( 'rpress_recount_tool_options', 'my_recount_tool_options' );
Notes#
Pair it with rpress_recount_tool_descriptions, which prints the help text for each option.
Source#
Fired from:
includes/admin/tools.php(line 347), inrpress_tools_recount_stats_display()
See also#
Was this page helpful?
