コード例 #1
0
ファイル: image-banner.php プロジェクト: arobbins/spellestate
        $width = spb_translateColumnWidthToSpan($width);
        $output .= "\n\t" . '<div class="spb_content_element spb_image_banner ' . $width . $el_class . '">';
        $output .= "\n\t\t" . '<div class="spb-asset-content">';
        $output .= "\n\t\t" . do_shortcode('[sf_imagebanner image_id="' . $image_id . '" image_size="' . $image_size . '" fixed_height="' . $fixed_height . '" image="' . $img_url . '" image_width="' . $image_width . '" image_height="' . $image_height . '" image_alt="' . $image_alt . '" animation="' . $animation . '" contentpos="' . $content_pos . '" textalign="' . $content_textalign . '" href="' . $image_link . '" target="' . $link_target . '"]' . $content . '[/sf_imagebanner]');
        $output .= "\n\t\t" . '</div>';
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
        return $output;
    }
    public function singleParamHtmlHolder($param, $value)
    {
        $output = '';
        $param_name = isset($param['param_name']) ? $param['param_name'] : '';
        $type = isset($param['type']) ? $param['type'] : '';
        $class = isset($param['class']) ? $param['class'] : '';
        if (isset($param['holder']) == false || $param['holder'] == 'hidden') {
            $output .= '<input type="hidden" class="spb_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '" value="' . $value . '" />';
            if ($param['type'] == 'attach_image') {
                $img = spb_getImageBySize(array('attach_id' => (int) preg_replace('/[^\\d]/', '', $value), 'thumb_size' => 'thumbnail'));
                $output .= ($img ? $img['thumbnail'] : '<img width="150" height="150" src="' . SwiftPageBuilder::getInstance()->assetURL('img/blank_f7.gif') . '" class="attachment-thumbnail" alt="" title="" />') . '<a href="#" class="column_edit_trigger' . ($img && !empty($img['p_img_large'][0]) ? ' image-exists' : '') . '"><i class="spb-icon-single-image"></i>' . __('No image yet! Click here to select it now.', 'swift-framework-plugin') . '</a>';
            }
        } else {
            $output .= '<' . $param['holder'] . ' class="spb_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '">' . $value . '</' . $param['holder'] . '>';
        }
        return $output;
    }
}
$image_sizes = array(__("Full", 'swift-framework-plugin') => "full", __("Large", 'swift-framework-plugin') => "large", __("Medium", 'swift-framework-plugin') => "medium", __("Thumbnail", 'swift-framework-plugin') => "thumbnail", __("Small 4/3 Cropped", 'swift-framework-plugin') => "thumb-image", __("Medium 4/3 Cropped", 'swift-framework-plugin') => "thumb-image-twocol", __("Large 4/3 Cropped", 'swift-framework-plugin') => "thumb-image-onecol", __("Large 1/1 Cropped", 'swift-framework-plugin') => "large-square");
$image_sizes = apply_filters('sf_image_sizes', $image_sizes);
SPBMap::map('spb_image_banner', array("name" => __("Image Banner", 'swift-framework-plugin'), "base" => "spb_image_banner", "class" => "spb_image_banner_widget spb_tab_media", "icon" => "icon-image-banner", "params" => array(array("type" => "attach_image", "heading" => __("Image", 'swift-framework-plugin'), "param_name" => "image", "value" => "", "description" => ""), array("type" => "dropdown", "heading" => __("Image Size", 'swift-framework-plugin'), "param_name" => "image_size", "value" => $image_sizes, "description" => __("Select the source size for the image (NOTE: this doesn't affect it's size on the front-end, only the quality).", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Fixed image height", 'swift-framework-plugin'), "param_name" => "fixed_height", "value" => "", "description" => __("If you wish to fix the image height, for purposes such as a grid, then please provide a numeric value here (no px).", 'swift-framework-plugin')), array("type" => "textarea_html", "holder" => "div", "class" => "", "heading" => __("Text", 'swift-framework-plugin'), "param_name" => "content", "value" => '', "description" => __("Enter your content.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Content Position", 'swift-framework-plugin'), "param_name" => "content_pos", "value" => array(__("Left", 'swift-framework-plugin') => "left", __("Center", 'swift-framework-plugin') => "center", __("Right", 'swift-framework-plugin') => "right"), "description" => __("Choose the alignment for the content.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Content Text Align", 'swift-framework-plugin'), "param_name" => "content_textalign", "value" => array(__("Left", 'swift-framework-plugin') => "left", __("Center", 'swift-framework-plugin') => "center", __("Right", 'swift-framework-plugin') => "right"), "description" => __("Choose the alignment for the text within the content.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Animation", 'swift-framework-plugin'), "param_name" => "animation", "value" => spb_animations_list(), "description" => __("Select an intro animation for the content that will show it when it appears within the viewport.", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Animation Delay", 'swift-framework-plugin'), "param_name" => "animation_delay", "value" => "200", "description" => __("If you wish to add a delay to the animation, then you can set it here (default 200) (ms).", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Add link to image", 'swift-framework-plugin'), "param_name" => "image_link", "value" => "", "description" => __("If you would like the image to link to a URL, then enter it here. NOTE: this will override the lightbox functionality if you have enabled it.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Link target", 'swift-framework-plugin'), "param_name" => "link_target", "value" => array(__("Self", 'swift-framework-plugin') => "_self", __("New Window", 'swift-framework-plugin') => "_blank"), "description" => __("Select if you want the link to open in a new window", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Extra class", 'swift-framework-plugin'), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style this particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'swift-framework-plugin')))));
コード例 #2
0
ファイル: row.php プロジェクト: arobbins/spellestate
    $params[] = array("type" => "dropdown", "heading" => __("Header Style", 'swift-framework-plugin'), "param_name" => "row_header_style", "value" => array("" => "", __("Light", 'swift-framework-plugin') => "light", __("Dark", 'swift-framework-plugin') => "dark"), "description" => __("If you have the transparent sticky header option enabled in the page meta options, then you can set the header style when scrolling over this row.", 'swift-framework-plugin'));
}
if (sf_theme_supports('advanced-row-styling')) {
    $params[] = array("type" => "dropdown", "heading" => __("Row top style", 'swift-framework-plugin'), "param_name" => "row_top_style", "value" => array(__("None", 'swift-framework-plugin') => "none", __("Slant Left-to-right", 'swift-framework-plugin') => "slant-ltr", __("Slant Right-to-left", 'swift-framework-plugin') => "slant-rtl"), "description" => __("Choose the top style for the row, or none.", 'swift-framework-plugin'));
    $params[] = array("type" => "dropdown", "heading" => __("Row bottom style", 'swift-framework-plugin'), "param_name" => "row_bottom_style", "value" => array(__("None", 'swift-framework-plugin') => "none", __("Slant Left-to-right", 'swift-framework-plugin') => "slant-ltr", __("Slant Right-to-left", 'swift-framework-plugin') => "slant-rtl"), "description" => __("Choose the bottom style for the row, or none.", 'swift-framework-plugin'));
}
$params[] = array("type" => "dropdown", "heading" => __("Row Overlay style", 'swift-framework-plugin'), "param_name" => "parallax_video_overlay", "value" => array(__("None", 'swift-framework-plugin') => "none", __("Color", 'swift-framework-plugin') => "color", __("Light Grid", 'swift-framework-plugin') => "lightgrid", __("Dark Grid", 'swift-framework-plugin') => "darkgrid", __("Light Grid (Fat)", 'swift-framework-plugin') => "lightgridfat", __("Dark Grid (Fat)", 'swift-framework-plugin') => "darkgridfat", __("Light Diagonal", 'swift-framework-plugin') => "diaglight", __("Dark Diagonal", 'swift-framework-plugin') => "diagdark", __("Light Vertical", 'swift-framework-plugin') => "vertlight", __("Dark Vertical", 'swift-framework-plugin') => "vertdark", __("Light Horizontal", 'swift-framework-plugin') => "horizlight", __("Dark Horizontal", 'swift-framework-plugin') => "horizdark"), "description" => __("If you would like an overlay to appear on top of the image/video, then you can select it here.", 'swift-framework-plugin'));
$params[] = array("type" => "uislider", "heading" => __("Row Overlay Opacity", 'swift-framework-plugin'), "param_name" => "row_overlay_opacity", "value" => "30", "step" => "5", "min" => "0", "max" => "100", "description" => __("Adjust the overlay capacity if using an image or video option. This only has effect for the color overlay style option, and shows an overlay over the image/video at the desired opacity. Percentage.", 'swift-framework-plugin'));
$params[] = array("type" => "uislider", "heading" => __("Padding - Vertical", 'swift-framework-plugin'), "param_name" => "row_padding_vertical", "value" => "0", "description" => __("Adjust the vertical padding for the row. (px)", 'swift-framework-plugin'));
if (sf_theme_supports('advanced-row-styling')) {
    $params[] = array("type" => "uislider", "heading" => __("Padding - Horizontal", 'swift-framework-plugin'), "param_name" => "row_padding_horizontal", "value" => "0", "min" => "0", "step" => "1", "max" => "20", "description" => __("Adjust the horizontal padding for the row. (%)", 'swift-framework-plugin'));
}
$params[] = array("type" => "uislider", "heading" => __("Margin - Vertical", 'swift-framework-plugin'), "param_name" => "row_margin_vertical", "value" => "0", "description" => __("Adjust the margin above and below the row. (px)", 'swift-framework-plugin'));
$params[] = array("type" => "buttonset", "heading" => __("Remove Element Spacing", 'swift-framework-plugin'), "param_name" => "remove_element_spacing", "value" => array(__('No', 'swift-framework-plugin') => "no", __('Yes', 'swift-framework-plugin') => "yes"), "buttonset_on" => "yes", "description" => __("Enable this option if you wish to remove all spacing from the elements within the row.", 'swift-framework-plugin'));
$params[] = array("type" => "buttonset", "heading" => __("Vertically Center Elements Within", 'swift-framework-plugin'), "param_name" => "vertical_center", "value" => array(__('No', 'swift-framework-plugin') => "false", __('Yes', 'swift-framework-plugin') => "true"), "buttonset_on" => "true", "std" => "false", "description" => __("Enable this option if you wish to center the elements within the row.", 'swift-framework-plugin'));
$params[] = array("type" => "dropdown", "heading" => __("Inner Column Height", 'swift-framework-plugin'), "param_name" => "inner_column_height", "value" => array(__('Natural', 'swift-framework-plugin') => "col-natural", __('Window Height', 'swift-framework-plugin') => "col-window-height"), "description" => __("If you have the Window Height option selected for the row, and would like inner column assets to be 100% height, then please select the Window Height option here.", 'swift-framework-plugin'));
$params[] = array("type" => "buttonset", "heading" => __("Expanding Row", 'swift-framework-plugin'), "param_name" => "row_expanding", "value" => array(__("No", 'swift-framework-plugin') => "no", __("Yes", 'swift-framework-plugin') => "yes"), "buttonset_on" => "yes", "description" => __("If you would like the content to be hidden on load, and have a text link to expand the content, then select Yes.", 'swift-framework-plugin'));
$params[] = array("type" => "textfield", "heading" => __("Expanding Link Text (Content Closed)", 'swift-framework-plugin'), "param_name" => "row_expading_text_closed", "value" => "", "required" => array("row_expanding", "=", "yes"), "description" => __("This is the text that is shown when the expanding row is closed.", 'swift-framework-plugin'));
$params[] = array("type" => "textfield", "heading" => __("Expanding Link Text (Content Open)", 'swift-framework-plugin'), "param_name" => "row_expading_text_open", "value" => "", "required" => array("row_expanding", "=", "yes"), "description" => __("This is the text that is shown when the expanding row is open.", 'swift-framework-plugin'));
$params[] = array("type" => "section_tab", "param_name" => "animation_tab", "heading" => __("Animation", 'swift-framework-plugin'));
$params[] = array("type" => "dropdown", "heading" => __("Intro Animation", 'swift-framework-plugin'), "param_name" => "row_animation", "value" => spb_animations_list(), "description" => __("Select an intro animation for the row which will show it when it appears within the viewport.", 'swift-framework-plugin'));
$params[] = array("type" => "textfield", "heading" => __("Animation Delay", 'swift-framework-plugin'), "param_name" => "row_animation_delay", "value" => "0", "description" => __("If you wish to add a delay to the animation, then you can set it here (ms).", 'swift-framework-plugin'));
$params[] = array("type" => "section_tab", "param_name" => "row_misc_tab", "heading" => __("Misc/ID", 'swift-framework-plugin'));
$params[] = array("type" => "dropdown", "heading" => __("Responsive Visiblity", 'swift-framework-plugin'), "param_name" => "row_responsive_vis", "holder" => 'indicator', "value" => spb_responsive_vis_list(), "description" => __("Set the responsive visiblity for the row, if you would only like it to display on certain display sizes.", 'swift-framework-plugin'));
$params[] = array("type" => "textfield", "heading" => __("Row ID", 'swift-framework-plugin'), "param_name" => "row_id", "value" => "", "description" => __("If you wish to add an ID to the row, then add it here. You can then use the id to deep link to this section of the page. This is also used for one page navigation. NOTE: Make sure this is unique to the page!!", 'swift-framework-plugin'));
$params[] = array("type" => "textfield", "heading" => __("Row Section Name", 'swift-framework-plugin'), "param_name" => "row_name", "value" => "", "description" => __("This is used for the one page navigation, to identify the row. If this is left blank, then the row will be left off of the one page navigation.", 'swift-framework-plugin'));
$params[] = array("type" => "textfield", "heading" => __("Row Extra Class", 'swift-framework-plugin'), "param_name" => "row_el_class", "value" => "", "description" => __("If you wish to style this particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'swift-framework-plugin'));
$params[] = array("type" => "buttonset", "heading" => __("Minimize Row", 'swift-framework-plugin'), "param_name" => "minimize_row", "value" => array(__("Yes", 'swift-framework-plugin') => "yes", __("No", 'swift-framework-plugin') => "no"), "buttonset_on" => "yes", "description" => "Choose if you would like to minimize the Row inside the Page Builder editing.");
/* SHORTCODE MAP
   ================================================== */
SPBMap::map('spb_row', array("name" => __("Row", 'swift-framework-plugin'), "base" => "spb_row", "controls" => "edit_delete", "class" => "spb_row spb_tab_layout", "icon" => "icon-row", "content_element" => true, "params" => $params));
コード例 #3
0
ファイル: icon-box.php プロジェクト: arobbins/spellestate
        extract(shortcode_atts(array('title' => '', 'icon' => '', 'character' => '', 'image' => '', 'svg_icon' => '', 'animate_svg' => '', 'box_type' => '', 'box_icon_type' => '', 'icon_color' => '', 'icon_bg_color' => '', 'text_color' => '', 'bg_color' => '', 'flip_text_color' => '', 'flip_bg_color' => '', 'animated_box_style' => '', 'animated_box_rounded' => '', 'animation' => '', 'animation_delay' => '', 'link' => '', 'target' => '', 'el_class' => '', 'el_position' => '', 'width' => '1/1'), $atts));
        $output = '';
        if ($image != "") {
            $img_url = wp_get_attachment_url($image, 'full');
            $image_object = sf_aq_resize($img_url, 70, 70, true, false);
            $image_url = $image_object[0];
        }
        $icon_box_output = do_shortcode('[sf_iconbox icon="' . $icon . '" character="' . $character . '" image="' . $image_url . '" svg="' . $svg_icon . '" animate_svg="' . $animate_svg . '" type="' . $box_type . '" icon_type="' . $box_icon_type . '" title="' . $title . '" animation="' . $animation . '" animation_delay="' . $animation_delay . '" bg_color="' . $bg_color . '" text_color="' . $text_color . '" icon_color="' . $icon_color . '" icon_bg_color="' . $icon_bg_color . '" flip_text_color="' . $flip_text_color . '" flip_bg_color="' . $flip_bg_color . '" animated_box_style="' . $animated_box_style . '" animated_box_rounded="' . $animated_box_rounded . '" link="' . $link . '" target="' . $target . '"]' . $content . '[/sf_iconbox]');
        $el_class = $this->getExtraClass($el_class);
        $width = spb_translateColumnWidthToSpan($width);
        $output .= "\n\t" . '<div class="spb_icon_box ' . $width . $el_class . '">';
        $output .= "\n\t\t" . '<div class="spb-asset-content">';
        $output .= "\n\t\t" . $icon_box_output;
        $output .= "\n\t\t" . '</div>';
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
        global $sf_include_carousel;
        $sf_include_carousel = true;
        return $output;
    }
}
$target_arr = array(__("Same window", 'swift-framework-plugin') => "_self", __("New window", 'swift-framework-plugin') => "_blank");
$icon_box_icon_types = array('' => '', __("Icon", 'swift-framework-plugin') => "icon", __("Character", 'swift-framework-plugin') => "character", __("Image", 'swift-framework-plugin') => "image");
$icon_box_types = array(__('Standard', 'swift-framework-plugin') => "standard", __('Standard with Title Icon', 'swift-framework-plugin') => "standard-title", __('Bold', 'swift-framework-plugin') => "bold", __('Left Icon', 'swift-framework-plugin') => "left-icon", __('Left Icon Alt', 'swift-framework-plugin') => "left-icon-alt", __('Boxed One', 'swift-framework-plugin') => "boxed-one", __('Boxed Two', 'swift-framework-plugin') => "boxed-two", __('Boxed Three', 'swift-framework-plugin') => "boxed-three", __('Boxed Four', 'swift-framework-plugin') => "boxed-four", __('Animated', 'swift-framework-plugin') => "animated");
if (spb_get_theme_name() == "atelier") {
    $icon_box_types = array(__('Standard', 'swift-framework-plugin') => "standard", __('Standard with Title Icon', 'swift-framework-plugin') => "standard-title", __('Left Icon', 'swift-framework-plugin') => "left-icon", __('Left Icon Alt', 'swift-framework-plugin') => "left-icon-alt", __('Boxed One', 'swift-framework-plugin') => "boxed-one", __('Boxed Two', 'swift-framework-plugin') => "boxed-two", __('Boxed Three', 'swift-framework-plugin') => "boxed-three", __('Boxed Four', 'swift-framework-plugin') => "boxed-four", __('Animated', 'swift-framework-plugin') => "animated");
}
$icon_box_icon_types = apply_filters('spb_icon_box_icon_types', $icon_box_icon_types);
$icon_box_types = apply_filters('spb_icon_box_types', $icon_box_types);
SPBMap::map('spb_icon_box', array("name" => __("Icon Box", 'swift-framework-plugin'), "base" => "spb_icon_box", "class" => "spb_tab_ui", "icon" => "icon-icon-box", "wrapper_class" => "clearfix", "params" => array(array("type" => "textfield", "heading" => __("Icon Box title", 'swift-framework-plugin'), "param_name" => "title", "value" => "", "description" => __("Icon Box title text.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Icon Box Type", 'swift-framework-plugin'), "param_name" => "box_type", "value" => $icon_box_types, "description" => __("Choose the type of icon box.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Icon Box Icon Type", 'swift-framework-plugin'), "param_name" => "box_icon_type", "value" => $icon_box_icon_types, "description" => __("Choose the type of icon box.", 'swift-framework-plugin')), array("type" => "icon-picker", "heading" => __("Icon Box Icon", 'swift-framework-plugin'), "param_name" => "icon", "value" => "", "required" => array("box_icon_type", "=", "icon"), "description" => ''), array("type" => "textfield", "heading" => __("Icon Box Character", 'swift-framework-plugin'), "param_name" => "character", "value" => "", "required" => array("box_icon_type", "=", "character"), "description" => __("Instead of an icon, you can optionally provide a single letter/digit here. NOTE: This will override the icon selection.", 'swift-framework-plugin')), array("type" => "attach_image", "heading" => __("Icon Box Image", 'swift-framework-plugin'), "param_name" => "image", "value" => "", "required" => array("box_icon_type", "=", "image"), "description" => __("Instead of an icon, you can optionally upload an image here. This will be resized to 70px x 70px. NOTE: This will override the icon selection.", 'swift-framework-plugin')), array("type" => "icon-picker", "heading" => __("Icon Box SVG", 'swift-framework-plugin'), "param_name" => "svg_icon", "data" => spb_get_svg_icons(), "value" => "", "required" => array("box_icon_type", "=", "svg"), "description" => __("You can select an SVG icon here.", 'swift-framework-plugin')), array("type" => "buttonset", "heading" => __("Animate SVG Icon", 'swift-framework-plugin'), "param_name" => "animate_svg", "value" => array(__('No', 'swift-framework-plugin') => "no", __('Yes', 'swift-framework-plugin') => "yes"), "required" => array("box_icon_type", "=", "svg"), "description" => __("If you are using an outline svg icon, then you can enable/disable the drawing animation on appear here.", 'swift-framework-plugin')), array("type" => "textarea_html", "holder" => "div", "class" => "", "heading" => __("Text", 'swift-framework-plugin'), "param_name" => "content", "value" => __("click the edit button to change this text.", 'swift-framework-plugin'), "description" => __("Enter your content.", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Icon Box Link", 'swift-framework-plugin'), "param_name" => "link", "value" => "", "description" => __("If you would like, you can set a link here for the icon and title to link through to.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Link Target", 'swift-framework-plugin'), "param_name" => "target", "value" => $target_arr), array("type" => "section", "param_name" => "ib_animation_options", "heading" => __("Animation Options", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Intro Animation", 'swift-framework-plugin'), "param_name" => "animation", "value" => spb_animations_list(), "description" => __("Select an intro animation for the icon box that will show it when it appears within the viewport.", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Animation Delay", 'swift-framework-plugin'), "param_name" => "animation_delay", "value" => "0", "description" => __("If you wish to add a delay to the animation, then you can set it here (ms).", 'swift-framework-plugin')), array("type" => "section_tab", "param_name" => "design_tab", "heading" => __("Design Options", 'swift-framework-plugin')), array("type" => "colorpicker", "heading" => __("Icon color", 'swift-framework-plugin'), "param_name" => "icon_color", "value" => "", "description" => __("Set the icon colour for the icon box, or leave blank to use the default colours.", 'swift-framework-plugin')), array("type" => "colorpicker", "heading" => __("Icon Background color", 'swift-framework-plugin'), "param_name" => "icon_bg_color", "value" => "", "description" => __("Set the icon background colour for the icon box, or leave blank to use the default colours.", 'swift-framework-plugin')), array("type" => "colorpicker", "heading" => __("Text color", 'swift-framework-plugin'), "param_name" => "text_color", "value" => "", "description" => __("Set the text colour for the icon box, or leave blank to use the default colours.", 'swift-framework-plugin')), array("type" => "colorpicker", "heading" => __("Background color", 'swift-framework-plugin'), "param_name" => "bg_color", "value" => "", "description" => __("Set the background colour for the icon box, or leave blank to use the default colours.", 'swift-framework-plugin')), array("type" => "colorpicker", "heading" => __("Flip Background color", 'swift-framework-plugin'), "param_name" => "flip_bg_color", "value" => "", "required" => array("box_type", "or", "animated,animated-alt"), "description" => __("Set the background colour for the back of the animated icon box, or leave blank to use the default colours.", 'swift-framework-plugin')), array("type" => "colorpicker", "heading" => __("Flip Text color", 'swift-framework-plugin'), "param_name" => "flip_text_color", "value" => "", "required" => array("box_type", "or", "animated,animated-alt"), "description" => __("Set the text colour for the back of the animated icon box, or leave blank to use the default colours.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Animated Box Style", 'swift-framework-plugin'), "param_name" => "animated_box_style", "value" => array(__('Stroke', 'swift-framework-plugin') => "stroke", __('Coloured', 'swift-framework-plugin') => "coloured"), "std" => 'coloured', "required" => array("box_type", "=", "animated-alt"), "description" => __("If you are using the animated icon box option, you can choose the style here.", 'swift-framework-plugin')), array("type" => "buttonset", "heading" => __("Animated Box Rounded", 'swift-framework-plugin'), "param_name" => "animated_box_rounded", "value" => array(__('Yes', 'swift-framework-plugin') => "yes", __('No', 'swift-framework-plugin') => "no"), "std" => 'yes', "required" => array("box_type", "=", "animated-alt"), "description" => __("If you are using the animated icon box option, you can choose to set it to be rounded here.", 'swift-framework-plugin')), array("type" => "section_tab", "param_name" => "misc_tab", "heading" => __("Misc Options", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Extra class", 'swift-framework-plugin'), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style this particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'swift-framework-plugin')))));
コード例 #4
0
ファイル: button.php プロジェクト: arobbins/spellestate
        $button_colour = strtolower($button_colour);
        $button_type = strtolower($button_type);
        $el_class = $this->getExtraClass($el_class);
        $width = spb_translateColumnWidthToSpan($width);
        $output .= "\n\t" . '<div class="spb_button spb_content_element ' . $width . $el_class . '" data-align="' . $align . '" data-animation="' . $animation . '" data-delay="' . $animation_delay . '">';
        $output .= "\n\t\t" . '<div class="spb-asset-content">';
        $output .= "\n\t\t\t" . do_shortcode('[sf_button type="' . $button_type . '" colour="' . $button_colour . '" size="' . $button_size . '" link="' . $button_link . '" target="' . $button_target . '" rounded="' . $rounded . '" dropshadow="' . $button_dropshadow . '" icon="' . $button_icon . '"]' . $button_text . '[/sf_button]');
        $output .= "\n\t\t" . '</div>';
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
        return $output;
    }
}
/* PARAMS
   ================================================== */
