I really had to lough when I read about ‘coding guidelines’ on these pages! Have the makers of WordPress ever seen a real API? ALL constants, variables and methods of the system should have a unique prefix (such as ‘wp_’ for example) in order to have separated namespaces. (They did it with the db table names, so why this mess in PHP?)
Otherwise it’s quite likely to happen that someone overwrites an internal WordPress variables/methods when developing more complex themes. Other solution would be to encapsulate the whole WordPress-thingy in a class (yes, a bit like $wpdb) and ONE single, global instance provides all methods/data. Would be a much cleaner interface imho.
If ‘code is poetry’ it should be self-explanatory and there shouldn’t be a need for so many (confusing) docs which are aiming at varying audiences (devs? designers? just bloggers in general?).
- The topic ‘RFC: A professional WordPress API’ is closed to new replies.