WordPress.org

Plugin Directory

Opened 5 years ago

Last modified 5 years ago

#1585 new defect

Network id is not set when adding the content_scheduler action hook

Reported by: alettieri Owned by:
Priority: high Severity: critical
Plugin: not-listed Keywords:
Cc:

Description

The Cron Events Scheduled table displays the following hook name: content_scheduler_notify_

The trailing underscore should be followed by the site id.

The issue may lie in the content-scheduler.php file lines, 66 + 67. The $current_blog variable isn't being defined anywhere, I don't think it's a global either. Might want to use the get_current_blog_id() function instead.

Something like:

$current_blog_id = get_current_blog_id();
add_action ('content_scheduler'.$current_blog_id, array( $this, 'answer_expiration_event') );
add_action ('content_scheduler_notify'.$current_blog_id, array( $this, 'answer_notification_event') ); 

Change History (1)

comment:1 @alettieri5 years ago

Should have said Lines 65+66.

Note: See TracTickets for help on using tickets.