wc_ps_search_form_header_tpl

Wc_ps_search_form_header_tpl().

Description

wc_ps_search_form_header_tpl( $ps_id, (array) $args = array() ); 

Parameters (2)

0. $ps_id
The ps id.
1. $args — Optional. (array) => array()
The args.

Usage

  1. if ( !function_exists( 'wc_ps_search_form_header_tpl' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-predictive-search-lite/includes/wc-predictive-template-functions.php'; 
  3.  
  4. // The ps id. 
  5. $ps_id = null; 
  6.  
  7. // The args. 
  8. $args = array(); 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = wc_ps_search_form_header_tpl($ps_id, $args); 
  12.  

Defined (1)

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

/includes/wc-predictive-template-functions.php  
  1. function wc_ps_search_form_header_tpl( $ps_id, $args = array() ) { 
  2. global $wc_predictive_search_header_template_settings; 
  3.  
  4. if ( ! is_array( $args ) ) { 
  5. $args = array(); 
  6.  
  7. $args['popup_wide'] = $wc_predictive_search_header_template_settings['popup_wide']; 
  8. $args['cat_align'] = $wc_predictive_search_header_template_settings['header_category_dropdown_align']; 
  9. $args['cat_max_wide'] = $wc_predictive_search_header_template_settings['header_category_dropdown_max_wide']; 
  10.  
  11. wc_ps_get_template( 'search-bar/predictive-search-form-header.php',  
  12. apply_filters( 'wc_ps_search_form_header_tpl_args', array( 
  13. 'ps_id' => $ps_id,  
  14. 'ps_widget_template' => 'header',  
  15. 'ps_args' => $args 
  16. ) ) 
  17. );