public function js_wp_urls()
 {
     wp_register_script('wpi_js_urls', WPIDB_URL . 'inc/wpi_script.js');
     wp_localize_script('wpi_js_urls', 'WPiURLS', array('WPIDB_URL' => WPIDB_URL));
     $fonts_list = WPiArray::get_fonts();
     $fonts = WPiTools::get_field_names($fonts_list);
     wp_localize_script('wpi_js_urls', 'WPIDB_FONTS', $fonts);
     $font_sizes = WPiArray::get_font_sizes();
     $font_sizes = WPiTools::get_list(array("suffix" => "px", "list" => $font_sizes, "keys" => false));
     wp_localize_script('wpi_js_urls', 'WPIDB_FONTS_SIZES', $font_sizes);
     $font_weights = WPiArray::get_font_weights();
     $font_weights = WPiTools::get_list(array("list" => $font_weights, "keys" => false));
     wp_localize_script('wpi_js_urls', 'WPIDB_FONTS_WEIGHTS', $font_weights);
     $letter_spacing = WPiArray::get_letter_spacing();
     $letter_spacing = WPiTools::get_list(array("suffix" => "px", "list" => $letter_spacing, "keys" => false));
     wp_localize_script('wpi_js_urls', 'WPIDB_LETTER_SPACING', $letter_spacing);
     $margin = WPiArray::get_margin();
     $margin = WPiTools::get_list(array("suffix" => "px", "list" => $margin, "keys" => false));
     wp_localize_script('wpi_js_urls', 'WPIDB_MARGIN', $margin);
     $border_width = WPiArray::get_border_width();
     $border_width = WPiTools::get_list(array("suffix" => "px", "list" => $border_width, "keys" => false));
     wp_localize_script('wpi_js_urls', 'WPIDB_BORDER_WIDTH', $border_width);
     $WPIDB = array("fonts" => $fonts, "font_sizes" => $font_sizes, "font_weights" => $font_weights, "letter_spacing" => $letter_spacing, "margin" => $margin, "border_width" => $border_width);
     wp_localize_script('wpi_js_urls', 'WPIDB', $WPIDB);
     wp_enqueue_script('wpi_js_urls');
 }
