register_post_status
is used for creating a custom post status. The protected argument, if true, specifies that a user must be logged in and have edit permissions on the post to view (preview) it.
For example, you said that the “draft” post status has protected
set to true. This means that you can only view (preview) the draft post if you have permission to edit the post. Once the post is published, the protected
parameter is turned off and anyone can view it.
If you are creating your own custom status, you might want it to be protected. For example, you could have a post status called “on_hold”, and when you set a post to that status, it would no longer be visible to the public, but still visible to the administrators of your site.
Related Posts:
- Is it possible to have more “levels” of draft/published statuses?
- how to assign a status/mark to post?
- Why doesn’t wp_update_post() update the post_status field?
- register_post_status and show_in_admin_all_list
- Changing post status in one click
- How can I run custom function when post status is changed?
- WP_Post_List_Table::get_views – Have post counts account for filters?
- Creating/editing custom ‘post-state’
- Using arbitrary post status without registering it
- Get a list of ALL Statuses both registered and built-in
- Adding custom post status to visibility in publish meta box
- Changing post status
- Change scheduled posts to published
- Include Drafts or Future posts with count_user_posts?
- Remove ‘private’ and ‘pending review’ options from post status dropdown
- Can not get future_to_publish to work
- Which is the better way to get the status of a post?
- “Publish immediately” with custom post status
- Modify Post Status Arguments
- Additional page and post status types
- Add a simple JS Alert Box on Post Submission
- Function to change post status IF current user and post author are the same
- Schedule future post to custom post status instead of publish?
- Why does get_post_status display published when attachment is in trash?
- Force Custom Post Type Status to ‘Future’ on first Save or Publish
- Workflow for attachments in WordPress
- how to transition to custom post status on post save
- How to change custom post type status when non-admin updates post?
- Custom post status filter links always show a count of all posts in the site with that status, not the logged in users count
- wordpress post status inquery
- Multiple Post Status
- retrieve post details in loop
- Any way to change post/page status when editing page?
- How to change post status from “draft” to “publish”?
- transition_post_status doesn’t work with bulk updates
- Submitted for Review back to a Draft page
- How to Add Custom Post Status in WordPress Admin
- Auto draft posts when scheduled date is reached
- Changing a post status name
- How to update post status to draft if user role is “pending’
- How to create posts with a specific date in bulk
- WordPress 5.3 update causes media library file upload to break – Cannot convert undefined or null to object
- is it possible to replace the use of gd_lib with imagick or ImageMagick?
- How to change “Draft” string for status of custom post type to “Unavailable”?
- Passing a hardcoded page/post ID into `get_post`
- HowTo: Add Class to Sidebar Widget List-Items
- How would I compare and remove hacks to core?
- Changing subdir multisite install to subdir core directory structure
- How to listen to color changes on the color picker?
- Change Password Hint
- How to remove X-Frame-Options: SAMEORIGIN” from WordPress?
- Custom Post Status not showing in Custom Post Type ALL view
- Bulk Update of Custom Post Type Post Status through SQL
- Setting post meta data to random value during post status transition / on publish
- What action is called when drafts are saved?
- Function to change a label (Username) in a core WordPress File (wp-includes/general-template.php)
- Custom Post Status Posts viewable to the public
- How can i know when i can execute what functions of wordpress?
- Render Selected Categories in Admin Edit Post Screen differently
- Get images only if parent status is publish
- Create front end link to save post (or unpublish post) as draft
- Hook before & after plugin / core update
- What problems maybe happen if I remove “wp-” prefix from wordpress folders and files?
- What differences are there between a Privately Published post and a Draft post?
- Auto-generated posts not showing in backend (but being counted!)
- Change sticky status of posts from phpMyAdmin
- In what part of the WordPress core does the users table and usermeta table get joined?
- What is the WP_Internal_Pointers core class?
- How to limit post of custom post status?
- How to overwrite / extent wordpress function is_email
- Change post status based on user role
- Save author posts as in pending review – block users updating their posts
- Check for security updates
- How to override default WordPress core language file
- Custom Status of Custom Post type need to EXCLUDE from Taxonomy pages
- Wrong post_status notice after wp_insert_post_data
- Weird behavior of Dashboard, must be core files
- WordPress action hooks related to scheduled posts not Fired
- Removing all post statuses from a Custom Post Type
- Are all hooks/functions tied to Kses meant for sanitization?
- Admin – create custom post status and display above table
- WordPress capabilities on pending post status
- Timezone is wrong when picking city (Copenhagen)
- How to edit the Tags within the image file URLs?
- Location of core code for database connection and get_header
- Allowed memory size of 33554432 bytes exhausted (tried to allocate 9967617 bytes) in …\wp-includes\functions.php
- Where’s the explanation of the TinyMCE’s vars in the WP core?
- How to add custom status to quick edit
- Change status of page after an event (Looking for best practice advice)
- wp-cli core install –skip-email and –skip-config flags not working on MAMP unknown parameter
- WordPress post_status and meta_query
- Sql Update CPT from publish to draft and particular custom field
- Why does DROP TABLE-ing the `wp_options` reset my user session?
- wp.getPosts with status = ‘trash’ using node.js
- Do something when user creates post (that’s pending)
- What is responsible for triggering “robots-template.php” file or “wp_robots_noindex()” core function out of it?
- After a while attachment meta data is missing “sizes” data
- Set post status to draft after validating post meta values in save_post hook
- change div text and link for logged in users
- WordPress Includes mejs 404 error