WC_Predictive_Search_Hook_Filter

WooCommerce Predictive Search Hook Filter.

Defined (1)

The class is defined in the following location(s).

/classes/class-wc-predictive-search-filter.php  
  1. class WC_Predictive_Search_Hook_Filter 
  2.  
  3. public static function plugins_loaded() { 
  4. global $woocommerce_search_page_id; 
  5. global $predictive_search_mode; 
  6.  
  7. $woocommerce_search_page_id = WC_Predictive_Search_Functions::get_page_id_from_shortcode( 'woocommerce_search', 'woocommerce_search_page_id'); 
  8.  
  9. $predictive_search_mode = get_option( 'predictive_search_mode', 'strict' ); 
  10.  
  11. public static function a3_wp_admin() { 
  12. wp_enqueue_style( 'a3rev-wp-admin-style', WOOPS_CSS_URL . '/a3_wp_admin.css' ); 
  13.  
  14. public static function yellow_message_dontshow() { 
  15. check_ajax_referer( 'wc_ps_yellow_message_dontshow', 'security' ); 
  16. $option_name = $_REQUEST['option_name']; 
  17. update_option( $option_name, 1 ); 
  18. die(); 
  19.  
  20. public static function yellow_message_dismiss() { 
  21. check_ajax_referer( 'wc_ps_yellow_message_dismiss', 'security' ); 
  22. $session_name = $_REQUEST['session_name']; 
  23. if ( !isset($_SESSION) ) { @session_start(); } 
  24. $_SESSION[$session_name] = 1 ; 
  25. die(); 
  26.  
  27. public static function plugin_extra_links($links, $plugin_name) { 
  28. global $wc_predictive_search_admin_init; 
  29.  
  30. if ( $plugin_name != WOOPS_NAME) { 
  31. return $links; 
  32. $links[] = '<a href="'.WOO_PREDICTIVE_SEARCH_DOCS_URI.'" target="_blank">'.__('Documentation', 'woops').'</a>'; 
  33. $links[] = '<a href="'.$wc_predictive_search_admin_init->support_url.'" target="_blank">'.__('Support', 'woops').'</a>'; 
  34. return $links; 
  35.  
  36. public static function plugin_extension_box( $boxes = array() ) { 
  37. global $wc_predictive_search_admin_init; 
  38.  
  39. $support_box = '<a href="'.$wc_predictive_search_admin_init->support_url.'" target="_blank" alt="'.__('Go to Support Forum', 'woops').'"><img src="'.WOOPS_IMAGES_URL.'/go-to-support-forum.png" /></a>'; 
  40.  
  41. $boxes[] = array( 
  42. 'content' => $support_box,  
  43. 'css' => 'border: none; padding: 0; background: none;' 
  44. ); 
  45.  
  46. $review_box = '<div style="margin-bottom: 5px; font-size: 12px;"><strong>' . __('Is this plugin is just what you needed? If so', 'woops') . '</strong></div>'; 
  47. $review_box .= '<a href="https://wordpress.org/support/view/plugin-reviews/woocommerce-predictive-search#postform" target="_blank" alt="'.__('Submit Review for Plugin on WordPress', 'woops').'"><img src="'.WOOPS_IMAGES_URL.'/a-5-star-rating-would-be-appreciated.png" /></a>'; 
  48.  
  49. $boxes[] = array( 
  50. 'content' => $review_box,  
  51. 'css' => 'border: none; padding: 0; background: none;' 
  52. ); 
  53.  
  54. $pro_box = '<a href="'.$wc_predictive_search_admin_init->pro_plugin_page_url.'" target="_blank" alt="'.__('WooCommerce Predictive Search Pro', 'woops').'"><img src="'.WOOPS_IMAGES_URL.'/pro-version.jpg" /></a>'; 
  55.  
  56. $boxes[] = array( 
  57. 'content' => $pro_box,  
  58. 'css' => 'border: none; padding: 0; background: none;' 
  59. ); 
  60.  
  61. $free_woocommerce_box = '<a href="https://profiles.wordpress.org/a3rev/#content-plugins" target="_blank" alt="'.__('Free WooCommerce Plugins', 'woops').'"><img src="'.WOOPS_IMAGES_URL.'/free-woocommerce-plugins.png" /></a>'; 
  62.  
  63. $boxes[] = array( 
  64. 'content' => $free_woocommerce_box,  
  65. 'css' => 'border: none; padding: 0; background: none;' 
  66. ); 
  67.  
  68. $free_wordpress_box = '<a href="https://profiles.wordpress.org/a3rev/#content-plugins" target="_blank" alt="'.__('Free WordPress Plugins', 'woops').'"><img src="'.WOOPS_IMAGES_URL.'/free-wordpress-plugins.png" /></a>'; 
  69.  
  70. $boxes[] = array( 
  71. 'content' => $free_wordpress_box,  
  72. 'css' => 'border: none; padding: 0; background: none;' 
  73. ); 
  74.  
  75. $connect_box = '<div style="margin-bottom: 5px;">' . __('Connect with us via', 'woops') . '</div>'; 
  76. $connect_box .= '<a href="https://www.facebook.com/a3rev" target="_blank" alt="'.__('a3rev Facebook', 'woops').'" style="margin-right: 5px;"><img src="'.WOOPS_IMAGES_URL.'/follow-facebook.png" /></a> '; 
  77. $connect_box .= '<a href="https://twitter.com/a3rev" target="_blank" alt="'.__('a3rev Twitter', 'woops').'"><img src="'.WOOPS_IMAGES_URL.'/follow-twitter.png" /></a>'; 
  78.  
  79. $boxes[] = array( 
  80. 'content' => $connect_box,  
  81. 'css' => 'border-color: #3a5795;' 
  82. ); 
  83.  
  84. return $boxes;