dailymotion_channel_shortcode

DailyMotion Channel Shortcode.

Description

dailymotion_channel_shortcode( $atts ); 

Examples: [dailymotion-channel user=MatthewDominick] [dailymotion-channel user=MatthewDominick type=grid] (supports grid, carousel, badge/default)

Parameters (1)

0. $atts
The atts.

Usage

  1. if ( !function_exists( 'dailymotion_channel_shortcode' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'jetpack-by-wordpress-com/modules/shortcodes/dailymotion.php'; 
  3.  
  4. // The atts. 
  5. $atts = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = dailymotion_channel_shortcode($atts); 
  9.  

Defined (1)

The function is defined in the following location(s).

/modules/shortcodes/dailymotion.php  
  1. function dailymotion_channel_shortcode( $atts ) { 
  2. $username = $atts['user']; 
  3.  
  4. switch( $atts['type'] ) { 
  5. case 'grid': 
  6. return '<iframe width="300px" height="264px" scrolling="no" frameborder="0" src="' . esc_url( '//www.dailymotion.com/badge/user/' . $username . '?type=grid' ) . '"></iframe>'; 
  7. break; 
  8. case 'carousel': 
  9. return '<iframe width="300px" height="360px" scrolling="no" frameborder="0" src="' . esc_url( '//www.dailymotion.com/badge/user/' . $username . '?type=carousel' ) . '"></iframe>'; 
  10. break; 
  11. default: 
  12. return '<iframe width="300px" height="78px" scrolling="no" frameborder="0" src="' . esc_url( '//www.dailymotion.com/badge/user/' . $username ) . '"></iframe>';