Title: RFC: A professional WordPress API
Last modified: August 18, 2016

---

# RFC: A professional WordPress API

 *  [jnt72](https://wordpress.org/support/users/jnt72/)
 * (@jnt72)
 * [19 years, 1 month ago](https://wordpress.org/support/topic/rfc-a-professional-wordpress-api/)
 * 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?).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Root](https://wordpress.org/support/users/root/)
 * (@root)
 * [19 years, 1 month ago](https://wordpress.org/support/topic/rfc-a-professional-wordpress-api/#post-559032)
 * Have you tried Habari? 🙂
 *  [lxg](https://wordpress.org/support/users/mastermind/)
 * (@mastermind)
 * [19 years, 1 month ago](https://wordpress.org/support/topic/rfc-a-professional-wordpress-api/#post-559399)
 * jnt72: This is nonsense.
 * The DB tables are prefixed because this allows having tables for more than one
   application in one database. It is merely a bonus for people who have limited
   hosting ressources.
 * The PHP functions/variables/etc. don’t have to be prefixed, as those descriptors
   don’t collide with other applications. And it’s up to the theme/plugin authors
   to prefix their descriptors, as they write code based on the core system.
 * > _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._
 * Go home, kid.
 *  [Les Bessant](https://wordpress.org/support/users/lesbessant/)
 * (@lesbessant)
 * [19 years, 1 month ago](https://wordpress.org/support/topic/rfc-a-professional-wordpress-api/#post-559400)
 * Comments, suggestions and discussion about WP’s core code would be better directed
   at the wp-hackers mailing list:
 * [http://lists.automattic.com/mailman/listinfo/wp-hackers](http://lists.automattic.com/mailman/listinfo/wp-hackers)
 *  [lxg](https://wordpress.org/support/users/mastermind/)
 * (@mastermind)
 * [19 years, 1 month ago](https://wordpress.org/support/topic/rfc-a-professional-wordpress-api/#post-559401)
 * LesBessant: I agree, but I just couldn’t leave that first post uncommented.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘RFC: A professional WordPress API’ is closed to new replies.

## Tags

 * [api](https://wordpress.org/support/topic-tag/api/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 4 replies
 * 4 participants
 * Last reply from: [lxg](https://wordpress.org/support/users/mastermind/)
 * Last activity: [19 years, 1 month ago](https://wordpress.org/support/topic/rfc-a-professional-wordpress-api/#post-559401)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
