cptui_admin_notice

Filters the custom admin notice for CPTUI.

Description

apply_filters( 'cptui_admin_notice', (string) $messagewrapstart_message_messagewrapend, (string) $action, (string) $message, (string) $messagewrapstart, (string) $messagewrapend ); 

Parameters (5)

0. $messagewrapstart_message_messagewrapend (string)
The messagewrapstart message messagewrapend.
1. $action (string)
Action whose message is being generated.
2. $message (string)
The message to be displayed.
3. $messagewrapstart (string)
The messagewrapstart.
4. $messagewrapend (string)
The messagewrapend.

Usage

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

Defined (2)

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

/inc/utility.php  
  1. return apply_filters( 'cptui_admin_notice', $messagewrapstart . $message . $messagewrapend, $action, $message, $messagewrapstart, $messagewrapend ); 
/custom-post-type-ui.php  
  1. return apply_filters( 'cptui_admin_notice', $messagewrapstart . $message . $messagewrapend, $action, $message, $messagewrapstart, $messagewrapend );