s2_post_statuses
The Subscribe2 s2 post statuses hook.
Description
Parameters (1)
- 0. $array (callback) =>
array('new', 'draft', 'auto-draft', 'pending')
- The array.
Usage
- To run the hook, copy the example below.
- $array = apply_filters( 's2_post_statuses', $array );
- if ( !empty( $array ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the s2_post_statuses callback
- function filter_s2_post_statuses( $array ) {
- // make filter magic happen here...
- return $array;
- };
- // add the filter
- add_filter( 's2_post_statuses', 'filter_s2_post_statuses', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 's2_post_statuses', 'filter_s2_post_statuses', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /classes/class-s2-core.php
- $statuses = apply_filters('s2_post_statuses', array('new', 'draft', 'auto-draft', 'pending'));