Closed gmatta01 closed 2 years ago
Hi,
The plugin doesn’t change anything about how the Status API works in WordPress, it just makes it possible to choose the custom status from the WordPress UI and to only apply custom status to given post types. If you need to mimic the pending status you can probably try to use the same way this status is registered by WordPress.
imath https://imathi.eu
De : Gangesh Matta notifications@github.com Envoyé : Monday, December 2, 2019 12:52:48 PM À : imath/wp-statuses wp-statuses@noreply.github.com Cc : Subscribed subscribed@noreply.github.com Objet : [imath/wp-statuses] Admin can not view post if "public" set to false. (#37)
Hello, As in example below, setting "Public" to false, post disappears from admin post list, and can not be previewed either by users with Administrator level.
How can a status behave like a "Pending" status?
function example_register() { register_post_status('assigned', array( 'label' => _x('Assigned', 'post status label', 'plugin-domain'), 'public' => false, 'label_count' => _n_noop('Assigned (%s)', 'Assigned (%s)', 'plugin-domain'), 'post_type' => array('product'), // Define one or more post types the status can be applied to. 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'show_in_metabox_dropdown' => true, 'show_in_inline_dropdown' => true, 'dashicon' => 'dashicons-businessman', )); }
Thanks in advance.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/imath/wp-statuses/issues/37?email_source=notifications&email_token=AAN74HCYMY2SA2WSRPTZUI3QWTZJBA5CNFSM4JTUUCOKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H5HTY3Q, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAN74HBMPI52WKUYAUNZTRLQWTZJBANCNFSM4JTUUCOA.
Hello, As in example below, setting "Public" to false, post disappears from admin post list, and can not be previewed either by users with Administrator level.
How can a status behave like a "Pending" status?
Thanks in advance.