logo

This is an old version of this answer!

Return to the current answer
I changed the plugin code a bit. So you can use it this way:

new FakePage(array(
'slug'=> 'about-us',
'title'=> 'About Us',
'content'=> '<p>Hi there! You are viewing my fake post!</p>'
));

new FakePage(array(
'slug'=> 'clients',
'title'=> 'Clientes',
'content'=> '<p>Our client list:</p>'
));

You can copy the class to your plugin file if you want.

Take a look:
http://pastium.org/view/24100932568ac6e264500b66681ff7ec

I cleaned up the comments so you can see the code.

I changed the following lines:
7 - To store the content
10 to 14 - So you can configure everything once.
37 - So the class can use the stored content.
43 - To make the code easier to read.
59 to 62 - Related to 43

PS. I found a but in my code :) Everything is ok now

Julio Protzek | 01/27/10 at 3:00am

This is an old version of this answer!

Return to the current answer