After update to php 8.0 this error was displayed on a packend page
]]>I have debug turned on, and I’m getting the above-captioned notice in my debug log. It references line 107.
I see that the plugin has not been updated in a while, and perhaps you don’t intend to do so any time soon. But if you could at least provide instructions on how to patch this, it would be appreciated.
Might it be as simple as adding this…
isset($_POST['html_mode_lock_nonce']) ) &&
… before this…
!wp_verify_nonce([etc]
?
]]>Would these 2 fixes make sense to add? Logs seems to hint yes.
First is “PHP Notice: Undefined index:”
Around line 124 isset wrapping seems to work:
if ( isset( $_POST['html_mode_lock'] ) ) {
$html_mode_lock = $_POST['html_mode_lock'];
}
Below one I could not figure out but someone could, see https://wordpress.stackexchange.com/a/123466 – or that is my translation…
Without PHP spit out “PHP Notice: Trying to get property of non-object”
add_filter('user_can_richedit', 'html_mode_lock_on');
function html_mode_lock_on($wp_rich_edit){
if (!is_singular()) return; // https://wordpress.stackexchange.com/a/123466
global $post;
$html_mode_lock = get_post_meta($post->ID,'html_mode_lock',true);
if($html_mode_lock)
return false;
return $wp_rich_edit;
}
]]>
Notice: Undefined index: html_mode_lock in /home/rickyb/public_html/0/wp-content/plugins/html-mode-locker/html-mode-locker.php on line 124
I have debugging turned on.
hmm.
My visual editor still strips html tags when switching from the html editor to the visual one and back again.
]]>After I installed the plugin I was not able to see it in the editor area. There is no HTML-Locker visbible and nothing to choose.
]]>Just installed this. I’m getting this error after installation on every page I switch to:
Warning: call_user_func(html_mode_lock_settings) [function.call-user-func]: First argument is expected to be a valid callback in /home/oozandoz/public_html/wp-admin/includes/template.php on line 1102
Screenshot of same: https://awesomescreenshot.com/092smat26
I think that problem is gone now that I’ve selected Pages in the settings. HOWEVER, your plugin says we can lock on a per item basis. As far as I can see it leaves all my pages locked in the mode it was in at the time I installed. I just want to lock one page. Is that possible? HOW?
]]>