public function to_json()
 {
     parent::to_json();
     $this->json['choices'] = array();
     if (is_array($this->choices)) {
         if (isset($this->choices['top']) && true == $this->choices['top']) {
             $this->json['choices']['top'] = true;
         }
         if (isset($this->choices['bottom']) && true == $this->choices['bottom']) {
             $this->json['choices']['bottom'] = true;
         }
         if (isset($this->choices['left']) && true == $this->choices['left']) {
             $this->json['choices']['left'] = true;
         }
         if (isset($this->choices['right']) && true == $this->choices['right']) {
             $this->json['choices']['right'] = true;
         }
     }
     $i18n = Nova_Toolkit::i18n();
     $this->json['l10n'] = array('top' => $i18n['top'], 'bottom' => $i18n['bottom'], 'left' => $i18n['left'], 'right' => $i18n['right']);
     if (isset($this->json['choices']['top']) && !isset($this->json['value']['top'])) {
         $this->json['value']['top'] = $this->json['default']['top'];
     }
     if (isset($this->json['choices']['bottom']) && !isset($this->json['value']['bottom'])) {
         $this->json['value']['bottom'] = $this->json['default']['bottom'];
     }
     if (isset($this->json['choices']['left']) && !isset($this->json['value']['left'])) {
         $this->json['value']['left'] = $this->json['default']['left'];
     }
     if (isset($this->json['choices']['right']) && !isset($this->json['value']['top'])) {
         $this->json['value']['right'] = $this->json['default']['right'];
     }
 }
 public function to_json()
 {
     parent::to_json();
     $i18n = Nova_Toolkit::i18n();
     $this->json['choices'] = empty($this->choices) || !is_array($this->choices) ? array() : $this->choices;
     $this->json['choices']['on'] = isset($this->choices['on']) ? $this->choices['on'] : $i18n['on'];
     $this->json['choices']['off'] = isset($this->choices['off']) ? $this->choices['off'] : $i18n['off'];
     $this->json['choices']['round'] = isset($this->choices['round']) ? $this->choices['round'] : false;
 }
 public function to_json()
 {
     parent::to_json();
     $i18n = Nova_Toolkit::i18n();
     $this->json['fonts'] = $this->get_all_fonts();
     $value = $this->value();
     $this->json['value'] = array('bold' => isset($value['bold']) ? $value['bold'] : false, 'italic' => isset($value['italic']) ? $value['italic'] : false, 'underline' => isset($value['underline']) ? $value['underline'] : false, 'strikethrough' => isset($value['strikethrough']) ? $value['strikethrough'] : false, 'font-family' => isset($value['font-family']) ? $value['font-family'] : '', 'font-size' => isset($value['font-size']) ? $value['font-size'] : '', 'font-weight' => isset($value['font-weight']) ? $value['font-weight'] : '', 'line-height' => isset($value['line-height']) ? $value['line-height'] : '', 'letter-spacing' => isset($value['letter-spacing']) ? $value['letter-spacing'] : '');
     $this->json['l10n'] = array('font-family' => $i18n['font-family'], 'font-size' => $i18n['font-size'], 'font-weight' => $i18n['font-weight'], 'line-height' => $i18n['line-height'], 'letter-spacing' => $i18n['letter-spacing']);
 }
 /**
  * The background choices.
  * @return array<string,array>
  */
 public static function background_choices()
 {
     $i18n = Nova_Toolkit::i18n();
     return array('repeat' => array('no-repeat' => $i18n['no-repeat'], 'repeat' => $i18n['repeat-all'], 'repeat-x' => $i18n['repeat-x'], 'repeat-y' => $i18n['repeat-y'], 'inherit' => $i18n['inherit']), 'size' => array('inherit' => $i18n['inherit'], 'cover' => $i18n['cover'], 'contain' => $i18n['contain']), 'attach' => array('inherit' => $i18n['inherit'], 'fixed' => $i18n['fixed'], 'scroll' => $i18n['scroll']), 'position' => array('left-top' => $i18n['left-top'], 'left-center' => $i18n['left-center'], 'left-bottom' => $i18n['left-bottom'], 'right-top' => $i18n['right-top'], 'right-center' => $i18n['right-center'], 'right-bottom' => $i18n['right-bottom'], 'center-top' => $i18n['center-top'], 'center-center' => $i18n['center-center'], 'center-bottom' => $i18n['center-bottom']));
 }
 /**
  * Return an array of standard websafe fonts.
  *
  * @return array    Standard websafe fonts.
  */
 public function get_standard_fonts()
 {
     $i18n = Nova_Toolkit::i18n();
     if (null == $this->standard_fonts) {
         $this->standard_fonts = apply_filters('nova/fonts/standard_fonts', array('serif' => array('label' => $i18n['serif'], 'stack' => 'Georgia,Times,"Times New Roman",serif'), 'sans-serif' => array('label' => $i18n['sans-serif'], 'stack' => 'Helvetica,Arial,sans-serif'), 'monospace' => array('label' => $i18n['monospace'], 'stack' => 'Monaco,"Lucida Sans Typewriter","Lucida Typewriter","Courier New",Courier,monospace')));
     }
     return $this->standard_fonts;
 }