Create new plugin 并将其添加为您的内容:
<?php
/*
Plugin Name: [CR]TestDropIn
Plugin URI: http://bayu.freelancer.web.id/
Description: A barebone plugin to test whatever wordpress API you want to test
Author: Arief Bayu Purwanto
Version: 0.0.1
Author URI: http://bayu.freelancer.web.id
*/
add_action(\'admin_head\', \'xxx_admin_hook\');
function xxx_admin_hook(){
?>
<script language="javascript" type="text/javascript">
jQuery(document).ready(function() {
jQuery(\'#post\').submit(function() {
//alert(\'Handler for .submit() called.\');
//return false;
var cfm = confirm("Do you have a title?\\n" +
"Is the article complete?\\n" +
"Spell checked?\\n" +
"Did you pick tags?\\n" +
"Have you selected a category?\\n" +
"Choose a featured image?", "Check your content");
if(cfm)
{
return true;
}
jQuery(\'#ajax-loading\').hide();
jQuery(\'#publish\').removeClass(\'button-primary-disabled\');
return false;
});
});
</script>
<?php
}
注:
它有bug,因为它没有取消加载图标。如果你真的不在乎,那就没什么大不了的,因为它既不会干扰过程,也不会破坏wordpress。只是没那么好看罢工>bug fixed!
已发布插件here (正在等待插件存储库的批准)。