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]
- How to include wp-load.php from any location?
- Correct way to enqueue jquery-ui
- How to echo the_excerpt without the P tag wrapper?
- How can I update a wordpress plugin from a Git repository (github)
- Is There a Plugin Life Cycle Documentation?
- What is an alternative method to the WordPress private _doing_it_wrong() function
- Shortcode adding p and br tags
- Problems with localization
- Install and load additional plugins when running unit tests
- How do I hook a custom discount to change a WC_Order price total on WooCommerce?
- Properly licensing a plugin that uses Apache 2.0 licensed code
- Can I dynamically create a link to my plugin settings/options page from my plugin description?
- Cannot search post by taxonomy
- Will current_theme_supports return TRUE with a nonstandard add_theme_support?
- WP AJAX is not working, always returns 0
- Act on user meta updated, but only once
- get_pages Drop down list for selection of a page
- Admin auto-refresh is interfering with Firebug — how to prevent it?
- Display content from custom post without modifying the single template
- How do I add custom column to woocommerce cart?
- WordPress mode for emacs?
- Widget translation on my plugin
- Make WordPress cache permanent for some pages until edited
- Getting timestamp of activation plugin time
- The plugin does not save data
- How do I create plugin or theme using MVC pattern?
- Empty Pdf file generated with FPDF library in WordPress plugin [closed]
- $wpdb->update() always need a second try
- Why aren’t some plugin styles loading when I load a template?
- Pagination not working with custom wp_query
- My plugin won’t create table in wordpress 3.5
- Remove Permalink Meta Box not working?
- WordPress actions for plugin admin UI page
- wp_insert_user keeps echoing values
- Pause plugin option page until all data manipulation is complete
- Modify custom block plugin without losing content
- apply_filters() and call_user_func() to define and call a function outside a class
- HTML Elements in my WP Plugin being generated in JS. Security and Translated Text Question about this method being used
- howTo let wordpress endpoint return html-page
- wp_ajax add_action fuction won’t fire on custom jQuery action
- wordpress4.8.2 Multilingual Plugin
- Create dedicated page with custom template showing custom data
- How can I see a varibles value when my plugin runs?
- WordPress plugin: admin-ajax.php not passing data to custom function
- How do I create Widget within plugin that uses its own class?
- How can I dynamically change title and description in WordPress?
- get the queried_object of an url
- How to get recent one post from each category on home page?