messages_notice_get_total_notice_count
Filters the total number of notices.
Description
Parameters (1)
- 0. $notice_count (number)
- The notice count.
Usage
- To run the hook, copy the example below.
- $notice_count = apply_filters( 'messages_notice_get_total_notice_count', $notice_count );
- if ( !empty( $notice_count ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the messages_notice_get_total_notice_count callback
- function filter_messages_notice_get_total_notice_count( $notice_count ) {
- // make filter magic happen here...
- return $notice_count;
- };
- // add the filter
- add_filter( 'messages_notice_get_total_notice_count', 'filter_messages_notice_get_total_notice_count', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'messages_notice_get_total_notice_count', 'filter_messages_notice_get_total_notice_count', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /bp-messages/classes/class-bp-messages-notice.php
- return (int) apply_filters( 'messages_notice_get_total_notice_count', $notice_count );