It is not possible to modify the post submit meta boxes with a filter.
But you can do that with JavaScript. This script will generate 10-12 random alphanumeric string and put it in the password field (if it is empty) when you click the Password protected radio button.
$('#visibility-radio-password').click(function () {
// If there is no password
var $password = $('#post_password')
if ( !$password.val() ) {
$password.val(Math.random().toString(36).slice(2));
}
});
Here you can learn how to correctly add JS scripts to admin pages – https://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts
Related Posts:
- Set page to draft on plugin deactivation
- Get page content using slug
- Change the_title() of a page dynamically
- How to edit the properties of a page programmatically?
- Problems after wp_set_password() containing an apostrophe
- What are the default WordPress password requirements?
- How to change post status in hook?
- How to trap “Publish” button to check for meta box validation?
- Pages 404 in wordpress
- How to create a dynamic page based on form data with a plugin?
- Use an empty page to build custom plugin output
- Is it possible for a plugin to register a page template file?
- How to use wp_set_password in a plugin?
- Dropdown list of pages to get page id to store in plugin options
- Calling a function from functions.php in custom page/ blog post
- How do I approach removing menu items on the fly based on settings in my plugin?
- Set a specific page as 404 – not found via my own plugin
- WordPress password reset – why post rp_key?
- Create a Page via plugin
- Secure Pages Best Practice
- wp_insert_user() function password never match
- Plugin generated virtual pages
- How to modify files inside wp-includes directory in wordpress
- How to get all product in the woo-commerce? [closed]
- ECHO Executing 4 Times In Head
- WordPress pages are not published due to External database connection with WPDB class
- Create page (not the post type) dynamically
- WordPress publish_post hook not getting featured image and meta on first publish, but works on updating title
- Multiple array for post_content on plugin activation
- How to list all images used on a specific page?
- Create fixed static pages
- How can I save a password securely as a settings field
- Using password protection to load different page elements?
- How to create archive page to add in menu
- Load specific page when a custom URL is hit
- Plugin frontend page design irrespective of the theme used
- Custom non-template page on front end fails to render
- WordPress Reset password Strength set to medium
- Use content filter on the post that is password-protected
- How do I control the list of Pages an author can see?
- How to add conent (text) to Add New pages form of admin in WordPress
- auto create only 1 wp page in activate custom plugin
- problem with blank page
- Tracing dashboard publish settings from input form in WordPress
- Create pages for authors
- Plugin SVN folder structure
- How do I use (or mimic) document.getElementById() on a page loaded from WordPress database?
- Send retrieve password notification email with custom HTML email template
- Using a Page Template Not in Theme
- Bulk post approval and publishing doesn’t work
- Generating Multiple Divi Pages from Database
- Problem with Owl Carousel, infinite loop [closed]
- Is there a way to decide from init whether we are on a certain backend page?
- Can a WordPress plugin add read-only pages?
- Objective Best Practices for Plugin Development? [closed]
- add_menu_page() with different name for first submenu item
- Autoloading & Namespaces in WordPress Plugins & Themes: Can it Work?
- How to include PHP files in plugins the correct way
- How can I add an image upload field directly to a custom write panel?
- A tool to analyze rewrite rules? [closed]
- Difference Between Filter and Action Hooks?
- framework for plugin/theme options panel? [closed]
- Creating a table in the admin-style?
- How can you check if you are in a particular page in the WP Admin section? For example how can I check if I am in the Users > Your Profile page?
- Sending the reset password link programatically
- Settings API with arrays example
- How to get the path to the current theme?
- How to make a plugin require another plugin?
- ajaxurl not defined on front end
- What process do you use for WordPress development? [closed]
- What’s the difference between term_id and term_taxonomy_id
- Should I use wpdb prepare?
- Why does WordPress use outdated jQuery v1.12.4?
- Post meta vs separate database tables
- Is there any plugin development framework
- Is it possible to reuse wp.media.editor Modal for dialogs other than media
- How to add a javascript snippet to the footer that requires jQuery
- Enhance Media Manager for Gallery
- How do I create a custom role capability?
- How do I add CSS options to my plugin without using inline styles?
- How do i best handle custom plugin page actions?
- Adding Custom Text Patterns in the WP 4.5 Visual Editor
- Automatically determine minimum WordPress version required for a plugin?
- What is the advantage of using wp_mail?
- How to make a WordPress plugin translation ready?
- How many times will this code run? (or, how rich is grandma?)
- How to create an API for my plugin?
- Is it ever okay to include inline CSS in plugins?
- Plugins in symlinked directories?
- How to override existing plugin action with new action
- How to include a file using get_template_part() in a plugin?
- Add custom TinyMCE 4 Button, Usable since WordPress 3.9-beta1
- How to store username and password to API in wordpress option DB?
- body_class hook for admin pages
- “Error: Options Page Not Found” on Settings Page Submission for an OOP Plugin
- Is it mandatory to use $wpdb->prefix in custom tables
- Which hook should be used to add an action containing a redirect?
- add_action hook for completely new post?
- Why does WordPress add 0 (zero) to an Ajax response?
- What should I use instead of WP_CONTENT_DIR and WP_PLUGIN_DIR?