将下面的代码添加到您的当前主题的 functions.php 文件:
// This is the confirmation message that will appear. $c_message = 'Are you SURE you want to publish this post?'; function confirm_publish(){ global $c_message; echo '<script type="text/javascript"><!-- var publish = document.getElementById("publish"); if (publish !== null) publish.onclick = function(){ return confirm("'.$c_message.'"); }; // --></script>'; } add_action('admin_footer', 'confirm_publish');
之后,点击发布按钮会有如上图的提示,可以防止误操作。
😯 这功能有什么用啊
防止手快回车
这个文章发的帅

这个功能还是很实用的,我也早已用上了
这个很好,可以当保险套用,有什么需要撤销的,可以赶紧取消继续编辑

是的 😉
能不能设置必须添加标题或者分类那些东西后,才能发布啊。
可以