Verified Commit a146bec0 authored by Erick Hitter's avatar Erick Hitter
Browse files

Each class doesn't need its own corresponding functions file, there just won't...

Each class doesn't need its own corresponding functions file, there just won't be enough functions to justify that
parent 9d537ce4
......@@ -41,7 +41,6 @@ class Main extends Singleton {
// Load dependencies
require __DIR__ . '/class-internal-events.php';
require __DIR__ . '/class-rest-api.php';
require __DIR__ . '/functions-internal-events.php';
require __DIR__ . '/functions.php';
// Block normal cron execution
......
<?php
namespace WP_Cron_Control_Revisited;
/**
* Check if an event is an internal one that the plugin will always run
*/
function is_internal_event( $action ) {
return Internal_Events::instance()->is_internal_event( $action );
}
/**
* Check if an event should never run
*/
function is_blocked_event( $action ) {
return Internal_Events::instance()->is_blocked_event( $action );
}
......@@ -8,3 +8,17 @@ namespace WP_Cron_Control_Revisited;
function get_plugin_var( $variable ) {
return property_exists( Main::instance(), $variable ) ? Main::instance()->$variable : null;
}
/**
* Check if an event is an internal one that the plugin will always run
*/
function is_internal_event( $action ) {
return Internal_Events::instance()->is_internal_event( $action );
}
/**
* Check if an event should never run
*/
function is_blocked_event( $action ) {
return Internal_Events::instance()->is_blocked_event( $action );
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment