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

Code Embed, version 1.2. 22 lines.

- Page: https://pluginprobe.com/plugins/simple-embed-code/1.2/code/simple-code-embed.php
- Raw: https://pluginprobe.com/plugins/simple-embed-code/1.2/raw/simple-code-embed.php
- Modified: 2009-11-11T07:35:36+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.2/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.2
Author: David Artiss
Author URI: http://www.artiss.co.uk
*/
add_filter('the_content', 'simple_code_embed');
function simple_code_embed($content) {
    global $post;
    $loop=1;
    while ($loop<6) {
        $code="CODE".$loop;
        $html=get_post_meta($post->ID,$code,false);
        $content=str_replace("%".$code."%",$html[0],$content);
        $loop++;
    }
    return $content;
}
?>
```
