Hold the phone: The user levels in WordPress look like they’ve been changed – here’s how to fix it.
Not sure why but the Postie plugin for WordPress has a habit of pooping out bad HTML. I searched the support page for this and there are many fixes suggested but it doesn’t look like anyone has actually fixed the plugin itself. Here’s the fixes I did. They do break localization settings so if you are using WordPress in a language other than English, you might have problems.
In config_form.php – Search for all instances of the localization echo function it’ll look like this
< %php _e("Recommended");?>
And tweak it to just
Recommended
And then in postie-functions.php, find:
function BuildBooleanSelect($label,$id,$current_value,$recommendation = NULL) {
return("<tr>
<th scope=\"row\">". _e($label).":</th>
<td><select name=\"$id\" id=\"$id\">
<option value=\"1\">"._e("Yes")."</option>
<option value=\"0\" ". (!$current_value ? "SELECTED" : NULL) . '>"._e("No")."</option>
</select>
<br /><code>'._e($recommendation).'</code><br/>
</td>
</tr>');
}
and replace it with:
function BuildBooleanSelect($label,$id,$current_value,$recommendation = NULL) {
return("<tr>
<th scope=\"row\">".$label.":</th>
<td><select name=\"$id\" id=\"$id\">
<option value=\"1\">Yes</option>
<option value=\"0\" ". (!$current_value ? "SELECTED" : NULL) . '>No</option>
</select>
<br /><code>'.$recommendation.'</code><br/>
</td>
</tr>');
}
And also find:
function BuildTextArea($label,$id,$current_value,$recommendation = NULL) {
$string = "<tr>
<th scope=\"row\">"._e($label).":</th></tr>";
if ($recommendation) {
$string .= "<tr><td> </td><td><code>"._e($recommendation)."</code></td></tr>";
}
And replace it with
function BuildTextArea($label,$id,$current_value,$recommendation = NULL) {
$string = "<tr>
<th scope=\"row\">".$label.":</th></tr>";
if ($recommendation) {
$string .= "<tr><td> </td><td><code>".$recommendation."</code></td></tr>";
}
If anyone is familiar with why it breaks with localization, fix it!
Leave a Reply