Ejemplo n.º 1
0
 public function fields()
 {
     $icons_arr = WPiArray::get_icons_arr();
     $icons = WPiTools::array2object($icons_arr);
     $target = array("self" => "Self", "_blank" => "New Window");
     $align = array("left" => "Left", "right" => "Right", "center" => "Center");
     $switch = array("0" => "Off", "1" => "On");
     $style_ids = WPiDesButCommon::get_style_ids();
     $style_ids_2 = WPiDesButCommon::add_empty_option(array("array" => $style_ids));
     $menu_links = array();
     $dummy_text = array(array("heading" => "Top 10 responsive websites", "subheading" => "Awesome Responsive Design Website Designs for Inspiration."), array("heading" => "2014 Winners - 2014 User Experience Awards", "subheading" => "The 2014 User Experience Awards was a smashing success. Check out the details below!"), array("heading" => "40+ Helpful Resources On User Interface Design Patterns", "subheading" => "UI-patterns.com is a large collection of design patterns for UI designers "), array("heading" => "The 30 Best Free Google Web Fonts for 2015", "subheading" => "A collection of the absolute best fonts available on Google Fonts in 2015 - open-source and 100% free for commercial use."), array("heading" => "What is ergonomics? - Ergonomics & Human Factors", "subheading" => "Ergonomics is about designing for people, wherever they interact with products, systems or processes."));
     for ($i = 1; $i <= 5; $i++) {
         if ($dummy_text[$i]) {
             $heading = $dummy_text[$i]['heading'];
             $subheading = $dummy_text[$i]['subheading'];
         } else {
             $heading = $dummy_text[0]['heading'];
             $subheading = $dummy_text[0]['subheading'];
         }
         $menu_links[] = array("label" => "Menu item " . $i, "name" => "menu_item" . $i, "type" => "boolean", "section" => "Menu links", "group" => "Menu item " . $i, "default" => "1", "value" => "", "list" => $switch);
         $menu_links[] = array("label" => "Heading", "name" => 'heading' . $i, "type" => "text", "section" => "Menu links", "group" => "Menu item " . $i, "value" => "", "default" => $heading);
         $menu_links[] = array("label" => "Sub Heading", "name" => 'subheading' . $i, "type" => "text", "section" => "Menu links", "group" => "Menu item " . $i, "value" => "", "default" => $subheading);
         $menu_links[] = array("label" => "Link", "name" => 'link' . $i, "type" => "text", "section" => "Menu links", "group" => "Menu item " . $i, "value" => "", "default" => "");
         $menu_links[] = array("label" => "Image", "name" => 'image' . $i, "type" => "wp_image", "section" => "Menu links", "group" => "Menu item " . $i, "value" => "");
         $menu_links[] = array("label" => "Target", "name" => 'target' . $i, "type" => "select", "section" => "Menu links", "group" => "Menu item " . $i, "value" => "", "list" => $target);
     }
     $fields = array(array("label" => "Button Text", "name" => 'button_text', "type" => "text", "section" => "Button", "group" => "Button", "value" => "", "default" => ""), array("label" => "Button Align", "name" => 'button_align', "type" => "select", "section" => "Button", "group" => "Button", "value" => "", "default" => "center", "list" => $align), array("label" => "Button Icon", "name" => 'button_icon', "type" => "select", "section" => "Button", "group" => "Button", "value" => "", "list" => $icons), array("label" => "All Buttons Style Id", "name" => 'style_id', "type" => "select", "section" => "Style Section", "group" => "Style", "value" => "", "list" => $style_ids));
     $fields = array_merge($menu_links, $fields);
     return $fields;
 }
Ejemplo n.º 2
0
 public function fields()
 {
     $icons_arr = WPiArray::get_icons_arr();
     $icons = WPiTools::array2object($icons_arr);
     $style_ids = WPiDesButCommon::get_style_ids();
     $style_ids_2 = WPiDesButCommon::add_empty_option(array("array" => $style_ids));
     $fields = array(array("label" => "All Buttons Style Id", "name" => 'style_id', "type" => "select", "section" => "Style Section", "group" => "Style", "value" => "", "list" => $style_ids), array("label" => "Left Button Style Id", "name" => 'left_button_style_id', "type" => "select", "section" => "Style Section", "group" => "Style", "value" => "", "list" => $style_ids_2), array("label" => "Right Button Style Id", "name" => 'right_button_style_id', "type" => "select", "section" => "Style Section", "group" => "Style", "value" => "", "list" => $style_ids_2), array("label" => "Left Button Text", "name" => 'left_button_text', "type" => "text", "section" => "Text Section", "group" => "Text", "value" => ""), array("label" => "Right Button Text", "name" => 'right_button_text', "type" => "text", "section" => "Text Section", "group" => "Text", "value" => ""), array("label" => "Left Button Icon", "name" => 'left_button_icon', "type" => "select", "section" => "Icon Section", "group" => "Text", "value" => "", "list" => $icons), array("label" => "Right Button Icon", "name" => 'right_button_icon', "type" => "select", "section" => "Icon Section", "group" => "Text", "value" => "", "list" => $icons), array("label" => "Left Button Link", "name" => 'left_button_link', "type" => "text", "section" => "Link Section", "group" => "Link", "value" => ""), array("label" => "Right Button Link", "name" => 'right_button_link', "type" => "text", "section" => "Link Section", "group" => "Link", "value" => ""), array("label" => "Icon Position", "name" => 'icon_position', "type" => "select", "section" => "Icon Section", "group" => "Text", "value" => "", "list" => array("left" => "Left", "right" => "Right")), array("label" => "Target", "name" => 'target', "type" => "select", "section" => "Link Section", "group" => "Link", "value" => "", "list" => array("self" => "Self", "_blank" => "New Window")), array("label" => "Min Width", "name" => 'min_width', "type" => "text", "section" => "Style Section", "group" => "Style", "value" => ""));
     return $fields;
 }