since you’re developing a plug-in, I assume you don’t want to touch any files outside of wp-content/plugins or ../themes for that matter.
However, if that’s not the case, follow along:
Go to wp-admin/includes/meta-boxes.php and find:
$visibility = 'public';
$visibility_trans = __('Public');
Now change it to the obvious:
$visibility = 'private';
$visibility_trans = __('Private');
Again, this affects the meta-boxes.php file which is outside of the plugins folder. Nonetheless, I think the approach you should be taking is creating a new meta box, adding your custom visibility setting (i.e. private) and make the latter override the default WP visibility setting.
Best,
Chris
Related Posts:
- Publish Post After Click On A Link
- Action on post publish
- Show Similar Post Titles ( Similar to Stack Exchange )
- How to add option box in “Edit Post” plugin API?
- How do I unlock a post programmatically?
- How To Ignore a Filter On Applying Filter the Content In a Function
- How to get posts by content?
- HELP: Integrating WP with raw PHP code once published button is hit
- Display future posts?
- How use %like% in sql statement wordpress
- Adding Attachment Display Settings in custom media frame
- Execute a plugin only on post pages
- View Private Published Page with URL Code (no login required)
- finding whether request is for post, and post id
- Display post lists in 2nd paragraph
- Redirect to another page using contact form 7? [closed]
- How to get all posts belongs to a user between a certain date
- Set Multiple Meta Values as an Array Using dispatch( ‘core/editor’ ).editPost() Call in Gutenberg/JS
- how to execute some code after a post is published in WordPress [duplicate]
- Post status doesn’t update to ‘future’ every time?
- Function added to hook “new_to_publish” not executing – custom plugin
- trigger email when post is published by someone a user follows
- Delete data from custom table when deleting a post
- Plugin is creating posts twice
- How to write a new file when new post has been published in WordPress
- How to get Recent Post From Each Category with Thumbnail?
- help intercepting save_post through plugin
- Is it possible to pin a post in second position from top
- Help to Create a Simple Plugin to make a post
- How to display the custom post related blog by category?
- WP Forms not displaying,becomming an fatal error
- How can I see $post object in frontend from functions.php?
- Allow members to create groups on my site
- add tags to wordpress post using REST API
- Prefix WordPress Taxonomy Tags With Hashtag Symbol Like Twitter
- WordPress Product Detail and catalog
- Is it possible to create duplicate post on other site (either push, on publish, or pull, periodically)?
- How can I get the Post ID and Post Type within a Must Use Plugin?
- Get content and send to 3rd party
- Displaying friend’s posts only
- Add new post using a page inside the website
- Get page type to display content
- Capturing POST data
- Custom feed parameters / Template overriding
- Plugin to display text before a post
- warning wp session
- Built a second plugin but it overwrote the first one
- WordPress gtag.js with User ID tracking
- Creating a functionality plugin to edit seriously simple podcasting
- Override plugin class which has namespace
- Plugin temporary files and files to download via FTP
- WordPress Site is Broken, Cannot see wp-admin page [closed]
- Is there a script to collect all hooks and filters provided by a plugin?
- How WordPress core manage the plugin installation
- Flickering sidebar when scrolling page [closed]
- DB Query not working in Plugin
- Is there a plugin or a way in the wordpress that would let us have different versions of a post or page accessibe to users?
- Why is my WordPress Plugin page requesting my FTP Login Credentials?
- add seperate suffix for low price and high price in woocommerce
- Moving FB comments at the end of page
- Cross Sells are not being shown in Cart Page. Please Help!
- Where Should i write the code for wordpress ajax voting?
- Error with get_price (and others) in self-written plugin to show price
- WordPress Fatal Errors [closed]
- Minimize and Uglify WordPress Plugin Files
- YOAST Seo xmlsitemap menu item not showing in the dashboard [closed]
- Change the number of plugins counted on wp-admin/plugins.php
- Translation issue with global variables
- plugin uninstall function drop the tables, but shows errors on admin
- download button for audio file in post [closed]
- How to use template inside plugin shortcode with variables for big HTML code
- check uncategorized category by default
- Print posts category or tag as a formatted journal
- Switch from wp-cron to a server cron job
- show my own admin_notices after a post has been published
- Asynchronous request in wordpress
- How to add a WordPress Nonce for this form to avoid CSRF
- Correct Plugin File Path
- strange shortcode error: does shortcodes requires any dependency?
- Overriding current theme files via plugin
- How do I add an options page at the bottom of the list?
- Development of plugins to add components like JqueryUI
- How to create a plugin that includes all the other plugins?
- plugin enqueue style on all pages
- How to ignore extra whitespaces in translation functions like _e?
- How does translation (gettext) work for translating config file of plugin?
- wp_loaded with static Singleton
- How to remove a CPT Menu from the Root Admin only
- Get post_id on clicking a link in WordPress
- WordPress.org: How to add a plugin for certain countries?
- How to delete all categories programatically?
- How to use custom Javascript code inside a plugin?
- Make plugin php file called directly aware of WordPress?
- How to remove menus items from Menu section from WordPress theme customizer
- Search users with custom meta data
- Why is it important to check for isset and is_array before checking in_array in this example?
- sending different email notification while registration based on user role
- Upload files to the plugin menu
- How to add/change (woocommerce) product tab icon
- Class or function wrapper for plugin code