Example #1
0
 protected function onSetupOptions(\Drone\Options\Group\Shortcode $options)
 {
     $options->addOption('select', 'order', 'ASC', '', '', array('options' => array('ASC' => '', 'DESC' => '')));
     $options->addOption('text', 'orderby', 'menu_order ID');
     $options->addOption('number', 'id', ($post = get_post()) ? $post->ID : 0);
     $options->addOption('number', 'columns', 3, '', '', array('min' => 1, 'max' => 9));
     $options->addOption('select', 'size', 'thumbnail', __('Size', $this->domain), '', array('options' => \apply_filters('image_size_names_choose', array('thumbnail' => __('Thumbnail', 'default'), 'medium' => __('Medium', 'default'), 'large' => __('Large', 'default'), 'full' => __('Full Size', 'default')))));
     $options->addOption('text', 'ids', '');
     $options->addOption('text', 'include', '');
     $options->addOption('text', 'exclude', '');
     $options->addOption('select', 'link', 'post', '', '', array('options' => array('post' => '', 'file' => '', 'none' => '')));
     foreach ($options->childs() as $child) {
         if ($child->name != 'size') {
             $child->included = false;
         }
     }
 }