[Plugin: Adman] Plugin bug in 3.4 version
-
Some little adjustments to make it work in 3.4 version (and all previous versions I suppose)
line 66
$adman_disable = get_post_meta($post->ID, ‘adman_disable’, true);
true as the 3rd parameterEdit action was rewritten slightly to save meta to the parent post, not to the revision
function edit_action($id) {$adman_edit = $_POST[“adman_edit”];
if (isset($adman_edit) && !empty($adman_edit)) {
$adman_disable = $_POST[“adman_disable”];$post_id = $id;
if(wp_is_post_revision( $id )){
$post_id = wp_is_post_revision( $id );
}delete_post_meta($post_id, ‘adman_disable’);
if (isset($adman_disable) && !empty($adman_disable)) {
add_post_meta($post_id, ‘adman_disable’, $adman_disable,true);
}
}
}line 155
$disable_adman = htmlspecialchars(stripcslashes(get_post_meta($post_id, ‘adman_disable’, true)));true as the third parameter
line 186
<input type=”checkbox” name=”adman_disable” <?php if ($disable_adman) echo “checked=\”checked\””; ?>/>
making markup strict
- The topic ‘[Plugin: Adman] Plugin bug in 3.4 version’ is closed to new replies.