Making WordPress.org

Ticket #356: wc-post-types.php.diff

File wc-post-types.php.diff, 558 bytes (added by dustyf, 10 years ago)

Patch including filter to add WC CPTs to Jetpack JSON API

  • wc-post-types.php

     
    15461546
    15471547// Load the plugin class.
    15481548$GLOBALS['wcpt_plugin'] = new WordCamp_Post_Types_Plugin;
     1549
     1550/**
     1551 * Add Custom Post Type Support for Jetpack JSON API
     1552 */
     1553function wcpt_jetpack_json_api() {
     1554        return array( 'wcb_speaker', 'wcb_session', 'wcb_sponsor', 'wcb_organizer' );
     1555}
     1556add_filter( 'jetpack_rest_api_compat', 'wcpt_jetpack_json_api' );
     1557 No newline at end of file