Filter hook to filter the post password.

This filter can filter the autogenerated post password that is created by the plugin to automatically protect comments.  There are some instances where a theme may not work well with this process and will put in the WP protected post dialog.  In these instances, the filter can be used to return a blank post password, thus returning WordPress to thinking the post is not password protected.

The example below demonstrates using the filter to return an empty post password.


(string) The autogenerated password from wp_generate_password.


Introduced in version 2.8.0


wpmem_securify is located in wp-members-core.php


 * Fixes password spoof - the plugin sets a post password to protect
 * the comment form.  In themes where this causes the WP password
 * protected post dialog to display, returning an empty post password
 * should correct the problem.

add_filter( 'wpmem_post_password', 'my_pass_filter' );
function my_pass_filter() {
    return '';

 * Here is the same thing using the __return_empty_string WP function.
 * This allows you to accomplish the same thing as above in a 
 * single line without creating an unnecessary method.  See:

add_filter( 'wpmem_post_password', '__return_empty_string' );

See a list of all filter and action hooks