<?php
/*
Plugin Name: My Tags
Plugin URI: http://wordpress.org/support/topic.php?id=32984
Description: Use personal HTML tags which are converted to "correct" ones. Add tags in the $my_tag_elements array of the plugin.
Version: 0.1
Author: Kaf Oseo
Author URI: http://szub.net
*/

function my_tags($text) {
/*
The $my_tag_elements array is where you add your custom tags (and the
elements they're replaced by in your blog).  Specify both opening and
closing tag forms on separate lines. Use the syntax:

    '<MyTag>' => '<showtag>',
    '</MyTag>' => '</showtag>'

Example:
    $my_tag_elements = array(
        '<image>' => '<div class="img1"><div class="img2">',
        '</image>' => '</div></div>'
        '<rant>' => '<span style="font-weight: bold; font-size: 150%;">'
        '</rant>' => '</span>'
    );
*/

    
$my_tag_elements = array(
        
'<picframe>' => '<div><div><div>',
        
'</picframe>' => '</div></div></div>',
    );

    foreach (
$my_tag_elements as $mytag => $showtag) {
        
$text str_replace($mytag$showtag$text);
    }
    return 
$text;
}

add_filter('the_content''my_tags'8);
add_filter('the_excerpt''my_tags'8);
?>