Esempio n. 2
0
 public function fields()
 {
     $icons_arr = WPiArray::get_icons_arr();
     $icons = WPiTools::array2object($icons_arr);
     $fonts = WPiDesButCommon::get_fonts_options();
     $font_sizes = WPiArray::get_font_sizes();
     $text_size_list = WPiTools::get_list(array("suffix" => "px", "list" => $font_sizes));
     $font_weights = WPiArray::get_font_weights();
     $font_weights = WPiTools::get_list(array("list" => $font_weights));
     $letter_spacing = WPiArray::get_letter_spacing();
     $letter_spacing = WPiTools::get_list(array("suffix" => "px", "list" => $letter_spacing));
     $margin = WPiArray::get_margin();
     $margin = WPiTools::get_list(array("suffix" => "px", "list" => $margin));
     $withMinusMargin = array_merge($margin, array("-10px" => "-10px", "-20px" => "-20px", "-30px" => "-30px", "-40px" => "-40px", "-50px" => "-50px", "-60px" => "-60px", "-70px" => "-70px", "-80px" => "-80px", "-90px" => "-90px", "-100px" => "-100px"));
     $border_width = WPiArray::get_border_width();
     $border_width = WPiTools::get_list(array("suffix" => "px", "list" => $border_width));
     $images = WPiTools::array2object(array("no", "Henry_Marion.jpg", "mypad.jpg", "dust.png", "sea.jpg", "reb_blue_bricks.jpg", "coffee_food.jpg", "jelly_fish.jpg", "yummy.jpg", "mountains_sea.jpg", "Food-From.jpg", "black_bg.jpg", "vintage.jpg", "black_shape.png", "Creative-Stationary.jpg", "triangles.png", "triangles2.png", "connected_circles.png", "bottom_lighting.png", "blur1.png", "city1.jpg", "forest1.jpg", "message_icons.png", "star_rays.png"));
     $repeat_images = WPiTools::array2object(array("no", "grey_texture.png", "wood_texture.jpg", "squares45.png", "noise2.png"));
     //$border_width=array("0px"=>"No", "1px"=>"1px", "2px"=>"2px", "3px"=>"3px", "4px"=>"4px","5px"=>"5px","6px"=>"6px","7px"=>"7px","8px"=>"8px","9px"=>"9px","10px"=>"10px");
     $text_shadow_distance = WPiTools::get_list(array("suffix" => "px", "list" => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)));
     $opacity = WPiTools::get_list(array("list" => array(100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0)));
     $style_ids = WPiDesButCommon::get_style_ids();
     $slide_height = WPiTools::get_list(array("suffix" => "px", "list" => array(300, 400, 500, 600, 700, 800)));
     $fields = array(array("label" => "Slide Heading", "name" => 'slide_heading', "type" => "textarea", "section" => "Text", "group" => "Heading", "value" => ""), array("label" => "Slide Sub Heading", "name" => 'slide_text', "type" => "textarea", "section" => "Text", "group" => "Sub Heading", "value" => ""), array("label" => "Slide Footer Text", "name" => 'slide_footer_text', "type" => "textarea", "section" => "Text", "group" => "Footer", "value" => ""), array("label" => "Button Text", "name" => 'button_text', "type" => "text", "section" => "Text", "group" => "Button", "value" => ""), array("label" => "Slide Heading_2", "name" => 'slide_heading_2', "type" => "text", "section" => "Text", "group" => "Multiple Headings (Animated)", "value" => ""), array("label" => "Slide Heading_3", "name" => 'slide_heading_3', "type" => "text", "section" => "Text", "group" => "Multiple Headings (Animated)", "value" => ""), array("label" => "Slide Heading Font", "name" => 'slide_heading_font', "type" => "select", "section" => "Fonts", "group" => "Heading", "css_property" => "font-family", "value" => "", "list" => $fonts), array("label" => "Slide Heading Size", "name" => 'slide_heading_size', "type" => "select", "section" => "Fonts", "group" => "Heading", "css_property" => "font-size", "value" => "", "list" => $text_size_list), array("label" => "Slide Heading Font Weight", "name" => 'slide_heading_font_weight', "type" => "select", "section" => "Fonts", "group" => "Heading", "css_property" => "font-weight", "value" => "", "list" => $font_weights), array("label" => "Slide Heading line Height", "name" => 'slide_heading_line_height', "type" => "select", "section" => "Fonts", "group" => "Heading", "css_property" => "line-height", "value" => "", "list" => array("1.2em" => "1.2", "1.1em" => "1.1", "1em" => "1", "0.9em" => "0.9", "0.8em" => "0.8", "0.7em" => "0.7", "0.6em" => "0.6")), array("label" => "Slide Heading Letter Spacing", "name" => 'slide_heading_letter_spacing', "type" => "select", "section" => "Fonts", "group" => "Heading", "css_property" => "letter-spacing", "value" => "", "list" => $letter_spacing), array("label" => "Slide Text Font", "name" => 'slide_text_font', "type" => "select", "section" => "Fonts", "group" => "Sub Heading", "css_property" => "font-family", "value" => "", "list" => $fonts), array("label" => "Slide Text Size", "name" => 'slide_text_size', "type" => "select", "section" => "Fonts", "group" => "Sub Heading", "css_property" => "font-size", "value" => "", "list" => $text_size_list), array("label" => "Slide Text Font Weight", "name" => 'slide_text_font_weight', "type" => "select", "section" => "Fonts", "group" => "Sub Heading", "css_property" => "font-weight", "value" => "", "list" => $font_weights), array("label" => "Slide Footer Text Size", "name" => 'slide_footer_text_size', "type" => "select", "section" => "Fonts", "group" => "Footer", "css_property" => "font-size", "value" => "", "list" => $text_size_list), array("label" => "Slide Heading color", "name" => 'slide_heading_color', "type" => "text", "section" => "Colors", "group" => "Heading", "css_property" => "color", "value" => ""), array("label" => "Slide Heading Border Color", "name" => 'slide_heading_border_color', "type" => "text", "section" => "Colors", "group" => "Heading", "css_property" => "border-color", "value" => ""), array("label" => "Slide Heading Background Color", "name" => 'slide_heading_background_color', "type" => "text", "section" => "Colors", "group" => "Heading", "css_property" => "background-color", "value" => ""), array("label" => "Slide Text color", "name" => 'slide_text_color', "type" => "text", "section" => "Colors", "group" => "Sub heading", "css_property" => "color", "value" => ""), array("label" => "Background Color", "name" => 'background_color', "type" => "text", "section" => "Colors", "group" => "Background", "css_property" => "background-color", "value" => ""), array("label" => "Slide Heading Margin Top", "name" => 'slide_heading_margin_top', "type" => "select", "section" => "Spacing", "group" => "Heading", "css_property" => "margin-top", "value" => "", "list" => $margin), array("label" => "Slide Heading Margin Left", "name" => 'slide_heading_margin_left', "type" => "select", "section" => "Spacing", "group" => "Heading", "css_property" => "margin-left", "value" => "", "list" => $margin), array("label" => "Slide Heading Margin Right", "name" => 'slide_heading_margin_right', "type" => "select", "section" => "Spacing", "group" => "Heading", "css_property" => "margin-right", "value" => "", "list" => $margin), array("label" => "Slide Heading Margin Bottom", "name" => 'slide_heading_margin_bottom', "type" => "select", "section" => "Spacing", "group" => "Heading", "css_property" => "margin-bottom", "value" => "", "list" => $margin), array("label" => "Slide Heading Padding", "name" => 'slide_heading_padding', "type" => "select", "section" => "Spacing", "group" => "Heading", "css_property" => "padding", "value" => "", "list" => $margin), array("label" => "Slide Text Margin Top", "name" => 'slide_text_margin_top', "type" => "select", "section" => "Spacing", "group" => "Sub Heading", "css_property" => "margin-top", "value" => "", "list" => $margin), array("label" => "Slide Text Margin Left", "name" => 'slide_text_margin_left', "type" => "select", "section" => "Spacing", "group" => "Sub Heading", "css_property" => "margin-left", "value" => "", "list" => $margin), array("label" => "Slide Text Margin Right", "name" => 'slide_text_margin_right', "type" => "select", "section" => "Spacing", "group" => "Sub Heading", "css_property" => "margin-right", "value" => "", "list" => $margin), array("label" => "Button Margin top", "name" => 'button_margin_top', "type" => "select", "section" => "Spacing", "group" => "Button", "css_property" => "margin-top", "value" => "", "list" => $margin), array("label" => "Button Margin Bottom", "name" => 'button_margin_bottom', "type" => "select", "section" => "Spacing", "group" => "Button", "css_property" => "margin-bottom", "value" => "", "list" => $margin), array("label" => "Slide Footer padding", "name" => 'slide_footer_padding', "type" => "select", "section" => "Spacing", "group" => "Footer", "value" => "", "list" => $margin), array("label" => "Frame Margin Left", "name" => 'frame_margin_left', "type" => "select", "section" => "Spacing", "group" => "Frame", "css_property" => "margin-left", "value" => "", "list" => $withMinusMargin), array("label" => "Frame Margin Right", "name" => 'frame_margin_right', "type" => "select", "section" => "Spacing", "group" => "Frame", "css_property" => "margin-right", "value" => "", "list" => $withMinusMargin), array("label" => "Slide Heading Border Width", "name" => 'slide_heading_border_width', "type" => "select", "section" => "Effects", "group" => "Borders", "css_property" => "border-width", "value" => "", "list" => $border_width), array("label" => "Slide Heading Shadow", "name" => 'slide_heading_shadow_distance', "type" => "select", "section" => "Effects", "group" => "Shadows", "css_property" => "text-shadow-distance", "value" => "", "list" => $text_shadow_distance), array("label" => "Button Style", "name" => 'style_id', "type" => "select", "section" => "Button Settings", "group" => "Style", "value" => "", "list" => $style_ids), array("label" => "Button link", "name" => 'button_link', "type" => "text", "section" => "Button Settings", "group" => "Link", "value" => ""), array("label" => "Button Icon", "name" => 'icon', "type" => "select", "section" => "Button Settings", "group" => "Icon", "value" => "", "list" => $icons), array("label" => "Target", "name" => 'target', "type" => "select", "section" => "Button Settings", "group" => "Link", "value" => "", "list" => array("self" => "Self", "_blank" => "New Window")), array("label" => "Custom Image", "name" => 'background_custom_image', "type" => "wp_image", "section" => "Frame", "group" => "Background Image", "css_property" => "background-image", "value" => ""), array("label" => "Preset Image", "name" => 'background_image', "type" => "select", "section" => "Frame", "group" => "Background Image", "css_property" => "background-image", "value" => "", "list" => $images), array("label" => "Image Opacity", "name" => 'background_image_opacity', "type" => "select", "section" => "Frame", "group" => "Background Image", "css_property" => "opacity", "value" => "", "list" => $opacity), array("label" => "Image Blur", "name" => 'background_image_blur', "type" => "select", "section" => "Frame", "group" => "Background Image Effects", "css_property" => "blur", "value" => "", "list" => $text_shadow_distance), array("label" => "Background Repeat Image", "name" => 'background_repeat_image', "type" => "select", "section" => "Frame", "group" => "Repeat Image", "css_property" => "background-image", "value" => "", "list" => $repeat_images), array("label" => "Frame Height", "name" => 'frame_height', "type" => "select", "section" => "Frame", "group" => "Frame Height", "css_property" => "min-height", "value" => "", "list" => $slide_height), array("label" => "Frame Width", "name" => 'frame_width', "type" => "text", "section" => "Frame", "group" => "Frame Width", "css_property" => "width", "value" => ""));
     return $fields;
 }
