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
- How to change a user’s password programatically
- Create a table in custom plugin on the activating it?
- How would you require and automatically download dependent plugins?
- Add section (add_settings_section) to a custom page (add_submenu_page)
- Load plugin selectively for pages or posts, etc
- Can i create two tables at single time while installation of custom plugin?
- Plugin for changing a post’s category based on it’s post date?
- How does WooCommerce display a custom comment_type in Comment Admin?
- How to display public user profile with 2 additional fields? (GitHub source code included)
- How to make my plugin GDPR compatible?
- Scope for PHP Variables Assigned in functions.php or a plugin
- How to make a custom field as an editor in wordpress?
- Why is an action callback function from an instance of a class always invoking the same function from an instance?
- JS Support Ticket – Auto create WP account
- Python with wordpress plugin
- Passing an array from shortcode-function to filter-function
- How to allow an editor to edit all WordPress blog posts but have the last say as administrator?
- WP_Async_Task doesn’t appear to be running asynchronously
- How to delete custom taxonomy terms in plugin’s uninstall.php?
- What are the Best Practises When Using AJAX in Plugin Development?
- Setup wp_schedule_event within a custom plugin
- execute function after one completed
- How can I run a custom shortcode function on a live site and only run if the viewer is a specific machine?
- How to Resize the Custom Post Images?
- Upload files to the plugin menu
- Class or function wrapper for plugin code
- Licensing a Plugin [closed]
- Add a function call after content automatically?
- WordPress plugin with its own “site”/theme
- Why the internal link get converted into a comment?
- Security of a WordPress Plugin
- Grouping imported products and showing variations based on selected product
- Shortcode do not return the right data in post
- Ultimate Members Default Post Layout problem
- How to define the slug for my custom plugin?
- Avoid WordPress header bar when form submission using admin_post in the frontend
- Set “Open in New tab” as default option
- Generate and send ICS file through WordPress
- Field salespeople task management
- Change localization only for plugin
- How to get author developer link on plugin page
- wp_schedule_event need to deactivate plugin changing recurrance
- A more elegant way to handle notices/warnings
- Redirect default login page to a custom page [duplicate]
- appointment plugin doesn’t display all appointments
- Doing action based on input from options menu
- Create New Admin Menu Section – Like how custom post type works, in a way
- Customize Multi-Column Tag Map to fetch specific post-type
- Combining JS files to one script
- What are the downsides of using bootstrap in plugin development?
- How to generate a responsive output from plugin?
- The plugin generated xxx characters of unexpected output during activation
- Shortcode returning specific content of a post
- How do i fix this error?