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
- How can I make a custom post status private or draft?
- Changing Post Status from Pending to Publish twice daily
- Difference between core and processor
- Azure VM Core vs vCPU
- What is socket, core, threads, CPU?
- How to Get All Posts with any post status?
- Explanation of update_post_(meta/term)_cache
- What’s the difference between get_home_path() and ABSPATH?
- How to check if a user (not current user) is logged in?
- Modifying WordPress core files
- What is the role and history of the $content_width global variable?
- New post status for custom post type
- Why do some core functions get wp_ while others do not? What’s the rule?
- Easiest Way to Create a Patch for Submission to WordPress Core?
- How to update page status from publish to draft and draft to publish
- $GLOBALS array for WordPress
- WordPress 5.3 update causes media library file upload to break – Cannot convert undefined or null to object
- How to disable core and plugin updates
- Looking for WordPress System Diagrams
- What are custom_css and customize_changeset used for?
- IP address whitelist to update WordPress core and plugins
- What are some reasons why you should not hack WordPress core files?
- What is in media-template.php, and how does it work?
- How to Display a List of Users Who Have Made at Least 1 Post?
- Update to older wordpress version from admin?
- Why does get_term() require taxonomy? Are term_ids not unique?
- Turn Off Automatic Trash Deletion?
- wordpress function to change post status [duplicate]
- How To/What triggers a WordPress auto update?
- “Unexpected error” on update requests
- Clarification on filters and hooks
- What’s $object->filter for?
- What is the difference between update_post_meta and update_postmeta hooks?
- Using get_post_meta with new_to_publish
- is it possible to replace the use of gd_lib with imagick or ImageMagick?
- Understanding SHORTINIT with WordPress 5
- Custom column for changing post status via ajax
- WordPress get_posts function, 1300 lines long
- Are the WordPress Core CSS styles really all nessesary?
- Managing WP Core & Plugin Updates for Clients
- How to change “Draft” string for status of custom post type to “Unavailable”?
- How do I use the WP image functions in a page template?
- How to display the status of users (online – offline) in archive.php
- Let private posts stay in status “private” after edit through “editors”
- How to check if page has status published
- Passing a hardcoded page/post ID into `get_post`
- Change the login button on the login page
- How to 301 private posts rather than 404?
- HowTo: Add Class to Sidebar Widget List-Items
- WP_Query by post ID doesn’t work if post is in custom post_status
- WP_Site_Query vs. WP_Network_Query in WordPress 4.6
- Slow wp_term_relationships query
- How would I compare and remove hacks to core?
- How Does WordPress Uninclude/Deactivate A Plugin?
- Rewriting a core function?
- Changing subdir multisite install to subdir core directory structure
- How to disable `SQL_CALC_FOUND_ROWS` [duplicate]
- Why are double-periods (“..”) invalid in a WordPress image filename?
- Does anyone have a visual breakdown of core hooks and when they are fired?