Title: meta option
Last modified: August 30, 2016

---

# meta option

 *  [tapos007](https://wordpress.org/support/users/tapos007/)
 * (@tapos007)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/meta-option/)
 *     ```
       array(
                   'name'      => 'option',
                   'type'      => 'select',
                   'label'     => __( 'Option', 'attachments' ),
                   'meta'      => array(
                       'allow_null'    => false,
                       'multiple'      => true,
                       'options'       => 'my_selector_function',
                   ),
               )
   
       function my_selector_function(){
           //$categories = get_terms( 'portfolio_texonomy', 'orderby=count&hide_empty=0&fields=names' );
           global $wpdb;
           $taxonomies = array(
               'portfolio_texonomy'
           );
           $args = array(
               'orderby'           => 'name',
               'order'             => 'ASC',
               'hide_empty'        => 0,
               'exclude'           => array(),
               'exclude_tree'      => array(),
               'include'           => array(),
               'number'            => '',
               'fields'            => 'all',
               'slug'              => '',
               'parent'            => '',
               'hierarchical'      => true,
               'child_of'          => 0,
               'childless'         => false,
               'get'               => '',
               'name__like'        => '',
               'description__like' => '',
               'pad_counts'        => false,
               'offset'            => '',
               'search'            => '',
               'cache_domain'      => 'core'
           );
   
           $terms = get_terms($taxonomies, $args);
   
           $_posts = array();
   
           foreach($terms as $p){
   
               $_posts[$p->term_id] = $p->name;
           }
           return $_posts;
   
       }
       ```
   

The topic ‘meta option’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/attachments_fafafa.svg)
 * [Attachments](https://wordpress.org/plugins/attachments/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/attachments/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/attachments/)
 * [Active Topics](https://wordpress.org/support/plugin/attachments/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/attachments/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/attachments/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [tapos007](https://wordpress.org/support/users/tapos007/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/meta-option/)
 * Status: not resolved