/** * Init method, called when accessing the page. */ function init() { add_action('admin_footer', array(&$this, 'list_scripts')); if (isset($_GET['action']) && isset($_GET['contest']) && $_GET['action'] == 'del') { $contest = new CH_Contest($_GET['contest']); if ($contest->_valid) { $contest->delete(true); } wp_safe_redirect(admin_url('admin.php?page=' . self::page_id)); } }