Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 11 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
||
| 1 | <?php |
| 2 | /** |
| 3 | * Description: WordPress.com provided functionality & tools pre-installed and activated on all Atomic Sites |
| 4 | * |
| 5 | * @package wpcomsh |
| 6 | */ |
| 7 | |
| 8 | // List of WP Cloud clients that will always load wpcomsh. |
| 9 | $wpcloud_client_ids = array( |
| 10 | 2, // wpcom |
| 11 | 10, // e2e |
| 12 | 32, // jurassicninja |
| 13 | ); |
| 14 | |
| 15 | /** |
| 16 | * Filters whether wpcomsh should be loaded. |
| 17 | * |
| 18 | * Only mu-plugins loaded before this file can hook into this filter. |
| 19 | * |
| 20 | * @param bool Whether wpcomsh should be loaded. |
| 21 | */ |
| 22 | $should_load_wpcomsh = (bool) apply_filters( 'wpcomsh_force_load', false ); |
| 23 | |
| 24 | // Load if any of these conditions are true. |
| 25 | $should_load_wpcomsh = $should_load_wpcomsh |
| 26 | || ( defined( 'WPCOMSH_FORCE_LOAD' ) && WPCOMSH_FORCE_LOAD ) |
| 27 | || ( defined( 'ATOMIC_CLIENT_ID' ) && in_array( (int) ATOMIC_CLIENT_ID, $wpcloud_client_ids, true ) ); |
| 28 | |
| 29 | if ( $should_load_wpcomsh ) { |
| 30 | require_once WPMU_PLUGIN_DIR . '/wpcomsh/wpcomsh.php'; |
| 31 | } |