Skip to content
Docs
Get RestroPress

Action

rpress_register_batch_exporter

Updated
On this page

Fires in the admin so extensions can register their batch exporters.

Runs on plugins_loaded at priority 99, in the admin only. The built-in exporters hook here to attach their class loaders to rpress_batch_export_class_include. An extension registers its own batch exporter class loader in a callback on this hook.

Example#

function my_register_batch_exporter() {
	add_action( 'rpress_batch_export_class_include', 'my_include_batch_exporter', 10, 1 );
}
add_action( 'rpress_register_batch_exporter', 'my_register_batch_exporter' );

function my_include_batch_exporter( $class ) {
	if ( 'My_Batch_Export' === $class ) {
		require_once plugin_dir_path( __FILE__ ) . 'class-my-batch-export.php';
	}
}

Source#

Fired from:

  • includes/admin/reporting/export/export-actions.php (line 68), in rpress_register_batch_exporters()

See also#

Was this page helpful?