Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * In some installations category month views for dates in 2038 onwards result in a server error which may have SEO
- * ramifications (as a bot might crawl to these links and encounter a 503).
- *
- * This function is a bit of a string function hatchet job but should resolve this even so. An equivalent to kill links
- * to dates before the Unix epoch could be similarly set up using the equivalent prev_month filter.
- */
- function avoid_2038_503s($html) {
- if (false !== strpos($html, 'data-month="2038-01"')) return '';
- return $html;
- }
- add_filter('tribe_events_the_next_month_link', 'avoid_2038_503s');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement