add example in readme.txt
Этот коммит содержится в:
12
readme.txt
12
readme.txt
@@ -8,3 +8,15 @@ My version Drupal Batch API for WordPress.
|
||||
|
||||
== Description ==
|
||||
|
||||
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!';
|
||||
}
|
||||
|
||||
|
Ссылка в новой задаче
Block a user