Changeset 803113
- Timestamp:
- 11/12/2013 02:19:56 PM (12 years ago)
- Location:
- jetpack/trunk/modules/shortcodes
- Files:
-
- 3 edited
-
bandcamp.php (modified) (2 diffs)
-
dailymotion.php (modified) (3 diffs)
-
presentations.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
jetpack/trunk/modules/shortcodes/bandcamp.php
r739902 r803113 20 20 'height' => null, // integer with optional "%" 21 21 'notracklist' => null, // may be string "true" (defaults false) 22 'artwork' => null, // may be string "false" (defaults true) 22 'tracklist' => null, // may be string "false" (defaults true) 23 'artwork' => null, // may be string "false" (alternately: "none") or "small" (default is large) 24 'minimal' => null, // may be string "true" (defaults false) 23 25 'theme' => null, // may be theme identifier string ("light"|"dark" so far) 24 26 'package' => null, // integer package id … … 127 129 } 128 130 129 if ( $attributes['artwork'] == "false" ) { 130 $url .= "/artwork=false"; 131 // 'tracklist' arg deprecates 'notracklist=true' to be less weird. 132 // Note, behavior if both are specified is undefinied 133 switch ( $attributes['tracklist'] ) { 134 case "false": 135 case "none": 136 $url .= "/tracklist=false"; 137 break; 138 } 139 140 switch ( $attributes['artwork'] ) { 141 case "false": 142 case "none": 143 case "small": 144 $url .= "/artwork=" . $attributes['artwork']; 145 break; 146 } 147 148 if ( $attributes['minimal'] == "true" ) { 149 $url .= "/minimal=true"; 131 150 } 132 151 -
jetpack/trunk/modules/shortcodes/dailymotion.php
r692359 r803113 67 67 * The new style is now: 68 68 * [dailymotion id=x8oma9 title=2 user=3 video=4] 69 * @todo: Update code to sniff for iframe embeds and convert those to shortcodes. 69 70 * 70 71 * @param array $atts … … 97 98 $id = urlencode( $id ); 98 99 99 $output = '<object width="' . $width . '" height="' . $height . '"><param name="movie" value="http://www.dailymotion.com/swf/'; 100 $after = ''; 101 if ( preg_match( '/^[a-z0-9]+$/', $id ) ) { 102 $output .= $id; 100 if ( preg_match( '/^[A-Za-z0-9]+$/', $id ) ) { 101 $output = '<iframe width="' . $width . '" height="' . $height . '" src="http://www.dailymotion.com/embed/video/' . $id . '" frameborder="0"></iframe>'; 102 $after = ''; 103 103 104 104 if ( array_key_exists( 'video', $atts ) && $video = preg_replace( '/[^-a-z0-9_]/i', '', $atts['video'] ) && array_key_exists( 'title', $atts ) && $title = wp_kses( $atts['title'], array() ) ) … … 109 109 } 110 110 111 $output .= '"></param><param name="allowfullscreen" value="true"></param><param name="wmode" value="opaque"></param><embed src="http://www.dailymotion.com/swf/' . $id . '" width="' . $width . '" height="' . $height . '" allowfullscreen="true" wmode="opaque"></embed></object>';112 113 111 return $output . $after; 114 112 } -
jetpack/trunk/modules/shortcodes/presentations.php
r798726 r803113 141 141 142 142 $atts = shortcode_atts( array( 143 'duration' => '',144 'height' => '',145 'width' => '',146 'bgcolor' => '',147 'bgimg' => '',148 'autoplay' => '',143 'duration' => '', 144 'height' => '', 145 'width' => '', 146 'bgcolor' => '', 147 'bgimg' => '', 148 'autoplay' => '', 149 149 150 150 // Settings 151 'transition' => '',152 'scale' => '',153 'rotate' => '',154 'fade' => '',155 'fadebullets' => '',151 'transition' => '', 152 'scale' => '', 153 'rotate' => '', 154 'fade' => '', 155 'fadebullets'=> '', 156 156 ), $atts ); 157 157 158 158 $this->presentation_settings = array( 159 'transition' => 'down', 160 'scale' => 1, 161 'rotate' => 0, 162 'fade' => 'on', 163 'fadebullets' => 0, 164 'last' => array( 165 'x' => 0, 166 'y' => 0, 167 'scale' => 1, 168 'rotate' => 0, 159 'transition' => 'down', 160 'scale' => 1, 161 'rotate' => 0, 162 'fade' => 'on', 163 'last' => array( 164 'x' => 0, 165 'y' => 0, 166 'scale' => 1, 167 'rotate' => 0, 169 168 ), 170 169 );
Note: See TracChangeset
for help on using the changeset viewer.