• I’ve done PHP development for nearly 15 years • I’m a contributor to WordPress 3.1.2 “Stubby” - there’s a name no man would self-apply where I come from Monday, November 21, 11
can use them. If they’re public other objects can read them! (Bye bye “global”) They can be anything a variable can be even another object!!! Monday, November 21, 11
can use them. They can alter other object variables (but that object has to be passed to them) They can be anything a function can be and can alter it’s sibling properties. Monday, November 21, 11
= "Main Navigation"; $truss->customMenu->Slug = "main-navigation"; $truss->customMenu->Create(); $truss->widgetArea->Name = "Footer (Left)"; $truss->widgetArea->Description = "Widgets that appear in the footer on the left."; $truss->widgetArea->Create(); $truss->postType->Name = "Tutorials"; $truss->postType->Singular = "Tutorial"; $truss->postType->Create(); This is my functions.php file IT’S TINY! Monday, November 21, 11
name public $Singular= ""; // Post type name (Singular) public $Public = true; // Post type public/private public $Archive = true; // Allow post type to be archived public $Slug = ""; // Set a slug for permalinks public function __construct($_name = 0, $_singular = 0) { $this->registry = $registry; $this->Name = $_name; $this->Singluar = $_singular; } public function Create() { /* Actual WordPress Code */ } } Custom Post Types Monday, November 21, 11