WC_Admin_Predictive_Search_Page

The WooCommerce Predictive Search LITE WC Admin Predictive Search Page class.

Defined (1)

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

/admin/admin-pages/predictive-search-page.php  
  1. class WC_Admin_Predictive_Search_Page extends WC_Predictive_Search_Admin_UI 
  2. {  
  3. /** 
  4. * @var string 
  5. */ 
  6. private $menu_slug = 'woo-predictive-search'; 
  7.  
  8. /** 
  9. * @var array 
  10. */ 
  11. private $page_data; 
  12.  
  13. /**-----------------------------------------------------------------------------------*/ 
  14. /** __construct() */ 
  15. /** Settings Constructor */ 
  16. /**-----------------------------------------------------------------------------------*/ 
  17. public function __construct() { 
  18. $this->page_init(); 
  19. $this->tabs_include(); 
  20.  
  21. /**-----------------------------------------------------------------------------------*/ 
  22. /** page_init() */ 
  23. /** Page Init */ 
  24. /**-----------------------------------------------------------------------------------*/ 
  25. public function page_init() { 
  26.  
  27. add_filter( $this->plugin_name . '_add_admin_menu', array( $this, 'add_admin_menu' ) ); 
  28.  
  29. /**-----------------------------------------------------------------------------------*/ 
  30. /** page_data() */ 
  31. /** Get Page Data */ 
  32. /**-----------------------------------------------------------------------------------*/ 
  33. public function page_data() { 
  34.  
  35. $page_data = array( 
  36. 'type' => 'submenu',  
  37. 'parent_slug' => 'woocommerce',  
  38. 'page_title' => __( 'Predictive Search', 'woops' ),  
  39. 'menu_title' => __( 'Predictive Search', 'woops' ),  
  40. 'capability' => 'manage_options',  
  41. 'menu_slug' => $this->menu_slug,  
  42. 'function' => 'wc_admin_predictive_search_page_show',  
  43. 'admin_url' => 'admin.php',  
  44. 'callback_function' => '',  
  45. 'script_function' => '',  
  46. 'view_doc' => '',  
  47. ); 
  48.  
  49. if ( $this->page_data ) return $this->page_data; 
  50. return $this->page_data = $page_data; 
  51.  
  52.  
  53. /**-----------------------------------------------------------------------------------*/ 
  54. /** add_admin_menu() */ 
  55. /** Add This page to menu on left sidebar */ 
  56. /**-----------------------------------------------------------------------------------*/ 
  57. public function add_admin_menu( $admin_menu ) { 
  58.  
  59. if ( ! is_array( $admin_menu ) ) $admin_menu = array(); 
  60. $admin_menu[] = $this->page_data(); 
  61.  
  62. return $admin_menu; 
  63.  
  64. /**-----------------------------------------------------------------------------------*/ 
  65. /** tabs_include() */ 
  66. /** Include all tabs into this page 
  67. /**-----------------------------------------------------------------------------------*/ 
  68. public function tabs_include() { 
  69.  
  70. include_once( $this->admin_plugin_dir() . '/tabs/global-settings-tab.php' ); 
  71. include_once( $this->admin_plugin_dir() . '/tabs/search-box-tab.php' ); 
  72. include_once( $this->admin_plugin_dir() . '/tabs/performance-settings-tab.php' ); 
  73. include_once( $this->admin_plugin_dir() . '/tabs/sidebar-template-tab.php' ); 
  74. include_once( $this->admin_plugin_dir() . '/tabs/header-template-tab.php' ); 
  75. include_once( $this->admin_plugin_dir() . '/tabs/all-results-pages-tab.php' ); 
  76. include_once( $this->admin_plugin_dir() . '/tabs/search-function-tab.php' ); 
  77.  
  78.  
  79. /**-----------------------------------------------------------------------------------*/ 
  80. /** admin_settings_page() */ 
  81. /** Show Settings Page */ 
  82. /**-----------------------------------------------------------------------------------*/ 
  83. public function admin_settings_page() { 
  84. global $wc_predictive_search_admin_init; 
  85.  
  86. $wc_predictive_search_admin_init->admin_settings_page( $this->page_data() ); 
  87.