You appear to be a bot. Output may be restricted
Description
Bootstrap logic for oik-batchThis checks if we're running as "CLI" – command line interface
- If we are then we prepare the batch environment
- then, if this file is the first file then we run the routine specified on the command line.
Usage
oik_batch_loaded();
Parameters
Returns
voidSource
File name: oik-batch/oik-batch.phpLines:
1 to 39 of 39
function oik_batch_loaded() { if ( PHP_SAPI == "cli" ) { if ( defined( 'WP_CLI' ) && WP_CLI ) { // This is WP-CLI } else { oik_batch_load_lib( "oik-cli" ); oik_batch_debug(); //oik_batch_trace( true ); oik_batch_define_constants(); oik_batch_load_oik_boot(); oik_batch_simulate_wp_settings(); oik_batch_load_wordpress_files(); echo PHP_SAPI; echo PHP_EOL; $included_files = get_included_files(); if ( $included_files[0] == __FILE__) { oik_batch_run(); }// else { // wp-batch has been loaded by another PHP routine so that routine is in charge. // } echo "End cli:" . __FUNCTION__ . PHP_EOL; } } else { //echo PHP_SAPI; //echo PHP_EOL; if ( function_exists( "bw_trace2" ) ) { bw_trace2( PHP_SAPI, "oik-batch loaded in WordPress environment?" ); } if ( function_exists( "add_action" ) ) { // if ( bw_is_wordpress() ) { oik_batch_load_lib( "oik-cli" ); oik_batch_load_oik_boot(); add_action( "admin_notices", "oik_batch_activation" ); add_action( "oik_admin_menu", "oik_batch_admin_menu" ); } } }View on GitHub