module = $module; $this->setting = $setting; $this->type = $type; $this->labels = $labels; } /** * Get the slug of the module. * * @return string */ public function get_module() { return $this->module; } /** * Get the slug of the setting. * * @return string */ public function get_setting() { return $this->setting; } /** * Get the setting type. * * @return string */ public function get_type() { return $this->type; } /** * Get the labels for this setting. * * Has 'title' and 'description' keys. * * @return string[] */ public function get_labels() { if ( ! $this->generated ) { $this->generated = call_user_func( $this->labels ); } return $this->generated; } }