WC_Predictive_Search_Sidebar_Template_Settings

The WooCommerce Predictive Search LITE WC Predictive Search Sidebar Template Settings class.

Defined (1)

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

/admin/settings/sidebar-template-settings.php  
  1. class WC_Predictive_Search_Sidebar_Template_Settings extends WC_Predictive_Search_Admin_UI 
  2.  
  3. /** 
  4. * @var string 
  5. */ 
  6. private $parent_tab = 'sidebar-template-settings'; 
  7.  
  8. /** 
  9. * @var array 
  10. */ 
  11. private $subtab_data; 
  12.  
  13. /** 
  14. * @var string 
  15. * You must change to correct option name that you are working 
  16. */ 
  17. public $option_name = 'wc_predictive_search_sidebar_template_settings'; 
  18.  
  19. /** 
  20. * @var string 
  21. * You must change to correct form key that you are working 
  22. */ 
  23. public $form_key = 'wc_predictive_search_sidebar_template_settings'; 
  24.  
  25. /** 
  26. * @var string 
  27. * You can change the order show of this sub tab in list sub tabs 
  28. */ 
  29. private $position = 1; 
  30.  
  31. /** 
  32. * @var array 
  33. */ 
  34. public $form_fields = array(); 
  35.  
  36. /** 
  37. * @var array 
  38. */ 
  39. public $form_messages = array(); 
  40.  
  41. /**-----------------------------------------------------------------------------------*/ 
  42. /** __construct() */ 
  43. /** Settings Constructor */ 
  44. /**-----------------------------------------------------------------------------------*/ 
  45. public function __construct() { 
  46.  
  47. $this->init_form_fields(); 
  48. $this->subtab_init(); 
  49.  
  50. $this->form_messages = array( 
  51. 'success_message' => __( 'Widget Template Settings successfully saved.', 'woocommerce-predictive-search' ),  
  52. 'error_message' => __( 'Error: Widget Template Settings can not save.', 'woocommerce-predictive-search' ),  
  53. 'reset_message' => __( 'Widget Template Settings successfully reseted.', 'woocommerce-predictive-search' ),  
  54. ); 
  55.  
  56. add_action( $this->plugin_name . '-' . $this->form_key . '_settings_end', array( $this, 'include_script' ) ); 
  57.  
  58. add_action( $this->plugin_name . '_set_default_settings' , array( $this, 'set_default_settings' ) ); 
  59.  
  60. add_action( $this->plugin_name . '_get_all_settings' , array( $this, 'get_settings' ) ); 
  61.  
  62. /**-----------------------------------------------------------------------------------*/ 
  63. /** subtab_init() */ 
  64. /** Sub Tab Init */ 
  65. /**-----------------------------------------------------------------------------------*/ 
  66. public function subtab_init() { 
  67.  
  68. add_filter( $this->plugin_name . '-' . $this->parent_tab . '_settings_subtabs_array', array( $this, 'add_subtab' ), $this->position ); 
  69.  
  70.  
  71. /**-----------------------------------------------------------------------------------*/ 
  72. /** set_default_settings() 
  73. /** Set default settings with function called from Admin Interface */ 
  74. /**-----------------------------------------------------------------------------------*/ 
  75. public function set_default_settings() { 
  76. global $wc_predictive_search_admin_interface; 
  77.  
  78. $wc_predictive_search_admin_interface->reset_settings( $this->form_fields, $this->option_name, false ); 
  79.  
  80. /**-----------------------------------------------------------------------------------*/ 
  81. /** get_settings() 
  82. /** Get settings with function called from Admin Interface */ 
  83. /**-----------------------------------------------------------------------------------*/ 
  84. public function get_settings() { 
  85. global $wc_predictive_search_admin_interface; 
  86.  
  87. $wc_predictive_search_admin_interface->get_settings( $this->form_fields, $this->option_name ); 
  88.  
  89. /** 
  90. * subtab_data() 
  91. * Get SubTab Data 
  92. * ============================================= 
  93. * array (  
  94. * 'name' => 'my_subtab_name' : (required) Enter your subtab name that you want to set for this subtab 
  95. * 'label' => 'My SubTab Name' : (required) Enter the subtab label 
  96. * 'callback_function' => 'my_callback_function' : (required) The callback function is called to show content of this subtab 
  97. * ) 
  98. */ 
  99. public function subtab_data() { 
  100.  
  101. $subtab_data = array(  
  102. 'name' => 'sidebar-template-settings',  
  103. 'label' => __( 'Widget Template', 'woocommerce-predictive-search' ),  
  104. 'callback_function' => 'wc_predictive_search_sidebar_template_settings_form',  
  105. ); 
  106.  
  107. if ( $this->subtab_data ) return $this->subtab_data; 
  108. return $this->subtab_data = $subtab_data; 
  109.  
  110.  
  111. /**-----------------------------------------------------------------------------------*/ 
  112. /** add_subtab() */ 
  113. /** Add Subtab to Admin Init 
  114. /**-----------------------------------------------------------------------------------*/ 
  115. public function add_subtab( $subtabs_array ) { 
  116.  
  117. if ( ! is_array( $subtabs_array ) ) $subtabs_array = array(); 
  118. $subtabs_array[] = $this->subtab_data(); 
  119.  
  120. return $subtabs_array; 
  121.  
  122. /**-----------------------------------------------------------------------------------*/ 
  123. /** settings_form() */ 
  124. /** Call the form from Admin Interface 
  125. /**-----------------------------------------------------------------------------------*/ 
  126. public function settings_form() { 
  127. global $wc_predictive_search_admin_interface; 
  128.  
  129. $output = ''; 
  130. $output .= $wc_predictive_search_admin_interface->admin_forms( $this->form_fields, $this->form_key, $this->option_name, $this->form_messages ); 
  131.  
  132. return $output; 
  133.  
  134. /**-----------------------------------------------------------------------------------*/ 
  135. /** init_form_fields() */ 
  136. /** Init all fields of this form */ 
  137. /**-----------------------------------------------------------------------------------*/ 
  138. public function init_form_fields() { 
  139.  
  140. // Define settings 
  141. $this->form_fields = apply_filters( $this->form_key . '_settings_fields', array( 
  142. array( 
  143. 'name' => __( 'Search Box Container', 'woocommerce-predictive-search' ),  
  144. 'type' => 'heading',  
  145. 'id' => 'predictive_search_container_box',  
  146. 'is_box' => true,  
  147. ),  
  148. array( 
  149. 'name' => __( 'Search Box Alignment', 'woocommerce-predictive-search' ),  
  150. 'id' => 'sidebar_search_box_align',  
  151. 'desc' => __( 'Alignment within the widget area container', 'woocommerce-predictive-search' ),  
  152. 'css' => 'width:80px;',  
  153. 'type' => 'select',  
  154. 'default' => 'none',  
  155. 'options' => array( 
  156. 'none' => __( 'None', 'woocommerce-predictive-search' ) ,  
  157. 'left' => __( 'Left', 'woocommerce-predictive-search' ) ,  
  158. 'center' => __( 'Center', 'woocommerce-predictive-search' ) ,  
  159. 'right' => __( 'Right', 'woocommerce-predictive-search' ) ,  
  160. ),  
  161. ),  
  162. array( 
  163. 'name' => __( 'Search Box Width', 'woocommerce-predictive-search' ),  
  164. 'desc' => '% ' . __( 'of width of widget area container', 'woocommerce-predictive-search' ) ,  
  165. 'id' => 'sidebar_search_box_wide',  
  166. 'type' => 'slider',  
  167. 'default' => 100,  
  168. 'min' => 30,  
  169. 'max' => 100,  
  170. 'increment' => 1,  
  171. ),  
  172. array( 
  173. 'name' => __( 'Search Box Height', 'woocommerce-predictive-search' ),  
  174. 'desc' => 'px',  
  175. 'id' => 'sidebar_search_box_height',  
  176. 'type' => 'text',  
  177. 'css' => 'width:40px;',  
  178. 'default' => 35,  
  179. ),  
  180. array( 
  181. 'name' => __( 'Search Box Margin', 'woocommerce-predictive-search' ),  
  182. 'id' => 'sidebar_search_box_margin',  
  183. 'type' => 'array_textfields',  
  184. 'ids' => array( 
  185. array( 'id' => 'sidebar_search_box_margin_top',  
  186. 'name' => __( 'Top', 'woocommerce-predictive-search' ),  
  187. 'class' => '',  
  188. 'css' => 'width:40px;',  
  189. 'default' => '0' ),  
  190. array( 'id' => 'sidebar_search_box_margin_bottom',  
  191. 'name' => __( 'Bottom', 'woocommerce-predictive-search' ),  
  192. 'class' => '',  
  193. 'css' => 'width:40px;',  
  194. 'default' => '10' ),  
  195. array( 'id' => 'sidebar_search_box_margin_left',  
  196. 'name' => __( 'Left', 'woocommerce-predictive-search' ),  
  197. 'class' => '',  
  198. 'css' => 'width:40px;',  
  199. 'default' => '0' ),  
  200. array( 'id' => 'sidebar_search_box_margin_right',  
  201. 'name' => __( 'Right', 'woocommerce-predictive-search' ),  
  202. 'class' => '',  
  203. 'css' => 'width:40px;',  
  204. 'default' => '0' ),  
  205. ),  
  206. array( 
  207. 'name' => __( 'Search Box Margin (Mobiles)', 'woocommerce-predictive-search' ),  
  208. 'id' => 'sidebar_search_box_mobile_margin',  
  209. 'type' => 'array_textfields',  
  210. 'ids' => array( 
  211. array( 'id' => 'sidebar_search_box_mobile_margin_top',  
  212. 'name' => __( 'Top', 'woocommerce-predictive-search' ),  
  213. 'class' => '',  
  214. 'css' => 'width:40px;',  
  215. 'default' => '10' ),  
  216. array( 'id' => 'sidebar_search_box_mobile_margin_bottom',  
  217. 'name' => __( 'Bottom', 'woocommerce-predictive-search' ),  
  218. 'class' => '',  
  219. 'css' => 'width:40px;',  
  220. 'default' => '10' ),  
  221. array( 'id' => 'sidebar_search_box_mobile_margin_left',  
  222. 'name' => __( 'Left', 'woocommerce-predictive-search' ),  
  223. 'class' => '',  
  224. 'css' => 'width:40px;',  
  225. 'default' => '10' ),  
  226. array( 'id' => 'sidebar_search_box_mobile_margin_right',  
  227. 'name' => __( 'Right', 'woocommerce-predictive-search' ),  
  228. 'class' => '',  
  229. 'css' => 'width:40px;',  
  230. 'default' => '10' ),  
  231. ),  
  232. array( 
  233. 'name' => __( 'Search Box Border', 'woocommerce-predictive-search' ),  
  234. 'id' => 'sidebar_search_box_border',  
  235. 'type' => 'border',  
  236. 'default' => array( 'width' => '1px', 'style' => 'solid', 'color' => '#cdcdcd', 'corner' => 'rounded' , 'top_left_corner' => 4 , 'top_right_corner' => 4 , 'bottom_left_corner' => 4 , 'bottom_right_corner' => 4 ),  
  237. ),  
  238. array( 
  239. 'name' => __( 'Search Box Border Focus', 'woocommerce-predictive-search' ),  
  240. 'id' => 'sidebar_search_box_border_color_focus',  
  241. 'type' => 'color',  
  242. 'default' => '#febd69',  
  243. ),  
  244. array( 
  245. 'name' => __( 'Border Shadow', 'woocommerce-predictive-search' ),  
  246. 'id' => 'sidebar_search_box_shadow',  
  247. 'type' => 'box_shadow',  
  248. 'default' => array( 'enable' => 0, 'h_shadow' => '0px' , 'v_shadow' => '1px', 'blur' => '0px' , 'spread' => '0px', 'color' => '#555555', 'inset' => 'inset' ) 
  249. ),  
  250.  
  251. array( 
  252. 'name' => __( 'Search in Category Dropdown', 'woocommerce-predictive-search' ),  
  253. 'type' => 'heading',  
  254. 'desc' => '<img class="rwd_image_maps" src="'.WOOPS_IMAGES_URL.'/premium-search-in-category.png" usemap="#searchInCategoryMap" style="width: auto; max-width: 100%;" border="0" /> 
  255. <map name="searchInCategoryMap" id="searchInCategoryMap"> 
  256. <area shape="rect" coords="445, 120, 890, 180" href="'.$this->pro_plugin_page_url.'" target="_blank" /> 
  257. </map>',  
  258. 'id' => 'predictive_search_category_dropdown_box',  
  259. 'is_box' => true,  
  260. ),  
  261.  
  262. array( 
  263. 'name' => '',  
  264. 'type' => 'heading',  
  265. 'id' => 'predictive_search_category_dropdown_pro_box',  
  266. 'class' => 'pro_feature_hidden',  
  267. 'is_box' => true,  
  268. ),  
  269. array( 
  270. 'name' => __( 'Alignment', 'woocommerce-predictive-search' ),  
  271. 'desc' => __( 'If set LEFT then Predictive Search Icon on RIGHT ', 'woocommerce-predictive-search' ),  
  272. 'id' => 'sidebar_category_dropdown_align',  
  273. 'type' => 'switcher_checkbox',  
  274. 'default' => 'left',  
  275. 'checked_value' => 'left',  
  276. 'unchecked_value' => 'right',  
  277. 'checked_label' => __( 'LEFT', 'woocommerce-predictive-search' ),  
  278. 'unchecked_label' => __( 'RIGHT', 'woocommerce-predictive-search' ),  
  279. ),  
  280. array( 
  281. 'name' => __( 'Maximum Width', 'woocommerce-predictive-search' ),  
  282. 'desc' => __( '% width of Search Box', 'woocommerce-predictive-search' ),  
  283. 'id' => 'sidebar_category_dropdown_max_wide',  
  284. 'type' => 'slider',  
  285. 'default' => 30,  
  286. 'min' => 10,  
  287. 'max' => 50,  
  288. 'increment' => 1,  
  289. ),  
  290. array( 
  291. 'name' => __( 'Category Font', 'woocommerce-predictive-search' ),  
  292. 'id' => 'sidebar_category_dropdown_font',  
  293. 'type' => 'typography',  
  294. 'default' => array( 'size' => '12px', 'line_height' => '1.4em', 'face' => 'Arial, sans-serif', 'style' => 'normal', 'color' => '#777777' ) 
  295. ),  
  296. array( 
  297. 'name' => __( 'Down Icon Size', 'woocommerce-predictive-search' ),  
  298. 'desc' => "px",  
  299. 'id' => 'sidebar_category_dropdown_icon_size',  
  300. 'type' => 'slider',  
  301. 'default' => 12,  
  302. 'min' => 8,  
  303. 'max' => 30,  
  304. 'increment' => 1,  
  305. ),  
  306. array( 
  307. 'name' => __( 'Down Icon Colour', 'woocommerce-predictive-search' ),  
  308. 'id' => 'sidebar_category_dropdown_icon_color',  
  309. 'type' => 'color',  
  310. 'default' => '#555555' 
  311. ),  
  312. array( 
  313. 'name' => __( 'Background Colour', 'woocommerce-predictive-search' ),  
  314. 'id' => 'sidebar_category_dropdown_bg_color',  
  315. 'type' => 'color',  
  316. 'default' => '#f3f3f3' 
  317. ),  
  318. array( 
  319. 'name' => __( 'Vertical Side Border', 'woocommerce-predictive-search' ),  
  320. 'id' => 'sidebar_category_dropdown_side_border',  
  321. 'type' => 'border_styles',  
  322. 'default' => array( 'width' => '1px', 'style' => 'solid', 'color' => '#cdcdcd' ),  
  323. ),  
  324.  
  325. array( 
  326. 'name' => __( 'Search Icon', 'woocommerce-predictive-search' ),  
  327. 'type' => 'heading',  
  328. 'id' => 'predictive_search_button_box',  
  329. 'is_box' => true,  
  330. ),  
  331. array( 
  332. 'name' => __( 'Search Icon Size', 'woocommerce-predictive-search' ),  
  333. 'desc' => "px",  
  334. 'id' => 'sidebar_search_icon_size',  
  335. 'type' => 'slider',  
  336. 'default' => 16,  
  337. 'min' => 8,  
  338. 'max' => 30,  
  339. 'increment' => 1,  
  340. ),  
  341. array( 
  342. 'name' => __( 'Search Icon Colour', 'woocommerce-predictive-search' ),  
  343. 'id' => 'sidebar_search_icon_color',  
  344. 'type' => 'color',  
  345. 'default' => '#555555' 
  346. ),  
  347. array( 
  348. 'name' => __( 'Search Icon Hover Colour', 'woocommerce-predictive-search' ),  
  349. 'id' => 'sidebar_search_icon_hover_color',  
  350. 'type' => 'color',  
  351. 'default' => '#ffffff' 
  352. ),  
  353. array( 
  354. 'name' => __( 'Background Colour', 'woocommerce-predictive-search' ),  
  355. 'id' => 'sidebar_search_icon_bg_color',  
  356. 'type' => 'color',  
  357. 'default' => '#febd69' 
  358. ),  
  359. array( 
  360. 'name' => __( 'Background Hover Colour', 'woocommerce-predictive-search' ),  
  361. 'id' => 'sidebar_search_icon_bg_hover_color',  
  362. 'type' => 'color',  
  363. 'default' => '#f3a847' 
  364. ),  
  365. array( 
  366. 'name' => __( 'Vertical Side Border', 'woocommerce-predictive-search' ),  
  367. 'id' => 'sidebar_search_icon_side_border',  
  368. 'type' => 'border_styles',  
  369. 'default' => array( 'width' => '0px', 'style' => 'solid', 'color' => '#febd69' ),  
  370. ),  
  371.  
  372. array( 
  373. 'name' => __( 'Search Input Box', 'woocommerce-predictive-search' ),  
  374. 'type' => 'heading',  
  375. 'id' => 'predictive_search_input_box',  
  376. 'is_box' => true,  
  377. ),  
  378. array( 
  379. 'name' => __( 'Input Font', 'woocommerce-predictive-search' ),  
  380. 'id' => 'sidebar_input_font',  
  381. 'type' => 'typography',  
  382. 'default' => array( 'size' => '12px', 'line_height' => '1.4em', 'face' => 'Arial, sans-serif', 'style' => 'normal', 'color' => '#111111' ) 
  383. ),  
  384. array( 
  385. 'name' => __( 'Input Padding', 'woocommerce-predictive-search' ),  
  386. 'id' => 'sidebar_input_padding',  
  387. 'type' => 'array_textfields',  
  388. 'ids' => array( 
  389. array( 'id' => 'sidebar_input_padding_tb',  
  390. 'name' => __( 'Top/Bottom', 'woocommerce-predictive-search' ),  
  391. 'class' => '',  
  392. 'css' => 'width:40px;',  
  393. 'default' => '6' ),  
  394. array( 'id' => 'sidebar_input_padding_lr',  
  395. 'name' => __( 'Left/Right', 'woocommerce-predictive-search' ),  
  396. 'class' => '',  
  397. 'css' => 'width:40px;',  
  398. 'default' => '10' ),  
  399. ),  
  400. array( 
  401. 'name' => __( 'Input Background Colour', 'woocommerce-predictive-search' ),  
  402. 'id' => 'sidebar_input_bg_color',  
  403. 'type' => 'bg_color',  
  404. 'default' => array( 'enable' => 1, 'color' => '#ffffff' ) 
  405. ),  
  406. array( 
  407. 'name' => __( 'Loading Icon Size', 'woocommerce-predictive-search' ),  
  408. 'desc' => "px",  
  409. 'id' => 'sidebar_loading_icon_size',  
  410. 'type' => 'slider',  
  411. 'default' => 16,  
  412. 'min' => 8,  
  413. 'max' => 30,  
  414. 'increment' => 1,  
  415. ),  
  416. array( 
  417. 'name' => __( 'Loading Icon Colour', 'woocommerce-predictive-search' ),  
  418. 'id' => 'sidebar_loading_icon_color',  
  419. 'type' => 'color',  
  420. 'default' => '#555555' 
  421. ),  
  422.  
  423. array( 
  424. 'name' => __( 'Results Dropdown Container', 'woocommerce-predictive-search' ),  
  425. 'type' => 'heading',  
  426. 'id' => 'predictive_search_popup_result_box',  
  427. 'is_box' => true,  
  428. ),  
  429. array( 
  430. 'name' => __( 'Dropdown Wide', 'woocommerce-predictive-search' ),  
  431. 'id' => 'popup_wide',  
  432. 'type' => 'switcher_checkbox',  
  433. 'default' => 'input_wide',  
  434. 'checked_value' => 'input_wide',  
  435. 'unchecked_value' => 'full_wide',  
  436. 'checked_label' => __( 'Input Wide', 'woocommerce-predictive-search' ),  
  437. 'unchecked_label' => __( 'Full Wide', 'woocommerce-predictive-search' ),  
  438. ),  
  439. array( 
  440. 'name' => __( 'Container Border', 'woocommerce-predictive-search' ),  
  441. 'id' => 'sidebar_popup_border',  
  442. 'type' => 'border',  
  443. 'default' => array( 'width' => '1px', 'style' => 'solid', 'color' => '#c2c2c2', 'corner' => 'square' , 'top_left_corner' => 0 , 'top_right_corner' => 0 , 'bottom_left_corner' => 0 , 'bottom_right_corner' => 0 ),  
  444. ),  
  445.  
  446. array( 
  447. 'name' => __( 'Results Dropdown Section Titles', 'woocommerce-predictive-search' ),  
  448. 'type' => 'heading',  
  449. 'id' => 'predictive_search_popup_result_title_box',  
  450. 'is_box' => true,  
  451. ),  
  452. array( 
  453. 'name' => __( 'Title Font', 'woocommerce-predictive-search' ),  
  454. 'id' => 'sidebar_popup_heading_font',  
  455. 'type' => 'typography',  
  456. 'default' => array( 'size' => '12px', 'line_height' => '1.4em', 'face' => 'Arial, sans-serif', 'style' => 'bold', 'color' => '#000000' ),  
  457. ),  
  458. array( 
  459. 'name' => __( 'Title Padding', 'woocommerce-predictive-search' ),  
  460. 'id' => 'sidebar_popup_heading_padding',  
  461. 'type' => 'array_textfields',  
  462. 'ids' => array( 
  463. array( 'id' => 'sidebar_popup_heading_padding_tb',  
  464. 'name' => __( 'Top/Bottom', 'woocommerce-predictive-search' ),  
  465. 'class' => '',  
  466. 'css' => 'width:40px;',  
  467. 'default' => '3' ),  
  468. array( 'id' => 'sidebar_popup_heading_padding_lr',  
  469. 'name' => __( 'Left/Right', 'woocommerce-predictive-search' ),  
  470. 'class' => '',  
  471. 'css' => 'width:40px;',  
  472. 'default' => '10' ),  
  473. ),  
  474. array( 
  475. 'name' => __( 'Container Border Bottom', 'woocommerce-predictive-search' ),  
  476. 'id' => 'sidebar_popup_heading_border',  
  477. 'type' => 'border_styles',  
  478. 'default' => array( 'width' => '0px', 'style' => 'solid', 'color' => '#c2c2c2' ),  
  479. ),  
  480. array( 
  481. 'name' => __( 'Container Background', 'woocommerce-predictive-search' ),  
  482. 'id' => 'sidebar_popup_heading_bg_color',  
  483. 'type' => 'color',  
  484. 'default' => '#f2f2f2',  
  485. ),  
  486.  
  487. array( 
  488. 'name' => __( 'Results Dropdown Items', 'woocommerce-predictive-search' ),  
  489. 'type' => 'heading',  
  490. 'id' => 'predictive_search_popup_result_items_box',  
  491. 'is_box' => true,  
  492. ),  
  493. array( 
  494. 'name' => __( 'Item Padding', 'woocommerce-predictive-search' ),  
  495. 'id' => 'sidebar_popup_item_padding',  
  496. 'type' => 'array_textfields',  
  497. 'ids' => array( 
  498. array( 'id' => 'sidebar_popup_item_padding_tb',  
  499. 'name' => __( 'Top/Bottom', 'woocommerce-predictive-search' ),  
  500. 'class' => '',  
  501. 'css' => 'width:40px;',  
  502. 'default' => '6' ),  
  503. array( 'id' => 'sidebar_popup_item_padding_lr',  
  504. 'name' => __( 'Left/Right', 'woocommerce-predictive-search' ),  
  505. 'class' => '',  
  506. 'css' => 'width:40px;',  
  507. 'default' => '10' ),  
  508. ),  
  509. array( 
  510. 'name' => __( 'Item Border Bottom', 'woocommerce-predictive-search' ),  
  511. 'id' => 'sidebar_popup_item_border',  
  512. 'type' => 'border_styles',  
  513. 'default' => array( 'width' => '0px', 'style' => 'solid', 'color' => '#c2c2c2' ),  
  514. ),  
  515. array( 
  516. 'name' => __( 'Item Border Bottom Hover Colour', 'woocommerce-predictive-search' ),  
  517. 'id' => 'sidebar_popup_item_border_hover_color',  
  518. 'type' => 'color',  
  519. 'default' => '#6d84b4',  
  520. ),  
  521. array( 
  522. 'name' => __( 'Item Background Colour', 'woocommerce-predictive-search' ),  
  523. 'id' => 'sidebar_popup_item_bg_color',  
  524. 'type' => 'color',  
  525. 'default' => '#ffffff',  
  526. ),  
  527. array( 
  528. 'name' => __( 'Item Background Hover Colour', 'woocommerce-predictive-search' ),  
  529. 'id' => 'sidebar_popup_item_bg_hover_color',  
  530. 'type' => 'color',  
  531. 'default' => '#6d84b4',  
  532. ),  
  533. array( 
  534. 'name' => __( 'Item Image Size', 'woocommerce-predictive-search' ),  
  535. 'desc' => "px",  
  536. 'id' => 'sidebar_popup_item_image_size',  
  537. 'type' => 'slider',  
  538. 'default' => 64,  
  539. 'min' => 32,  
  540. 'max' => 96,  
  541. 'increment' => 1,  
  542. ),  
  543. array( 
  544. 'name' => __( 'Product Name Font', 'woocommerce-predictive-search' ),  
  545. 'id' => 'sidebar_popup_product_name_font',  
  546. 'type' => 'typography',  
  547. 'default' => array( 'size' => '12px', 'line_height' => '1.4em', 'face' => 'Arial, sans-serif', 'style' => 'bold', 'color' => '#3b5998' ),  
  548. ),  
  549. array( 
  550. 'name' => __( 'Product Name Hover Colour', 'woocommerce-predictive-search' ),  
  551. 'id' => 'sidebar_popup_product_name_hover_color',  
  552. 'type' => 'color',  
  553. 'default' => '#ffffff',  
  554. ),  
  555. array( 
  556. 'name' => __( 'Product SKU Font', 'woocommerce-predictive-search' ),  
  557. 'id' => 'sidebar_popup_product_sku_font',  
  558. 'type' => 'typography',  
  559. 'default' => array( 'size' => '12px', 'line_height' => '1.4em', 'face' => 'Arial, sans-serif', 'style' => 'normal', 'color' => '#3b5998' ),  
  560. ),  
  561. array( 
  562. 'name' => __( 'Product SKU Hover Colour', 'woocommerce-predictive-search' ),  
  563. 'id' => 'sidebar_popup_product_sku_hover_color',  
  564. 'type' => 'color',  
  565. 'default' => '#ffffff',  
  566. ),  
  567. array( 
  568. 'name' => __( 'Product Price Font', 'woocommerce-predictive-search' ),  
  569. 'id' => 'sidebar_popup_product_price_font',  
  570. 'type' => 'typography',  
  571. 'default' => array( 'size' => '12px', 'line_height' => '1.4em', 'face' => 'Arial, sans-serif', 'style' => 'normal', 'color' => '#000000' ),  
  572. ),  
  573. array( 
  574. 'name' => __( 'Product Price Hover Colour', 'woocommerce-predictive-search' ),  
  575. 'id' => 'sidebar_popup_product_price_hover_color',  
  576. 'type' => 'color',  
  577. 'default' => '#ffffff',  
  578. ),  
  579. array( 
  580. 'name' => __( 'Product Description Font', 'woocommerce-predictive-search' ),  
  581. 'id' => 'sidebar_popup_product_desc_font',  
  582. 'type' => 'typography',  
  583. 'default' => array( 'size' => '12px', 'line_height' => '1.4em', 'face' => 'Arial, sans-serif', 'style' => 'normal', 'color' => '#000000' ),  
  584. ),  
  585. array( 
  586. 'name' => __( 'Product Description Hover Colour', 'woocommerce-predictive-search' ),  
  587. 'id' => 'sidebar_popup_product_desc_hover_color',  
  588. 'type' => 'color',  
  589. 'default' => '#ffffff',  
  590. ),  
  591. array( 
  592. 'name' => __( 'Product Stock Qty Font', 'woocommerce-predictive-search' ),  
  593. 'id' => 'sidebar_popup_product_stock_qty_font',  
  594. 'type' => 'typography',  
  595. 'default' => array( 'size' => '12px', 'line_height' => '1.4em', 'face' => 'Arial, sans-serif', 'style' => 'normal', 'color' => '#000000' ),  
  596. ),  
  597. array( 
  598. 'name' => __( 'Product Stock Qty Hover Colour', 'woocommerce-predictive-search' ),  
  599. 'id' => 'sidebar_popup_product_stock_qty_hover_color',  
  600. 'type' => 'color',  
  601. 'default' => '#ffffff',  
  602. ),  
  603. array( 
  604. 'name' => __( 'Product Category Font', 'woocommerce-predictive-search' ),  
  605. 'id' => 'sidebar_popup_product_category_font',  
  606. 'type' => 'typography',  
  607. 'default' => array( 'size' => '12px', 'line_height' => '1.4em', 'face' => 'Arial, sans-serif', 'style' => 'normal', 'color' => '#000000' ),  
  608. ),  
  609. array( 
  610. 'name' => __( 'Product Category Link Hover Colour', 'woocommerce-predictive-search' ),  
  611. 'id' => 'sidebar_popup_product_category_link_hover_color',  
  612. 'type' => 'color',  
  613. 'default' => '#ffffff',  
  614. ),  
  615. array( 
  616. 'name' => __( "Product 'Category' Colour", 'woocommerce-predictive-search' ),  
  617. 'id' => 'sidebar_popup_product_category_color',  
  618. 'desc' => __( 'Category: word text colour', 'woocommerce-predictive-search' ),  
  619. 'type' => 'color',  
  620. 'default' => '#000000',  
  621. ),  
  622. array( 
  623. 'name' => __( "Product 'Category' Hover Colour", 'woocommerce-predictive-search' ),  
  624. 'id' => 'sidebar_popup_product_category_hover_color',  
  625. 'desc' => __( 'Category: word text colour on hover', 'woocommerce-predictive-search' ),  
  626. 'type' => 'color',  
  627. 'default' => '#ffffff',  
  628. ),  
  629.  
  630. array( 
  631. 'name' => __( 'Results Dropdown Footer', 'woocommerce-predictive-search' ),  
  632. 'type' => 'heading',  
  633. 'id' => 'predictive_search_popup_result_footer_box',  
  634. 'is_box' => true,  
  635. ),  
  636. array( 
  637. 'name' => __( 'Footer Padding', 'woocommerce-predictive-search' ),  
  638. 'id' => 'sidebar_popup_footer_padding',  
  639. 'type' => 'array_textfields',  
  640. 'ids' => array( 
  641. array( 'id' => 'sidebar_popup_footer_padding_tb',  
  642. 'name' => __( 'Top/Bottom', 'woocommerce-predictive-search' ),  
  643. 'class' => '',  
  644. 'css' => 'width:40px;',  
  645. 'default' => '3' ),  
  646. array( 'id' => 'sidebar_popup_footer_padding_lr',  
  647. 'name' => __( 'Left/Right', 'woocommerce-predictive-search' ),  
  648. 'class' => '',  
  649. 'css' => 'width:40px;',  
  650. 'default' => '10' ),  
  651. ),  
  652. array( 
  653. 'name' => __( 'Footer Background Colour', 'woocommerce-predictive-search' ),  
  654. 'id' => 'sidebar_popup_footer_bg_color',  
  655. 'type' => 'color',  
  656. 'default' => '#f2f2f2',  
  657. ),  
  658. array( 
  659. 'name' => __( 'See More Text', 'woocommerce-predictive-search' ),  
  660. 'id' => 'sidebar_popup_seemore_text',  
  661. 'type' => 'text',  
  662. 'default' => __( "See more search results for '%s' in:", 'woocommerce-predictive-search' ),  
  663. ),  
  664. array( 
  665. 'name' => __( 'See More Font', 'woocommerce-predictive-search' ),  
  666. 'id' => 'sidebar_popup_seemore_font',  
  667. 'type' => 'typography',  
  668. 'default' => array( 'size' => '10px', 'line_height' => '1.4em', 'face' => 'Arial, sans-serif', 'style' => 'bold', 'color' => '#999999' ),  
  669. ),  
  670. array( 
  671. 'name' => __( 'More Link Font', 'woocommerce-predictive-search' ),  
  672. 'id' => 'sidebar_popup_more_link_font',  
  673. 'type' => 'typography',  
  674. 'default' => array( 'size' => '12px', 'line_height' => '1.4em', 'face' => 'Arial, sans-serif', 'style' => 'bold', 'color' => '#3b5998' ),  
  675. ),  
  676. array( 
  677. 'name' => __( 'More Icon Size', 'woocommerce-predictive-search' ),  
  678. 'desc' => "px",  
  679. 'id' => 'sidebar_popup_more_icon_size',  
  680. 'type' => 'slider',  
  681. 'default' => 12,  
  682. 'min' => 8,  
  683. 'max' => 24,  
  684. 'increment' => 1,  
  685. ),  
  686. array( 
  687. 'name' => __( 'More Icon Colour', 'woocommerce-predictive-search' ),  
  688. 'id' => 'sidebar_popup_more_icon_color',  
  689. 'type' => 'color',  
  690. 'default' => '#3b5998' 
  691. ),  
  692.  
  693. )); 
  694.  
  695. public function include_script() { 
  696. wp_enqueue_script( 'jquery-rwd-image-maps' ); 
  697. ?> 
  698. <script> 
  699. (function($) { 
  700.  
  701. $(document).ready(function() { 
  702.  
  703. }); 
  704.  
  705. })(jQuery); 
  706. </script> 
  707. <?php