$button_types = array('standard' => __('Standard', 'swiftframework'), 'bordered' => __('Bordered', 'swiftframework'), 'rotate-3d' => __('3D Rotate', 'swiftframework'), 'stroke-to-fill' => __('Stroke To Fill', 'swiftframework'), 'sf-icon-reveal' => __('Icon Reveal', 'swiftframework'), 'sf-icon-stroke' => __('Icon', 'swiftframework'));
if (!sf_theme_supports('3drotate-button')) {
    unset($button_types['rotate-3d']);
}
if (!sf_theme_supports('bordered-button')) {
    unset($button_types['bordered']);
}
$button_sizes = array('standard' => __('Standard', 'swiftframework'), 'large' => __('Large', 'swiftframework'));
$button_colours = array('accent' => __('Accent', 'swiftframework'), 'black' => __('Black', 'swiftframework'), 'white' => __('White', 'swiftframework'), 'blue' => __('Blue', 'swiftframework'), 'grey' => __('Grey', 'swiftframework'), 'lightgrey' => __('Light Grey', 'swiftframework'), 'orange' => __('Orange', 'swiftframework'), 'green' => __('Green', 'swiftframework'), 'pink' => __('Pink', 'swiftframework'), 'gold' => __('Gold', 'swiftframework'), 'transparent-light' => __('Transparent - Light', 'swiftframework'), 'transparent-dark' => __('Transparent - Dark', 'swiftframework'));
$button_types = apply_filters('sf_shortcode_button_types', $button_types);
$button_sizes = apply_filters('sf_shortcode_button_sizes', $button_sizes);
$button_colours = apply_filters('sf_shortcode_button_colours', $button_colours);
$params = array(array("type" => "textfield", "heading" => __("Button Text", 'swift-framework-plugin'), "param_name" => "button_text", "value" => "", "description" => __("Enter the button text here.", 'swift-framework-plugin')), array("type" => "dropdown-id", "heading" => __("Button Size", 'swift-framework-plugin'), "param_name" => "button_size", "value" => $button_sizes, "description" => __("Choose the button size.", 'swift-framework-plugin')), array("type" => "dropdown-id", "heading" => __("Button Colour", 'swift-framework-plugin'), "param_name" => "button_colour", "value" => $button_colours, "description" => __("Choose the button colour.", 'swift-framework-plugin')), array("type" => "dropdown-id", "heading" => __("Button Type", 'swift-framework-plugin'), "param_name" => "button_type", "value" => $button_types, "description" => __("Choose the button type.", 'swift-framework-plugin')), array("type" => "buttonset", "heading" => __("Rounded Button", 'swift-framework-plugin'), "param_name" => "rounded", "value" => array(__("No", 'swift-framework-plugin') => "no", __("Yes", 'swift-framework-plugin') => "yes"), "buttonset_on" => "yes", "description" => __("Select if you want the button to be rounded.", 'swift-framework-plugin')), array("type" => "buttonset", "heading" => __("Button Drop Shadow", 'swift-framework-plugin'), "param_name" => "button_dropshadow", "value" => array(__("No", 'swift-framework-plugin') => "no", __("Yes", 'swift-framework-plugin') => "yes"), "buttonset_on" => "yes", "description" => __("Select if you want the button to have a drop shadow.", 'swift-framework-plugin')), array("type" => "icon-picker", "heading" => __("Button Icon", 'swift-framework-plugin'), "param_name" => "button_icon", "value" => "", "description" => ''), array("type" => "textfield", "heading" => __("Button Link", 'swift-framework-plugin'), "param_name" => "button_link", "value" => "", "description" => __("Enter the button link here, be sure to include http://.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Button Link Target", 'swift-framework-plugin'), "param_name" => "button_target", "value" => array(__("Self", 'swift-framework-plugin') => "_self", __("New Window", 'swift-framework-plugin') => "_blank"), "description" => __("Select if you want the link to open in a new window or in the same window.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Button align", 'swift-framework-plugin'), "param_name" => "align", "value" => array(__("Left", 'swift-framework-plugin') => "left", __("Center", 'swift-framework-plugin') => "center", __("Right", 'swift-framework-plugin') => "right"), "std" => 'center', "description" => __("Choose the button alignment.", 'swift-framework-plugin')), array("type" => "section", "param_name" => "tb_animation_options", "heading" => __("Animation Options", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Intro Animation", 'swift-framework-plugin'), "param_name" => "animation", "value" => spb_animations_list(), "description" => __("Select an intro animation for the text block that will show it when it appears within the viewport.", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Animation Delay", 'swift-framework-plugin'), "param_name" => "animation_delay", "value" => "0", "description" => __("If you wish to add a delay to the animation, then you can set it here (ms).", 'swift-framework-plugin')), array("type" => "section", "param_name" => "btn_misc_options", "heading" => __("Misc Options", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Extra class", 'swift-framework-plugin'), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style this particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'swift-framework-plugin')));
/* SHORTCODE MAP
   ================================================== */
SPBMap::map('spb_button', array("name" => __("Button", 'swift-framework-plugin'), "base" => "spb_button", "class" => "spb_button spb_tab_ui", "icon" => "icon-button", "params" => $params));
コード例 #5
0
ファイル: media.php プロジェクト: arobbins/spellestate
        $class = isset($param['class']) ? $param['class'] : '';
        if (isset($param['holder']) == false || $param['holder'] == 'hidden') {
            $output .= '<input type="hidden" class="spb_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '" value="' . $value . '" />';
            if ($param['type'] == 'attach_image') {
                $img = spb_getImageBySize(array('attach_id' => (int) preg_replace('/[^\\d]/', '', $value), 'thumb_size' => 'thumbnail'));
                $output .= ($img ? $img['thumbnail'] : '<img width="66" height="66" src="' . SwiftPageBuilder::getInstance()->assetURL('img/blank_f7.gif') . '" class="attachment-thumbnail" alt="" title="" />') . '<a href="#" class="column_edit_trigger' . ($img && !empty($img['p_img_large'][0]) ? ' image-exists' : '') . '"><i class="spb-icon-single-image"></i>' . __('No image yet! Click here to select it now.', 'swift-framework-plugin') . '</a>';
            }
        } else {
            $output .= '<' . $param['holder'] . ' class="spb_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '">' . $value . '</' . $param['holder'] . '>';
        }
        return $output;
    }
}
$image_sizes = array(__("Full", 'swift-framework-plugin') => "full", __("Large", 'swift-framework-plugin') => "large", __("Medium", 'swift-framework-plugin') => "medium", __("Thumbnail", 'swift-framework-plugin') => "thumbnail", __("Small 4/3 Cropped", 'swift-framework-plugin') => "thumb-image", __("Medium 4/3 Cropped", 'swift-framework-plugin') => "thumb-image-twocol", __("Large 4/3 Cropped", 'swift-framework-plugin') => "thumb-image-onecol", __("Large 1/1 Cropped", 'swift-framework-plugin') => "large-square");
$image_sizes = apply_filters('sf_image_sizes', $image_sizes);
SPBMap::map('spb_image', array("name" => __("Image", 'swift-framework-plugin'), "base" => "spb_image", "class" => "spb_image_widget spb_tab_media", "icon" => "icon-image", "params" => array(array("type" => "textfield", "heading" => __("Widget title", 'swift-framework-plugin'), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", 'swift-framework-plugin')), array("type" => "attach_image", "heading" => __("Image", 'swift-framework-plugin'), "param_name" => "image", "value" => ""), array("type" => "dropdown", "heading" => __("Image Size", 'swift-framework-plugin'), "param_name" => "image_size", "value" => $image_sizes, "description" => __("Select the source size for the image (NOTE: this doesn't affect it's size on the front-end, only the quality).", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Image width", 'swift-framework-plugin'), "param_name" => "image_width", "value" => "", "description" => __("If you would like to override the width that the image is displayed at, then please provide the value here (no px). NOTE: The image can only be max 100% of it's container, this is generally for use if you would like to make the image smaller, and it will be centralised.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Image Frame", 'swift-framework-plugin'), "param_name" => "frame", "value" => array(__("No Frame", 'swift-framework-plugin') => "noframe", __("Border Frame", 'swift-framework-plugin') => "borderframe", __("Glow Frame", 'swift-framework-plugin') => "glowframe", __("Shadow Frame", 'swift-framework-plugin') => "shadowframe"), "description" => __("Select a frame for the image.", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Image Caption", 'swift-framework-plugin'), "param_name" => "caption", "value" => "", "description" => __("If you would like a caption to be shown below the image, add it here.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Caption Position", 'swift-framework-plugin'), "param_name" => "caption_pos", "value" => array(__("Hover", 'swift-framework-plugin') => "hover", __("Below", 'swift-framework-plugin') => "below"), "description" => __("Choose if you would like the caption to appear on the hover, or below the image. If you leave the caption field above blank then no caption will be shown.", 'swift-framework-plugin')), array("type" => "buttonset", "heading" => __("Remove rounded corners", 'swift-framework-plugin'), "param_name" => "remove_rounded", "value" => array(__("Yes", 'swift-framework-plugin') => "yes", __("No", 'swift-framework-plugin') => "no"), "buttonset_on" => "yes", "description" => __("Select if you want to remove rounded corners from the image.", 'swift-framework-plugin')), array("type" => "buttonset", "heading" => __("Full width", 'swift-framework-plugin'), "param_name" => "fullwidth", "value" => array(__("No", 'swift-framework-plugin') => "no", __("Yes", 'swift-framework-plugin') => "yes"), "buttonset_on" => "yes", "description" => __("Select if you want the image to be the full width of the page. (Make sure the element width is 1/1 too).", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Image Overflow", 'swift-framework-plugin'), "param_name" => "overflow_mode", "value" => array(__("None", 'swift-framework-plugin') => "none", __("Left", 'swift-framework-plugin') => "left", __("Right", 'swift-framework-plugin') => "right"), "description" => __("You can use this to stop the image from being limited to 100% width and overflow to the selected side.", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Extra class", 'swift-framework-plugin'), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style this particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'swift-framework-plugin')), array("type" => "section_tab", "param_name" => "link_options_tab", "heading" => __("Link", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Image Link URL", 'swift-framework-plugin'), "param_name" => "image_link", "value" => "", "required" => array("lightbox", "=", "no"), "description" => __("If you would like the image to link to a URL, then enter it here. NOTE: this will override the lightbox functionality if you have enabled it.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Link target", 'swift-framework-plugin'), "param_name" => "link_target", "value" => array(__("Self", 'swift-framework-plugin') => "_self", __("New Window", 'swift-framework-plugin') => "_blank"), "required" => array("lightbox", "=", "no"), "description" => __("Select if you want the link to open in a new window", 'swift-framework-plugin')), array("type" => "buttonset", "heading" => __("Enable lightbox link", 'swift-framework-plugin'), "param_name" => "lightbox", "value" => array(__("Yes", 'swift-framework-plugin') => "yes", __("No", 'swift-framework-plugin') => "no"), "buttonset_on" => "yes", "description" => __("Select if you want the image to open in a lightbox on click", 'swift-framework-plugin')), array("type" => "section_tab", "param_name" => "animation_options_tab", "heading" => __("Animation", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Intro Animation", 'swift-framework-plugin'), "param_name" => "intro_animation", "value" => spb_animations_list(), "description" => __("Select an intro animation for the image that will show it when it appears within the viewport.", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Animation Delay", 'swift-framework-plugin'), "param_name" => "animation_delay", "value" => "200", "description" => __("If you wish to add a delay to the animation, then you can set it here (default 200) (ms).", 'swift-framework-plugin')))));
/* GOOGLE MAPS ASSET
   ================================================== */
