Created
June 27, 2016 22:38
-
-
Save GeoffEW/858cb19b184ab8f3ea21fa9552b71c3d to your computer and use it in GitHub Desktop.
Fix oEmbed Pro 4.2+
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Avoid a problem with Events Calendar PRO 4.2 which can inadvertently | |
* break oembeds. | |
*/ | |
function undo_recurrence_oembed_logic() { | |
if ( ! class_exists( 'Tribe__Events__Pro__Main' ) ) return; | |
$pro_object = Tribe__Events__Pro__Main::instance(); | |
$pro_callback = array( $pro_object, 'oembed_request_post_id_for_recurring_events' ); | |
remove_filter( 'oembed_request_post_id', $pro_callback ); | |
} | |
add_action( 'init', 'undo_recurrence_oembed_logic' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment