class-vamtam-customize-control.php 509 B

123456789101112131415161718192021
  1. <?php
  2. class Vamtam_Customize_Control extends WP_Customize_Control {
  3. public $type = 'vamtam-generic';
  4. public $compiler = false;
  5. public function to_json() {
  6. parent::to_json();
  7. if ( isset( $this->default ) ) {
  8. $this->json['default'] = $this->default;
  9. } else {
  10. $this->json['default'] = $this->setting->default;
  11. }
  12. $this->json['value'] = $this->value();
  13. $this->json['choices'] = $this->choices;
  14. $this->json['link'] = $this->get_link();
  15. $this->json['id'] = $this->id;
  16. }
  17. }