5
Home
Igor V Belousov редактировал(а) эту страницу 2015-08-21 22:50:05 +03:00
Welcome to the batch_operations wiki!
This plugin for WordPress is my version of Drupal Batch API.
Description
Batch API need for running long-term operation without using the function
set_time_limit
or CLI.
Long-term operation is divided into short-term sub-operations which are executed in the order queue. Sub-operation can send a message below the progress bar.
Install
- Upload latest stable version of code https://github.com/IgorVBelousov/batch_operations/archive/master.zip.
- Unpack this archive to the
/wp-content/plugins/
directory - Activate the plugin through the 'Plugins' menu in WordPress
- Use batch operations in your code
Use
The plugin provides two functions for the programmer.
batch_operations_notice
Function for output informational messages in admin-page the next time viewing for the current user.
batch_operations_notice( string $message [, string $type = 'info' ] )
$message
- Informational message$type
- Type of message. This parameter is responsible for the design of the message.
There are four types of messages:info
- Message with a blue border on the leftsuccess
- Message with a green border on the leftwarning
- Message with a yellow border on the lefterror
- Message with a red border on the left
A screenshot of the results of functions:
batch_operations_notice( 'default' );
batch_operations_notice( 'info', 'info' );
batch_operations_notice( 'success', 'success' );
batch_operations_notice( 'warning', 'warning' );
batch_operations_notice( 'error', 'error' );
batch_operations_start
Function for starting run batch operations.
batch_operations_start( array $batch_arr [, string $redirect = NULL ] )