Advertisement
Guest User

Function

a guest
Nov 21st, 2012
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.66 KB | None | 0 0
  1. function retrieve_my_terms() {
  2.  
  3.     $prefix = 'haze_';
  4.  
  5.     //Portfolio Categories Select
  6.     $config = array(
  7.         'id' => 'portfolio_categories_meta',       
  8.         'title' => 'Choose Portfolio Categories to show',      
  9.         'pages' => array(),
  10.         'context' => 'normal',                 
  11.         'priority' => 'high',                  
  12.         'fields' => array(),                   
  13.         'local_images' => false,               
  14.         'use_with_theme' => true               
  15.     );
  16.    
  17.     $cats_meta =  new AT_Meta_Box($config);
  18.    
  19.  
  20.  
  21.     global $terms;
  22.    
  23.     $terms = get_terms('portfolio_cats');
  24.    
  25.     foreach ($terms as $term) {
  26.         $option = $term->name;
  27.         $cats_meta->addCheckbox($prefix.'checkbox_field_id',array('name'=> $option));
  28.     }
  29.  
  30.     $cats_meta->Finish();          
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement