Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Moves setup code from VIP_Scanner_UI::__construct() into the init action

To allow hooking into the actions / filters called here, which is
impossible unless the hooking code was included before VIP Scanner
(which is up to WP’s plugin loading order).

Fixes #70
  • Loading branch information...
commit 85a438b0bcb1b1e0532059dd374d679881cee254 1 parent 69a1f32
@nickdaugherty nickdaugherty authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 vip-scanner.php
View
10 vip-scanner.php
@@ -25,8 +25,10 @@ class VIP_Scanner_UI {
function __construct() {
add_action( 'init', array( $this, 'init' ) );
add_action( 'admin_init', array( $this, 'admin_init' ) );
- do_action( 'vip_scanner_loaded' );
+ }
+ function init() {
+ add_action( 'admin_menu', array( $this, 'add_menu_page' ) );
$this->blocker_types = apply_filters( 'vip_scanner_blocker_types', array(
'blocker' => __( 'Blockers', 'theme-check' ),
@@ -34,16 +36,14 @@ function __construct() {
'required' => __( 'Required', 'theme-check' ),
) );
+ do_action( 'vip_scanner_loaded' );
+
$review_types = VIP_Scanner::get_instance()->get_review_types();
$this->default_review = apply_filters( 'vip_scanner_default_review', 0, $review_types );
$this->to = apply_filters( 'vip_scanner_email_to', '' );
}
- function init() {
- add_action( 'admin_menu', array( $this, 'add_menu_page' ) );
- }
-
function admin_init() {
if ( isset( $_POST['page'], $_POST['action'] ) && $_POST['page'] == self::key && $_POST['action'] == 'Export' )
$this->export();
Please sign in to comment.
Something went wrong with that request. Please try again.