function __construct()
 {
     $this->url = DP_Helpers::get_dir_url(__FILE__);
     $this->login_required = true;
     $this->current_user_ip = preg_replace('/[^0-9a-fA-F:., ]/', '', $_SERVER['REMOTE_ADDR']);
     $labels = array('add' => __('Liked', 'dp'), 'disaddd' => __('Liked', 'dp'), 'add' => __('I add this', 'dp'), 'disadd' => __('I disadd this', 'dp'), 'remove' => __('Unadd', 'dp'), 'undisadd' => __("Undisadd", 'dp'));
     $this->labels = json_decode(json_encode($labels));
 }
 function __construct()
 {
     $this->url = DP_Helpers::get_dir_url(__FILE__);
     add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts'));
     add_action('_admin_menu', array($this, 'add_admin_page'));
     //add_action('admin_menu', array($this, 'acf_add_local_field_group'));
     add_action('pre_get_posts', array($this, 'pre_get_posts'));
     add_action('wp_head', array($this, 'wp_head'));
 }
 function __construct()
 {
     global $wpdb;
     $this->table = $wpdb->dp_post_likes;
     $this->url = DP_Helpers::get_dir_url(__FILE__);
     $this->like_count_key = 'dp_like_count';
     $this->dislike_count_key = 'dp_dislike_count';
     $this->like_karma_key = 'dp_like_karma';
     $this->login_required = true;
     $this->visitor_method = 'ip';
     // ip||cookie
     $this->changeable = true;
     $this->current_user_ip = preg_replace('/[^0-9a-fA-F:., ]/', '', $_SERVER['REMOTE_ADDR']);
     $labels = array('liked' => __('Liked', 'dp'), 'disliked' => __('Liked', 'dp'), 'like' => __('I like this', 'dp'), 'dislike' => __('I dislike this', 'dp'), 'unlike' => __('Unlike', 'dp'), 'undislike' => __("Undislike", 'dp'));
     $this->labels = json_decode(json_encode($labels));
     $this->cookie = !empty($_COOKIE['dp_post_likes']) ? (array) json_decode(wp_unslash($_COOKIE['dp_post_likes']), true) : array();
     $this->labels = array('like' => __('Liked', 'dp_like_post'), 'liked' => __('Liked', 'dp_like_post'), 'like_title' => __('Like this', 'dp_like_post'), 'liked_title' => __('You liked this', 'dp_like_post'), 'dislike' => __('Dislike', 'dp_like_post'), 'disliked' => __('Disliked', 'dp_like_post'), 'dislike_title' => __('Dislike this', 'dp_like_post'), 'disliked_title' => __('You disliked this', 'dp_like_post'));
 }