function init()
 {
     if (is_admin()) {
         return;
     }
     if (ThemeOption::getOption('maintenance_mode_enable') != 1) {
         return;
     }
     $user = wp_get_current_user();
     if (in_array($user->data->ID, (array) ThemeOption::getOption('maintenance_mode_user_id'))) {
         return;
     }
     $address = array_map('trim', mb_split("\n", ThemeOption::getOption('maintenance_mode_ip_address')));
     if (in_array(ThemeHelper::getVisitorIP(), $address)) {
         return;
     }
     $page = get_post((int) ThemeOption::getOption('maintenance_mode_post_id'));
     if (is_null($page)) {
         return;
     }
     add_action('wp_head', array($this, 'filterWPHead'));
 }