nf_admin_notices
The Ninja Forms nf admin notices hook.
Description
Parameters (1)
- 0. $admin_notices (unknown)
- The admin notices.
Usage
- To run the hook, copy the example below.
- $admin_notices = apply_filters( 'nf_admin_notices', $admin_notices );
- if ( !empty( $admin_notices ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the nf_admin_notices callback
- function filter_nf_admin_notices( $admin_notices ) {
- // make filter magic happen here...
- return $admin_notices;
- };
- // add the filter
- add_filter( 'nf_admin_notices', 'filter_nf_admin_notices', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'nf_admin_notices', 'filter_nf_admin_notices', 10, 1 );
Defined (2)
The filter is defined in the following location(s).
- /ninja-forms.php
- self::$instance->notices->admin_notice( apply_filters( 'nf_admin_notices', $admin_notices ) );
- /deprecated/ninja-forms.php
- $admin_notices = apply_filters( 'nf_admin_notices', array() );