This is Roundbox 0.45

August 28, 2007

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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: