Changeset 5078
- Timestamp:
- 02/12/2006 02:10:19 AM (21 years ago)
- File:
-
- 1 edited
-
audio-player/trunk/plugin/audio-player.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
audio-player/trunk/plugin/audio-player.php
r5007 r5078 173 173 174 174 // Replace mp3 links 175 if( in_array( "links", $ap_behaviour ) ) $content = preg_replace_callback( "/<a href=\"([^\"]+\.mp3)\">[^<]+<\/a>/", "ap_replace", $content );175 if( in_array( "links", $ap_behaviour ) ) $content = preg_replace_callback( "/<a ([^=]+=\"[^\"]+\" )*href=\"([^\"]+\.mp3)\"( [^=]+=\"[^\"]+\")*>[^<]+<\/a>/", "ap_replace", $content ); 176 176 177 177 // Replace [audio syntax] 178 if( in_array( "default", $ap_behaviour ) ) $content = preg_replace_callback( "/\[audio:( [^]]+)]/", "ap_replace", $content );178 if( in_array( "default", $ap_behaviour ) ) $content = preg_replace_callback( "/\[audio:(([^]]+))]/", "ap_replace", $content ); 179 179 180 180 // Enclosure integration … … 187 187 $postfixAudio = get_option( "audio_player_postfixaudio" ); 188 188 if( $postfixAudio != "" ) $postfixAudio = "," . $postfixAudio; 189 189 190 190 if( count($enclosure) > 0 ) { 191 191 for($i = 0;$i < count($enclosure);$i++) { … … 204 204 function ap_replace($matches) { 205 205 global $ap_audioURL, $ap_instances; 206 // Split opti ns207 $data = preg_split("/[\| \¦]/", $matches[1]);206 // Split options 207 $data = preg_split("/[\|]/", $matches[2]); 208 208 $files = array(); 209 209 … … 216 216 // If file doesn't start with http://, assume it is in the default audio folder 217 217 foreach( explode( ",", $data[0] ) as $afile ) { 218 if(strpos($afile, "http://") !== 0) array_push( $files, $ap_audioURL . "/" . $afile ); 219 else array_push( $files, $afile ); 218 if(strpos($afile, "http://") !== 0) $afile = $ap_audioURL . "/" . $afile; 219 array_push( $files, $afile ); 220 221 // Add source file to instances already added to the post 222 array_push( $ap_instances, $afile ); 220 223 } 221 224 … … 235 238 } 236 239 237 // Add source file to instances already added to the post238 array_push( $ap_instances, $file );239 240 240 // Return player instance code 241 241 return ap_getplayer( $file, $options );
Note:
See TracChangeset
for help on using the changeset viewer.