Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericakfranz/f47b66a331508b1d131c to your computer and use it in GitHub Desktop.
Save ericakfranz/f47b66a331508b1d131c to your computer and use it in GitHub Desktop.
<?php
/**
* Plugin Name: Soliloquy - Change YouTube Video Arguments
* Plugin URI: http://soliloquywp.com
* Version: 1.0
* Author: Tim Carr
* Author URI: http://www.n7studios.co.uk
* Description: Add, edit or remove arguments for the YouTube Video Slides
*/
/**
* Change the default YouTube Video Arguments
*
* @param array $args Default Arguments
* @return array New Arguments
*/
function soliloquy_change_youtube_args( $args ) {
/**
* Defaults:
* 'enablejsapi' => 1,
* 'version' => 3,
* 'wmode' => 'transparent',
* 'rel' => 0,
* 'showinfo' => 0,
* 'modestbranding' => 1,
* 'autoplay' => 1,
* 'origin' => get_home_url()
*/
$args['autohide'] = 1;
$args['controls'] = 0;
return $args;
}
add_filter( 'soliloquy_youtube_args', 'soliloquy_change_youtube_args' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment