• Love the broadcast plugin but It wouldn’t work for more complicated scenarios. Is it possible to add in some hooks and make some functions public so that plugin authors can hook into broadcast and make their complicated custom posts type broadcast correctly?

    add_filter( 'broadcast_custom_fields', 'jxn_venuemap', 10, 2);
    function jxn_venuemap($custom_fields, $blog_id) {
        global $threewp_broadcast;
        if ( isset( $custom_fields['_EventVenueID'][0] ) &&  $custom_fields['_EventVenueID'][0]  !== 0 ) {
            $broadcast_data = $threewp_broadcast->get_post_broadcast_data( $blog_id , $custom_fields['_EventVenueID'][0] );
            $linked = $broadcast_data->get_linked_children();
    
            var_dump($linked);
    
            if (count( $linked ) > 0 ) {
                $custom_fields['_EventVenueID'] = $linked[get_current_blog_id()];
            }
        }
        return $custom_fields;
    }

    here is an example function I made.. I added a customs fields filter to broadcast and then I made the get_post_broadcast_data function public.

    In this example I made broadcast work with tribe events calendar by looking up the the vendor on the child blog and then replacing that custom field to match

    http://wordpress.org/extend/plugins/threewp-broadcast/

  • The topic ‘Broadcast feature request’ is closed to new replies.