more setup
This commit is contained in:
parent
e0e81f553f
commit
090c43691f
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
.settings/
|
.settings/
|
||||||
.buildpath
|
.buildpath
|
||||||
.project
|
.project
|
||||||
|
coverage
|
||||||
|
6
phpunit.xml
Normal file
6
phpunit.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<phpunit colors="true">
|
||||||
|
<php>
|
||||||
|
<ini name="error_reporting" value="30719" />
|
||||||
|
</php>
|
||||||
|
</phpunit>
|
@ -96,6 +96,17 @@ class QuickAudioEmbed {
|
|||||||
function _the_content_callback($matches) {
|
function _the_content_callback($matches) {
|
||||||
$dimensions = explode('x', $this->settings['dimensions']);
|
$dimensions = explode('x', $this->settings['dimensions']);
|
||||||
|
|
||||||
|
if (preg_match('#rel="(?P<rel>[^\"]+)"#', $matches[0], $rel_match) > 0) {
|
||||||
|
foreach (explode(',', $rel_match['rel']) as $part) {
|
||||||
|
$values = explode('=', $part);
|
||||||
|
$key = array_shift($values);
|
||||||
|
$values = implode('=', $values);
|
||||||
|
switch ($key) {
|
||||||
|
case 'noembed':
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return sprintf('
|
return sprintf('
|
||||||
<embed type="application/x-shockwave-flash"
|
<embed type="application/x-shockwave-flash"
|
||||||
src="http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=%s"
|
src="http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=%s"
|
||||||
|
14
readme.txt
Normal file
14
readme.txt
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
=== Quick Audio Embed ===
|
||||||
|
Contributors: johncoswell
|
||||||
|
Tags: audio, embed, mp3
|
||||||
|
Requires at least: 2.9
|
||||||
|
Tested up to: 2.9
|
||||||
|
Stable tag: 0.1
|
||||||
|
Donate link: http://www.coswellproductions.com/wordpress/wordpress-plugins/
|
||||||
|
|
||||||
|
Quick Audio Embed is a WordPress plugin that quickly turns any link to an MP3 file into an embedded MP3 player.
|
||||||
|
|
||||||
|
== Description ==
|
||||||
|
|
||||||
|
Uploaded an MP3 file and want to quickly wrap it in a player? Quick Audio Embed uses the Google Reader MP3 player
|
||||||
|
to automatically wrap all linked-to MP3 files in an embedded media player.
|
9
test/QuickAudioEmbedTest.php
Normal file
9
test/QuickAudioEmbedTest.php
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require_once('PHPUnit/Framework.php');
|
||||||
|
require_once('MockPress/mockpress.php');
|
||||||
|
require_once(dirname(__FILE__) . '/../quick-audio-embed.php');
|
||||||
|
|
||||||
|
class QuickAudioEmbedTest extends PHPUnit_Framework_TestCase {
|
||||||
|
function setUp() { _reset_wp(); }
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user