boot.php
58 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Factory Processing |
| 5 | * |
| 6 | * Use https://github.com/deliciousbrains/wp-background-processing |
| 7 | * |
| 8 | * @since 1.0.0 |
| 9 | * |
| 10 | * @package factory-processing |
| 11 | * |
| 12 | * @version 1.0.0 |
| 13 | */ |
| 14 | |
| 15 | // Exit if accessed directly |
| 16 | if ( ! defined( 'ABSPATH' ) ) { |
| 17 | exit; |
| 18 | } |
| 19 | |
| 20 | if ( defined( 'FACTORY_PROCESSING_759_LOADED' ) || ( defined( 'FACTORY_PROCESSING_STOP' ) && FACTORY_PROCESSING_STOP ) ) { |
| 21 | return; |
| 22 | } |
| 23 | |
| 24 | define( 'FACTORY_PROCESSING_759_LOADED', true ); |
| 25 | define( 'FACTORY_PROCESSING_759_VERSION', '1.1.3' ); |
| 26 | |
| 27 | define( 'FACTORY_PROCESSING_759_DIR', __DIR__ ); |
| 28 | define( 'FACTORY_PROCESSING_759_URL', plugins_url( '', __FILE__ ) ); |
| 29 | |
| 30 | // load_plugin_textdomain( 'wbcr_factory_processing_759', false, dirname( plugin_basename( __FILE__ ) ) . '/langs' ); |
| 31 | |
| 32 | require_once FACTORY_PROCESSING_759_DIR . '/includes/classes/wp-async-request.php'; |
| 33 | require_once FACTORY_PROCESSING_759_DIR . '/includes/classes/wp-background-process.php'; |
| 34 | |
| 35 | |
| 36 | /** |
| 37 | * @param Wbcr_Factory600_Plugin $plugin |
| 38 | */ |
| 39 | add_action( |
| 40 | 'wbcr_factory_processing_759_plugin_created', |
| 41 | function ( $plugin ) { |
| 42 | /* @var Wbcr_Factory600_Plugin $plugin */ |
| 43 | |
| 44 | /* |
| 45 | Settings of Processing |
| 46 | $settings = [ |
| 47 | 'dir' => null, |
| 48 | 'file' => 'app.log', |
| 49 | 'flush_interval' => 1000, |
| 50 | 'rotate_size' => 5000000, |
| 51 | 'rotate_limit' => 3, |
| 52 | ]; |
| 53 | |
| 54 | $plugin->set_logger( "WBCR\Factory_Processing_759\Processing", $settings ); |
| 55 | */ |
| 56 | } |
| 57 | ); |
| 58 |