public static final function getControlClass($type)
 {
     if (!isset(self::$control_classes)) {
         self::$control_classes = apply_filters('cornerstone_control_types', array('choose' => 'Cornerstone_Control_Choose', 'dimensions' => 'Cornerstone_Control_Dimensions', 'info' => 'Cornerstone_Control_Info', 'sortable' => 'Cornerstone_Control_Sortable', 'text' => 'Cornerstone_Control_Text', 'textarea' => 'Cornerstone_Control_Textarea'));
     }
     $class_name = 'Cornerstone_Control';
     if (isset(self::$control_classes[$type]) && class_exists(self::$control_classes[$type])) {
         $class_name = self::$control_classes[$type];
     }
     return $class_name;
 }
Exemplo n.º 2
0
 public static final function getControlClass($type)
 {
     if (!isset(self::$control_classes)) {
         self::$control_classes = apply_filters('cornerstone_control_types', array('choose' => 'Cornerstone_Control_Choose', 'color' => 'Cornerstone_Control_Color', 'code-editor' => 'Cornerstone_Control_Code_Editor', 'date' => 'Cornerstone_Control_Date', 'dimensions' => 'Cornerstone_Control_Dimensions', 'editor' => 'Cornerstone_Control_Editor', 'icon-choose' => 'Cornerstone_Control_Icon_Choose', 'image' => 'Cornerstone_Control_Image', 'info' => 'Cornerstone_Control_Info', 'multi-choose' => 'Cornerstone_Control_Multi_Choose', 'number' => 'Cornerstone_Control_Number', 'sortable' => 'Cornerstone_Control_Sortable', 'text' => 'Cornerstone_Control_Text', 'textarea' => 'Cornerstone_Control_Textarea', 'toggle' => 'Cornerstone_Control_Toggle'));
     }
     $class_name = 'Cornerstone_Control_Undefined';
     if (isset(self::$control_classes[$type]) && class_exists(self::$control_classes[$type])) {
         $class_name = self::$control_classes[$type];
     }
     return $class_name;
 }