Description
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.
Parameters
$password
(string) The autogenerated password from wp_generate_password.
Changelog
Introduced in version 2.8.0
Source
wpmem_securify is located in wp-members-core.php
Usage
/** * 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: * http://codex.wordpress.org/Function_Reference/_return_empty_string */ add_filter( 'wpmem_post_password', '__return_empty_string' );