Esempio n. 3
0
 public function fields()
 {
     $icons_arr = WPiArray::get_icons_arr();
     $icons = WPiTools::array2object($icons_arr);
     $fonts = WPiDesButCommon::get_fonts_options();
     $font_weight = WPiTools::get_list(array("suffix" => "", "list" => array(100, 300, 400, 600, 700)));
     $text_size_list = WPiTools::get_list(array("suffix" => "px", "list" => array(8, 9, 10, 12, 14, 16, 18, 20, 23, 26, 28, 30, 32, 36, 40, 44, 48, 52, 66, 72, 80, 100, 120)));
     $fields = array(array("label" => "Shape", "name" => 'shape', "type" => "select", "section" => "Button Common Settings", "value" => "", "list" => array("rectangle" => "Rectangle", "5px" => "5px", "7px" => "7px", "10px" => "10px", "15px" => "15px", "rounded" => "Rounded")), array("label" => "Padding", "name" => 'padding', "type" => "select", "section" => "Button Common Settings", "value" => "", "list" => array("3px" => "3px", "5px" => "5px", "7px" => "7px", "10px" => "10px", "15px" => "15px", "20px" => "20px", "30px" => "30px", "40px" => "40px", "50px" => "50px")), array("label" => "Font", "name" => 'font', "type" => "select", "section" => "Button Common Settings", "group" => "Font", "css_property" => "font-family", "value" => "", "list" => $fonts), array("label" => "Font Weight", "name" => 'font_weight', "type" => "select", "section" => "Button Common Settings", "group" => "Font", "css_property" => "font-weight", "value" => "", "list" => $font_weight), array("label" => "Text Size", "name" => 'text_size', "type" => "select", "section" => "Button Common Settings", "group" => "Font", "css_property" => "font-size", "value" => "", "list" => $text_size_list), array("label" => "Border Width", "name" => 'border_width', "type" => "select", "section" => "Button Common Settings", "group" => "Border", "css_property" => "border-width", "value" => "", "list" => array("0px" => "No", "1px" => "1px", "2px" => "2px", "3px" => "3px", "4px" => "4px", "5px" => "5px", "6px" => "6px", "7px" => "7px", "8px" => "8px", "9px" => "9px", "10px" => "10px")), array("label" => "Border Style", "name" => 'border_style', "type" => "select", "section" => "Button Common Settings", "group" => "Border", "css_property" => "border-style", "value" => "", "list" => array("solid" => "Solid", "dashed" => "Dashed", "dotted" => "Dotted", "double" => "Double", "inset" => "Inset", "outset" => "Outset")), array("label" => "Border Sides", "name" => 'border_sides', "type" => "select", "section" => "Button Common Settings", "group" => "Border", "value" => "", "list" => array("all" => "All Sides", "bottom" => "Only Bottom", "top" => "Only Top", "left" => "Only Left", "right" => "Only Right")), array("label" => "Shadow", "name" => 'shadow', "type" => "select", "section" => "Button Common Settings", "group" => "Shadow", "value" => "", "list" => array("no" => "No", "1px" => "1px", "2px" => "2px", "3px" => "3px", "4px" => "4px", "5px" => "5px", "6px" => "6px", "7px" => "7px", "8px" => "8px", "9px" => "9px", "10px" => "10px", "inset_wb" => "Inset White bottom", "inset_wt" => "Inset White Top", "inset_bb" => "Inset Black Bottom", "inset_bt" => "Inset Black Top")), array("label" => "Text Shadow", "name" => 'text_shadow', "type" => "select", "section" => "Button Common Settings", "group" => "Shadow", "value" => "", "list" => array("no" => "No", "1px" => "1px", "2px" => "2px", "3px" => "3px", "4px" => "4px", "5px" => "5px")), array("label" => "Glow Size", "name" => 'glow_size', "type" => "select", "section" => "Button Common Settings", "group" => "Glow", "css_property" => "glow", "value" => "", "list" => array("no" => "No", "1px" => "1px", "2px" => "2px", "3px" => "3px", "4px" => "4px", "5px" => "5px", "6px" => "6px", "7px" => "7px", "8px" => "8px", "9px" => "9px", "10px" => "10px")), array("label" => "Glow Color", "name" => 'glow_color', "type" => "text", "section" => "Button Common Settings", "group" => "Glow", "css_property" => "glow", "value" => ""), array("label" => "Texture", "name" => 'texture', "type" => "select", "section" => "Button Common Settings", "value" => "", "list" => array("no" => "No", "noise.png" => "Noise", "checks.png" => "Checks", "checks_small.png" => "Checks Small")), array("label" => "Display", "name" => 'display', "type" => "select", "section" => "Button Common Settings", "css_property" => "display", "value" => "", "list" => array("inline-block" => "Inline Block ", "block" => "Block")), array("label" => "Text Color", "name" => 'text_color', "type" => "text", "section" => "Button Normal Settings", "css_property" => "color", "value" => ""), array("label" => "Background Color", "name" => 'background_color', "type" => "text", "section" => "Button Normal Settings", "css_property" => "background-color", "value" => ""), array("label" => "Border Color", "name" => 'border_color', "type" => "text", "section" => "Button Normal Settings", "css_property" => "border-color", "value" => ""), array("label" => "Text Color", "name" => 'text_color_h', "type" => "text", "section" => "Button Hover Settings", "css_property" => "color", "value" => ""), array("label" => "Background Color", "name" => 'background_color_h', "type" => "text", "section" => "Button Hover Settings", "css_property" => "background-color", "value" => ""), array("label" => "Border Color", "name" => 'border_color_h', "type" => "text", "section" => "Button Hover Settings", "css_property" => "border-color", "value" => ""), array("label" => "Text Color", "name" => 'text_color_a', "type" => "text", "section" => "Button Active Settings", "css_property" => "color", "value" => ""), array("label" => "Background Color", "name" => 'background_color_a', "type" => "text", "section" => "Button Active Settings", "css_property" => "background-color", "value" => ""), array("label" => "Border Color", "name" => 'border_color_a', "type" => "text", "section" => "Button Active Settings", "css_property" => "border-color", "value" => ""));
     return $fields;
 }
