Created
October 27, 2016 22:00
-
-
Save cliffordp/3c905c991294e94a9b77b929af053423 to your computer and use it in GitHub Desktop.
Enable Jetpack Publicize for The Events Calendar events
This file contains 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 | |
/** | |
* Enable Jetpack Publicize for The Events Calendar events | |
* | |
* from https://gist.github.com/cliffordp/3c905c991294e94a9b77b929af053423 | |
* | |
* adapted from https://jetpack.com/support/publicize/#custom-post-types for The Events Calendar | |
*/ | |
add_action( 'init', 'tribe_events_work_with_jetpack_publicize' ); | |
function tribe_events_work_with_jetpack_publicize() { | |
if ( ! class_exists( 'Tribe__Events__Main' ) ) { | |
return false; | |
} | |
add_post_type_support( Tribe__Events__Main::POSTTYPE, 'publicize' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment