Support Forum

Where to start?

LU Luffer
Luffer
Member

Okay, so I have purchased a copy of phpDesigner 7, looks pretty nice from what I've seen so far. Only been using it to edit some css on a site I'm developing for someone up to now though.

I've only really had a cursory glance at the SP code before, but was thinking I might take a better look at it this weekend in between the British GP and the World Cup Final.

Thing is, where do I start? How does the plugin structure work? Is there some kind of main() function where I can see how things happpen? How do I begin, got any advise?

Is there a certain point in the code I should head for? I'm kind of lost looking at it at the moment? Lot's of unfamiliar function calls too I need to get my head around too Confused

1 Answer

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

main() is where php most definately diverges from C…!

WordPress plugins do require a file with a specific header and in the case of SP this file is sf-control.php. This is where SP starts to load from and can be traced from.

However, WP is already loading stuff up before it includes plugins and you have to remember that WP has a lot of 'hooks' – placed in the processing where plugins can attach their own code. You wil find that sf-control.php loads up our hooks file. Also loads our constants file and our includes file – which oncludes other code files as needed.

Another important thing to remember about php is that any php code included that is NOT inside of a function is immediately run when it's file is loaded.