| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: DecaLog Early Loader |
| 4 |
* Plugin URI: https://perfops.one/decalog |
| 5 |
* Description: MU plugin to early initialize DecaLog engine and listeners. |
| 6 |
* Version: 4.x |
| 7 |
* Author: Pierre Lannoy / PerfOps One |
| 8 |
* Author URI: https://perfops.one |
| 9 |
* License: GPLv3 |
| 10 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.html |
| 11 |
*/ |
| 12 |
|
| 13 |
if ( (bool) get_site_option( 'decalog_earlyloading', true ) ) { |
| 14 |
$file = WP_PLUGIN_DIR . '/decalog/decalog.php'; |
| 15 |
if ( file_exists( $file ) ) { |
| 16 |
define( 'DECALOG_EARLY_INIT', true ); |
| 17 |
require $file; |
| 18 |
} |
| 19 |
} |
| 20 |
|
| 21 |
add_action( |
| 22 |
'muplugins_loaded', |
| 23 |
function() { |
| 24 |
if ( ! defined( 'POMU_END_TIMESTAMP' ) ) { |
| 25 |
define( 'POMU_END_TIMESTAMP', microtime( true ) ); |
| 26 |
}}, |
| 27 |
PHP_INT_MIN, |
| 28 |
0 |
| 29 |
); |
| 30 |
|
| 31 |
add_action( |
| 32 |
'muplugins_loaded', |
| 33 |
function() { |
| 34 |
if ( ! defined( 'POPL_START_TIMESTAMP' ) ) { |
| 35 |
define( 'POPL_START_TIMESTAMP', microtime( true ) ); |
| 36 |
}}, |
| 37 |
PHP_INT_MAX, |
| 38 |
0 |
| 39 |
); |
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|