Skip to content
Beau Charman edited this page Jan 21, 2014 · 4 revisions

models.php

<?php
/**
 *
 * Models
 *
 * Data structures and custom post types
 *
 */



class Bamboo_Model {



  /**
   * Global Variables
   */
  public static $Genre;
  public static $Movie;



  function __construct()
  {

    /**
     * Include Font Awesome
     */
    Bamboo_Custom_Post_Type::get_font_awesome();

    /**
     * register taxonomies
     */
    self::create_taxonomies();

    /**
     * register post types
     */
    self::create_post_types();

  }



  /**
   *
   * Taxonomies
   *
   */
  function create_taxonomies()
  {

    /**
     * Genre
     */
    Bamboo_Model::$Genre = new Bamboo_Custom_Taxonomy(
      array(
        'name'   => 'genre',
        'post_type' => 'movie'
       )
    );

  }



  /**
   *
   * Post Types
   *
   */
  function create_post_types()
  {

    /**
     * Movies
     */
    Bamboo_Model::$Movie = new Bamboo_Custom_Post_Type(
      array(
        'name'   => 'movie'
      )
    );

  }

}

new Bamboo_Model;
Clone this wiki locally