function __construct()
 {
     // Get The Registry
     $this->_settings = AVH_FDAS_Settings::getInstance();
     $this->_classes = AVH_FDAS_Classes::getInstance();
     // Initialize the plugin
     $this->_core = $this->_classes->load_class('Core', 'plugin', true);
     $this->_ipcachedb = $this->_classes->load_class('DB', 'plugin', true);
     $this->screen = 'avh_f_d_a_s_page_avh_first_defense_against_spam_ip_cache_';
     $default_status = get_user_option('avhfdas_ip_cache_list_last_view');
     if (empty($default_status)) {
         $default_status = 'all';
     }
     $status = isset($_REQUEST['avhfdas_ip_cache_list_status']) ? $_REQUEST['avhfdas_ip_cache_list_status'] : $default_status;
     if (!in_array($status, array('all', 'ham', 'spam', 'search'))) {
         $status = 'all';
     }
     if ($status != $default_status && 'search' != $status) {
         update_user_meta(get_current_user_id(), 'avhfdas_ip_cache_list_last_view', $status);
     }
     if (AVH_Common::getWordpressVersion() >= 3.2) {
         parent::__construct(array('plural' => 'ips', 'singular' => 'ip', 'ajax' => true));
     } else {
         parent::WP_List_Table(array('plural' => 'ips', 'singular' => 'ip', 'ajax' => true));
     }
 }
 /**
  * Setup everything needed for the FAQ page
  *
  */
 function actionLoadPageHook_faq()
 {
     add_meta_box('avhecBoxFAQ', __('F.A.Q.', 'avh-ec'), array(&$this, 'metaboxFAQ'), $this->hooks['menu_faq'], 'normal', 'core');
     add_meta_box('avhecBoxTranslation', __('Translation', 'avh-ec'), array(&$this, 'metaboxTranslation'), $this->hooks['menu_faq'], 'normal', 'core');
     if (AVH_Common::getWordpressVersion() >= 3.1) {
         add_screen_option('layout_columns', array('max' => 2, 'default' => 2));
     } else {
         add_filter('screen_layout_columns', array(&$this, 'filterScreenLayoutColumns'), 10, 2);
     }
     // WordPress core Styles and Scripts
     wp_enqueue_script('common');
     wp_enqueue_script('wp-lists');
     wp_enqueue_script('postbox');
     // WordPress core Styles
     wp_admin_css('css/dashboard');
     // Plugin Style
     wp_enqueue_style('avhec-admin-css');
 }
 /**
  * Adds an extra option on the comment row
  *
  * @WordPress Filter comment_row_actions
  *
  * @param $actions array
  * @param $comment object
  *
  * @return array
  * @since     1.0
  */
 public function filterCommentRowActions($actions, $comment)
 {
     $apikey = $this->_core->getOptionElement('sfs', 'sfsapikey');
     $add_to_blacklist = $this->_core->getOptionElement('general', 'addblacklist');
     $link_text = '';
     if (isset($comment->comment_approved) && 'spam' == $comment->comment_approved && ('' != $apikey && !empty($comment->comment_author_email) || 1 == $add_to_blacklist)) {
         if ('' != $apikey && !empty($comment->comment_author_email)) {
             $link_text .= __('Report', 'avhfdas');
         }
         if (1 == $add_to_blacklist) {
             if (!empty($link_text)) {
                 $link_text .= ', ';
             }
             $link_text .= __('Blacklist', 'avh-fdas');
         }
         $link_text .= __(' & Delete', 'avhfdas');
         if (AVH_Common::getWordpressVersion() > 3.0) {
             $report_url = esc_url(wp_nonce_url("admin.php?avhfdas_ajax_action=avh-fdas-reportcomment&id={$comment->comment_ID}", "report-comment_{$comment->comment_ID}"));
         } else {
             $report_url = clean_url(wp_nonce_url("admin.php?avhfdas_ajax_action=avh-fdas-reportcomment&id={$comment->comment_ID}", "report-comment_{$comment->comment_ID}"));
         }
         if (AVH_Common::getWordpressVersion() >= 3.5) {
             $actions['report'] = '<a data-wp-lists=\'delete:the-comment-list:comment-' . $comment->comment_ID . ':e7e7d3:action=avh-fdas-reportcomment\' class="delete vim-d vim-destructive" href="' . $report_url . '">' . $link_text . '</a>';
         } else {
             $actions['report'] = '<a class=\'delete:the-comment-list:comment-' . $comment->comment_ID . ':e7e7d3:action=avh-fdas-reportcomment vim-d vim-destructive\' href="' . $report_url . '">' . $link_text . '</a>';
         }
     }
     return $actions;
 }
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
if (!defined('AVH_FRAMEWORK')) {
    define('AVH_FRAMEWORK', true);
}
$_dir = dirname(__FILE__);
$_basename = plugin_basename(__FILE__);
require_once $_dir . '/libs/avh-registry.php';
require_once $_dir . '/libs/avh-common.php';
require_once $_dir . '/libs/avh-security.php';
require_once $_dir . '/libs/avh-visitor.php';
require_once $_dir . '/class/avh-fdas.registry.php';
require_once $_dir . '/class/avh-fdas.define.php';
if (AVH_Common::getWordpressVersion() >= 2.8) {
    $_classes = AVH_FDAS_Classes::getInstance();
    $_classes->setDir($_dir);
    $_classes->setClassFilePrefix('avh-fdas.');
    $_classes->setClassNamePrefix('AVH_FDAS_');
    unset($_classes);
    $_settings = AVH_FDAS_Settings::getInstance();
    $_settings->storeSetting('plugin_dir', $_dir);
    $_settings->storeSetting('plugin_basename', $_basename);
    require $_dir . '/avh-fdas.client.php';
} else {
    add_action('activate_' . AVH_FDAS_Define::PLUGIN_FILE, 'avh_fdas_remove_plugin');
}
function avh_fdas_remove_plugin()
{
    $active_plugins = (array) get_option('active_plugins');