类似的东西怎么样:
function wpse65611_script() {
wp_enqueue_style( \'wp-pointer\' );
wp_enqueue_script( \'wp-pointer\' );
wp_enqueue_script( \'utils\' ); // for user settings
?>
<script type="text/javascript">
jQuery(\'#embed-github-gist .delete a\').click(function(){
jQuery(\'#embed-github-gist .delete a\').pointer({
content: \'<h3>Delete this or delete everything?</h3><p><a id="this" class="primary button" href="url1">Delete data</a> <a id="everything" class="button" href="\'+jQuery(\'#embed-github-gist .delete a\').attr(\'href\')+\'">Delete plugin</a></p>\',
position: {
my: \'left top\',
at: \'center bottom\',
offset: \'-1 0\'
},
close: function() {
//
}
}).pointer(\'open\');
return false;
});
</script><?php
}
add_action( \'admin_footer\', \'wpse65611_script\' );
其结果是:
将url1替换为只删除数据的url。
请注意,如果您将其放入插件中并且该插件已停用,则不会运行此操作,将其放入另一个插件或主题中会起作用,但这将是一种不好的做法
还可以将嵌入github gist插件的ID替换为您自己的