v2.2.5
This commit is contained in:
parent
97ed06ef72
commit
d611209171
5 changed files with 35 additions and 10 deletions
15
worker.php
15
worker.php
|
|
@ -74,9 +74,20 @@ if ( ! file_exists( $wp_load_path ) ) {
|
|||
|
||||
require_once $wp_load_path;
|
||||
|
||||
// Verify plugin is active.
|
||||
// Load plugin if not already loaded (happens in DOING_CRON context)
|
||||
if ( ! defined( 'ROBOTSTXT_SMTP_NEWSLETTER_VERSION' ) ) {
|
||||
fwrite( STDERR, "Error: Newsletter SMTP plugin is not active\n" );
|
||||
$plugin_file = __DIR__ . '/robotstxt-smtp-newsletter.php';
|
||||
if ( file_exists( $plugin_file ) ) {
|
||||
require_once $plugin_file;
|
||||
} else {
|
||||
fwrite( STDERR, "Error: Newsletter SMTP plugin file not found\n" );
|
||||
exit( 1 );
|
||||
}
|
||||
}
|
||||
|
||||
// Verify plugin loaded successfully
|
||||
if ( ! defined( 'ROBOTSTXT_SMTP_NEWSLETTER_VERSION' ) ) {
|
||||
fwrite( STDERR, "Error: Newsletter SMTP plugin could not be loaded\n" );
|
||||
exit( 1 );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue