nf_notification_admin_js_vars
The Ninja Forms nf notification admin js vars hook.
Description
Parameters (1)
- 0. $array — Optional. (callback) =>
array( 'activate' => __( 'Activate', 'ninja-forms' ), 'deactivate' => __( 'Deactivate', 'ninja-forms' ), 'search_fields' => $search_fields, 'tokens' => array(), 'all_fields' => $fields, 'process_fields' => $process_fields, 'filter_type' => esc_url_raw( remove_query_arg( array( 'type' ) ) ), )
- The array.
Usage
- To run the hook, copy the example below.
- $array = apply_filters( 'nf_notification_admin_js_vars', $array );
- if ( !empty( $array ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the nf_notification_admin_js_vars callback
- function filter_nf_notification_admin_js_vars( $array ) {
- // make filter magic happen here...
- return $array;
- };
- // add the filter
- add_filter( 'nf_notification_admin_js_vars', 'filter_nf_notification_admin_js_vars', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'nf_notification_admin_js_vars', 'filter_nf_notification_admin_js_vars', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /deprecated/classes/notifications.php
- $js_vars = apply_filters( 'nf_notification_admin_js_vars', array(