draft post and publish post manage

Sure it is – you can use the wp_insert_post_data filter: function no_going_back_to_draft($slashed_data , $post_data) { if($slashed_data[‘post_status’] == ‘draft’) { // we’re only interested in posts being saved as “drafts” $user = wp_get_current_user(); if ( in_array( ‘no-going-back-to-draft-role’, (array) $user->roles ) ) { // we’re only interested in users with that special, restricted role $post = get_post($post_data[‘ID’]); … Read more

Include drafts in internal link dialog

This is very similar to this question. We have to hook into check_ajax_referer to address the internal linking feature only. Then we register an action for pre_get_posts to extend the search to drafts and pending posts. We will still get no pretty permalinks, because they are excluded in get_permalink. So we register a filter for … Read more

Custom CSS for viewing a draft page on the frontend?

There is probably a better way but you could add the following CSS to your stylesheet, which will add a little banner when viewing a page that has a status of draft. .status-draft.hentry:before { content: “Previewing a Draft”; background: #87C5D6 !important; display: block; text-align: center; } You could also use these classes for the different … Read more