function thb_create_slideshows_posttype_config_container($label = '', $slug = 'slideshow_config_container') { /** * Base configuration fields container. */ $thb_container = new THB_MetaboxFieldsContainer('', $slug); $field = new THB_NumberField('delay'); $field->setLabel(__('Delay', 'thb_text_domain')); $field->setHelp(__('Expressed in seconds.', 'thb_text_domain')); $field->setPlaceholder(__('E.g. 5', 'thb_text_domain')); $thb_container->addField($field); $field = new THB_NumberField('transition_speed'); $field->setLabel(__('Transition speed', 'thb_text_domain')); $field->setHelp(__('Expressed in seconds.', 'thb_text_domain')); $field->setPlaceholder(__('E.g. 1', 'thb_text_domain')); $field->setMin('0'); $field->setStep('0.05'); $thb_container->addField($field); $thb_field = new THB_SelectField('slideshow_type'); $thb_field->setLabel(__('Type', 'thb_text_domain')); $thb_field->setDynamicOptions('thb_slideshows_types'); $thb_field->setInvisibleIfEmpty(true); $thb_container->addField($thb_field); return $thb_container; }