Thread Starter
qworx
(@qworx)
Found an error.
My apache errorlog says this:
PHP Warning: Missing argument 1 for wp_check_post_lock()
To get rid of it, replace:
if (wp_check_post_lock()) {
echo "Post is currently being edited by wp user.";
}
with
if (wp_check_post_lock($post_id)) {
echo "Post is currently being edited by wp user.";
}
Thread Starter
qworx
(@qworx)
Thanks lot for your answer bcworkz!
Since I only want to display the “post is being edited”-warning on the post itself (in my case content-single.php, inside the themes folder) I placed the function in content-single.php.
The function is also being called in content-single.php. The theme is custom made, so the code itself won’t be in danger of any theme-updates.
Anyhow, you answered my question! Thanks alot budd 🙂
-
This reply was modified 9 years, 4 months ago by qworx.