Advertisement
gilzow

bondlsc child functions

Feb 19th, 2015
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.54 KB | None | 0 0
  1. function childThemeSetup()
  2. {
  3.     registerPostTypePerson();
  4.     registerPersonTypeTax();
  5.     registerResearchTax();
  6. }
  7.  
  8. function registerPostTypePerson()
  9. {
  10.     $aryPostTypeArguments = array(
  11.         'labels'    => mizzouCreatePostTypeLabels('Person','People'),
  12.         'public'    => true,
  13.         'rewrite'   => true,
  14.         'menu_position'=>20,
  15.         'supports'   => array(
  16.             'title',
  17.             'editor',
  18.             'thumbnail',
  19.             'revision',
  20.             'custom-fields'
  21.         ),
  22.     );
  23.  
  24.     register_post_type('person',$aryPostTypeArguments);
  25.  
  26. }
  27.  
  28. function registerPersonTypeTax()
  29. {
  30.     /**
  31.      * @todo ask gen if this really needs to be attached to pages
  32.      */
  33.     $aryAttachedToPostTypes = array('person','page','post');
  34.     $aryTaxonomyArgs = array(
  35.         'labels'         => mizzouCreateTaxonomyLabels('Person Type'),
  36.         'sort'          => true,
  37.         'rewrite'       => array('slug'=>'person-type'),
  38.         'hierarchical'  => true,
  39.     );
  40.  
  41.     register_taxonomy('person_type',$aryAttachedToPostTypes,$aryTaxonomyArgs);
  42. }
  43.  
  44. function registerResearchTax()
  45. {
  46.     /**
  47.     * @todo ask gen if research needs to be attached to posts
  48.     */
  49.     $aryAttachedToPostTypes = array('person','page');
  50.  
  51.     $aryTaxonomyArgs = array(
  52.         'labels'         => mizzouCreateTaxonomyLabels('Research Topic','Research Topics'),
  53.         'sort'          => true,
  54.         'rewrite'       => array('slug'=>'research-topic'),
  55.         /**
  56.         * @todo ask gen if research tags should be check boxes or complete-as-you-type
  57.         */
  58.         'hierarchical'  => false,
  59.     );
  60.  
  61.     register_taxonomy('research',$aryAttachedToPostTypes,$aryTaxonomyArgs);
  62. }
  63.  
  64.  
  65. add_action('init','childThemeSetup');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement