# simple-embed-code/1.0/simple-code-embed.php

Code Embed, version 1.0. 24 lines.

- Page: https://pluginprobe.com/plugins/simple-embed-code/1.0/code/simple-code-embed.php
- Raw: https://pluginprobe.com/plugins/simple-embed-code/1.0/raw/simple-code-embed.php
- Modified: 2009-04-05T09:53:38+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/simple-embed-code/1.0/code/simple-code-embed.php#L10-L20`.

```php
<?php
/*
Plugin Name: Simple Code Embed
Plugin URI: http://www.artiss.co.uk/simple-code-embed
Description: Allows you to embed code into your posts & pages
Version: 1.0
Author: David Artiss
Author URI: http://www.artiss.co.uk
*/
add_filter('the_content', 'simple_code_embed');

function simple_code_embed($content) { 
global $post;
$page=$content;
$i=1;
while ($i<6) {
    $code="CODE".$i;
	$html=get_post_meta($post->ID,$code,false);
	$page=str_replace("%".$code."%",$html[0],$page); 
    $i++;
}
return $page;
}
?>
```
