我有一个wordpress插件,它的缓存填充速度非常快。为了清空缓存,我可以登录并通过WP的后端按下按钮。
我希望每天都能这样做(不需要设定时间),自动保存我每天必须登录。
按钮的HTML如下所示:
<input style="float:right;" class="button-primary" value="Delete All" name="delete_all_links" id="delete_all_links" type="button">
并且jquery看起来像这样:
jQuery("input:button#delete_all_links").live("click",function(){
if(confirm("Click OK to delete all.")){
delete_all_url("All");
}
});
function delete_all_url(all){
var data={
action : "delete_all_url",
is_auto: all
};
jQuery.post(ajaxurl,data,function(){
jQuery("table#list_all_url > tbody > tr").animate({opacity:0},400,function(){
//jQuery(this).remove();
//update_pagination(curr_page);
search_cloaked_links();
});
});
}
是否可以更改jquery以便自动执行此操作?