apply_filters( 'learndash_admin_post_stati', array $admin_post_status, string $post_type, array $post_counts )
Filters list of post status shown in the admin.
Description #
Parameters #
- $admin_post_status
-
(array) List of post status shown in the admin.
- $post_type
-
(string) Post Type slug.
- $post_counts
-
(array) An array of number of posts for each status.
Source #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php
/**
* Example usage for learndash_admin_post_stati filter.
*/
add_filter(
'learndash_admin_post_stati',
function( $admin_post_status, $post_type, $post_counts ) {
// May add any custom logic using $admin_post_status, $post_type, $post_counts.
// Always return $admin_post_status.
return $admin_post_status;
},
10,
3
);