PluginProbe
Code Embed / 1.3
Code Embed v1.3
2.6.4 2.6.3 2.6.2 2.6.1 trunk 1.0 1.1 1.2 1.3 1.4.1 1.5.1 1.6.1 2.0.2 2.1.2 2.2.2 2.3.9 2.4 2.5.1 2.5.2 2.6
← All changes | simple-code-embed.php +5 -6 1.21.3 View file →
@@ -2,21 +2,20 @@
2 2 /*
3 3 Plugin Name: Simple Code Embed
4 4 Plugin URI: http://www.artiss.co.uk/simple-code-embed
5 5 Description: Allows you to embed code into your posts & pages
6 -Version: 1.2
6 +Version: 1.3
7 7 Author: David Artiss
8 8 Author URI: http://www.artiss.co.uk
9 9 */
10 -add_filter('the_content', 'simple_code_embed');
10 +add_filter('the_content','simple_code_embed');
11 11 function simple_code_embed($content) {
12 12 global $post;
13 13 $loop=1;
14 - while ($loop<6) {
15 - $code="CODE".$loop;
16 - $html=get_post_meta($post->ID,$code,false);
17 - $content=str_replace("%".$code."%",$html[0],$content);
14 + while ($loop<21) {
15 + $html=get_post_meta($post->ID,"CODE".$loop,false);
16 + $content=str_replace("%CODE".$loop."%",$html[0],$content);
18 17 $loop++;
19 18 }
20 19 return $content;
21 20 }
22 21 ?>