我使用wordpress主题wpcasa,主题更改wordpress的标准文本。
所以我加入了一个主题的过滤器挂钩:
add_filter( \'the_password_form\', \'wpsight_password_form_dmd\' );
function wpsight_password_form_dmd($output){
global $post;
$output = \'\';
$aktuelleseite = $_SERVER[\'REQUEST_URI\'];
$sprache = explode(\'/\',$aktuelleseite);
$label = \'pwbox-\'.( empty( $post->ID ) ? rand() : $post->ID );
$output = \'<form action="\' . get_option( \'siteurl\' ) . \'/wp-login.php?action=postpass" method="post" class="form-password form-inline">\';
switch($sprache[1]){
case \'en\':
$output .= \'<p>Please include your password which we sent you.<br><br>You do not have a password? Than make a request <a href="/en/top-ten-request-form/"><u>here</u></a>.</p>\';
break;
case \'de\':
$output .= \'<p>Bitte geben Sie hier Ihr Passwort ein, welches wir Ihnen gesendet haben.<br><br>Sie haben kein Passwort? Dann fordern Sie <a href="/de/top-ten-zugangsformular/"><u>hier</u></a> eins an.</p>\';
break;
}
$output .= \' <label for="\' . $label . \'">\' . __( \'Password\', \'wpsight\' ) . \'<input name="post_password" id="\' . $label . \'" type="password" size="20" class="password span3" /></label><button type="submit" name="Submit" class="btn">\' . esc_attr__( \'Submit\', \'wpsight\' ) . \'</button></form>\';
return $output;
}
现在一切正常。