Skip to content

Commit

Permalink
Added check for if we want to disable this. Mostly for local environm…
Browse files Browse the repository at this point in the history
…ents.
  • Loading branch information
richardtape committed Mar 28, 2023
1 parent c909ea8 commit cae61e7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions wp-caliper.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}

// Don't want this on local environments.
if ( defined( 'DISABLE_WP_EXPERIENCE_API' ) && true === constant( 'DISABLE_WP_EXPERIENCE_API' ) ) {
return;
}

if ( ! defined( 'WP_CALIPER_PLUGIN_DIR' ) ) {
define( 'WP_CALIPER_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
}
Expand Down

0 comments on commit cae61e7

Please sign in to comment.