贴一段代码,需要的用户直接添加到function即可
//为WordPress文章发布按钮添加确认对话框
$c_message = '是否确定发布?';
function lxtx_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', 'lxtx_confirm_publish');
原文链接:https://harecms.com/?p=4375,转载请注明出处。
