Commit 42673468 authored by Erick Hitter's avatar Erick Hitter

Don't register hooks immediately when plugin is instantiated, otherwise no one...

Don't register hooks immediately when plugin is instantiated, otherwise no one else can hook in reliably.
parent af390c8c
......@@ -58,6 +58,16 @@ class WP_Revisions_Control {
return self::$__instance;
}
/**
* Register actions and filters at init so others can interact, if desired.
*
* @uses add_action
* @return null
*/
private function setup() {
add_action( 'init', array( $this, 'action_init' ) );
}
/**
* Register actions and filters
*
......@@ -65,7 +75,7 @@ class WP_Revisions_Control {
* @uses add_filter
* @return null
*/
private function setup() {
public function action_init() {
add_action( 'admin_init', array( $this, 'action_admin_init' ) );
add_filter( 'wp_revisions_to_keep', array( $this, 'filter_wp_revisions_to_keep' ), 50, 2 );
......
Markdown is supported
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