ninja_forms_display_fields_array
The Ninja Forms ninja forms display fields array hook.
Description
Parameters (2)
- 0. $field_results (unknown)
- The field results.
- 1. $form_id (unknown)
- The form id.
Usage
- To run the hook, copy the example below.
- $field_results = apply_filters( 'ninja_forms_display_fields_array', $field_results, $form_id );
- if ( !empty( $field_results ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the ninja_forms_display_fields_array callback
- function filter_ninja_forms_display_fields_array( $field_results, $form_id ) {
- // make filter magic happen here...
- return $field_results;
- };
- // add the filter
- add_filter( 'ninja_forms_display_fields_array', 'filter_ninja_forms_display_fields_array', 10, 2 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'ninja_forms_display_fields_array', 'filter_ninja_forms_display_fields_array', 10, 2 );
Defined (1)
The filter is defined in the following location(s).
- /deprecated/includes/display/fields/display-fields.php
- $field_results = apply_filters('ninja_forms_display_fields_array', $field_results, $form_id);