2015-06-04 21:02:09 +00:00
|
|
|
=== Batch operations ===
|
2015-06-05 19:26:11 +00:00
|
|
|
Contributors: igor-v-belousov
|
2015-06-10 14:13:27 +00:00
|
|
|
Tags: batch, dev, development, prod, production
|
2015-06-08 13:29:01 +00:00
|
|
|
Requires at least: 3.5
|
2015-06-10 14:13:27 +00:00
|
|
|
Tested up to: 4.2
|
2015-06-04 21:02:09 +00:00
|
|
|
|
|
|
|
My version Drupal Batch API for WordPress.
|
|
|
|
|
|
|
|
== Description ==
|
|
|
|
|
2015-06-05 19:38:55 +00:00
|
|
|
Example code:
|
|
|
|
|
|
|
|
$batch['title']='Title';
|
|
|
|
$batch['operations'][]=array('test_batch_operation',array());
|
|
|
|
|
|
|
|
batch_operations_start($batch);
|
|
|
|
|
|
|
|
function test_batch_operation(&$context) {
|
|
|
|
file_put_contents( ABSPATH . 'test.txt', "batch work" );
|
|
|
|
$context['message'] = 'Yeap! Work!';
|
|
|
|
}
|
|
|
|
|