Created
December 5, 2014 14:10
-
-
Save n7studios/feaa6745d27e77a22c9a to your computer and use it in GitHub Desktop.
Soliloquy - Change YouTube Video Arguments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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