Ejemplo n.º 1
0
 /**
  * Removes \" in the font family value.
  * 
  * @since 3.1.0
  * @return mixed[]
  */
 public function getValuesToSave()
 {
     $values = parent::getValuesToSave();
     $familyKey = $this->options['name'] . '__family';
     $values[$familyKey] = stripcslashes($values[$familyKey]);
     return $values;
 }
 public function __construct($options, $form, $provider = null)
 {
     parent::__construct($options, $form, $provider);
     if (!isset($options['color'])) {
         $options['color'] = array();
     }
     $options['color'] = array_merge($options['color'], array('name' => $this->options['name'] . '__color', 'default' => isset($this->options['default']) ? $this->options['default']['color'] : '#1e8cbe', 'pickerTarget' => '.factory-control-' . $this->options['name'] . ' .factory-picker-target'));
     if (!isset($options['opacity'])) {
         $options['opacity'] = array();
     }
     $options['opacity'] = array_merge($options['opacity'], array('name' => $this->options['name'] . '__opacity', 'default' => isset($this->options['default']) ? $this->options['default']['opacity'] : 100, 'units' => '%', 'range' => array(0, 100), 'way' => 'slider'));
     $this->color = new FactoryForms328_ColorControl($options['color'], $form, $provider);
     $this->opacity = new FactoryForms328_IntegerControl($options['opacity'], $form, $provider);
     $this->innerControls = array($this->color, $this->opacity);
 }