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. :)

Be Sociable, Share!
  • http://lysender.co.cc/ Lysender

    Wow nice! Pwd yan pamalit sa WPSyntaxHighlighter Plus :D

  • Jhoy Imperial

    sana :D publish ko xa pag marami na xang colors

  • Anon

    Thanks for posting about this, I would love to read more about this topic.

Recent Tweets

Sponsored Links

 

"Minimalist Cereal 2"
design and theme by Jhoy Imperial

Email us at support@codingcereal.com

Copyright 2010 - 2011 © www.codingcereal.com