Changeset 1574937
- Timestamp:
- 01/15/2017 01:51:18 AM (9 years ago)
- File:
-
- 1 edited
-
shrinking-video/trunk/class.shrinkingvideo.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
shrinking-video/trunk/class.shrinkingvideo.php
r1565766 r1574937 6 6 function __construct(){ 7 7 add_action( 'wp_enqueue_scripts', array( $this, 'shrinking_video_scripts' ) ); 8 add_action( 'wp_enqueue_scripts', array( $this, 'shrinking_video_stylesheet' ) ); 8 9 add_shortcode( 'shrinkingvideo', array( $this, 'shrinking_video_shortcode' ) ); 9 10 } … … 20 21 'src' => '', 21 22 'height' => '394', 22 'width' => '700' 23 'width' => '700', 24 'position' => 'top-right', 25 'class' => '' 23 26 ), $atts ); 24 27 25 28 $new_url = wp_oembed_get( $a['src'], array( 'width' => $a['width'], 'height' => $a['height'] ) ); 26 echo "<script> shrinking_video({$a['height']},{$a['width']} ); </script>";29 echo "<script> shrinking_video({$a['height']},{$a['width']},'{$a['position']}'); </script>"; 27 30 28 return "<div id='shrinking_video' >{$new_url}</div>";31 return "<div id='shrinking_video' class='{$a['class']}'>{$new_url}</div>"; 29 32 } 30 33 … … 32 35 wp_enqueue_script( 'jquery' ); 33 36 wp_enqueue_script( 'shrinkingvideo.js', plugin_dir_url( __FILE__ ) . 'js/shrinkingvideo.js' ); 37 } 38 39 function shrinking_video_stylesheet(){ 40 wp_enqueue_style( 'shrinkingvideo.css', plugin_dir_url( __FILE__ ) . 'css/shrinkingvideo.css' ); 34 41 } 35 42
Note: See TracChangeset
for help on using the changeset viewer.