ID, 'audio_file', true ) ) { return new Seriously_Simple_Podcasting( $data ); } return $transformer; }, 10, 3 ); } /** * Adds WPML Multilingual CMS (plugin) support. * * This class handles the compatibility with the WPML plugin. * * @see https://wpml.org/ */ if ( \defined( 'ICL_SITEPRESS_VERSION' ) ) { WPML::init(); } } \add_action( 'plugins_loaded', __NAMESPACE__ . '\plugin_init' ); /** * Register the Stream Connector for ActivityPub. * * @param array $classes The Stream connectors. * * @return array The Stream connectors with the ActivityPub connector. */ function register_stream_connector( $classes ) { $class = new Stream_Connector(); if ( method_exists( $class, 'is_dependency_satisfied' ) && $class->is_dependency_satisfied() ) { $classes[] = $class; } return $classes; } add_filter( 'wp_stream_connectors', __NAMESPACE__ . '\register_stream_connector' ); // Excluded ActivityPub post types from the Stream. add_filter( 'wp_stream_posts_exclude_post_types', function ( $post_types ) { $post_types[] = 'ap_follower'; $post_types[] = 'ap_extrafield'; $post_types[] = 'ap_extrafield_blog'; return $post_types; } ); /** * Load the BuddyPress integration. * * Only load code that needs BuddyPress to run once BP is loaded and initialized. * * @see https://buddypress.org/ */ add_action( 'bp_include', array( __NAMESPACE__ . '\Buddypress', 'init' ), 0 );