public function template_redirect()
 {
     if (is_404()) {
         $options = red_get_options();
         if (isset($options['expire_404']) && $options['expire_404'] >= 0) {
             RE_404::create($this->get_url(), $this->get_user_agent(), $this->get_ip(), $this->get_referrer());
         }
     }
 }
 function admin_screen_404()
 {
     if (isset($_POST['delete-all']) && check_admin_referer('redirection-log_management')) {
         RE_404::delete_all();
         $this->render_message(__('Your logs have been deleted', 'redirection'));
     }
     $options = red_get_options();
     $table = new Redirection_404_Table($options);
     $table->prepare_items(isset($_GET['ip']) ? $_GET['ip'] : false);
     $this->render('log', array('options' => $options, 'table' => $table, 'lookup' => $options['lookup'], 'type' => '404s'));
 }
 function process_bulk_action()
 {
     if ('delete' === $this->current_action()) {
         foreach ($_POST['item'] as $id) {
             RE_404::delete(intval($id));
         }
     }
 }
 /**
  * Matches 404s
  * @return [type] [description]
  */
 function template_redirect()
 {
     if (is_404()) {
         $options = $this->get_options();
         if ($options['log_404s']) {
             $log = RE_404::create(red_get_url(), red_user_agent(), red_ip(), red_http_referrer());
         }
     }
 }