Monday, August 27, 2007

This is Roundbox 0.45

I have now named the Class as 'Roundbox' for this theme in theme.php


define( 'THEME_CLASS', 'Roundbox' );


In all theme files I then call the custom function specific for this theme using e.g. Roundbox::draw('top','small'). To save typing and typo errors I have the codes generating nested [div] now coming from a function as I have this small and large round corners all over the place. The function looks like


function($where,$size)


I just have to specify $where (top or bottom) and $size (large or small) at the place where I need them.

The same way is used for displaying postmeta as well. I added a function post_meta for use in the theme files. As postmeta display is repeated a few times in home, entry.single, page.single and search therefore many lines can be replaced by just one line. The lesson learnt is that $post and $user must be passed to the function, thanks Tinyau for the advice.

No comments:

Post a Comment