Skip to content

Commit

Permalink
Merge pull request #18 from brainstormforce/sant-plug
Browse files Browse the repository at this point in the history
EPS-612: Improved codebase
  • Loading branch information
sushmak02 authored Jul 15, 2024
2 parents 84815b2 + 5fee265 commit 45ddf2f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
14 changes: 7 additions & 7 deletions column-separator-for-beaver-builder-module/includes/frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@
$svg_color = '#'.(( $settings->bbcs_color != '' ) ? $settings->bbcs_color : 'c7c7c7') ;
$svg_height = ( $settings->bbcs_size != '' ) ? $settings->bbcs_size : '100' ;
if( $settings->bbcs_shape == 'triangle' ) {
$shape_html = '<svg class="'.$cs_classes.'" xmlns="http://www.w3.org/2000/svg" version="1.1" fill="'.$svg_color.'" width="100%" height="'.$svg_height.'" viewBox="0 0 4.66666 0.333331" preserveAspectRatio="none"><path class="fil0" d="M-0 0.333331l4.66666 0 0 -3.93701e-006 -2.33333 0 -2.33333 0 0 3.93701e-006zm0 -0.333331l4.66666 0 0 0.166661 -4.66666 0 0 -0.166661zm4.66666 0.332618l0 -0.165953 -4.66666 0 0 0.165953 1.16162 -0.0826181 1.17171 -0.0833228 1.17171 0.0833228 1.16162 0.0826181z"/></svg>';
$shape_html = '<svg class="'. esc_attr( $cs_classes ).'" xmlns="http://www.w3.org/2000/svg" version="1.1" fill="'. esc_attr( $svg_color ).'" width="100%" height="'. esc_attr( $svg_height ).'" viewBox="0 0 4.66666 0.333331" preserveAspectRatio="none"><path class="fil0" d="M-0 0.333331l4.66666 0 0 -3.93701e-006 -2.33333 0 -2.33333 0 0 3.93701e-006zm0 -0.333331l4.66666 0 0 0.166661 -4.66666 0 0 -0.166661zm4.66666 0.332618l0 -0.165953 -4.66666 0 0 0.165953 1.16162 -0.0826181 1.17171 -0.0833228 1.17171 0.0833228 1.16162 0.0826181z"/></svg>';
}
elseif ( $settings->bbcs_shape == 'left-triangle' || $settings->bbcs_shape == 'right-triangle' ) {
$shape_html = '<svg class="'.$cs_classes.'" xmlns="http://www.w3.org/2000/svg" version="1.1" fill="'.$svg_color.'" width="100%" height="'.$svg_height.'" viewBox="0 0 2000 90" preserveAspectRatio="none"><polygon xmlns="http://www.w3.org/2000/svg" points="535.084,64.886 0,0 0,90 2000,90 2000,0 "></polygon></svg>';
$shape_html = '<svg class="'. esc_attr( $cs_classes ).'" xmlns="http://www.w3.org/2000/svg" version="1.1" fill="'. esc_attr( $svg_color ).'" width="100%" height="'. esc_attr( $svg_height ).'" viewBox="0 0 2000 90" preserveAspectRatio="none"><polygon xmlns="http://www.w3.org/2000/svg" points="535.084,64.886 0,0 0,90 2000,90 2000,0 "></polygon></svg>';
}
elseif ( $settings->bbcs_shape == 'tilt-left' || $settings->bbcs_shape == 'tilt-right' ) {
$shape_html = '<svg class="'.$cs_classes.'" xmlns="http://www.w3.org/2000/svg" version="1.1" fill="'.$svg_color.'" width="100%" height="'.$svg_height.'" viewBox="0 0 4 0.266661" preserveAspectRatio="none"><polygon class="fil0" points="4,0 4,0.266661 -0,0.266661 "/></svg>';
$shape_html = '<svg class="'. esc_attr( $cs_classes ).'" xmlns="http://www.w3.org/2000/svg" version="1.1" fill="'. esc_attr( $svg_color ).'" width="100%" height="'. esc_attr( $svg_height ).'" viewBox="0 0 4 0.266661" preserveAspectRatio="none"><polygon class="fil0" points="4,0 4,0.266661 -0,0.266661 "/></svg>';
}
elseif ( $settings->bbcs_shape == 'circle' ) {
$shape_html = '<svg class="'.$cs_classes.'" xmlns="http://www.w3.org/2000/svg" version="1.1" fill="'.$svg_color.'" width="100%" height="'.$svg_height.'" viewBox="0 0 0.2 0.1"><path d="M0.200004 0c-3.93701e-006,0.0552205 -0.0447795,0.1 -0.100004,0.1 -0.0552126,0 -0.0999921,-0.0447795 -0.1,-0.1l0.200004 0z"/></svg>';
$shape_html = '<svg class="'. esc_attr( $cs_classes ).'" xmlns="http://www.w3.org/2000/svg" version="1.1" fill="'. esc_attr( $svg_color ).'" width="100%" height="'. esc_attr( $svg_height ).'" viewBox="0 0 0.2 0.1"><path d="M0.200004 0c-3.93701e-006,0.0552205 -0.0447795,0.1 -0.100004,0.1 -0.0552126,0 -0.0999921,-0.0447795 -0.1,-0.1l0.200004 0z"/></svg>';
}
elseif ( $settings->bbcs_shape == 'curv-center' ) {
$shape_html = '<svg class="'.$cs_classes.'" xmlns="http://www.w3.org/2000/svg" version="1.1" fill="'.$svg_color.'" width="100%" height="'.$svg_height.'" viewBox="0 0 4.66666 0.333331" preserveAspectRatio="none"><path class="fil1" d="M4.66666 0l0 7.87402e-006 -3.93701e-006 0c0,0.0920315 -1.04489,0.166665 -2.33333,0.166665 -1.28844,0 -2.33333,-0.0746339 -2.33333,-0.166665l-3.93701e-006 0 0 -7.87402e-006 4.66666 0z"></path></svg>';
$shape_html = '<svg class="'. esc_attr( $cs_classes ).'" xmlns="http://www.w3.org/2000/svg" version="1.1" fill="'. esc_attr( $svg_color ).'" width="100%" height="'. esc_attr( $svg_height ).'" viewBox="0 0 4.66666 0.333331" preserveAspectRatio="none"><path class="fil1" d="M4.66666 0l0 7.87402e-006 -3.93701e-006 0c0,0.0920315 -1.04489,0.166665 -2.33333,0.166665 -1.28844,0 -2.33333,-0.0746339 -2.33333,-0.166665l-3.93701e-006 0 0 -7.87402e-006 4.66666 0z"></path></svg>';
}
elseif ( $settings->bbcs_shape == 'small-triangle' ) {
$shape_html = '<svg class="'.$cs_classes.'" xmlns="http://www.w3.org/2000/svg" version="1.1" fill="'.$svg_color.'" width="100%" height="'.$svg_height.'" viewBox="0 0 0.156661 0.1"><polygon points="0.156661,3.93701e-006 0.156661,0.000429134 0.117665,0.05 0.0783307,0.0999961 0.0389961,0.05 -0,0.000429134 -0,3.93701e-006 0.0783307,3.93701e-006 "></polygon></svg>';
$shape_html = '<svg class="'. esc_attr( $cs_classes ).'" xmlns="http://www.w3.org/2000/svg" version="1.1" fill="'. esc_attr( $svg_color ).'" width="100%" height="'. esc_attr( $svg_height ).'" viewBox="0 0 0.156661 0.1"><polygon points="0.156661,3.93701e-006 0.156661,0.000429134 0.117665,0.05 0.0783307,0.0999961 0.0389961,0.05 -0,0.000429134 -0,3.93701e-006 0.0783307,3.93701e-006 "></polygon></svg>';
}
elseif ( $settings->bbcs_shape == 'zig-zag' ) {
$shape_html = '<div class="'.$cs_classes.'"></div>';
$shape_html = '<div class="'. esc_attr( $cs_classes ).'"></div>';
}
?>
<?php if ( FLBuilderModel::is_builder_active() ): ?>
Expand Down
2 changes: 1 addition & 1 deletion column-separator-for-beaver-builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Column Separator For Beaver Builder
* Plugin URI: http://www.brainstormforce.com
* Description: This is the plugin to create column separator in beaver builder.
* Version: 1.0.1
* Version: 1.0.2
* Author: Pratik Chaskar
* Author URI: https://pratikchaskar.com/
* License: GNU General Public License v3.0
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Contributors: pratikchaskar
Requires at least: 4.4
Tags: beaver builder, page builder plugin, column, separator, column separator, style, simple column
Stable tag: 1.0.1
Stable tag: 1.0.2
Tested up to: 6.6
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Expand All @@ -25,6 +25,9 @@ Column separator for Beaver Builder. Separate Beaver Builder columns with differ

== Changelog ==

= 1.0.2 =
- Improvement: Improved codebase for improved security.

= 1.0.1 =
- Improvement: Added compatibility to WordPress 6.1

Expand Down

0 comments on commit 45ddf2f

Please sign in to comment.