Я искал похожий ответ.Я не совсем уверен, как реализован Календарь событий, но, исходя из опыта, сделав нечто подобное с плагином Business Directly, вы можете перезаписать хуки, привязав их к вашим собственным методам из файла functions.php вашей темы.
Вот исключение, которое я написал для переопределения ловушки 'wpbdm_show-add-list-form':
/*
* 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!";
}