if ( isset( $_POST['action'
] ) &&
$_POST['action'
] == 'enter-key'
) { self::
enter_api_key();
} } public static function init_hooks() { // The standalone stats page was removed in 3.0 for an all-in-one config and stats page.
// Redirect any links that might have been bookmarked or in browser history.
if ( isset( $_GET['page'
] ) && 'akismet-stats-display' ==
$_GET['page'
] ) { wp_safe_redirect( esc_url_raw( self::
get_page_url( 'stats'
) ), 301
);
die;
} self::
$initiated = true;
add_action( 'admin_init', array
( 'Akismet_Admin', 'admin_init'
) );
add_action( 'admin_menu', array
( 'Akismet_Admin', 'admin_menu'
), 5
); # Priority 5, so it's called before Jetpack's admin_menu.
add_action( 'admin_notices', array
( 'Akismet_Admin', 'display_notice'
) );
add_action( 'admin_enqueue_scripts', array
( 'Akismet_Admin', 'load_resources'
) );
add_action( 'activity_box_end', array
( 'Akismet_Admin', 'dashboard_stats'
) );
add_action( 'rightnow_end', array
( 'Akismet_Admin', 'rightnow_stats'
) );