<form_key>_settings_fields

The WordPress Core form key settings fields hook.

Description

apply_filters( '<form_key>_settings_fields', (array) $array ); 

Parameters (1)

0. $array — Optional. (array) => array( array( 'name' => __( 'HEADER TEMPLATE PREMIUM', 'woocommerce-predictive-search' ), 'type' => 'heading', 'desc' => '', 'alway_open'=> true, 'id' => 'predictive_search_container_box', 'is_box' => true, ),)
The array.

Usage

To run the hook, copy the example below.
  1. $array = apply_filters( '{$form_key}_settings_fields', $array ); 
  2.  
  3. if ( !empty( $array ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the <form_key>_settings_fields callback 
  2. function filter_form_key_settings_fields( $array ) { 
  3. // make filter magic happen here... 
  4. return $array
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( "{$form_key}_settings_fields", 'filter_form_key_settings_fields', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( "{$form_key}_settings_fields", 'filter_form_key_settings_fields', 10, 1 ); 

Defined (2)

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

/admin/settings/header-template-settings.php  
  1. $this->form_fields = apply_filters( $this->form_key . '_settings_fields', array( 
/admin/settings/sidebar-template-settings.php  
  1. $this->form_fields = apply_filters( $this->form_key . '_settings_fields', array(