class SwiftPageBuilderShortcode_spb_gmaps extends SwiftPageBuilderShortcode
{
    public function contentAdmin($atts, $content = null)
    {
        $width = $custom_markup = '';
        $shortcode_attributes = array('width' => '1/1');
        foreach ($this->settings['params'] as $param) {
            if ($param['param_name'] != 'content') {
                if (is_string($param['value'])) {
                    $shortcode_attributes[$param['param_name']] = __($param['value'], 'swift-framework-plugin');
                } else {
                    $shortcode_attributes[$param['param_name']] = $param['value'];
                }
コード例 #6
0
ファイル: default.php プロジェクト: Infernosaint/WPSetupTest2
        $output = '';
        $el_class = $this->getExtraClass($el_class);
        $width = spb_translateColumnWidthToSpan($width);
        $output .= "\n\t" . '<div class="spb_button_element sf-animation ' . $width . $el_class . '" data-animation="' . $animation . '" data-delay="' . $animation_delay . '">';
        $output .= "\n\t\t\t" . do_shortcode('[sf_button colour="' . $button_colour . '" type="' . $button_type . '" size="' . $button_size . '" link="' . $button_link . '" target="' . $button_target . '" icon="' . $button_icon . '" dropshadow="' . $button_dropshadow . '"]' . $button_text . '[/sf_button]');
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
        return $output;
    }
}
$type_arr = array(__("Standard", 'swift-framework-plugin') => "standard", __("Stroke to Fill", 'swift-framework-plugin') => "stroke-to-fill", __("Icon Reveal", 'swift-framework-plugin') => "sf-icon-reveal", __("Icon Stroke", 'swift-framework-plugin') => "sf-icon-stroke");
if (spb_get_theme_name() == "joyn") {
    $type_arr = array(__("Standard", 'swift-framework-plugin') => "standard", __("Bordered", 'swift-framework-plugin') => "bordered", __("Rotate 3D", 'swift-framework-plugin') => "rotate-3d", __("Stroke to Fill", 'swift-framework-plugin') => "stroke-to-fill", __("Icon Reveal", 'swift-framework-plugin') => "sf-icon-reveal", __("Icon Stroke", 'swift-framework-plugin') => "sf-icon-stroke");
}
$target_arr = array(__("Same window", 'swift-framework-plugin') => "_self", __("New window", 'swift-framework-plugin') => "_blank");
SPBMap::map('spb_button', array("name" => __("Button", 'swift-framework-plugin'), "base" => "spb_button", "class" => "", "icon" => "spb-icon-button", "wrapper_class" => "clearfix", "controls" => "full", "params" => array(array("type" => "dropdown", "heading" => __("Button Size", 'swift-framework-plugin'), "param_name" => "button_size", "value" => array(__("Standard", 'swift-framework-plugin') => "standard", __("Large", 'swift-framework-plugin') => "large")), array("type" => "dropdown", "heading" => __("Button Colour", 'swift-framework-plugin'), "param_name" => "button_colour", "value" => array(__("Accent", 'swift-framework-plugin') => "accent", __("Black", 'swift-framework-plugin') => "black", __("White", 'swift-framework-plugin') => "white", __("Blue", 'swift-framework-plugin') => "blue", __("Grey", 'swift-framework-plugin') => "grey", __("Light Grey", 'swift-framework-plugin') => "lightgrey", __("Orange", 'swift-framework-plugin') => "orange", __("Turquoise", 'swift-framework-plugin') => "turquoise", __("Green", 'swift-framework-plugin') => "green", __("Pink", 'swift-framework-plugin') => "pink", __("Gold", 'swift-framework-plugin') => "gold", __("Transparent - Light", 'swift-framework-plugin') => "transparent-light", __("Transparent - Dark", 'swift-framework-plugin') => "transparent-dark")), array("type" => "dropdown", "heading" => __("Button Type", 'swift-framework-plugin'), "param_name" => "button_type", "value" => $type_arr), array("type" => "textfield", "heading" => __("Button Text", 'swift-framework-plugin'), "param_name" => "button_text", "holder" => "div", "value" => "Button Text", "description" => __("Icon to the left of the title text. You can get the code from <a href='http://fortawesome.github.com/Font-Awesome/' target='_blank'>here</a>. E.g. fa-cloud", 'swift-framework-plugin')), array("type" => "icon-picker", "heading" => __("Button Icon", 'swift-framework-plugin'), "param_name" => "button_icon", "value" => "", "description" => ''), array("type" => "textfield", "heading" => __("Button Link", 'swift-framework-plugin'), "param_name" => "button_link", "value" => ""), array("type" => "dropdown", "heading" => __("Button Target", 'swift-framework-plugin'), "param_name" => "button_target", "value" => $target_arr), array("type" => "buttonset", "heading" => __("Button Dropshadow", 'swift-framework-plugin'), "param_name" => "button_dropshadow", "value" => array(__('No', 'swift-framework-plugin') => "no", __('Yes', 'swift-framework-plugin') => "yes")), array("type" => "section", "param_name" => "tb_animation_options", "heading" => __("Animation Options", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Intro Animation", 'swift-framework-plugin'), "param_name" => "animation", "value" => spb_animations_list(), "description" => __("Select an intro animation for the text block that will show it when it appears within the viewport.", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Animation Delay", 'swift-framework-plugin'), "param_name" => "animation_delay", "value" => "0", "description" => __("If you wish to add a delay to the animation, then you can set it here (ms).", 'swift-framework-plugin')), array("type" => "section", "param_name" => "btn_misc_options", "heading" => __("Misc Options", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Extra class", 'swift-framework-plugin'), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style this particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'swift-framework-plugin')))));
/* BOXED CONTENT ASSET
   ================================================== */
class SwiftPageBuilderShortcode_spb_boxed_content extends SwiftPageBuilderShortcode
{
    public function content($atts, $content = null)
    {
        $title = $type = $bg_style = $inline_style = $custom_bg_colour = $custom_text_colour = $padding_vertical = $padding_horizontal = $el_class = $width = $el_position = '';
        extract(shortcode_atts(array('title' => '', 'type' => '', 'custom_bg_colour' => '', 'custom_text_colour' => '', 'padding_vertical' => '0', 'padding_horizontal' => '0', 'el_class' => '', 'el_position' => '', 'width' => '1/2'), $atts));
        $output = '';
        $el_class = $this->getExtraClass($el_class);
        $width = spb_translateColumnWidthToSpan($width);
        if ($custom_bg_colour != "") {
            $bg_style .= 'background: ' . $custom_bg_colour . '!important;';
        }
        if ($custom_text_colour != "") {
コード例 #7
0
ファイル: column.php プロジェクト: Infernosaint/WPSetupTest2
            $output .= '<div data-element_type="spb_column" class="spb_column spb_sortable spb_droppable ' . $width[$i] . ' not-column-inherit">';
            $output .= '<input type="hidden" class="spb_sc_base" name="" value="spb_column" />';
            $output .= str_replace("%column_size%", spb_translateColumnWidthToFractional($width[$i]), $column_controls);
            $output .= '<div class="spb_element_wrapper">';
            $output .= '<div class="row-fluid spb_column_container spb_sortable_container not-column-inherit">';
            $output .= do_shortcode(shortcode_unautop($content));
            $output .= SwiftPageBuilder::getInstance()->getLayout()->getContainerHelper();
            $output .= '</div>';
            if (isset($this->settings['params'])) {
                $inner = '';
                foreach ($this->settings['params'] as $param) {
                    $param_value = isset(${$param}['param_name']) ? ${$param}['param_name'] : '';
                    //var_dump($param_value);
                    if (is_array($param_value)) {
                        // Get first element from the array
                        reset($param_value);
                        $first_key = key($param_value);
                        $param_value = $param_value[$first_key];
                    }
                    $inner .= $this->singleParamHtmlHolder($param, $param_value);
                }
                $output .= $inner;
            }
            $output .= '</div>';
            $output .= '</div>';
        }
        return $output;
    }
}
SPBMap::map('spb_column', array("name" => __("Column", 'swift-framework-plugin'), "base" => "spb_column", "controls" => "full-column", "content_element" => false, "params" => array(array("type" => "section", "param_name" => "section_bg_video_options", "heading" => __("Column Background Options", 'swift-framework-plugin')), array("type" => "colorpicker", "heading" => __("Background color", 'swift-framework-plugin'), "param_name" => "col_bg_color", "value" => "", "description" => __("Select a background colour for the row here.", 'swift-framework-plugin')), array("type" => "section", "param_name" => "section_bg_image_options", "heading" => __("Column Background Image Options", 'swift-framework-plugin')), array("type" => "attach_image", "heading" => __("Background Image", 'swift-framework-plugin'), "param_name" => "col_bg_image", "value" => "", "description" => "Choose an image to use as the background for the parallax area."), array("type" => "dropdown", "heading" => __("Background Image Type", 'swift-framework-plugin'), "param_name" => "col_bg_type", "value" => array(__("Cover", 'swift-framework-plugin') => "cover", __("Pattern", 'swift-framework-plugin') => "pattern"), "description" => __("If you're uploading an image that you want to spread across the whole asset, then choose cover. Else choose pattern for an image you want to repeat.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Background Image Movement", 'swift-framework-plugin'), "param_name" => "col_parallax_image_movement", "value" => array(__("Fixed", 'swift-framework-plugin') => "fixed", __("Scroll", 'swift-framework-plugin') => "scroll", __("Stellar (dynamic)", 'swift-framework-plugin') => "stellar"), "description" => __("Choose the type of movement you would like the parallax image to have. Fixed means the background image is fixed on the page, Scroll means the image will scroll will the page, and stellar makes the image move at a seperate speed to the page, providing a layered effect.", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Parallax Image Speed (Stellar Only)", 'swift-framework-plugin'), "param_name" => "col_parallax_image_speed", "value" => "0.5", "description" => "The speed at which the parallax image moves in relation to the page scrolling. For example, 0.5 would mean the image scrolls at half the speed of the standard page scroll. (Default 0.5)."), array("type" => "section", "param_name" => "section_display_options", "heading" => __("Column Display Options", 'swift-framework-plugin')), array("type" => "uislider", "heading" => __("Padding", 'swift-framework-plugin'), "param_name" => "col_padding", "value" => "0", "min" => "0", "step" => "1", "max" => "20", "description" => __("Adjust the padding for the column. (%)", 'swift-framework-plugin')), array("type" => "section", "param_name" => "col_animation_options", "heading" => __("Animation Options", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Intro Animation", 'swift-framework-plugin'), "param_name" => "col_animation", "value" => spb_animations_list(), "description" => __("Select an intro animation for the column which will show it when it appears within the viewport.", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Animation Delay", 'swift-framework-plugin'), "param_name" => "col_animation_delay", "value" => "0", "description" => __("If you wish to add a delay to the animation, then you can set it here (ms).", 'swift-framework-plugin')), array("type" => "section", "param_name" => "section_misc_options", "heading" => __("Column Misc Options", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Responsive Visiblity", 'swift-framework-plugin'), "param_name" => "col_responsive_vis", "holder" => 'indicator', "value" => spb_responsive_vis_list(), "description" => __("Set the responsive visiblity for the row, if you would only like it to display on certain display sizes.", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Extra class", 'swift-framework-plugin'), "param_name" => "col_el_class", "value" => "", "description" => __("If you wish to style this particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'swift-framework-plugin')))));
コード例 #8
0
ファイル: default.php プロジェクト: arobbins/spellestate
            $output .= "\n\t" . '<div class="spb_content_element ' . $width . $el_class . '">';
        }
        $output .= "\n\t\t" . '<div class="spb-asset-content" style="' . $inline_style . '">';
        if ($icon_output != "") {
            $output .= $title != '' ? "\n\t\t\t" . '<div class="title-wrap"><h3 class="spb-heading spb-icon-heading"><span>' . $icon_output . '' . $title . '</span></h3></div>' : '';
        } else {
            $output .= $title != '' ? "\n\t\t\t" . $this->spb_title($title, 'spb-text-heading') : '';
        }
        $output .= "\n\t\t\t" . do_shortcode($content);
        $output .= "\n\t\t" . '</div>';
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        $output = $this->startRow($el_position, '', false) . $output . $this->endRow($el_position, '', false);
        return $output;
    }
}
SPBMap::map('spb_text_block', array("name" => __("Text Block", 'swift-framework-plugin'), "base" => "spb_text_block", "class" => "spb_tab_media", "icon" => "icon-text-block", "wrapper_class" => "clearfix", "controls" => "full", "params" => array(array("type" => "textfield", "holder" => "div", "heading" => __("Widget title", 'swift-framework-plugin'), "param_name" => "title", "value" => "", "description" => __("Heading text. Leave it empty if not needed.", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Title icon", 'swift-framework-plugin'), "param_name" => "icon", "value" => "", "description" => __("Icon to the left of the title text. This is the class name for the icon, e.g. fa-cloud", 'swift-framework-plugin')), array("type" => "textarea_html", "holder" => "div", "class" => "", "heading" => __("Text", 'swift-framework-plugin'), "param_name" => "content", "value" => '', "description" => __("Enter your content.", 'swift-framework-plugin')), array("type" => "section_tab", "param_name" => "animation_options_tab", "heading" => __("Animation", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Intro Animation", 'swift-framework-plugin'), "param_name" => "animation", "value" => spb_animations_list(), "description" => __("Select an intro animation for the text block that will show it when it appears within the viewport.", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Animation Delay", 'swift-framework-plugin'), "param_name" => "animation_delay", "value" => "0", "description" => __("If you wish to add a delay to the animation, then you can set it here (ms).", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Data Form Content", 'swift-framework-plugin'), "param_name" => "form_content", "value" => "", "description" => __("This is a hidden field that is used to save the content when using forms inside the content.", 'swift-framework-plugin')))));
/* BOXED CONTENT ASSET
   ================================================== */
class SwiftPageBuilderShortcode_spb_boxed_content extends SwiftPageBuilderShortcode
{
    public function content($atts, $content = null)
    {
        $title = $type = $bg_style = $inline_style = $custom_bg_colour = $custom_text_colour = $padding_vertical = $padding_horizontal = $el_class = $width = $el_position = '';
        extract(shortcode_atts(array('title' => '', 'type' => '', 'custom_bg_colour' => '', 'custom_text_colour' => '', 'box_link' => '', 'box_link_target' => '_self', 'padding_vertical' => '0', 'padding_horizontal' => '0', 'el_class' => '', 'el_position' => '', 'width' => '1/2'), $atts));
        $output = '';
        $el_class = $this->getExtraClass($el_class);
        $width = spb_translateColumnWidthToSpan($width);
        if ($custom_bg_colour != "") {
            $bg_style .= 'background: ' . $custom_bg_colour . '!important;';
        }
        if ($custom_text_colour != "") {
コード例 #9
0
ファイル: column.php プロジェクト: arobbins/spellestate
            $output .= '<div data-element_type="spb_column" class="spb_column spb_sortable spb_droppable ' . $width[$i] . ' not-column-inherit">';
            $output .= '<input type="hidden" class="spb_sc_base" name="" value="spb_column" />';
            $output .= str_replace("%column_size%", spb_translateColumnWidthToFractional($width[$i]), $column_controls);
            $output .= '<div class="spb_element_wrapper">';
            $output .= '<div class="row-fluid spb_column_container spb_sortable_container not-column-inherit">';
            $output .= do_shortcode(shortcode_unautop($content));
            $output .= SwiftPageBuilder::getInstance()->getLayout()->getContainerHelper();
            $output .= '</div>';
            if (isset($this->settings['params'])) {
                $inner = '';
                foreach ($this->settings['params'] as $param) {
                    $param_value = isset(${$param['param_name']}) ? ${$param['param_name']} : '';
                    //var_dump($param_value);
                    if (is_array($param_value)) {
                        // Get first element from the array
                        reset($param_value);
                        $first_key = key($param_value);
                        $param_value = $param_value[$first_key];
                    }
                    $inner .= $this->singleParamHtmlHolder($param, $param_value);
                }
                $output .= $inner;
            }
            $output .= '</div>';
            $output .= '</div>';
        }
        return $output;
    }
}
SPBMap::map('spb_column', array("name" => __("Column", 'swift-framework-plugin'), "base" => "spb_column", "controls" => "full-column", "class" => "spb_column spb_tab_layout", "icon" => "icon-column", "params" => array(array("type" => "dropdown", "heading" => __("Intro Animation", 'swift-framework-plugin'), "param_name" => "col_animation", "value" => spb_animations_list(), "description" => __("Select an intro animation for the column which will show it when it appears within the viewport.", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Animation Delay", 'swift-framework-plugin'), "param_name" => "col_animation_delay", "value" => "0", "description" => __("If you wish to add a delay to the animation, then you can set it here (ms).", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Responsive Visiblity", 'swift-framework-plugin'), "param_name" => "col_responsive_vis", "holder" => 'indicator', "value" => spb_responsive_vis_list(), "description" => __("Set the responsive visiblity for the row, if you would only like it to display on certain display sizes.", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Extra class", 'swift-framework-plugin'), "param_name" => "col_el_class", "value" => "", "description" => __("If you wish to style this particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'swift-framework-plugin')), array("type" => "section_tab", "param_name" => "column_sizing_tab", "heading" => __("Custom Sizing", 'swift-framework-plugin'), "value" => ""), array("type" => "dropdown", "heading" => __("XS", 'swift-framework-plugin'), "param_name" => "col_xs", "holder" => 'indicator', "value" => array('', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'), "description" => __("XS", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("SM", 'swift-framework-plugin'), "param_name" => "col_sm", "holder" => 'indicator', "value" => array('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'), "description" => __("SM", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("MD", 'swift-framework-plugin'), "param_name" => "col_md", "holder" => 'indicator', "value" => array('', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'), "description" => __("MD", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("LG", 'swift-framework-plugin'), "param_name" => "col_lg", "holder" => 'indicator', "value" => array('', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'), "description" => __("LG", 'swift-framework-plugin')), array("type" => "section_tab", "param_name" => "background_tab", "heading" => __("Background Options", 'swift-framework-plugin'), "value" => ""), array("type" => "colorpicker", "heading" => __("Background color", 'swift-framework-plugin'), "param_name" => "col_bg_color", "value" => "", "description" => __("Select a background colour for the row here.", 'swift-framework-plugin')), array("type" => "attach_image", "heading" => __("Background Image", 'swift-framework-plugin'), "param_name" => "col_bg_image", "value" => "", "description" => "Choose an image to use as the background for the parallax area."), array("type" => "dropdown", "heading" => __("Background Image Type", 'swift-framework-plugin'), "param_name" => "col_bg_type", "value" => array(__("Cover", 'swift-framework-plugin') => "cover", __("Pattern", 'swift-framework-plugin') => "pattern"), "description" => __("If you're uploading an image that you want to spread across the whole asset, then choose cover. Else choose pattern for an image you want to repeat.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Background Image Movement", 'swift-framework-plugin'), "param_name" => "col_parallax_image_movement", "value" => array(__("Fixed", 'swift-framework-plugin') => "fixed", __("Scroll", 'swift-framework-plugin') => "scroll", __("Stellar (dynamic)", 'swift-framework-plugin') => "stellar"), "description" => __("Choose the type of movement you would like the parallax image to have. Fixed means the background image is fixed on the page, Scroll means the image will scroll will the page, and stellar makes the image move at a seperate speed to the page, providing a layered effect.", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Parallax Image Speed", 'swift-framework-plugin'), "param_name" => "col_parallax_image_speed", "value" => "0.5", "description" => "The speed at which the parallax image moves in relation to the page scrolling. For example, 0.5 would mean the image scrolls at half the speed of the standard page scroll. (Default 0.5)."), array("type" => "section_tab", "param_name" => "design_tab", "heading" => __("Design Options", 'swift-framework-plugin'), "value" => ""), array("type" => "uislider", "heading" => __("Padding", 'swift-framework-plugin'), "param_name" => "col_padding", "value" => "0", "min" => "0", "step" => "1", "max" => "20", "description" => __("Adjust the padding for the column. (%)", 'swift-framework-plugin')), array("type" => "uislider", "heading" => __("Vertical Offset", 'swift-framework-plugin'), "param_name" => "col_vertical_offset", "value" => "0", "min" => "-1000", "step" => "10", "max" => "1000", "description" => __("Add a vertical offset to the column (px).", 'swift-framework-plugin')), array("type" => "uislider", "heading" => __("Horizontal Offset", 'swift-framework-plugin'), "param_name" => "col_horizontal_offset", "value" => "0", "min" => "-1000", "step" => "10", "max" => "1000", "description" => __("Add a horizontal offset to the column (px).", 'swift-framework-plugin')), array("type" => "uislider", "heading" => __("Custom z-index", 'swift-framework-plugin'), "param_name" => "col_custom_zindex", "value" => "0", "min" => "0", "step" => "1", "max" => "100", "description" => __("Add a custom z-index to the column, for use with offsets and layering.", 'swift-framework-plugin')))));
コード例 #10
0
    public function content($atts, $content = null)
    {
        $title = $el_class = $text_color = $image_url = $image_object = $width = $el_position = '';
        extract(shortcode_atts(array('title' => '', 'icon' => '', 'character' => '', 'image' => '', 'box_type' => '', 'icon_color' => '', 'icon_bg_color' => '', 'text_color' => '', 'bg_color' => '', 'flip_text_color' => '', 'flip_bg_color' => '', 'animation' => '', 'animation_delay' => '', 'link' => '', 'target' => '', 'el_class' => '', 'el_position' => '', 'width' => '1/1'), $atts));
        $output = '';
        if ($image != "") {
            $img_url = wp_get_attachment_url($image, 'full');
            $image_object = sf_aq_resize($img_url, 70, 70, true, false);
            $image_url = $image_object[0];
        }
        $icon_box_output = do_shortcode('[sf_iconbox icon="' . $icon . '" character="' . $character . '" image="' . $image_url . '" type="' . $box_type . '" title="' . $title . '" animation="' . $animation . '" animation_delay="' . $animation_delay . '" bg_color="' . $bg_color . '" text_color="' . $text_color . '" icon_color="' . $icon_color . '" icon_bg_color="' . $icon_bg_color . '" flip_text_color="' . $flip_text_color . '" flip_bg_color="' . $flip_bg_color . '" link="' . $link . '" target="' . $target . '"]' . $content . '[/sf_iconbox]');
        $el_class = $this->getExtraClass($el_class);
        $width = spb_translateColumnWidthToSpan($width);
        $output .= "\n\t" . '<div class="spb_icon_box ' . $width . $el_class . '">';
        $output .= "\n\t\t" . '<div class="spb-asset-content">';
        $output .= "\n\t\t" . $icon_box_output;
        $output .= "\n\t\t" . '</div>';
        $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
        $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
        global $sf_include_carousel;
        $sf_include_carousel = true;
        return $output;
    }
}
$target_arr = array(__("Same window", 'swift-framework-plugin') => "_self", __("New window", 'swift-framework-plugin') => "_blank");
$icon_box_types = array(__('Standard', 'swift-framework-plugin') => "standard", __('Standard with Title Icon', 'swift-framework-plugin') => "standard-title", __('Bold', 'swift-framework-plugin') => "bold", __('Left Icon', 'swift-framework-plugin') => "left-icon", __('Left Icon Alt', 'swift-framework-plugin') => "left-icon-alt", __('Boxed One', 'swift-framework-plugin') => "boxed-one", __('Boxed Two', 'swift-framework-plugin') => "boxed-two", __('Boxed Three', 'swift-framework-plugin') => "boxed-three", __('Boxed Four', 'swift-framework-plugin') => "boxed-four", __('Animated', 'swift-framework-plugin') => "animated");
if (spb_get_theme_name() == "atelier") {
    $icon_box_types = array(__('Standard', 'swift-framework-plugin') => "standard", __('Standard with Title Icon', 'swift-framework-plugin') => "standard-title", __('Left Icon', 'swift-framework-plugin') => "left-icon", __('Left Icon Alt', 'swift-framework-plugin') => "left-icon-alt", __('Boxed One', 'swift-framework-plugin') => "boxed-one", __('Boxed Two', 'swift-framework-plugin') => "boxed-two", __('Boxed Three', 'swift-framework-plugin') => "boxed-three", __('Boxed Four', 'swift-framework-plugin') => "boxed-four", __('Animated', 'swift-framework-plugin') => "animated");
}
SPBMap::map('spb_icon_box', array("name" => __("Icon Box", 'swift-framework-plugin'), "base" => "spb_icon_box", "class" => "", "icon" => "spb-icon-icon-box", "wrapper_class" => "clearfix", "params" => array(array("type" => "textfield", "heading" => __("Icon Box title", 'swift-framework-plugin'), "param_name" => "title", "holder" => 'div', "value" => "", "description" => __("Icon Box title text.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Icon Box Type", 'swift-framework-plugin'), "param_name" => "box_type", "value" => $icon_box_types, "description" => __("Choose the type of icon box.", 'swift-framework-plugin')), array("type" => "icon-picker", "heading" => __("Icon Box Icon", 'swift-framework-plugin'), "param_name" => "icon", "value" => "", "description" => ''), array("type" => "textfield", "heading" => __("Icon Box Character", 'swift-framework-plugin'), "param_name" => "character", "value" => "", "description" => __("Instead of an icon, you can optionally provide a single letter/digit here. NOTE: This will override the icon selection.", 'swift-framework-plugin')), array("type" => "attach_image", "heading" => __("Icon Box Image", 'swift-framework-plugin'), "param_name" => "image", "value" => "", "description" => __("Instead of an icon, you can optionally upload an image here. This will be resized to 70px x 70px. NOTE: This will override the icon selection.", 'swift-framework-plugin')), array("type" => "textarea_html", "holder" => "div", "class" => "", "heading" => __("Text", 'swift-framework-plugin'), "param_name" => "content", "value" => __("click the edit button to change this text.", 'swift-framework-plugin'), "description" => __("Enter your content.", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Icon Box Link", 'swift-framework-plugin'), "param_name" => "link", "value" => "", "description" => __("If you would like, you can set a link here for the icon and title to link through to.", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Link Target", 'swift-framework-plugin'), "param_name" => "target", "value" => $target_arr), array("type" => "section", "param_name" => "ib_animation_options", "heading" => __("Animation Options", 'swift-framework-plugin')), array("type" => "dropdown", "heading" => __("Intro Animation", 'swift-framework-plugin'), "param_name" => "animation", "value" => spb_animations_list(), "description" => __("Select an intro animation for the icon box that will show it when it appears within the viewport.", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Animation Delay", 'swift-framework-plugin'), "param_name" => "animation_delay", "value" => "0", "description" => __("If you wish to add a delay to the animation, then you can set it here (ms).", 'swift-framework-plugin')), array("type" => "section", "param_name" => "ib_colour_options", "heading" => __("Colour Options", 'swift-framework-plugin')), array("type" => "colorpicker", "heading" => __("Icon color", 'swift-framework-plugin'), "param_name" => "icon_color", "value" => "", "description" => __("Set the icon colour for the icon box, or leave blank to use the default colours.", 'swift-framework-plugin')), array("type" => "colorpicker", "heading" => __("Icon Background color", 'swift-framework-plugin'), "param_name" => "icon_bg_color", "value" => "", "description" => __("Set the icon background colour for the icon box, or leave blank to use the default colours.", 'swift-framework-plugin')), array("type" => "colorpicker", "heading" => __("Text color", 'swift-framework-plugin'), "param_name" => "text_color", "value" => "", "description" => __("Set the text colour for the icon box, or leave blank to use the default colours.", 'swift-framework-plugin')), array("type" => "colorpicker", "heading" => __("Background color", 'swift-framework-plugin'), "param_name" => "bg_color", "value" => "", "description" => __("Set the background colour for the icon box, or leave blank to use the default colours.", 'swift-framework-plugin')), array("type" => "colorpicker", "heading" => __("Flip Background color", 'swift-framework-plugin'), "param_name" => "flip_bg_color", "value" => "", "required" => array("box_type", "=", "animated"), "description" => __("Set the background colour for the back of the animated icon box, or leave blank to use the default colours.", 'swift-framework-plugin')), array("type" => "colorpicker", "heading" => __("Flip Text color", 'swift-framework-plugin'), "param_name" => "flip_text_color", "value" => "", "required" => array("box_type", "=", "animated"), "description" => __("Set the text colour for the back of the animated icon box, or leave blank to use the default colours.", 'swift-framework-plugin')), array("type" => "section", "param_name" => "ib_misc_options", "heading" => __("Misc Options", 'swift-framework-plugin')), array("type" => "textfield", "heading" => __("Extra class", 'swift-framework-plugin'), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style this particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'swift-framework-plugin')))));