/**
* WordPress 更改文章密码保护后显示的提示内容
* http://www.wpdaxue.com/change-password-protected-text.html
*/
function password_protected_change( $content ) {
global $post;
if ( ! empty( $post->post_password ) && stripslashes( $_COOKIE['wp-postpass_'.COOKIEHASH] ) != $post->post_password ) {
$output = '
';
return $output;
} else {
return $content;
}
}
add_filter( 'the_content','password_protected_change' );