views:

28

answers:

2

Hello,

I starting working with WordPress as a CMS, now that the V3 makes it way easier to manage taxonomies and custom post types. My work is mostly focused on developping plugins and themes.

My biggest plugin does some admin stuff (add admin menu items and the related pages and features), but also does some importing and exporting, and hooks some of the base post processing treatments ("when a new post is created").

My biggest theme is pretty small, and all it does is display custom posts in a custom way.

After a few weeks of work, I have several thousands of LoC, and it's getting harder and harder to dig into it. Which leads me to the following question : How do you organize your WP plugins code ? And what about your WP themes code ?

A: 

Why not to split plugin into several files by function? The same goes to themes. Any problem you have with that?

FractalizeR
I have absolutely no problem with that. In fact that's what I do right now...I'm just looking for a cleverer way, or something that's more in the way of what WP internally does.
Nicolas
I doubt there is any other way. Internal WP organization is not very much clearly structured, so...
FractalizeR
+1  A: 

several thousands of LoC

That's pretty epic! I've always found the beauty of WP is that I can, as jQuery put it;

Write less, do more!

You might be much better off using Pods CMS alongside WP to cut down your code.

TheDeadMedic
Indeed ! To be fair, I didn't start using WP because I wanted to, but because a customer asked me to, and paid me for it :) And I have to admit that the v3 really brings something new. But thanks for telling me about Pods CMS, that I didn't know at all, but might come in handy soon.
Nicolas