ID ) ) { wp_send_json_error(); } setup_postdata( $post ); $content = wp_unslash( $_POST['oembed_content'] ); $parsed = apply_filters( 'the_content', $content ); wp_send_json( array( 'content' => $parsed ) ); } } /** * The main plugin controller * - conditionally loads other plugins * - creates feature flags */ class AudioVideoBonusPack extends AVSingleton { /** * Sandbox actions and filters */ protected function __construct() { parent::__construct(); add_action( 'admin_init', array( $this, 'admin_init' ) ); if ( get_option( 'av_transcoding_enabled', 1 ) ) { require( AV_DIR . '/features/transcoding/transcoding.php' ); AVTranscoding::get_instance(); } if ( get_option( 'av_embed_views_enabled', 1 ) ) { require( AV_DIR . '/features/embeds/embeds.php' ); AVEmbeds::get_instance(); } if ( get_option( 'av_soundcloud_manager_enabled', 1 ) ) { require( AV_DIR . '/features/soundcloud/soundcloud.php' ); AVSoundCloud::get_instance(); } } /** * Register feature settings for the main plugin controller */ function admin_init() { add_settings_section( 'av-settings', __( 'Audio/Video Settings' ), array( $this, 'settings' ), 'media' ); register_setting( 'media', 'av_embed_views_enabled' ); add_settings_field( 'av-embed_views_enabled', __( 'Show Previews of Embedded Media' ), array( $this, 'field_embed_views_enabled' ), 'media', 'av-settings' ); register_setting( 'media', 'av_soundcloud_manager_enabled' ); add_settings_field( 'av-soundcloud_manager_enabled', __( 'Add Advanced SoundCloud support' ), array( $this, 'field_soundcloud_manager_enabled' ), 'media', 'av-settings' ); register_setting( 'media', 'av_transcoding_enabled' ); add_settings_field( 'av-transcoding-enabled', __( 'Automatically generate HTML5 fallbacks' ), array( $this, 'field_transcoding_enabled' ), 'media', 'av-settings' ); } /** * Output the 'av_transcoding_enabled' field */ function field_transcoding_enabled() { $option = get_option( 'av_transcoding_enabled', 1 ); ?> /> /> /> If you were redirected here when activating the plugin, ffmpeg is not installed properly; or you need to specify the paths to these binaries: (You can find them via which ffmpeg)