Esempio n. 4
0
 public function fields()
 {
     $icons_arr = WPiArray::get_icons_arr();
     $gap = WPiTools::get_list(array("suffix" => "px", "list" => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)));
     $margin = WPiArray::get_margin();
     $margin = WPiTools::get_list(array("suffix" => "px", "list" => $margin));
     $show_hide = array(1 => "Show", 0 => "Hide");
     $style_ids = WPiDesButCommon::get_style_ids();
     $fields = array(array("label" => "Facebook", "name" => 'facebook', "type" => "boolean", "section" => "Buttons", "group" => "Facebook", "value" => "", "list" => $show_hide), array("label" => "Twitter", "name" => 'twitter', "type" => "boolean", "section" => "Buttons", "group" => "Twitter", "value" => "", "list" => $show_hide), array("label" => "LinkedIn", "name" => 'linkedin', "type" => "boolean", "section" => "Buttons", "group" => "Linkedin", "value" => "", "list" => $show_hide), array("label" => "Pinterest", "name" => 'pinterest', "type" => "boolean", "section" => "Buttons", "group" => "Pinterest", "value" => "", "list" => $show_hide), array("label" => "Google Plus", "name" => 'googleplus', "type" => "boolean", "section" => "Buttons", "group" => "Google Plus", "value" => "", "list" => $show_hide), array("label" => "Tumblr", "name" => 'tumblr', "type" => "boolean", "section" => "Buttons", "group" => "tumblr", "value" => "", "list" => $show_hide), array("label" => "Stumbleupon", "name" => 'stumbleupon', "type" => "boolean", "section" => "Buttons", "group" => "Stumbleupon", "value" => "", "list" => $show_hide), array("label" => "Reddit", "name" => 'reddit', "type" => "boolean", "section" => "Buttons", "group" => "Reddit", "value" => "", "list" => $show_hide), array("label" => "WordPress", "name" => 'wordpress', "type" => "boolean", "section" => "Buttons", "group" => "WordPress", "value" => "", "list" => $show_hide), array("label" => "Email", "name" => 'email', "type" => "boolean", "section" => "Buttons", "group" => "Email", "value" => "", "list" => $show_hide), array("label" => "Style Id", "name" => 'style_id', "type" => "select", "section" => "Button Style", "group" => "Style", "value" => "", "list" => $style_ids), array("label" => "Share Text", "name" => 'share_text', "type" => "text", "section" => "Text", "group" => "Text", "value" => ""), array("label" => "Button Gap", "name" => 'button_gap', "type" => "select", "section" => "Spacing", "group" => "Button Gap", "value" => "", "list" => $gap), array("label" => "Share Text", "name" => 'share_text_margin_bottom', "type" => "select", "section" => "Spacing", "group" => "Shate Text", "css_property" => "margin-bottom", "value" => "", "list" => $gap), array("label" => "Frame Padding Top", "name" => 'frame_padding_top', "type" => "select", "section" => "Spacing", "group" => "Frame", "css_property" => "padding-top", "value" => "", "list" => $margin), array("label" => "Frame Padding Bottom", "name" => 'frame_padding_bottom', "type" => "select", "section" => "Spacing", "group" => "Frame", "css_property" => "padding-bottom", "value" => "", "list" => $margin), array("label" => "Frame Padding Left", "name" => 'frame_padding_left', "type" => "select", "section" => "Spacing", "group" => "Frame", "css_property" => "padding-left", "value" => "", "list" => $margin), array("label" => "Frame Padding right", "name" => 'frame_padding_right', "type" => "select", "section" => "Spacing", "group" => "Frame", "css_property" => "padding-right", "value" => "", "list" => $margin));
     return $fields;
 }