我在尋找相似的答案。我不完全確定事件日曆是如何實現的,但是從Business Directly Plugin類似的經驗來講,你可以通過鉤住你自己的方法從主題的functions.php文件中覆蓋鉤子。
這裏是一個除了我寫了覆蓋鉤「wpbdm_show加上市形式」:
/*
* Fix the horrible output of wpbusdirman_displaypostform() from wpbusdirman.php
*
* This is done by overriding the wpbdm_show-add-listing-form hook with my own function
*/
add_filter('wpbdm_show-add-listing-form', 'alternative_wpbusdirman_displaypostform', 10, 4);
// Ensure that the method signature is the same (same order of vars, same
function alternative_wpbusdirman_displaypostform($makeactive = 1, $wpbusdirmanerrors = '', $neworedit = 'new', $wpbdmlistingid = '')
{
// This assumes that the Business Directory Plugin is installed
if (!function_exists("wpbusdirman_displaypostform"))
{
// If the funct doesn't exist then it probably isn't installed
return '';
}
// Call the method and regex parse out the bits we don't want
$original_output = wpbusdirman_displaypostform($makeactive, $wpbusdirmanerrors, $neworedit, $wpbdmlistingid);
// Do some fixing of the output. In this example we do nothing and just return what we received.
return $original_output . " WE EDITED IT!";
}