Writing your own wordpress plugin.

Ok, ddavp so I have this massive reel engine project called dakotaspots and a lot of people use it to feed their website.

kaufen Womens Intimacy Enhancer online

Problem is, I really do think that websites are a thing of the past, like literally I just told several clients they need to chuck their sites and replace it with wordpress.

So, I thought I better get cracking on a dakotaspots wordpress plugin.

As Buy Clomid Online Pharmacy No Prescription Needed it turns out, it’s really a snap.

Basically you just pull in this variable called $the_content from something called a filter..

Here’s roughly what it looks like.

/*
Plugin Name: Dakotaspots
*/
$TAG = "[SHOWMYREEL]";
function reel_loader($the_content)
{
 GLOBAL $TAG;
 $spos = strpos($the_content, $TAG);
 if ($spos !== false){
    $rid=251;
    $gid=66;
    include [a display file that spits out some html populated by the rid/gid above as the var $body_content]
    return $body_content;
}

add_filter('the_content', 'reel_loader');
?>

When you’re ready to test, you just punch in the tag [SHOWMYREEL] into a page, it makes the match, and calls the filter.! What a snap.!

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!

You must be logged in to post a comment.