我使用现代部落的“活动日历”插件。我在用ajax get语句加载的php文件的开始处有以下代码。“活动日历”插件由现代部落在WordPress的不工作
if (!function_exists('tribe_create_event')) {
echo "function does not exist";
return;
}
这是ajax调用。
jQuery.get("http://allthingsbahai.net/wp-content/themes/accelerate-child/insertdate.php",
{gregdate: gregdate, badidate: badidate},
function(result, status) {
alert(status);
alert(result);
//alert(result.badidate);
//alert(result.gregdate);
}
);
它以成功状态返回,结果“功能不存在”。我对此感到困惑。日历工作正常,通过WordPress管理界面接受输入,并正确显示。 我很难过。
tribe_create_event函数是否存在? – madalinivascu
它是“事件日历”界面的一部分。 [链接到文档](https://theeventscalendar.com/plugin/the-events-calendar/page/2/) [链接到更多文档](https://theeventscalendar.com/function/tribe_create_event/) 该插件已安装并激活,所以我不知道它为什么不起作用。 –
为什么不使用优先方式通过wp_ajax动作在wordpress中调用ajax? – madalinivascu