public function init() { $labels = array('singular_name' => Paper_Inflector::singularize(ucfirst($this->post_type))); $options = array_merge(array('label' => Paper_Inflector::pluralize(ucfirst($this->post_type)), 'labels' => $labels, 'rewrite' => array('slug' => $this->post_type), 'public' => true, 'has_archive' => true), $this->options); $options['supports'] = $this->supports; register_post_type($this->post_type, $options); }
public function with_color_control() { $this->control = array('class' => 'WP_Customize_Color_Control', 'options' => array('label' => Paper_Inflector::humanize($this->id), 'section' => $this->section['id'], 'settings' => $this->id)); return $this; }