3
posted on July 23, 2009 06:27 AM by Jhoy Imperial
under PHP, Web development
tagged code highlighter, developing wordpress plugin, snippet highlighter, Wordpress Plugin
I’ve been studying how to develop wordpress plugins recently. Last night, I was able to create my first ever plugin.
Snippet Code Highlighter is a wordpress plugin that stylize your snippet code. Currently, it is able to highlight the PHP tags.
It uses the HTML tag “<pre></pre>” to trigger the function. The CSS class “highlightcode” should be added to the <pre> tag.
This is a the sample of a normal <pre> content:
<?php
function sample_function(){
echo "hi";
}
?>
This is a the sample of content of the plugin:
<?php
function sample_function(){
echo "hi";
}
?>
With a little more tweeking, surely it’ll be very more useful.
"Nice" -- Romeo John
"How can I make a tabswitch, within a tab switch. When I try adding and switching class names, the in" -- The
"Nice post ! Keep up good work. I have also created similar kind of work in my blog to populate gri" -- Hitesh Agja
"Thanks. It's awesome." -- Tony Nguyen
"Thanks ;)" -- Kakha Giorgashvili