Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Prevent CLI errors if WP isn't loaded.
Browse files Browse the repository at this point in the history
  • Loading branch information
wpscholar committed Jan 8, 2019
1 parent ed30bf2 commit febcfeb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php

add_action( 'after_setup_theme', 'eig_module_spam_prevention_register' );
if ( function_exists( 'add_action' ) ) {
add_action( 'after_setup_theme', 'eig_module_spam_prevention_register' );
}

/**
* Register the spam prevention module
Expand All @@ -19,4 +21,4 @@ function eig_module_spam_prevention_register() {
*/
function eig_module_spam_prevention_load() {
require dirname( __FILE__ ) . '/spam-prevention.php';
}
}

0 comments on commit febcfeb

Please sign in to comment.