3. Today
A note on coding standards
Defining “Post Types” or “Content Types”
Give an example of Custom Post Types
Open up to questions about Custom Post Types
4. Coding Standards
Coding standards are very very important
If you’re releasing a public plugin, things can go wrong
if you don’t use namespaces
The biggest problem with the plugin repository is a lack
of following coding standards
Version control. Version control is important (<3 git)
5. Namespacing
Prepend function names with something - anything!
For example, an events plugin - could use
evnt_show_events instead of just show_events
This is good - you avoid conflicts!
show_events is bad
6. Write good code
Brace Style
Single-line conditionals
http://codex.wordpress.org/
WordPress_Coding_Standards
9. Content Types
WordPress can handle any type of content
Content Types allow you to manage your data
Optimised for limitless amounts of data - example,
WP.com
Defaults: Revisions, Posts, Pages
10. “Custom” Post Types
Wrapped around your content - it makes
managing things easier
Moulded to your data - Events, books, cars,
anything
Increase Productivity
14. Getting technical
Use register_post_type in an init hook
Remember, namespacing
Attributes - labels, supports metaboxes
You can use single-type.php (single-event.php)
URL routes (so /event/)
15. Even More Technical
Utilise taxonomies - you can tack on categories or any
other taxonomy to a post type
Post Types Manager
Threading