shapes
7 years ago
updater
6 years ago
vendor
6 years ago
admin-posts.php
7 years ago
admin-settings-js-config.php
8 years ago
admin-settings-modules.php
7 years ago
admin-settings-post-types.php
7 years ago
admin-settings-tools.php
6 years ago
admin-settings-upgrade.php
7 years ago
admin-settings-user-access.php
7 years ago
admin-settings-welcome.php
7 years ago
admin-settings.php
7 years ago
column-css.php
7 years ago
column-group.php
7 years ago
column-settings.php
6 years ago
column.php
7 years ago
compatibility.php
6 years ago
export-filters.php
8 years ago
export.php
7 years ago
global-settings.php
6 years ago
icon-selector.php
8 years ago
layout-js-config.php
8 years ago
layout-settings.php
7 years ago
loop-settings-matching.php
7 years ago
module-settings.php
6 years ago
module.php
7 years ago
row-css.php
7 years ago
row-js.php
7 years ago
row-settings.php
6 years ago
row-video.php
7 years ago
row.php
7 years ago
shape-layer.php
7 years ago
strings.php
7 years ago
ui-bar-title-area.php
7 years ago
ui-bar.php
6 years ago
ui-extras.php
8 years ago
ui-field-align.php
7 years ago
ui-field-animation.php
7 years ago
ui-field-border.php
7 years ago
ui-field-button-group.php
7 years ago
ui-field-button.php
8 years ago
ui-field-code.php
8 years ago
ui-field-color.php
7 years ago
ui-field-date.php
7 years ago
ui-field-dimension.php
7 years ago
ui-field-editor.php
8 years ago
ui-field-font.php
7 years ago
ui-field-form.php
7 years ago
ui-field-gradient.php
7 years ago
ui-field-icon.php
7 years ago
ui-field-layout.php
8 years ago
ui-field-link.php
7 years ago
ui-field-multiple-audios.php
8 years ago
ui-field-multiple-photos.php
8 years ago
ui-field-ordering.php
8 years ago
ui-field-photo-sizes.php
7 years ago
ui-field-photo.php
7 years ago
ui-field-post-type.php
8 years ago
ui-field-preset.php
7 years ago
ui-field-raw.php
7 years ago
ui-field-select.php
7 years ago
ui-field-shadow.php
7 years ago
ui-field-shape-transform.php
7 years ago
ui-field-suggest.php
7 years ago
ui-field-text.php
7 years ago
ui-field-textarea.php
8 years ago
ui-field-time.php
8 years ago
ui-field-timezone.php
8 years ago
ui-field-typography.php
7 years ago
ui-field-unit.php
7 years ago
ui-field-video.php
8 years ago
ui-field.php
7 years ago
ui-js-config.php
6 years ago
ui-js-templates.php
6 years ago
ui-legacy-custom-field.php
8 years ago
ui-legacy-field.php
7 years ago
ui-legacy-settings.php
8 years ago
ui-loop-settings.php
7 years ago
ui-service-settings.php
8 years ago
ui-settings-config.php
6 years ago
ui-settings-form-row.php
7 years ago
ui-settings-form.php
7 years ago
updater-config.php
6 years ago
shape-layer.php
45 lines
| 1 | <div class="fl-builder-layer fl-builder-shape-layer fl-builder-<?php echo $position; ?>-edge-layer fl-builder-shape-<?php echo esc_attr( $shape_name ); ?>"> |
| 2 | <svg class="<?php echo $svg_class; ?>" viewBox="<?php echo $view_box; ?>" preserveAspectRatio="<?php echo $preserve_aspect_ratio; ?>"> |
| 3 | |
| 4 | <defs> |
| 5 | <?php |
| 6 | $is_in_builder = FLBuilderModel::is_builder_active(); |
| 7 | if ( $is_in_builder || 'gradient' === $settings->{ $prefix . 'fill_style' } ) { |
| 8 | |
| 9 | $linear_gradient_id = "fl-row-$id-$prefix-linear-gradient"; |
| 10 | $radial_gradient_id = "fl-row-$id-$prefix-radial-gradient"; |
| 11 | $gradient_settings = $settings->{ $prefix . 'fill_gradient' }; |
| 12 | $colors = $gradient_settings['colors']; |
| 13 | $stops = $gradient_settings['stops']; |
| 14 | |
| 15 | // Radial Gradient |
| 16 | $parts = explode( ' ', $gradient_settings['position'] ); |
| 17 | $cx = FLBuilderArt::get_int_for_position_name( $parts[0] ); |
| 18 | $cy = FLBuilderArt::get_int_for_position_name( $parts[1] ); |
| 19 | $r = ( .5 === $cx && .5 === $cy ) ? .5 : 1; |
| 20 | ?> |
| 21 | <linearGradient id="<?php echo $linear_gradient_id; ?>" gradientUnits="objectBoundingBox" gradientTransform="rotate(<?php echo $gradient_settings['angle']; ?> .5 .5)"> |
| 22 | <?php |
| 23 | foreach ( $colors as $i => $color ) { |
| 24 | $rgba = FLBuilderColor::rgba_values_for_color( $color ); |
| 25 | ?> |
| 26 | <stop offset="<?php echo $stops[ $i ] . '%'; ?>" stop-color="<?php echo $rgba['rgb']; ?>" stop-opacity="<?php echo $rgba['a']; ?>" /> |
| 27 | <?php } ?> |
| 28 | </linearGradient> |
| 29 | <radialGradient id="<?php echo $radial_gradient_id; ?>" cx="<?php echo $cx; ?>" cy="<?php echo $cy; ?>" r="<?php echo $r; ?>"> |
| 30 | <?php |
| 31 | foreach ( $colors as $i => $color ) { |
| 32 | $rgba = FLBuilderColor::rgba_values_for_color( $color ); |
| 33 | ?> |
| 34 | <stop offset="<?php echo $stops[ $i ] . '%'; ?>" stop-color="<?php echo $rgba['rgb']; ?>" stop-opacity="<?php echo $rgba['a']; ?>" /> |
| 35 | <?php } ?> |
| 36 | </radialGradient> |
| 37 | <?php } // End if ?> |
| 38 | </defs> |
| 39 | |
| 40 | <g class="fl-shape-content"> |
| 41 | <?php echo $content; ?> |
| 42 | </g> |
| 43 | </svg> |
| 44 | </div> |
| 45 |