mycred_video_query

Codex / mycred/core / Filters / mycred_video_query

Navigation:

  1. Description
  2. Used By
  3. Parameters
  4. Default Arguments
  5. Example

Description

This filter allows you to make changes to the youtube video query.

 

Used By

  • Function: mycred_render_shortcode_video

 

Parameters

  • args (array)
    Default YouTube Query arguments.
  • atts (array)
    The shortcode attributes.
  • video_id (string)
    YouTube Video ID.

 

Default Arguments

The following default arguments are passed though this filter:

array(
	'enablejsapi' => 1,
	'version'     => 3,
	'playerapiid' => $video_id,
	'rel'         => 0,
	'controls'    => 1,
	'showinfo'    => 0
)

For more information consult the YouTube API documentation.

 

Example

Example 1: Disable YouTube Video controls.

<?php
add_filter( 'mycred_video_query', 'customize_youtube_query' );
function customize_youtube_query( $args )
{
	$args['controls'] = 0;
	return $args;
}
?>

Last edited June 26, 2016