fixing non-static method WARN; reorganizing action priority to avoid collisions
Peter Molnar hello@petermolnar.eu
Fri, 05 Feb 2016 13:33:31 +0000
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
sender.php
→
sender.php
@@ -57,7 +57,7 @@ // register the action for processing received
add_action( static::cron, array( &$this, 'process' ) ); // register new posts - add_action( 'transition_post_status', array( &$this, 'queue' ), 12, 5 ); + add_action( 'transition_post_status', array( &$this, 'queue' ), 98, 5 ); }@@ -111,7 +111,7 @@ * @param string $new_status New post status
* @param string $old_status Previous post status * @param object $post WP Post object */ - public function queue( $new_status, $old_status, $post ) { + public static function queue( $new_status, $old_status, $post ) { if ( ! static::is_post( $post ) ) { static::debug( "Whoops, this is not a post." );