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

Drop the unused "blocked event" functionality functionality as it's half-baked and causing fatals

parent 7d0c025d
......@@ -104,11 +104,6 @@ class Cron_Options_CPT extends Singleton {
foreach ( $timestamp_events as $action => $action_instances ) {
foreach ( $action_instances as $instance => $instance_args ) {
// There are some jobs we never care to run
if ( is_blocked_event( $action ) ) {
continue;
}
// Check if post exists and bail
$job_exists = get_posts( array(
'name' => sprintf( '%s-%s-%s', $timestamp, md5( $action ), $instance ),
......
......@@ -84,15 +84,6 @@ class Internal_Events extends Singleton {
return in_array( $action, wp_list_pluck( $this->internal_jobs, 'action' ) );
}
/**
* Allow specific events to be blocked perpetually
*/
public function is_blocked_event( $action ) {
$blocked_hooks = array();
return in_array( $action, $blocked_hooks );
}
/**
* Published scheduled posts that miss their schedule
*/
......
......@@ -125,12 +125,6 @@ class Main extends Singleton {
// Extract just the essentials needed to retrieve the full job later on
foreach ( $timestamp_events as $action => $action_instances ) {
foreach ( $action_instances as $instance => $instance_args ) {
// There are some jobs we never care to run
if ( is_blocked_event( $action ) ) {
wp_unschedule_event( $timestamp, $action, $instance_args['args'] );
continue;
}
// Necessary data to identify an individual event
// `$action` is hashed to avoid information disclosure
// Core hashes `$instance` for us
......
......@@ -15,10 +15,3 @@ function get_plugin_var( $variable ) {
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