https://github.com/beapi/bea-post-status-admin
Handle the post status on the admin
https://github.com/beapi/bea-post-status-admin
Last synced: 8 months ago
JSON representation
Handle the post status on the admin
- Host: GitHub
- URL: https://github.com/beapi/bea-post-status-admin
- Owner: BeAPI
- License: gpl-2.0
- Created: 2014-11-08T10:46:24.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2023-07-18T07:39:30.000Z (over 2 years ago)
- Last Synced: 2025-04-22T15:11:57.279Z (8 months ago)
- Language: PHP
- Homepage:
- Size: 26.4 KB
- Stars: 5
- Watchers: 17
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Bea post status Admin
==
Registering post_status on WordPress does not display an interface for it.
With this plugin you can display the new Post status to the admin interface and interact with it !
Usage
==
```
// Add post status
add_action( 'bea/psa/register', 'init_post_status' );
function init_post_status( $class ) {
register_post_status( 'refused', array(
'label' => 'Refused',
'public' => true,
'exclude_from_search' => true,
'show_in_admin_all_list' => true,
'show_in_admin_status_list' => true,
'label_count' => _n_noop( 'Refused (%s)', 'Refused (%s)' ),
) );
// Add the post_status admin interface
/**
Here you can add the post status to a post type and choose the submit button text if you choose the
post_status on the select.
*/
$class::register_status( 'refused', array( "post" ), 'Refuse the post' );
}```
Caution
==
In this plugin version, there is no checks on the user role or capabilities, so this just add the interface and that's it !