static function is_html5()
 {
     if (self::$is_html5 == null) {
         self::$is_html5 = function_exists('current_theme_supports') && current_theme_supports('html5');
     }
     return self::$is_html5;
 }
 function print_form_field($fld, $type, $options = array(), $args = array())
 {
     $value = array_key_exists($fld, $this->instance) ? $this->instance[$fld] : false;
     print Footer_Putter_Utils::form_field($this->get_field_id($fld), $this->get_field_name($fld), $this->tooltips->tip($fld), $value, $type, $options, $args, 'br');
 }
 function form_field($id, $name, $label, $value, $type, $options = array(), $args = array(), $wrap = false)
 {
     if (!$label) {
         $label = $id;
     }
     $label_args = is_array($args) && array_key_exists('label_args', $args) ? $args['label_args'] : false;
     return Footer_Putter_Utils::form_field($id, $name, $this->tooltips->tip($label, $label_args), $value, $type, $options, $args, $wrap);
 }
 public static function is_html5()
 {
     return Footer_Putter_Utils::is_html5();
 }
Example #5
0
 function get_meta_form_data($metakey, $prefix, $values)
 {
     $content = array();
     if (($post_id = Footer_Putter_Utils::get_post_id()) && ($meta = Footer_Putter_Utils::get_meta($post_id, $metakey))) {
         $values = Footer_Putter_Utils::validate_options($values, $meta);
     }
     foreach ($values as $key => $val) {
         $content[$key] = array();
         $content[$key]['value'] = $val;
         $content[$key]['id'] = $prefix . $key;
         $content[$key]['name'] = $metakey . '[' . $key . ']';
     }
     return $content;
 }