Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // remove the event_single_page filter that Eventin adds so that Bricks can render the template
- global $wp_filter;
- $hook = "single_template";
- if (!isset($wp_filter[$hook])) {
- return;
- }
- $filters = $wp_filter[$hook];
- foreach ($filters[10] as $key => $val) {
- if (str_ends_with($key, "event_single_page")) {
- $vals = array_values($val);
- $isFound = true;
- $callbackFn = $vals[0];
- }
- }
- if ($isFound) {
- remove_filter("single_template", $callbackFn);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement