Version Description
Download this release
Release Info
| Developer | dartiss |
| Plugin | |
| Version | 1.1 |
| Comparing to | |
| See all releases | |
Code changes from version 1.0 to 1.1
- readme.txt +15 -5
- simple-code-embed.php +3 -3
readme.txt
CHANGED
|
@@ -3,8 +3,8 @@ Contributors: dartiss
|
|
| 3 |
Donate link: http://tinyurl.com/bdc4uu
|
| 4 |
Tags: Code, HTML, JavaScript, XHTML, Embed, YouTube
|
| 5 |
Requires at least: 2.0.0
|
| 6 |
-
Tested up to: 2.
|
| 7 |
-
Stable tag: 1.
|
| 8 |
|
| 9 |
Embed code, whether HTML or JavaScript, directly in your posts and pages. Ideal for showing YouTube videos!
|
| 10 |
|
|
@@ -14,11 +14,11 @@ As you probably know if you put code directly into your post or page, it is ofte
|
|
| 14 |
|
| 15 |
This plugin makes use of the Custom Fields facility when creating/editing posts and pages.
|
| 16 |
|
| 17 |
-
Add a custom field named
|
| 18 |
|
| 19 |
Now, in your post or page simply add a reference to `%CODEx%` (again where x is the number that you used before).
|
| 20 |
|
| 21 |
-
Here's an example. I create a custom field named
|
| 22 |
|
| 23 |
`<object width="425" height="344">`
|
| 24 |
`<param name="movie" value="http://www.youtube.com/v/oHg5SJYRHA0&hl=en&fs=1"></param>`
|
|
@@ -38,4 +38,14 @@ Then, where I wish the video to appear in my post I simply add `%CODE1%`. Simple
|
|
| 38 |
|
| 39 |
= How can I get help or request possible changes =
|
| 40 |
|
| 41 |
-
Feel free to report any problems, or suggestions for enhancements, to me either via my contact form or by the plugins homepage at http://www.artiss.co.uk/simple-code-embed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
Donate link: http://tinyurl.com/bdc4uu
|
| 4 |
Tags: Code, HTML, JavaScript, XHTML, Embed, YouTube
|
| 5 |
Requires at least: 2.0.0
|
| 6 |
+
Tested up to: 2.8
|
| 7 |
+
Stable tag: 1.1
|
| 8 |
|
| 9 |
Embed code, whether HTML or JavaScript, directly in your posts and pages. Ideal for showing YouTube videos!
|
| 10 |
|
| 14 |
|
| 15 |
This plugin makes use of the Custom Fields facility when creating/editing posts and pages.
|
| 16 |
|
| 17 |
+
Add a custom field named `CODEx`, where x is a number between 1 and 5 (this allows you to have up to 5 pieces of embedded code per page or post). In the value field place your embedded code - this can be HTML, XHTML, JavaScript, etc. Server side languages, such as PHP, doesn't work.
|
| 18 |
|
| 19 |
Now, in your post or page simply add a reference to `%CODEx%` (again where x is the number that you used before).
|
| 20 |
|
| 21 |
+
Here's an example. I create a custom field named `CODE1` with a value of...
|
| 22 |
|
| 23 |
`<object width="425" height="344">`
|
| 24 |
`<param name="movie" value="http://www.youtube.com/v/oHg5SJYRHA0&hl=en&fs=1"></param>`
|
| 38 |
|
| 39 |
= How can I get help or request possible changes =
|
| 40 |
|
| 41 |
+
Feel free to report any problems, or suggestions for enhancements, to me either via my contact form or by the plugins homepage at http://www.artiss.co.uk/simple-code-embed
|
| 42 |
+
|
| 43 |
+
== Changelog ==
|
| 44 |
+
|
| 45 |
+
= 1.0 =
|
| 46 |
+
* Initial release
|
| 47 |
+
|
| 48 |
+
= 1.1 =
|
| 49 |
+
* The instructions have been corrected (thanks to John J. Camilleri for pointing it out!)
|
| 50 |
+
* Plugin has been tested with version 2.8 of WordPress.
|
| 51 |
+
* No code changes have been made
|
simple-code-embed.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
Plugin Name: Simple Code Embed
|
| 4 |
Plugin URI: http://www.artiss.co.uk/simple-code-embed
|
| 5 |
Description: Allows you to embed code into your posts & pages
|
| 6 |
-
Version: 1.
|
| 7 |
Author: David Artiss
|
| 8 |
Author URI: http://www.artiss.co.uk
|
| 9 |
*/
|
|
@@ -15,8 +15,8 @@ $page=$content;
|
|
| 15 |
$i=1;
|
| 16 |
while ($i<6) {
|
| 17 |
$code="CODE".$i;
|
| 18 |
-
|
| 19 |
-
|
| 20 |
$i++;
|
| 21 |
}
|
| 22 |
return $page;
|
| 3 |
Plugin Name: Simple Code Embed
|
| 4 |
Plugin URI: http://www.artiss.co.uk/simple-code-embed
|
| 5 |
Description: Allows you to embed code into your posts & pages
|
| 6 |
+
Version: 1.1
|
| 7 |
Author: David Artiss
|
| 8 |
Author URI: http://www.artiss.co.uk
|
| 9 |
*/
|
| 15 |
$i=1;
|
| 16 |
while ($i<6) {
|
| 17 |
$code="CODE".$i;
|
| 18 |
+
$html=get_post_meta($post->ID,$code,false);
|
| 19 |
+
$page=str_replace("%".$code."%",$html[0],$page);
|
| 20 |
$i++;
|
| 21 |
}
|
| 22 |
return $page;
|
