Upgarded to 4.17.4

This commit is contained in:
naomi 2022-06-23 13:17:18 +01:00
parent 80f1e87db9
commit a04fb0c7af
404 changed files with 54683 additions and 4417 deletions

View File

@ -603,22 +603,6 @@ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.
```
jQuery Hashchange Event
-----------------------
includes/builder/scripts/
```text
jQuery hashchange event - v1.3 - 7/21/2010
http://benalman.com/projects/jquery-hashchange-plugin/
Copyright (c) 2010 "Cowboy" Ben Alman
Dual licensed under the MIT and GPL licenses.
http://benalman.com/about/license/
See LICENSE.md for the full GPLv2 license.
```
Magnific Popup
--------------

View File

@ -35,4 +35,4 @@ http://www.elegantthemes.com/gallery/divi/documentation/divi-library/
http://www.elegantthemes.com/gallery/divi/documentation/customizer/
## Copyright
> **© Copyright 2013-2020, Elegant Themes, Inc.**
> **© Copyright 2013-2022, Elegant Themes, Inc.**

View File

@ -1,3 +1,849 @@
version 4.17.4 ( updated 05-12-2022 )
- Fixed PHP 8 warning for Specialty Column Section Background Settings on Frontend for some cases.
- Fixed Body Line Height option affects the Menu Module icons.
- iFrame from custom field is now allowed to be embedded as Dynamic Content.
- Fixed issue when 3P modules have custom selector for background hover, it's no longer worked and inherited main selector instead with :hover suffix.
- Fixed Import Presets checkbox when importing items to local library using Cloud App.
- Fixed warning MaxListenersExceededWarning printed in the console when opening global color setting field.
- Fixed social media module sticky margin overridden by desktop value.
- Fixed the title, description and the label name that possibly causes confusion when saving Section / Row / Module / Layout.
- Fixed background video not properly showing up on hover.
- Fixed a z-index ordering conflict between video backgrounds and section dividers.
- Fixed menu overflow issue in header with video background.
- Updated React Tooltip NPM package to the latest version.
- Fixed a bug which caused rendering the wrong CSS for image size on front end in some cases.
- Fixed a bug in BarCounter module to show percentage properly in VB.
- Added missing placeholder SVGs on Theme Builder.
- Removed unneeded help button from Save to Library Modal in some cases.
- Fixed migration of background gradient settings for Specialty Section columns.
- Exposed animation functionalities for third-party extensions.
- Fixed checkout module being unable to process the checkout request when "Ship to different address ?" is selected.
- Fixed issue where a Shop page built with Divi Builder could have some Woo Module styles broken on Front End.
- Fixed duplicate styles tag injected into VB builder HTML head element.
- Fix recently broken backwards compatibility in includes/builder/feature/Library.php.
- Fixed module count label when no results found in Divi Library, rather than "0 Module" it will display "No Results".
- Fixed Premade Items disappearing when logging out from Divi Cloud.
- Fixed Divi Library items list rendering in WP Admin.
- Fixed PHP error when exporting some layouts from Divi Library.
- Fixed Global Colors exporting when item is exported from the Divi Library.
- Added 'Update URI' plugin header check that can be used by 3rd party developers to avoid update conflicts with plugins sold on the Marketplace and the ones sold on the developer's website.
- Fixed a PHP fatal error that occured when installing themes on older versions of WordPress (5.4.10 or older).
- Added Template Editor support on Divi and Extra themes.
- Fixed a bug that caused the email icon to be displayed on the top bar (default header) when no value was set for the email field in some cases.
* cloud/cloud-app.php
* core/admin/js/portability.js
* core/components/Portability.php
* core/components/Updates.php
* core/functions.php
* functions.php
* header.php
* includes/block-editor-integration.php
* includes/builder/class-et-builder-element.php
* includes/builder/compat/woocommerce.php
* includes/builder/feature/Library.php
* includes/builder/feature/dynamic-assets/class-dynamic-assets.php
* includes/builder/feature/dynamic-content.php
* includes/builder/feature/gutenberg/BlockTemplates.php
* includes/builder/feature/gutenberg/blocks/Layout.php
* includes/builder/feature/gutenberg/utils/Editor.php
* includes/builder/framework.php
* includes/builder/frontend-builder/bundle.js
* includes/builder/frontend-builder/helpers.php
* includes/builder/functions.php
* includes/builder/main-structure-elements.php
* includes/builder/module/field/Divider.php
* includes/builder/module/helpers/Background.php
* includes/builder/module/helpers/StickyOptions.php
* includes/builder/module/settings/migration/BackgroundGradientStops.php
* includes/builder/scripts/frontend/scripts.js
* includes/builder/scripts/frontend/woocommerce-modules.js
* theme-header.php
* theme.json
version 4.17.3 ( updated 04-22-2022 )
- Fixed premade items caching.
- Fixed free items calculation in the Divi Cloud App.
* cloud/build/et-cloud-app.bundle.js
version 4.17.2 ( updated 04-21-2022 )
- Fixed a bug that prevented the settings modal from updating its background gradient preview when switching between view modes.
- Improved items list refresh in the Cloud App after premade item is copied.
- Fixed a PHP warning that occurred when attempting to edit a non-existent post from the WordPress backend.
- Fixed flipped divider flickering in Safari browser.
- Fixed Uncaught TypeError when Post Content module is edited in Wireframe Mode and then saved.
- Fixed box shadow disappearing from posts in the blog module with pagination.
- Fixed an issue where, during a woocommerce checkout, changing the country wasn't updating the shipping method .
- Fixed a bug in Global Presets that would create malformed background gradients when processing global colors contained within a background gradient.
- Fixed major performance issue caused by modifications to React Tooltip, which resulted in noticeable lag when interacting with the settings modal for long periods of time.
- Fixed Library Modal styles loading in Backend Builder when Divi Builder Plugin is used.
- Removed unsupported actions from the Divi Cloud in Theme Builder.
- Fixed premade layouts update in the Cloud App when new layouts added.
- Fixed large lists of Categories and Tags creation at once from the Cloud App.
- Fixed Cloud tags icon if tag name contains uppercase letters.
- Fixed the incorrect message that appeared when Divi Marketplace product updates failed.
* cloud/cloud-app.php
* core/components/Updates.php
* includes/builder/class-et-builder-element.php
* includes/builder/feature/global-presets/Settings.php
* includes/builder/frontend-builder/assets.php
* includes/builder/frontend-builder/bundle.js
* includes/builder/functions.php
* includes/builder/module/helpers/Background.php
* includes/builder/module/settings/Migration.php
* includes/builder/module/settings/migration/BackgroundGradientStops.php
* includes/builder/scripts/frontend/scripts-dynamic.js
* includes/builder/scripts/frontend/scripts.js
* includes/builder/scripts/frontend/woocommerce-modules.js
version 4.17.1 ( updated 04-14-2022 )
- Fixed conflict with Events Manager plugin.
- Fixed a bug in the background gradients migration script that prevented inherited settings from fully migrating to the new Gradient Builder format.
- Fixed a bug in Counter Module that caused the background image to repeat with default settings on the front end.
- Fixes an issue where the semicolon was not included after the important property on some form fields on focus.
- Fixed issue were changing the zip code wasn't updating the shipping method for the given zip code.
- Fixed an issue which caused background pattern/mask to not show up properly when parallax image is used for column backgrounds on the front end.
- Fixed a text string conversion that could cause a fatal error in PHP 8.0 or later.
- Fixed Divi Cloud App conflict with 3rd party plugins in some cases.
- Fixed infinity resize event when FW Header fullscreen exists and the module scripts are reinitiated.
- Fixed numeric input increment step value is incorrect when shift key is released before any other key.
* includes/builder/class-et-builder-element.php
* includes/builder/feature/BlockEditorIntegration.php
* includes/builder/feature/Library.php
* includes/builder/feature/global-presets/Settings.php
* includes/builder/frontend-builder/assets.php
* includes/builder/frontend-builder/bundle.js
* includes/builder/frontend-builder/theme-builder/admin.php
* includes/builder/main-structure-elements.php
* includes/builder/module/CircleCounter.php
* includes/builder/module/settings/Migration.php
* includes/builder/module/settings/migration/BackgroundGradientStops.php
* includes/builder/post/taxonomy/LayoutTag.php
* includes/builder/scripts/frontend/scripts.js
* includes/builder/scripts/frontend/woocommerce-modules.js
version 4.17 ( updated 04-06-2022 )
- Added Divi Cloud storage system for Divi layouts.
- Launched new version of the Divi Library popup in the Visual Builder.
- Added the ability to manage Divi Library tags and categories in the Visual Builder.
- Added new tag view mode in the Divi Library popup, allowing layouts to be categorized into tag "folders."
- Added the ability to edit, preview, duplicate, delete and restore Divi Library layouts in the Visual Builder.
- Added the ability to favorite local and pre-made layouts.
- Added new sort modes and filtering options to the layouts list in the Divi Library popup.
- Added the ability to create new tags and categories when saving layouts in the Divi Library from the Visual Builder.
* core/admin/fonts/builder.eot
* core/admin/fonts/builder.svg
* core/admin/fonts/builder.ttf
* core/admin/fonts/builder.woff
* core/admin/js/portability.js
* core/admin/js/react-dom.production.min.js
* core/admin/js/react.production.min.js
* core/components/Portability.php
* css/theme-customizer-controls-styles.css
* functions.php
* includes/builder/core.php
* includes/builder/feature/BlockEditorIntegration.php
* includes/builder/feature/Library.php
* includes/builder/feature/et-server-frame.php
* includes/builder/feature/global-presets/Settings.php
* includes/builder/feature/woocommerce-modules.php
* includes/builder/framework.php
* includes/builder/frontend-builder/assets.php
* includes/builder/frontend-builder/bundle.js
* includes/builder/frontend-builder/helpers.php
* includes/builder/frontend-builder/i18n.php
* includes/builder/frontend-builder/i18n/library.php
* includes/builder/frontend-builder/i18n/library/categories.php
* includes/builder/frontend-builder/i18n/library/layouts-long.php
* includes/builder/frontend-builder/i18n/library/layouts-short.php
* includes/builder/frontend-builder/i18n/library/packs.php
* includes/builder/frontend-builder/i18n/portability.php
* includes/builder/frontend-builder/theme-builder/admin.php
* includes/builder/frontend-builder/theme-builder/theme-builder.php
* includes/builder/frontend-builder/theme-builder/woocommerce.php
* includes/builder/frontend-builder/view.php
* includes/builder/functions.php
* includes/builder/languages/et_builder-en_US-et-builder-gutenberg.po
* includes/builder/module/settings/migration/BackgroundGradientStops.php
* includes/builder/module/woocommerce/AddToCart.php
* includes/builder/module/woocommerce/Breadcrumb.php
* includes/builder/module/woocommerce/CartNotice.php
* includes/builder/module/woocommerce/CartProducts.php
* includes/builder/module/woocommerce/CartTotals.php
* includes/builder/module/woocommerce/CheckoutAdditionalInfo.php
* includes/builder/module/woocommerce/CheckoutBilling.php
* includes/builder/module/woocommerce/CheckoutOrderDetails.php
* includes/builder/module/woocommerce/CheckoutPaymentInfo.php
* includes/builder/module/woocommerce/CheckoutShipping.php
* includes/builder/module/woocommerce/CrossSells.php
* includes/builder/module/woocommerce/Description.php
* includes/builder/module/woocommerce/Gallery.php
* includes/builder/module/woocommerce/RelatedProducts.php
* includes/builder/module/woocommerce/Reviews.php
* includes/builder/module/woocommerce/Tabs.php
* includes/builder/module/woocommerce/Upsells.php
* includes/builder/post/taxonomy/LayoutTag.php
* includes/builder/post/type/Layout.php
* includes/builder/scripts/frontend/preview.js
* includes/builder/scripts/src/builder.js
* includes/builder/template-preview.php
* includes/builder/templates/block-layout-preview.php
* js/custom.js
* js/custom.unified.js
* package-lock.json
* rtl.css
version 4.16.1 ( updated 04-04-2022 )
- Fixed a problem with frontend rendering of CSS for columns in specialty sections that used background gradients.
- Replaced jQuery hashchange library with Javascript hashchange event.
- Fixed search module background not being set on the entire module.
- Enhanced our options migration system to include third-party Divi Builder modules in its option updates.
- Fixed Global Colors usage in Presets.
- Fixed page settings bar collapsing unintentionally when clicking anywhere in the page.
- Fixed Checkout Details module not changing price when shipping option is changed.
- Fixed a data formatting conflict between Dynamic Content and Gradient Builder that blocked saving in some cases.
- Hardened escaping for plugin changelog entry URL being saved to transient data.
* CREDITS.md
* core/components/Updates.php
* includes/builder/feature/dynamic-assets/assets/js/hash.js
* includes/builder/feature/dynamic-assets/assets/js/hashchange.js
* includes/builder/feature/dynamic-assets/class-dynamic-assets.php
* includes/builder/frontend-builder/bundle.js
* includes/builder/main-structure-elements.php
* includes/builder/module/Search.php
* includes/builder/module/settings/Migration.php
* includes/builder/module/settings/migration/BackgroundGradientStops.php
* includes/builder/scripts/frontend/scripts.js
* includes/builder/scripts/frontend/woocommerce-modules.js
version 4.16 ( updated 03-30-2022 )
- Added new advanced gradient builder control to the background option group.
- Improved VB performance by refactoring event listener in utils/mouse.js to be more efficient.
- Removed mousemove event listener in ETBuilderRoot component.
- Improved the logic to add/ remove event listener in ETBuilderPageSettingsBar component.
- Improved VB performance by prevented certain actions from being executed on every click when not necessary.
- Improved VB performance by refactoring event listener in utils/keyboard.js to be more efficient.
- Fixed helper functions not being loaded in certain cases causing errors when 3rd party modules are autosaved.
- Fixed a bug which were causing Background Size of Post Slider Module to be different in some cases on Frontend.
- Fixed a bug where the left padding for specialty columns did not work in some cases.
- Fixed an issue where the "View Details" link was not correctly set for products on the latest version.
* README.md
* core/components/Portability.php
* core/components/Updates.php
* core/ui/components/controls/slider/slider-utils.js
* includes/builder/class-et-builder-element.php
* includes/builder/class-et-global-settings.php
* includes/builder/feature/I18n.php
* includes/builder/feature/dynamic-assets/dynamic-assets.php
* includes/builder/feature/global-presets/Settings.php
* includes/builder/frontend-builder/bundle.js
* includes/builder/frontend-builder/helpers.php
* includes/builder/frontend-builder/i18n/display-conditions.php
* includes/builder/frontend-builder/init.php
* includes/builder/functions.php
* includes/builder/main-structure-elements.php
* includes/builder/module/FullwidthSlider.php
* includes/builder/module/Slider.php
* includes/builder/module/helpers/Background.php
* includes/builder/module/helpers/ResponsiveOptions.php
* includes/builder/module/settings/Migration.php
* includes/builder/module/settings/migration/BackgroundGradientStops.php
* includes/builder/module/settings/migration/ColumnOptions.php
* includes/builder/scripts/src/builder.js
version 4.15.1 ( updated 03-18-2022 )
- Fixed a PHP error in Extra Theme which was caused by Background Settings helper class.
- Updated Image Position option to show for all image repeat options in Background Settings.
- Fixed a bug that was causing Button Background Settings to not render properly on front end.
* includes/builder/class-et-builder-element.php
* includes/builder/frontend-builder/helpers.php
* includes/builder/module/helpers/Background.php
version 4.15 ( updated 03-17-2022 )
- Added the new Background Masks design setting. Background Masks frame your backgrounds to create new shapes and visual effects.
- Added the new Background Patterns design setting. Background Patterns overlay your background elements, adding texture to your page.
- Added new Background Image Size option.
- Added new Background Image Offset options to allow for background image position adjustment.
- The "Place Gradient Above Background Image" option now works with parallax background images.
- Copying and pasting background options will now work correctly between standard and specialty sections.
- Fixed duplication issue when multiple output elements are added on the same Woo module.
- Fixed builder being laggy after adjusting draggable sizing.
- Fixed PHP warning when Contains conditional logic for Custom Field is being used and the second custom field value is empty.
- Fixed module animation doesn't work when Popup Maker plugin is active.
* core/components/data/Utils.php
* includes/builder/autoload.php
* includes/builder/class-et-builder-element.php
* includes/builder/feature/I18n.php
* includes/builder/feature/background-masks/BackgroundMaskOptions.php
* includes/builder/feature/background-masks/BackgroundMaskStyleBase.php
* includes/builder/feature/background-masks/BackgroundMaskStyleFactory.php
* includes/builder/feature/background-masks/BackgroundPatternOptions.php
* includes/builder/feature/background-masks/BackgroundPatternStyleBase.php
* includes/builder/feature/background-masks/BackgroundPatternStyleFactory.php
* includes/builder/feature/background-masks/Functions.php
* includes/builder/feature/background-masks/MaskFields.php
* includes/builder/feature/background-masks/PatternFields.php
* includes/builder/feature/background-masks/mask/README.md
* includes/builder/feature/background-masks/mask/arch.php
* includes/builder/feature/background-masks/mask/bean.php
* includes/builder/feature/background-masks/mask/blades.php
* includes/builder/feature/background-masks/mask/caret.php
* includes/builder/feature/background-masks/mask/chevrons.php
* includes/builder/feature/background-masks/mask/corner-blob.php
* includes/builder/feature/background-masks/mask/corner-lake.php
* includes/builder/feature/background-masks/mask/corner-paint.php
* includes/builder/feature/background-masks/mask/corner-pill.php
* includes/builder/feature/background-masks/mask/corner-square.php
* includes/builder/feature/background-masks/mask/diagonal-bars-2.php
* includes/builder/feature/background-masks/mask/diagonal-bars.php
* includes/builder/feature/background-masks/mask/diagonal-pills.php
* includes/builder/feature/background-masks/mask/diagonal.php
* includes/builder/feature/background-masks/mask/ellipse.php
* includes/builder/feature/background-masks/mask/floating-squares.php
* includes/builder/feature/background-masks/mask/honeycomb.php
* includes/builder/feature/background-masks/mask/layer-blob.php
* includes/builder/feature/background-masks/mask/paint.php
* includes/builder/feature/background-masks/mask/rock-stack.php
* includes/builder/feature/background-masks/mask/square-stripes.php
* includes/builder/feature/background-masks/mask/triangles.php
* includes/builder/feature/background-masks/mask/wave.php
* includes/builder/feature/background-masks/pattern/3d-diamonds.php
* includes/builder/feature/background-masks/pattern/README.md
* includes/builder/feature/background-masks/pattern/checkerboard.php
* includes/builder/feature/background-masks/pattern/confetti.php
* includes/builder/feature/background-masks/pattern/crosses.php
* includes/builder/feature/background-masks/pattern/cubes.php
* includes/builder/feature/background-masks/pattern/diagonal-stripes-2.php
* includes/builder/feature/background-masks/pattern/diagonal-stripes.php
* includes/builder/feature/background-masks/pattern/diamonds.php
* includes/builder/feature/background-masks/pattern/honeycomb.php
* includes/builder/feature/background-masks/pattern/inverted-chevrons-2.php
* includes/builder/feature/background-masks/pattern/inverted-chevrons.php
* includes/builder/feature/background-masks/pattern/ogees.php
* includes/builder/feature/background-masks/pattern/pills.php
* includes/builder/feature/background-masks/pattern/pinwheel.php
* includes/builder/feature/background-masks/pattern/polka-dots.php
* includes/builder/feature/background-masks/pattern/scallops.php
* includes/builder/feature/background-masks/pattern/shippo.php
* includes/builder/feature/background-masks/pattern/smiles.php
* includes/builder/feature/background-masks/pattern/squares.php
* includes/builder/feature/background-masks/pattern/triangles.php
* includes/builder/feature/background-masks/pattern/tufted.php
* includes/builder/feature/background-masks/pattern/waves.php
* includes/builder/feature/background-masks/pattern/zig-zag-2.php
* includes/builder/feature/background-masks/pattern/zig-zag.php
* includes/builder/feature/woocommerce-modules.php
* includes/builder/framework.php
* includes/builder/frontend-builder/bundle.js
* includes/builder/frontend-builder/helpers.php
* includes/builder/functions.php
* includes/builder/main-structure-elements.php
* includes/builder/module/Accordion.php
* includes/builder/module/Audio.php
* includes/builder/module/BarCounters.php
* includes/builder/module/BarCountersItem.php
* includes/builder/module/Blog.php
* includes/builder/module/Blurb.php
* includes/builder/module/CircleCounter.php
* includes/builder/module/Code.php
* includes/builder/module/Comments.php
* includes/builder/module/ContactForm.php
* includes/builder/module/ContactFormItem.php
* includes/builder/module/CountdownTimer.php
* includes/builder/module/Cta.php
* includes/builder/module/Divider.php
* includes/builder/module/FilterablePortfolio.php
* includes/builder/module/FullwidthCode.php
* includes/builder/module/FullwidthHeader.php
* includes/builder/module/FullwidthImage.php
* includes/builder/module/FullwidthMap.php
* includes/builder/module/FullwidthMenu.php
* includes/builder/module/FullwidthPortfolio.php
* includes/builder/module/FullwidthPostSlider.php
* includes/builder/module/FullwidthPostTitle.php
* includes/builder/module/FullwidthSlider.php
* includes/builder/module/Gallery.php
* includes/builder/module/Icon.php
* includes/builder/module/Image.php
* includes/builder/module/Login.php
* includes/builder/module/Map.php
* includes/builder/module/Menu.php
* includes/builder/module/NumberCounter.php
* includes/builder/module/Portfolio.php
* includes/builder/module/PostSlider.php
* includes/builder/module/PostTitle.php
* includes/builder/module/PostsNavigation.php
* includes/builder/module/PricingTables.php
* includes/builder/module/PricingTablesItem.php
* includes/builder/module/Search.php
* includes/builder/module/Sidebar.php
* includes/builder/module/Signup.php
* includes/builder/module/Slider.php
* includes/builder/module/SliderItem.php
* includes/builder/module/SocialMediaFollow.php
* includes/builder/module/Tabs.php
* includes/builder/module/TabsItem.php
* includes/builder/module/TeamMember.php
* includes/builder/module/Testimonial.php
* includes/builder/module/Text.php
* includes/builder/module/Toggle.php
* includes/builder/module/Video.php
* includes/builder/module/VideoSlider.php
* includes/builder/module/field/display-conditions/CustomField.php
* includes/builder/module/helpers/Background.php
* includes/builder/module/helpers/ResponsiveOptions.php
* includes/builder/module/settings/Migration.php
* includes/builder/module/settings/migration/BackgroundGradientOverlaysImage.php
* includes/builder/module/type/PostContent.php
* includes/builder/module/woocommerce/Breadcrumb.php
* includes/builder/module/woocommerce/CartNotice.php
* includes/builder/module/woocommerce/CheckoutPaymentInfo.php
* includes/builder/module/woocommerce/Shop.php
* includes/builder/plugin-compat/popup-maker.php
* includes/builder/scripts/frontend/scripts.js
version 4.14.9 ( updated 03-10-2022 )
- Fixed a compatibility issue with WP Offload Media where one of the plugin's methods was renamed causing a fatal error in our products.
- Exposed hasValue helper for third-party extensions.
- Fixed search module input placeholder hidden with field text alignment set to right.
- Fixed a bug which were causing Background Settings on Responsive mode to not display properly on some cases.
- PHP 7.4 or higher is now recommended for performance and security reasons. Divi Help & Support Center's System Status card has been updated to reflect this.
- Fixed Presets pop-up window overflow issue when items exceeded viewport height.
- Changed 'Improve Google Fonts Loading' option default to 'off'.
* core/components/Portability.php
* core/components/SupportCenter.php
* includes/builder/class-et-builder-element.php
* includes/builder/feature/dynamic-assets/assets/js/search.js
* includes/builder/feature/dynamic-assets/class-dynamic-assets.php
* includes/builder/feature/gutenberg/blocks/Layout.php
* includes/builder/feature/gutenberg/utils/Editor.php
* includes/builder/frontend-builder/bundle.js
* includes/builder/module/woocommerce/CheckoutBilling.php
* includes/builder/plugin-compat/amazon-s3-and-cloudfront.php
* includes/builder/scripts/frontend/scripts.js
* options_divi.php
version 4.14.8 ( updated 02-17-2022 )
- Fixed issue where the google maps are not loading in the Map Module in the VB.
- Performance improved by preventing unnecessary re-renderings of some components.
- Fixed price showing for Woo related products when disabled.
- Fixed an issue where DONOTCACHEPAGE didn't work as intended with CDNs and several Caching Plugins.
- Introduced new hook, et_builder_global_modules_ignore_autop, to allow third-party modules to ignore autop on Global Module content processing.
- Optimized performance when Elements that are located inside the Post Content Module are hovered.
- Fixed conditions for when to show Enable Divi Builder button in WP admin bar.
- Fixed light font weight overriding strong tag in body text in the testimonial module.
- Fixed Divi Layout block styling issues when it is rendered inside WP Template or WP Template Parts.
- Fixing styling issue with the Woo Notice module.
- Fixed image overlay icon not perfectly centered.
- Fixed inverted Divi Placeholder text color when Twenty Twenty Two theme uses dark background.
- Fixed Layer View modal not dropping the dragged module.
- Fixed bug with module Drag&Drop when the page has custom Body Template.
- Fixed "unable to process your order" error when using Stripe payment gateway.
- Fixed a PHP error that occurred in some cases when exporting through Divi's portability system.
- Added Template Editor support on Divi and Extra themes.
- Fixed an issue with the Search widget where part of the "search" button text displays on a new line with some fonts.
* core/components/PageResource.php
* core/components/Portability.php
* includes/builder/class-et-builder-element.php
* includes/builder/class-et-builder-post-feature-base.php
* includes/builder/conditions.php
* includes/builder/feature/BlockTemplates.php
* includes/builder/feature/DoNotCachePage.php
* includes/builder/feature/dynamic-assets/class-dynamic-assets.php
* includes/builder/feature/gutenberg/blocks/Layout.php
* includes/builder/feature/gutenberg/utils/Editor.php
* includes/builder/feature/woocommerce/templates/checkout/form-checkout.php
* includes/builder/framework.php
* includes/builder/frontend-builder/assets.php
* includes/builder/frontend-builder/bundle.js
* includes/builder/frontend-builder/helpers.php
* includes/builder/functions.php
* includes/builder/module/Testimonial.php
* includes/builder/module/woocommerce/CartNotice.php
* includes/builder/module/woocommerce/CheckoutAdditionalInfo.php
* includes/builder/module/woocommerce/CheckoutBilling.php
* includes/builder/module/woocommerce/CheckoutOrderDetails.php
* includes/builder/module/woocommerce/CheckoutShipping.php
* includes/builder/module/woocommerce/RelatedProducts.php
* includes/builder/scripts/frontend/woocommerce-modules.js
* includes/builder/templates/block-template-canvas.php
version 4.14.7 ( updated 01-20-2022 )
- Fixed an issue where the Global Presets history didn't update with every action causing changes to not save.
- Fixed lazy loading images to occur only on below the fold content when Divi Builder is used.
- Recover some Block Editor control buttons on Template Editor mode.
- Fixed broken layout on Divi Woo Products module.
- Fixed incorrectly set Page Type in Theme Builder when using the Woo Notice module.
- Fixed issue where flip section divider is not showing in Safari.
- Fixed issue where the menu items wrap into multiple lines.
- Fixed builder issue when users edit a WooCommerce product and use FSE theme.
- Improved Theme Builder Template compatibility with Block Editor Template.
- Fixed Account name/password incorrect validation while on Checkout page built using Divi Builder.
- Fixed Divi block styling issue on Template Editor.
- Disable ET buttons when users open Template Editor.
- Fixed issue where global color becomes static if hover options are enabled.
- Fixed Payment form repeatedly showing in all Divi Checkout modules.
- Fixed an issue where the Pricing Table child element text color didn't overwrite the parent module text color in some cases.
- Added support for SVG files in portability export.
* core/components/Portability.php
* includes/builder/compat/early.php
* includes/builder/feature/BlockEditorIntegration.php
* includes/builder/feature/BlockTemplates.php
* includes/builder/feature/dynamic-assets/class-dynamic-assets.php
* includes/builder/frontend-builder/bundle.js
* includes/builder/module/FullwidthMenu.php
* includes/builder/module/Menu.php
* includes/builder/module/PricingTablesItem.php
* includes/builder/module/woocommerce/CheckoutAdditionalInfo.php
* includes/builder/module/woocommerce/CheckoutBilling.php
* includes/builder/module/woocommerce/CheckoutOrderDetails.php
* includes/builder/module/woocommerce/CheckoutShipping.php
* includes/builder/scripts/frontend/woocommerce-modules.js
* includes/builder/templates/block-template-canvas.php
version 4.14.6 ( updated 01-13-2022 )
- Fixed auto-opening preview tab when Divi Woo Product page is loaded w/ Rank Math plugin enabled.
- Fixed unintended lag in the Visual Builder caused by a previous bug fix.
- Fixed an issue where the layout(s) images were not exported from Divi Libray in some cases.
* core/components/Portability.php
* includes/builder/class-et-builder-element.php
* includes/builder/class-et-builder-module-shortcode-manager.php
* includes/builder/core.php
* includes/builder/feature/content-retriever/retrievers/PageContentRetriever.php
* includes/builder/feature/gutenberg/blocks/Layout.php
* includes/builder/feature/gutenberg/blocks/PostExcerpt.php
* includes/builder/feature/woocommerce-modules.php
* includes/builder/frontend-builder/bundle.js
* includes/builder/frontend-builder/theme-builder/woocommerce.php
* includes/builder/functions.php
* includes/builder/plugin-compat/wp-rocket.php
* includes/builder/scripts/frontend/scripts.js
version 4.14.5 ( updated 01-05-2022 )
- Fixed missing Table Header styles in Phone mode when using the Cart Products module.
- Added option to let user enable or disable Theme Builder Editor inside Visual Builder.
- Fixed the broken magic colors system.
- Fixed a compatibility issue with WP Rocket where the option to remove unused CSS was removing required CSS for the Blog Module's column size.
- Fixed PHP 8.1 deprecated FILTER_SANITIZE_STRING constant on BFB initial content.
- Fixed PHP 8.1 deprecated FILTER_SANITIZE_STRING constant on Global Presets and Colors features.
- Fixed broken WooCommerce extensions elements added on single product, product related pages, and Woo modules.
- Fixed Divi icons rendering saved in the Global Presets(GP) with unicode format: $ on VB.
- Fixed the Cart Products table styles allowing the table to be responsive.
- Fixed an issue with slide move-to that caused unwanted max-height being applied on all modules that use this function.
- Fixed issue with double wrappers when page has only the Body Layout created in Theme Builder.
- Fixed error in the console when scrolling and having 3rd party modules with child in the content.
- Fixed missing no account warning text when accessing Library Layouts of Divi Layout block.
- Fixed PHP 8.1 warnings when Dynamic Assets feature is enabled.
- Fixed some PHP 8.1 deprecation warnings and errors.
- Fixed an issue where the Blog module grid style would not work correctly due to Salvattore failing to retrieve the number of columns.
- Improved display of Divi icons when Dynamic Assets is turning on.
- Fixed incorrect Core - Post Excerpt block result on the FE.
- Fixed copy/paste between Radio and Selected Radio option groups in the Checkout Payment module.
- Fixed wrong height of Full-width slider image when placed immediately after transparent primary Menu.
- Fixed reCaptcha not visible when Dynamic CSS option is disabled.
- Added "Posts for Current Page" loop option for Blog module in Visual Theme Builder Editor.
- Fixed some PHP 8.1 deprecation warnings and errors.
* core/components/SupportCenter.php
* core/components/api/spam/ReCaptcha.php
* core/components/mu-plugins/SupportCenterSafeModeDisablePlugins.php
* core/ui/utils/property-resolver.js
* epanel/core_functions.php
* epanel/custom_functions.php
* functions.php
* header.php
* includes/builder/class-et-builder-element.php
* includes/builder/class-et-builder-module-shortcode-manager.php
* includes/builder/core.php
* includes/builder/feature/BlockEditorIntegration.php
* includes/builder/feature/content-retriever/retrievers/PageContentRetriever.php
* includes/builder/feature/dynamic-assets/class-dynamic-assets.php
* includes/builder/feature/dynamic-content.php
* includes/builder/feature/gutenberg/blocks/Layout.php
* includes/builder/feature/gutenberg/blocks/PostExcerpt.php
* includes/builder/feature/icon-manager/ExtendedFontIcons.php
* includes/builder/feature/woocommerce-modules.php
* includes/builder/framework.php
* includes/builder/frontend-builder/bundle.js
* includes/builder/frontend-builder/helpers.php
* includes/builder/frontend-builder/theme-builder/dynamic-content.php
* includes/builder/frontend-builder/theme-builder/woocommerce.php
* includes/builder/functions.php
* includes/builder/module/BarCountersItem.php
* includes/builder/module/CircleCounter.php
* includes/builder/module/ContactForm.php
* includes/builder/module/CountdownTimer.php
* includes/builder/module/woocommerce/CartProducts.php
* includes/builder/plugin-compat/sg-cachepress.php
* includes/builder/plugin-compat/sitepress-multilingual-cms.php
* includes/builder/plugin-compat/wp-rocket.php
* includes/builder/scripts/frontend/scripts.js
* includes/social_icons.php
* single.php
* theme-header.php
version 4.14.4 ( updated 12-17-2021 )
- Fixed a conflict with SiteGround Optimizer where the Theme Customizer styles would not work when the Output Styles Inline option was enabled in Divi's Theme Options.
- Fixed a compatibility issue with SiteGround Optimizer that would cause the Divi Builder to timeout.
- Fixed order class suffix changing from _0 to _1 due to the use of do_shortcode().
* composer.json
* includes/builder/feature/dynamic-assets/class-dynamic-assets.php
* includes/builder/frontend-builder/bundle.js
* includes/builder/functions.php
* includes/builder/plugin-compat/sg-cachepress.php
* includes/builder/scripts/src/builder.js
version 4.14.3 ( updated 12-16-2021 )
- Added the all new "Product Stock" condition to Display Conditions feature.
- Added the all new "Custom Field" condition to Display Conditions feature.
- Added the all new "URL Parameter" condition to Display Conditions feature.
- Fixed various various TinyMCE editor options not working in Theme Builder in Extra theme.
- Fixed repetitive text on all Checkout modules along w/ the missing default border width for the payment methods.
- Fixed all Checkout modules that displayed errors when a Product in cart goes out of stock while Checkout.
- The margin container in the Icon Module was reassigned to the main Icon Module container.
- Fixed Fields Text size option not targeting the right elements on Checkout page.
- Fixed default pricing tables color for frequency not being properly applied in certain cases.
- Fixed an issue where preset CSS are always Loaded even when presets are not used.
- Fixed fatal error shown when Shop module, used on a page, is viewed after disabling the Woocommerce plugin.
- Fixed Checkout workflow failure when checkout page is built using Theme Builder.
- Fixed using of slashes in the Date Format option in Blog, Fullwidth Post Title and Post Title modules.
- Fixed max-height set on image module for mobile devices resulting in stretched image.
- Fixed a PHP warning that occurred when the stored Global Presets History was an array instead of an object.
- Fixed shipping address not working when Cart Totals module is used.
- Fixed inconsistent form notice's font weight in the Checkout Payment module.
- Fixed bottom content jumping issue with Sliders on Webkit based browsers.
- Fixed a PHP 8 deprecation notice in the Cross Sells Module.
- Fixed bug with removing sections from Post Content module when there is only one section inside the Body Layout.
- Fixed issue with editing page content that is nested inside the Post Content Module in Body Template in Full Site Editing mode.
- Fixed Blurb module header color transition not working with the Text Color option.
- Fixed an issue with video responsiveness and dimensions on accordion module when dynamic js lib was enabled.
- Improve SiteGround Optimizer plugin compatibility with Dynamic Assets.
- Fixed broken Column Label Option Group styles on Table & Phone modes in Cart Totals module.
- Fixed compatibility issues with Optima Express IDX Plugin.
- Improve reCaptcha compatibility with 3rd Party reCaptcha solutions.
- Fixed Cart Totals module's Table Cells Background Color option not working in Phone mode.
- Fixed Fields Focus Text color being overridden in Checkout Info module.
* composer.json
* includes/builder/autoload.php
* includes/builder/class-et-builder-module-shortcode-manager.php
* includes/builder/core.php
* includes/builder/feature/ajax-data/AjaxData.php
* includes/builder/feature/dynamic-assets/class-dynamic-assets.php
* includes/builder/feature/global-presets/History.php
* includes/builder/feature/woocommerce-modules.php
* includes/builder/framework.php
* includes/builder/frontend-builder/bundle.js
* includes/builder/frontend-builder/i18n/display-conditions.php
* includes/builder/functions.php
* includes/builder/module/Blog.php
* includes/builder/module/Blurb.php
* includes/builder/module/Icon.php
* includes/builder/module/Image.php
* includes/builder/module/field/DisplayConditions.php
* includes/builder/module/field/display-conditions/CustomField.php
* includes/builder/module/field/display-conditions/ProductStock.php
* includes/builder/module/field/display-conditions/UrlParameter.php
* includes/builder/module/woocommerce/CartNotice.php
* includes/builder/module/woocommerce/CartTotals.php
* includes/builder/module/woocommerce/CheckoutAdditionalInfo.php
* includes/builder/module/woocommerce/CheckoutBilling.php
* includes/builder/module/woocommerce/CheckoutOrderDetails.php
* includes/builder/module/woocommerce/CheckoutShipping.php
* includes/builder/module/woocommerce/CrossSells.php
* includes/builder/plugin-compat/sg-cachepress.php
* includes/builder/scripts/frontend/scripts.js
* includes/builder/scripts/frontend/woocommerce-modules.js
* includes/builder/scripts/src/builder.js
version 4.14.2 ( updated 11-30-2021 )
- Fixed issue with Divi activation upon editing Divi Layout Block in Gutenberg.
- Fixed the margin applying for the icon with the left placement in the Blurb module.
- Fixed delayed editor switching from GB to VB when activating VB by replacing waitForSave() that is based on@wordpress/data's subscribe() with evaluating state and props change that is already passed by Higher Order Component from store's state.
- Fixed break in gallery module tablet layout when item titles have different lengths.
- Added wrapper to expanded icon picker styles.
- Fixed Text alignment option not working on front-end pages.
- Fixed padding setting for modules that have buttons (including the Button module) and set an button's icon.
- Fixed issue that renders invisible text in Gutenberg editor.
- Fixed center text alignment not working for the Person module.
- Fixed console error caused by invalid srcset attributes in SVG images when "Enable Responsive Images" option is on.
- Improved Display Conditions technical implementation for rendering Tooltip contents.
- Fixed tablet/mobile (auto) width not reflecting in VB when width is assigned in responsive view for desktop only.
- Fixed the Fields default border radius value for Cart Totals and Cart Products modules.
- Fixed PHP 8 deprecation warning on Icon module.
- Fixed error when accessing background image of button module.
- Improved display of Divi icons when Dynamic Assets is turning on.
- Added loading of the Icon Modules styles on FE.
- Fixed some layout export errors in PHP 8.
- Fixed hidden sections dots appearing in page dot navigation.
- Fixed Default white link color in Footer Widgets set from Theme Customizer was not working.
* core/components/Portability.php
* includes/builder/feature/dynamic-assets/class-dynamic-assets.php
* includes/builder/feature/gutenberg/EditorTypography.php
* includes/builder/feature/icon-manager/ExtendedFontIcons.php
* includes/builder/frontend-builder/bundle.js
* includes/builder/frontend-builder/i18n/display-conditions.php
* includes/builder/functions.php
* includes/builder/module/Icon.php
* includes/builder/module/field/display-conditions/Author.php
* includes/builder/module/field/display-conditions/Browser.php
* includes/builder/module/field/display-conditions/CartContents.php
* includes/builder/module/field/display-conditions/Categories.php
* includes/builder/module/field/display-conditions/CategoryPage.php
* includes/builder/module/field/display-conditions/Cookie.php
* includes/builder/module/field/display-conditions/DateArchive.php
* includes/builder/module/field/display-conditions/DateTime.php
* includes/builder/module/field/display-conditions/DynamicPosts.php
* includes/builder/module/field/display-conditions/LoggedInStatus.php
* includes/builder/module/field/display-conditions/OperatingSystem.php
* includes/builder/module/field/display-conditions/PageVisit.php
* includes/builder/module/field/display-conditions/PostType.php
* includes/builder/module/field/display-conditions/ProductPurchase.php
* includes/builder/module/field/display-conditions/SearchResults.php
* includes/builder/module/field/display-conditions/TagPage.php
* includes/builder/module/field/display-conditions/Tags.php
* includes/builder/module/field/display-conditions/UserRole.php
* includes/builder/module/woocommerce/CartProducts.php
* includes/builder/module/woocommerce/CartTotals.php
* js/src/custom-dynamic.js
* js/src/custom.js
version 4.14.1 ( updated 11-23-2021 )
- Fixed broken styles in the Divi Builder Plugin due to missing content wrapper.
- Fixed et_get_first_section console error.
- Fixed validation when Country, whose state isn't pre-defined, is selected during Checkout.
- Fixed issue affecting Checkout when using Divi modules as well as the default WooCommerce checkout shortcode.
- Fixed "no available payment" warning showing twice.
- Fixed broken shipping fields on Checkout page when WooCommerce shortcode within Text module.
- Fixed a bug that caused generated file lock files to not delete when they should have, during the creation of dynamic css files.
- Fixed PHP error occurring when the WP Rest API is used fetch posts which include a WC Cart Notice module in their content.
- Fixed hidden quantity text in the quantity field on WooCommerce product pages.
- Fixed static CSS cache clearing not working on Windows.
* core/components/cache/Directory.php
* includes/builder/core.php
* includes/builder/feature/dynamic-assets/class-dynamic-assets.php
* includes/builder/frontend-builder/bundle.js
* includes/builder/module/woocommerce/CartNotice.php
* includes/builder/scripts/frontend/scripts.js
* includes/builder/scripts/frontend/woocommerce-modules.js
* includes/builder/scripts/src/builder.js
* js/src/custom.js
version 4.14 ( updated 11-22-2021 )
- Introduced 8 new Divi WooCommerce modules, including the ability to customize your WooCommerce cart and checkout pages.
- An additional conversion of icons values created in previous Divi versions for 3p modules was added.
- The algorithm for checking the presence of icons in the content for Dynamic Assets has been changed, now it searches for the values of icons in the content, regardless of which field they are in.
- Fixed Display Conditions feature integration with Find & Replace feature so now they work together as expected.
- Fixed bug with copying and pasting elements between different pages, and enabled copying and pasting elements from one Theme Builder area to another.
- Fixed issue with double wrappers when page has only the Body Layout created in Theme Builder.
- Added extra conversion for the case with the font_icon__hover option when the "Allowlist" mechanism is run.
- Fixed broken icon fonts that occurred when a page's CSS cache was first generated using http, and then later served using https.
- Added a fallback check that will regenerate Dynamic CSS when we identify that the cached CSS files are missing Theme Builder CSS for whatever reason.
- Changed default transparent RGBA value to mitigate the issue with how color interpolation works in Safari browser.
- Fixed pagination not working for Portfolio module when used in a Theme Builder template.
- Fixed wrong height of Full-width slider image when placed immediately after transparent primary Menu.
- Fixed an issue with Settings Options field visibility checks when field dependencies were removed.
- Fixed an edge case in the Builder where Blurb Module would break on a specific combination of Image and Scroll Effects.
- Fixed child theme's style version being ignored when it's enqueued.
- Fixed the issue when reCaptcha was enabled in some cases even if it is not used anywhere on the site.
* composer.json
* core/admin/fonts/builder.eot
* core/admin/fonts/builder.ttf
* core/admin/fonts/builder.woff
* core/components/api/spam/ReCaptcha.php
* core/components/data/Utils.php
* core/functions.php
* includes/builder/autoload.php
* includes/builder/class-et-builder-element.php
* includes/builder/class-et-builder-module-shortcode-manager.php
* includes/builder/core.php
* includes/builder/feature/AjaxCache.php
* includes/builder/feature/ajax-data/AjaxData.php
* includes/builder/feature/display-conditions/DisplayConditions.php
* includes/builder/feature/dynamic-assets/class-dynamic-assets.php
* includes/builder/feature/dynamic-assets/dynamic-assets.php
* includes/builder/feature/dynamic-content.php
* includes/builder/feature/global-presets/Settings.php
* includes/builder/feature/icon-manager/ExtendedFontIcons.php
* includes/builder/feature/woocommerce-modules.php
* includes/builder/feature/woocommerce/placeholder/WoocommerceProductSimplePlaceholder.php
* includes/builder/feature/woocommerce/templates/cart/cart-totals.php
* includes/builder/feature/woocommerce/templates/cart/cart.php
* includes/builder/feature/woocommerce/templates/cart/cross-sells.php
* includes/builder/feature/woocommerce/templates/checkout/form-login.php
* includes/builder/feature/woocommerce/templates/checkout/payment-method.php
* includes/builder/feature/woocommerce/templates/checkout/payment.php
* includes/builder/feature/woocommerce/templates/checkout/review-order.php
* includes/builder/feature/woocommerce/templates/global/form-login-fe.php
* includes/builder/feature/woocommerce/templates/global/form-login.php
* includes/builder/feature/woocommerce/templates/global/quantity-input.php
* includes/builder/framework.php
* includes/builder/frontend-builder/bundle.js
* includes/builder/frontend-builder/helpers.php
* includes/builder/frontend-builder/theme-builder/woocommerce.php
* includes/builder/functions.php
* includes/builder/module/Comments.php
* includes/builder/module/ContactForm.php
* includes/builder/module/Portfolio.php
* includes/builder/module/field/Border.php
* includes/builder/module/field/MarginPadding.php
* includes/builder/module/helpers/WoocommerceModules.php
* includes/builder/module/settings/Migration.php
* includes/builder/module/settings/migration/ContactFormUniqueID.php
* includes/builder/module/settings/migration/IconManager.php
* includes/builder/module/settings/migration/WooTextOG.php
* includes/builder/module/woocommerce/AddToCart.php
* includes/builder/module/woocommerce/AdditionalInfo.php
* includes/builder/module/woocommerce/Breadcrumb.php
* includes/builder/module/woocommerce/CartNotice.php
* includes/builder/module/woocommerce/CartProducts.php
* includes/builder/module/woocommerce/CartTotals.php
* includes/builder/module/woocommerce/CheckoutAdditionalInfo.php
* includes/builder/module/woocommerce/CheckoutBilling.php
* includes/builder/module/woocommerce/CheckoutOrderDetails.php
* includes/builder/module/woocommerce/CheckoutPaymentInfo.php
* includes/builder/module/woocommerce/CheckoutShipping.php
* includes/builder/module/woocommerce/CrossSells.php
* includes/builder/module/woocommerce/Description.php
* includes/builder/module/woocommerce/Gallery.php
* includes/builder/module/woocommerce/Images.php
* includes/builder/module/woocommerce/Meta.php
* includes/builder/module/woocommerce/Price.php
* includes/builder/module/woocommerce/Rating.php
* includes/builder/module/woocommerce/RelatedProducts.php
* includes/builder/module/woocommerce/Reviews.php
* includes/builder/module/woocommerce/Shop.php
* includes/builder/module/woocommerce/Stock.php
* includes/builder/module/woocommerce/Tabs.php
* includes/builder/module/woocommerce/Title.php
* includes/builder/module/woocommerce/Upsells.php
* includes/builder/scripts/frontend/scripts.js
* includes/builder/scripts/frontend/woocommerce-modules.js
* js/src/custom.js
version 4.13.1 ( updated 11-11-2021 )
- Fixed front end .css files being enqueued inside the Visual Builder when editing category pages using the Theme Builder Editor.
- Fixed issue with Post Content Module error inside the Specialty section.
- Fixed visual builder laggy on Initial load.
- Fixed error when double click on child module preview to open settings modal.
- Fixed Divi Placeholder block is not rendered properly on edit post admin page.
- Updated Display Conditions feature making it more robust and added specific hooks to disable/enable Display Conditions site-wide.
- Refactored Dynamic Assets for improved technical maintainability.
- Fixed error in the browser console when doing drag and drop modules.
- Introduces new action hook after contact form entry is submitted.
* includes/builder/class-et-builder-element.php
* includes/builder/feature/ajax-data/AjaxData.php
* includes/builder/feature/display-conditions/DisplayConditions.php
* includes/builder/feature/dynamic-assets/class-dynamic-assets.php
* includes/builder/feature/global-presets/Settings.php
* includes/builder/framework.php
* includes/builder/frontend-builder/bundle.js
* includes/builder/frontend-builder/theme-builder/frontend.php
* includes/builder/functions.php
* includes/builder/module/ContactForm.php
* includes/builder/module/field/DisplayConditions.php
* includes/builder/module/field/display-conditions/PageVisit.php
* includes/builder/module/settings/Migration.php
* includes/builder/module/settings/migration/ContactFormUniqueID.php
* includes/builder/plugin-compat/popup-maker.php
version 4.13 ( updated 11-04-2021 )
- Added hundreds of new icons to the Divi icon picker.
- Added expanded icon picker for easier icon browsing.

46
cloud/README.md Normal file
View File

@ -0,0 +1,46 @@
# Cloud
Divi Cloud Client Application
Cloud Application is the Browser for the Library items which allows to manage items and perform various actions with items. It supports local items and items stored on the Divi Cloud. Both can be loaded into a single list and user can move items between local and cloud libraries using the Cloud App interface.
This is a standalone application and is fully independant from the Divi, includes/builder and core repos.
The only dependancy is the common repo.
It means Cloud Application can be mounted anywhere outside Divi and Visual Builder, for example on WP admin pages and can be extended to work with any type of items. It's not limited to work with Visual Builder layouts, items type is configurable.
To mount the Cloud app you have to create a container with id='et-cloud-app' and trigger `et_cloud_container_ready` event with set of preferences. Cloud Application will be mounted into `et-cloud-app` container.
Preferences format:
```
{
context: string,
initialTab: string,
editableTabs: array,
cloudTab: string,
predefinedTab: string,
globalSupport: boolean,
animation: string,
isProductTour: boolean,
showLoadOptions: boolean,
permanentFilter: object,
}
```
The page will have to listen for the Cloud App events to handle the actions like loading item from the Cloud, editing, updating, etc. The list of available Cloud App actions:
et_cloud_page_changed,
et_cloud_use_item,
et_cloud_download_progress,
et_cloud_account_status_error,
et_cloud_help,
et_cloud_item_action,
et_cloud_filter_update,
et_cloud_update_item,
et_cloud_item_toggle_location,
et_cloud_token_ready,
et_cloud_token_removed,
et_cloud_app_ready,
Cloud App also have API to send data from the page or trigger some events. See the `cloud/app/providers/bridge.js` for available actions.
All the tests located in `__tests__` directory and can be run form the /cloud repo using `yarn test` command.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

312
cloud/cloud-app.php Normal file
View File

@ -0,0 +1,312 @@
<?php
class ET_Cloud_App {
/**
* @var ET_Cloud_App
*/
private static $_instance;
/**
* Get the class instance.
*
* @since 3.0.99
*
* @return ET_Builder_Library
*/
public static function instance() {
if ( ! self::$_instance ) {
self::$_instance = new self;
}
add_action( 'wp_ajax_et_cloud_update_tokens', array( 'ET_Cloud_App', 'ajaxRefreshTokens' ) );
add_action( 'wp_ajax_et_cloud_remove_tokens', array( 'ET_Cloud_App', 'removeTokens' ) );
add_filter( 'et_builder_load_requests', array( 'ET_Cloud_App', 'updateAjaxCallsList' ) );
return self::$_instance;
}
public static function updateAjaxCallsList() {
return array( 'action' => array( 'et_cloud_update_tokens' ) );
}
public static function removeTokens() {
$nonce = $_POST['et_cloud_token_nonce'];
if ( ! wp_verify_nonce( $nonce, 'et_cloud_remove_token' ) ) {
die();
}
$user_id = (string) get_current_user_id();
$saved_tokens = get_option( 'et_cloud_refresh_token', array() );
$saved_tokens[ $user_id ] = array();
// Save empty refresh token for current user.
update_option( 'et_cloud_refresh_token', $saved_tokens );
wp_send_json_success();
}
public static function ajaxRefreshTokens() {
$nonce = $_POST['et_cloud_token_nonce'];
if ( ! wp_verify_nonce( $nonce, 'et_cloud_refresh_token' ) ) {
die();
}
return ET_Cloud_App::refreshTokens();
}
public static function refreshTokens() {
// Clear options cache to make sure we're using the latest version of the token.
wp_cache_delete( 'et_cloud_refresh_token', 'options' );
$user_id = (string) get_current_user_id();
$saved_tokens = get_option( 'et_cloud_refresh_token', array() );
$access_token = sanitize_text_field( $_POST['et_cloud_access_token'] );
$save_session = wp_validate_boolean( sanitize_text_field( $_POST['et_cloud_save_session'] ) );
$token_part = sanitize_text_field( $_POST['et_cloud_refresh_token_part'] );
$user_token_data = isset( $saved_tokens[ $user_id ] ) ? $saved_tokens[ $user_id ] : array();
$is_refresh = ! $access_token || '' === $access_token;
$url = 'https://cloud.elegantthemes.com/wp/wp-json/cloud/v1/activate';
$refresh_token = '';
if ( $is_refresh && is_array( $user_token_data ) && !empty( $user_token_data ) ) {
$refresh_token = $user_token_data['is_full_token'] ? $user_token_data['refresh_token'] : $user_token_data['refresh_token'] . $token_part;
$save_session = $is_refresh ? $user_token_data['is_full_token'] : $save_session;
}
if ( $is_refresh ) {
if ( ! $save_session && ( ! $token_part || '' === $token_part ) ) {
wp_send_json_error( array(
'error' => '401',
'errorType' => 'silent',
) );
return;
}
$is_updating_token = 'updating' === get_transient( 'et_cloud_access_token_update_status' );
// Previous request is not finished yet. Try again after 2 seconds.
// Otherwise this request will fail with 401 error.
if ( $is_updating_token ) {
sleep(2);
ET_Cloud_App::refreshTokens();
}
// Set updating token flag with 5 seconds expiration.
set_transient( 'et_cloud_access_token_update_status', 'updating', 5 );
}
if ( ( ! $is_refresh && '' === $access_token ) || ( $is_refresh && '' === $refresh_token ) ) {
wp_send_json_error( array(
'error' => '401',
) );
return;
}
if ( $is_refresh ) {
$token_array = explode('.', $refresh_token);
// Token is a json string of base64 encoded array. Decode it to access the data in token.
$refresh_token_data = json_decode(base64_decode($token_array[1]));
if ( !empty( $refresh_token_data ) && is_object( $refresh_token_data ) && isset( $refresh_token_data->aud ) ) {
$user_cloud_endpoint = $refresh_token_data->aud[1];
} else {
wp_send_json_error( array(
'error' => '401',
) );
return;
}
$url = sprintf('%1$s/wp-json/auth/v1/token', $user_cloud_endpoint);
}
if ( ! $is_refresh ) {
update_option( 'et_server_domain_token', $access_token );
}
$request_body = array();
$auth_token = $is_refresh ? $refresh_token : $access_token;
$response = wp_remote_post( $url, array(
'headers' => array(
'Authorization' => 'Bearer ' . $auth_token,
),
'body' => $request_body,
) );
if ( is_wp_error( $response ) ) {
// Delete updating token flag.
delete_transient( 'et_cloud_access_token_update_status' );
wp_send_json_error( array(
'error' => 'Cloud Request Failed. Please Try Again Later',
) );
return;
}
$response_code = wp_remote_retrieve_response_code( $response );
$response_body = wp_remote_retrieve_body( $response );
$decoded_body = json_decode( $response_body, TRUE );
// Valid response should contain 2 tokens.
if ( !isset( $decoded_body['refresh_token'] ) || !isset( $decoded_body['access_token'] ) || 200 !== $response_code ) {
// Authorization error. Need to reset all tokens and ask user to login again.
if ( 401 === $response_code ) {
$saved_tokens[ $user_id ] = array();
// Save empty refresh token for current user.
update_option( 'et_cloud_refresh_token', $saved_tokens, false );
// Delete updating token flag.
delete_transient( 'et_cloud_access_token_update_status' );
wp_send_json_error( array(
'error' => '401',
) );
return;
}
wp_send_json_error( array(
'error' => wp_remote_retrieve_response_message( $response ),
) );
return;
}
$refresh_token = $decoded_body['refresh_token'];
$access_token = $decoded_body['access_token'];
$token_to_save = $refresh_token;
$token_part = '';
// We shouldn't save the full token, so user cannot use this token in other browser.
if ( ! $save_session ) {
$token_parts = str_split( $refresh_token, 400 );
$token_to_save = $token_parts[0];
$token_part = $token_parts[1];
}
$saved_tokens[ $user_id ] = array(
'refresh_token' => sanitize_text_field( $token_to_save ),
'is_full_token' => $save_session,
);
// Save refresh token for current user.
update_option( 'et_cloud_refresh_token', $saved_tokens, false );
// Delete updating token flag.
delete_transient( 'et_cloud_access_token_update_status' );
// Save Access Token for 30 seconds so it can be quickly retrieved by the VB.
set_transient( 'et_cloud_access_token', $access_token, 30);
wp_send_json_success( array(
'accessToken' => $decoded_body['access_token'],
'refreshTokenPart' => $token_part,
'domainToken' => get_option( 'et_server_domain_token', '' ),
) );
}
public static function hasRefreshToken() {
$user_id = (string) get_current_user_id();
$saved_tokens = get_option( 'et_cloud_refresh_token', array() );
$refresh_token = isset( $saved_tokens[ $user_id ] ) ? $saved_tokens[ $user_id ] : array();
return $refresh_token && ! empty( $refresh_token );
}
public static function get_cloud_helpers() {
if ( !defined( 'ET_CLOUD_PLUGIN_DIR' ) ) {
define( 'ET_CLOUD_PLUGIN_DIR', get_template_directory() . '/cloud' );
}
$home_url = wp_parse_url( get_site_url() );
$etAccount = et_core_get_et_account();
return [
'i18n' => require ET_CLOUD_PLUGIN_DIR . '/i18n/library.php',
'nonces' => [
'et_cloud_download_item' => wp_create_nonce( 'et_cloud_download_item' ),
'et_cloud_refresh_token' => wp_create_nonce( 'et_cloud_refresh_token' ),
'et_cloud_remove_token' => wp_create_nonce( 'et_cloud_remove_token' ),
'et_builder_ajax_save_domain_token' => wp_create_nonce( 'et_builder_ajax_save_domain_token' ),
'et_builder_marketplace_api_get_layouts' => wp_create_nonce( 'et_builder_marketplace_api_get_layouts' ),
'et_builder_marketplace_api_get_layout_categories' => wp_create_nonce( 'et_builder_marketplace_api_get_layout_categories' ),
],
'ajaxurl' => is_ssl() ? admin_url( 'admin-ajax.php' ) : admin_url( 'admin-ajax.php', 'http' ),
'home_url' => isset( $home_url['path'] ) ? untrailingslashit( $home_url['path'] ) : '/',
'website_url' => $home_url['host'],
'etAccount' => [
'username' => $etAccount['et_username'],
'apiKey' => $etAccount['et_api_key'],
],
'domainToken' => get_option( 'et_server_domain_token', '' ),
'initialCloudStatus' => ET_Cloud_App::hasRefreshToken() ? 'on' : 'off',
];
}
/**
* Load the Cloud App scripts.
*
* @since ??
*
* @return void
*/
public static function load_js( $enqueue_prod_scripts = true, $skip_react_loading = false ) {
if ( !defined( 'ET_CLOUD_PLUGIN_URI' ) ) {
define( 'ET_CLOUD_PLUGIN_URI', get_template_directory_uri() . '/cloud' );
}
if ( !defined( 'ET_CLOUD_PLUGIN_DIR' ) ) {
define( 'ET_CLOUD_PLUGIN_DIR', get_template_directory() . '/cloud' );
}
$CORE_VERSION = defined( 'ET_CORE_VERSION' ) ? ET_CORE_VERSION : '';
$ET_DEBUG = defined( 'ET_DEBUG' ) && ET_DEBUG;
$DEBUG = $ET_DEBUG;
$home_url = wp_parse_url( get_site_url() );
$build_dir_uri = ET_CLOUD_PLUGIN_URI . '/build';
$common_scripts = ET_COMMON_URL . '/scripts';
$cache_buster = $DEBUG ? mt_rand() / mt_getrandmax() : $CORE_VERSION;
$asset_path = ET_CLOUD_PLUGIN_DIR . '/build/et-cloud-app.bundle.js';
if ( file_exists( $asset_path ) ) {
wp_enqueue_style( 'et-cloud-styles', "{$build_dir_uri}/et-cloud-app.bundle.modals.css", [], (string) $cache_buster );
}
wp_enqueue_script( 'es6-promise', "{$common_scripts}/es6-promise.auto.min.js", [], '4.2.2', true );
$BUNDLE_DEPS = [
'jquery',
'react',
'react-dom',
'es6-promise',
];
if ( $DEBUG || $enqueue_prod_scripts || file_exists( $asset_path ) ) {
$BUNDLE_URI = ! file_exists( $asset_path ) ? "{$home_url['scheme']}://{$home_url['host']}:31495/et-cloud-app.bundle.js" : "{$build_dir_uri}/et-cloud-app.bundle.js";
// Skip the React loading if we already have React ( Gutenberg editor for example ) to avoid conflicts.
if ( ! $skip_react_loading ) {
if ( function_exists( 'et_fb_enqueue_react' ) ) {
et_fb_enqueue_react();
}
}
wp_enqueue_script( 'et-cloud-app', $BUNDLE_URI, $BUNDLE_DEPS, (string) $cache_buster, true );
wp_localize_script( 'et-cloud-app', 'et_cloud_data', ET_Cloud_App::get_cloud_helpers());
}
}
}
ET_Cloud_App::instance();

BIN
cloud/fonts/CloudApp.eot Normal file

Binary file not shown.

27
cloud/fonts/CloudApp.svg Normal file
View File

@ -0,0 +1,27 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
<json>
<![CDATA[
{
"fontFamily": "CloudApp",
"majorVersion": 1,
"minorVersion": 0,
"version": "Version 1.0",
"fontId": "CloudApp",
"psName": "CloudApp",
"subFamily": "Regular",
"fullName": "CloudApp",
"description": "Font generated by IcoMoon."
}
]]>
</json>
</metadata>
<defs>
<font id="CloudApp" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" horiz-adv-x="512" d="" />
<glyph unicode="&#xe900;" glyph-name="inline-cloud" data-tags="inline-cloud" d="M877.714 434.468v40.96c0 182.126-147.017 329.143-329.143 329.143-169.691 0-307.2-128.731-325.486-293.303-1.463 0.731-2.194 0.731-3.657 0.731-121.417 0-219.429-98.011-219.429-219.429s98.011-219.429 219.429-219.429c79.726 0 550.766 0 621.714 0 100.937 0 182.857 81.92 182.857 182.857 0 88.503-62.903 161.646-146.286 178.469z" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
cloud/fonts/CloudApp.ttf Normal file

Binary file not shown.

BIN
cloud/fonts/CloudApp.woff Normal file

Binary file not shown.

182
cloud/i18n/library.php Normal file
View File

@ -0,0 +1,182 @@
<?php
$sub_directory = dirname( __FILE__ ) . '/library';
return array(
'%s Library' => sprintf( esc_html_x( '%s Library', 'Divi Library', 'et_builder' ), 'Divi' ),
'%d Layout' => esc_html__( '%d Layout', 'et_builder' ),
'%d Layouts' => esc_html__( '%d Layouts', 'et_builder' ),
'%d Layout Pack' => esc_html__( '%d Layout Pack', 'et_builder' ),
'%d Layout Packs' => esc_html__( '%d Layout Packs', 'et_builder' ),
'%d Module' => esc_html__( '%d Module', 'et_builder' ),
'%d Modules' => esc_html__( '%d Modules', 'et_builder' ),
'%d Page' => esc_html__( '%d Page', 'et_builder' ),
'%d Pages' => esc_html__( '%d Pages', 'et_builder' ),
'%d Row' => esc_html__( '%d Row', 'et_builder' ),
'%d Rows' => esc_html__( '%d Rows', 'et_builder' ),
'%d Section' => esc_html__( '%d Section', 'et_builder' ),
'%d Sections' => esc_html__( '%d Sections', 'et_builder' ),
'%d Total Layouts' => esc_html__( '%d Total Layouts', 'et_builder' ),
'Add New Category' => esc_html__( 'Add New Category', 'et_builder' ),
'Add New Cloud Category' => esc_html__( 'Add New Cloud Category', 'et_builder' ),
'Add New Layout' => esc_html__( 'Add New Layout', 'et_builder' ),
'Add New Pack' => esc_html__( 'Add New Pack', 'et_builder' ),
'Add New Tag' => esc_html__( 'Add New Tag', 'et_builder' ),
'Add New Cloud Tag' => esc_html__( 'Add New Cloud Tag', 'et_builder' ),
'Add To Categories' => esc_html__( 'Add To Categories', 'et_builder' ),
'Add To Divi Cloud' => esc_html__( 'Add To Divi Cloud', 'et_builder' ),
'All' => esc_html__( 'All', 'et_builder' ),
'Move To Divi Cloud' => esc_html__( 'Move To Divi Cloud', 'et_builder' ),
'Add To Favorites' => esc_html__( 'Add To Favorites', 'et_builder' ),
'Add To Tags' => esc_html__( 'Add To Tags', 'et_builder' ),
'API Key' => esc_html__( 'API Key', 'et_builder' ),
'Save Changes' => esc_html__( 'Save Changes', 'et_builder' ),
'Authentication Required' => esc_html__( 'Authentication Required', 'et_builder' ),
'Cancel' => esc_html__( 'Cancel', 'et_builder' ),
'Categories' => esc_html__( 'Categories', 'et_builder' ),
'Category' => esc_html__( 'Category', 'et_builder' ),
'Copy To Library' => esc_html__( 'Copy To Library', 'et_builder' ),
'Copy To Divi Cloud' => esc_html__( 'Copy To Divi Cloud', 'et_builder' ),
'Create New Category/Categories' => esc_html__( 'Create New Category/Categories', 'et_builder' ),
'Create New Tag/Tags' => esc_html__( 'Create New Tag/Tags', 'et_builder' ),
'Delete' => esc_html__( 'Delete', 'et_builder' ),
'Demo' => esc_html__( 'Demo', 'et_builder' ),
'Divi Cloud' => esc_html__( 'Divi Cloud', 'et_builder' ),
'Your Divi Cloud Session Has Ended' => esc_html__( 'Your Divi Cloud Session Has Ended', 'et_builder' ),
'Please Log In Again' => esc_html__( 'Please Log In Again', 'et_builder' ),
'Delete Permanently' => esc_html__( 'Delete Permanently', 'et_builder' ),
'Duplicate' => esc_html__( 'Duplicate', 'et_builder' ),
'Edit' => esc_html__( 'Edit', 'et_builder' ),
'Edit Tags And Categories' => esc_html__( 'Edit Tags And Categories', 'et_builder' ),
'Edit With Divi' => esc_html__( 'Edit With Divi', 'et_builder' ),
'Elegant Themes Account' => esc_html__( 'Elegant Themes Account', 'et_builder' ),
'Empty Trash' => esc_html__( 'Empty Trash', 'et_builder' ),
'Enable Divi Cloud' => esc_html__( 'Enable Divi Cloud', 'et_builder' ),
'Error' => esc_html__( 'Error', 'et_builder' ),
'Explore Other Modules With Tag' => esc_html__( 'Explore Other Modules With Tag', 'et_builder' ),
'Explore Other Rows With Tag' => esc_html__( 'Explore Other Rows With Tag', 'et_builder' ),
'Explore Other Sections With Tag' => esc_html__( 'Explore Other Sections With Tag', 'et_builder' ),
'Export' => esc_html__( 'Export', 'et_builder' ),
'Failed to load your existing layouts. Please try again later.' => esc_html__( 'Failed to load your existing layouts. Please try again later.', 'et_builder' ),
'Favorites' => esc_html__( 'Favorites', 'et_builder' ),
'Find A Layout' => esc_html__( 'Find A Layout', 'et_builder' ),
'Find A Module' => esc_html__( 'Find A Module', 'et_builder' ),
'Find A Page' => esc_html__( 'Find A Page', 'et_builder' ),
'Find A Row' => esc_html__( 'Find A Row', 'et_builder' ),
'Find A Section' => esc_html__( 'Find A Section', 'et_builder' ),
'Filter' => esc_html__( 'Filter', 'et_builder' ),
'Folder' => esc_html__( 'Folder', 'et_builder' ),
'Get Unlimited Divi Cloud Storage' => esc_html__( 'Get Unlimited Divi Cloud Storage', 'et_builder' ),
'Generating Screenshot' => esc_html__( 'Generating Screenshot', 'et_builder' ),
'Global' => esc_html_x( 'Global', 'Divi Library Global Module', 'et_builder' ),
'Global items' => esc_html__( 'Global items', 'et_builder' ),
'Grid View' => esc_html_x( 'Grid View', 'Divi Library View Mode', 'et_builder' ),
'Help' => esc_html__( 'Help', 'et_builder' ),
'Layout' => esc_html_x( 'Layout', 'Divi Library Item Type', 'et_builder' ),
'Layout Details' => esc_html_x( 'Layout Details', 'Divi Library Title', 'et_builder' ),
'Layout Pack' => esc_html__( 'Layout Pack', 'et_builder' ),
'Layout Name' => esc_html__( 'Layout Name', 'et_builder' ),
'Layouts In This Pack' => esc_html_x( 'Layouts In This Pack', 'Layout Pack', 'et_builder' ),
'Library' => esc_html__( 'Library', 'et_builder' ),
'List View' => esc_html_x( 'List View', 'Divi Library View Mode', 'et_builder' ),
'Live Preview' => esc_html__( 'Live Preview', 'et_builder' ),
'Load From Library' => esc_html__( 'Load From Library', 'et_builder' ),
'Locations' => esc_html__( 'Locations', 'et_builder' ),
'Log In' => esc_html__( 'Log In', 'et_builder' ),
'Log In To Divi Cloud' => esc_html__( 'Log In To Divi Cloud', 'et_builder' ),
'Manage Categories' => esc_html_x( 'Manage Categories', 'Layout Categories', 'et_builder' ),
'Manage Layouts' => esc_html__( 'Manage Layouts', 'et_builder' ),
'Manage Packs' => esc_html_x( 'Manage Packs', 'Layout Packs', 'et_builder' ),
'Manage Tags' => esc_html_x( 'Manage Tags', 'Layout Categories', 'et_builder' ),
'Manage Your Elegant Themes Account' => esc_html__( 'Manage Your Elegant Themes Account', 'et_builder' ),
'Module' => esc_html_x( 'Module', 'Divi Library Item Type', 'et_builder' ),
'Module Name' => esc_html__( 'Module Name', 'et_builder' ),
'Most Used' => esc_html__( 'Most Used', 'et_builder' ),
'My Divi Cloud' => esc_html__( 'My Divi Cloud', 'et_builder' ),
'Name' => esc_html__( 'Name', 'et_builder' ),
'New To Old' => esc_html__( 'New To Old', 'et_builder' ),
'No Results' => esc_html__( 'No Results', 'et_builder' ),
'No Screenshot' => esc_html__( 'No Screenshot', 'et_builder' ),
'On Divi Cloud' => esc_html__( 'On Divi Cloud', 'et_builder' ),
'Old To New' => esc_html__( 'Old To New', 'et_builder' ),
'Only Show' => esc_html__( 'Only Show', 'et_builder' ),
'Pack View' => esc_html_x( 'Pack View', 'Divi Library View Mode (Layout Pack)', 'et_builder' ),
'Password' => esc_html__( 'Password', 'et_builder' ),
'Premade Layouts' => esc_html__( 'Premade Layouts', 'et_builder' ),
'Published' => esc_html__( 'Published', 'et_builder' ),
'Remove From Cloud' => esc_html__( 'Remove From Cloud', 'et_builder' ),
'Remove From Favorites' => esc_html__( 'Remove From Favorites', 'et_builder' ),
'Rename' => esc_html__( 'Rename', 'et_builder' ),
'Replace Existing Content' => esc_html__( 'Replace Existing Content', 'et_builder' ),
'Restore' => esc_html__( 'Restore', 'et_builder' ),
'Row' => esc_html_x( 'Row', 'Divi Library Layout Type', 'et_builder' ),
'Row Name' => esc_html__( 'Row Name', 'et_builder' ),
'Save as Global' => esc_html__( 'Save as Global', 'et_builder' ),
'Save To Divi Cloud' => esc_html__( 'Save To Divi Cloud', 'et_builder' ),
'Search' => esc_html__( 'Search', 'et_builder' ),
'Search Layout Categories' => esc_html__( 'Search For Categories', 'et_builder' ),
'Search Layout Packs' => esc_html__( 'Search For Packs', 'et_builder' ),
'Search Layouts' => esc_html__( 'Search For Layouts', 'et_builder' ),
'Section' => esc_html_x( 'Section', 'Divi Library Layout Type', 'et_builder' ),
'Section Name' => esc_html__( 'Section Name', 'et_builder' ),
'Sign In To Divi Cloud' => esc_html__( 'Sign In To Divi Cloud', 'et_builder' ),
'Sign Out Of Divi Cloud' => esc_html__( 'Sign Out Of Divi Cloud', 'et_builder' ),
'Sort' => esc_html__( 'Sort', 'et_builder' ),
'Status' => esc_html__( 'Status', 'et_builder' ),
'Submit' => esc_html__( 'Submit', 'et_builder' ),
'Tags' => esc_html__( 'Tags', 'et_builder' ),
'Tag View' => esc_html_x( 'Tag View', 'Divi Library View Mode', 'et_builder' ),
'This Website' => esc_html__( 'This Website', 'et_builder' ),
'Title' => esc_html__( 'Title', 'et_builder' ),
'Trash' => esc_html__( 'Trash', 'et_builder' ),
'Free Divi Cloud Limit Reached' => esc_html__( 'Free Divi Cloud Limit Reached', 'et_builder' ),
'Use This Layout' => esc_html_x( 'Use This Layout', 'Apply layout to the page', 'et_builder' ),
'Use This Module' => esc_html_x( 'Use This Module', 'Insert Module from library', 'et_builder' ),
'Use This Row' => esc_html_x( 'Use This Row', 'Insert Row from library', 'et_builder' ),
'Use This Section' => esc_html_x( 'Use This Section', 'Insert Section from library', 'et_builder' ),
'Username' => esc_html__( 'Username', 'et_builder' ),
'Uh Oh!' => esc_html__( 'Uh Oh!', 'et_builder' ),
'Untagged' => esc_html__( 'Untagged', 'et_builder' ),
'Upgrade Your Divi Cloud' => esc_html__( 'Upgrade Your Divi Cloud', 'et_builder' ),
'View Live Demo' => esc_html_x( 'View Live Demo', 'Page layout', 'et_builder' ),
'View Mode' => esc_html_x( 'View Mode', 'Divi Library', 'et_builder' ),
'Your Existing Pages' => esc_html__( 'Your Existing Pages', 'et_builder' ),
'Your Saved Layouts' => esc_html__( 'Your Saved Layouts', 'et_builder' ),
'Your Divi Cloud membership has expired' => esc_html__( 'Your Divi Cloud membership has expired', 'et_builder' ),
'$apiKeyHelp' => et_get_safe_localization( sprintf( __( 'You can find your API Key <a href="%s" target="_blank">here</a>.', 'et_builder' ), 'https://www.elegantthemes.com/members-area/api/' ) ),
'$expiredAccount' => et_get_safe_localization( sprintf( __( 'Your %s subscription has expired. In order to download Premade Layouts from the %s Library you must <a href="%s" target="_blank">renew your subscription</a>.', 'et_builder' ), 'Elegant Themes', 'Divi', 'https://www.elegantthemes.com/members-area' ) ),
'$noAccount' => sprintf( esc_html__( 'Before you can download Premade Layouts from the %s Library you must authenticate your %s subscription.', 'et_builder' ), 'Divi', 'Elegant Themes' ),
'$usernameHelp' => esc_html__( 'This is the username that you use to access the Members Area on elegantthemes.com.', 'et_builder' ),
'$cloudLoginHelp' => esc_html__( 'To enable Divi Cloud on this website, log in to your Elegant Themes account', 'et_builder' ),
'$cloudAuthError' => esc_html__( 'Your Divi Cloud session has ended. Please try logging in again. If you continue to experience authorization failures, try closing Library modal and opening it again so that your authorization token can be regenerated.', 'et_builder' ),
'$cloudFreeLimitExceeded' => esc_html__( 'Unlock Unlimited Divi Cloud Storage', 'et_builder' ),
'$cloudTrashConfirmation' => esc_html__( 'Are You Sure?', 'et_builder' ),
'$cloudTrashWarning' => esc_html__( 'Do you want to permanently delete all the items in your trash? This action cannot be undone and the items cannot be recovered.', 'et_builder' ),
'$cloudSaveGlobal' => esc_html__( 'Duplicate Global Item To Cloud', 'et_builder' ),
'$cloudGlobalWarning' => esc_html__( 'Global items cannot be added to your Divi Cloud. Would you like to save a non-global version to your Divi Cloud? The version on this website will remain a global instance', 'et_builder' ),
'$cloudPaidLimitExceeded' => esc_html__( 'Uh Oh! You have reached your Divi Cloud quota.', 'et_builder' ),
'$cloudUpgradeMessage' => esc_html__( 'All Divi users can store up to %s items to their Divi Cloud for free. To save more items to your cloud and unlock unlimited storage, upgrade your Divi Cloud membership today. If you build Divi websites for a living, Divi Cloud is an awesome add-on and an amazing time saver. You are going to love it!', 'et_builder' ),
'$cloudUpgradeMessage500' => esc_html__( 'You have hit your 500MB Limit. To continue to save items to your Divi Cloud, you must delete some of your existing items to free up space or upgrade your Divi Cloud storage.', 'et_builder' ),
'$cloudLoginNotification' => esc_html__( 'Sign in to your Elegant Themes account using the pop-up to activate Divi Cloud.', 'et_builder' ),
'$cloudBuyNotification' => esc_html__( 'Complete your purchase using the pop-up to upgrade Divi Cloud.', 'et_builder' ),
'$cloudLoginForgotPass' => et_get_safe_localization( sprintf( __( 'Forgot your <a href="%1$s" target="_blank">Username</a> or <a href="%1$s" target="_blank">Password</a>?', 'et_builder' ), 'https://www.elegantthemes.com/members-area/' ) ),
'$layoutSourceET' => esc_html__( 'By Elegant Themes', 'et_builder' ),
'$layoutSourceETShort' => esc_html__( 'Elegant Themes', 'et_builder' ),
'$layoutSourceCommunity' => esc_html__( 'By The Community', 'et_builder' ),
'$layoutSourceCommunityShort' => esc_html__( 'Community', 'et_builder' ),
'$marketplaceLayoutPurchase' => esc_html__( 'Buy', 'et_builder' ),
'$marketplaceLayoutViewDetails' => esc_html__( 'View Details', 'et_builder' ),
'$libraryErrorBoundary' => esc_html__( '%1$s could not be displayed.', 'et_builder' ),
'$libraryHideError' => esc_html__( 'hide error message', 'et_builder' ),
'$libraryShowError' => esc_html__( 'show error message', 'et_builder' ),
'$marketplaceAuthor' => esc_html__( 'By %s', 'et_builder' ),
'$marketplaceReviews' => esc_html__( '%d Reviews', 'et_builder' ),
'$marketplaceSales' => esc_html__( '%d Sales', 'et_builder' ),
'$marketplaceView' => esc_html__( 'View in Divi Marketplace', 'et_builder' ),
'@categories' => require $sub_directory . '/categories.php',
'@layoutsLong' => require $sub_directory . '/layouts-long.php',
'@layoutsShort' => require $sub_directory . '/layouts-short.php',
'@packs' => require $sub_directory . '/packs.php',
'$trashStorageNotice' => et_get_safe_localization( sprintf( __( 'Trash storage for Divi Cloud is limited to 50 items for free accounts. Once your trash exceeds 50 items, the oldest items in your trashed will be permanently deleted to make room for new items. Purchase a <a href="%s" target="_blank">Divi Cloud Membership</a> for unlimited storage.', 'et_builder' ), 'https://www.elegantthemes.com/divi-cloud/' ) ),
'$accountLimitNotice' => et_get_safe_localization( sprintf( __( 'Your Divi Cloud membership has expired. To access items stored on your cloud, please <a href="%s" target="_blank">renew your Divi Cloud membership</a>.', 'et_builder' ), 'https://www.elegantthemes.com/members-area/membership/' ) ),
);

3
cloud/images/layout.svg Normal file
View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<path d="M1 24h6a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1v-6a1 1 0 0 1 1-1zM25 0h6a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1zM1 12h30a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1v-6a1 1 0 0 1 1-1zm12 12h18a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H13a1 1 0 0 1-1-1v-6a1 1 0 0 1 1-1zM1 0h18a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1z" fill="#e7eef5"/>
</svg>

After

Width:  |  Height:  |  Size: 455 B

4
common/README.md Normal file
View File

@ -0,0 +1,4 @@
# Common
- Anything here should be pure and not rely on anything from VB, TB, Core, so it can be reused wherever, even outside Divi.
- Only external dependencies allowed.

55
common/init.php Normal file
View File

@ -0,0 +1,55 @@
<?php
if ( ! function_exists( 'et_common_setup' ) ) :
/**
* Setup Common const.
*
* @since ??
*
*/
function et_common_setup() {
if ( defined( 'ET_COMMON_URL' ) ) {
return;
}
$common_path = _et_core_normalize_path( trailingslashit( dirname( __FILE__ ) ) );
$theme_dir = _et_core_normalize_path( trailingslashit( realpath( get_template_directory() ) ) );
if ( 0 === strpos( $common_path, $theme_dir ) ) {
$url = get_template_directory_uri() . '/common/';
} else {
$url = plugin_dir_url( __FILE__ );
}
define( 'ET_COMMON_URL', $url );
}
endif;
if ( ! function_exists( 'et_fb_enqueue_react' ) ):
/**
* Load React. Use react from cdn server in debug mode or local version in production.
*
* @since ??
*
*/
function et_fb_enqueue_react() {
$DEBUG = defined( 'ET_DEBUG' ) && ET_DEBUG;
$common_scripts = ET_COMMON_URL . 'scripts';
$react_version = '16.12.0';
wp_dequeue_script( 'react' );
wp_dequeue_script( 'react-dom' );
wp_deregister_script( 'react' );
wp_deregister_script( 'react-dom' );
if ( $DEBUG || DiviExtensions::is_debugging_extension() ) {
wp_enqueue_script( 'react', "https://cdn.jsdelivr.net/npm/react@{$react_version}/umd/react.development.js", array(), $react_version, true );
wp_enqueue_script( 'react-dom', "https://cdn.jsdelivr.net/npm/react-dom@{$react_version}/umd/react-dom.development.js", array( 'react' ), $react_version, true );
add_filter( 'script_loader_tag', 'et_core_add_crossorigin_attribute', 10, 3 );
} else {
wp_enqueue_script( 'react', "{$common_scripts}/react.production.min.js", array(), $react_version, true );
wp_enqueue_script( 'react-dom', "{$common_scripts}/react-dom.production.min.js", array( 'react' ), $react_version, true );
}
}
endif;

10
common/scripts/es6-promise.auto.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,4 +0,0 @@
{
"name": "autonomic/Divi",
"type": "wordpress-theme"
}

View File

@ -1,4 +1,11 @@
<?php
/**
* Define the current ET Core version4.17.4
*
* (Note: this value updates automatically as part of our Grunt release task4.17.4)
*
* @package \ET\Core
*/
// Note, this will be updated automatically during grunt release task
$ET_CORE_VERSION = '4.13.0';
$ET_CORE_VERSION = '4.17.4';

Binary file not shown.

View File

@ -113,8 +113,8 @@
<glyph unicode="&#xe90c;" glyph-name="woo-upsells" d="M256 0c0-35.346-28.654-64-64-64s-64 28.654-64 64c0 35.346 28.654 64 64 64s64-28.654 64-64zM832 0c0-35.346-28.654-64-64-64s-64 28.654-64 64c0 35.346 28.654 64 64 64s64-28.654 64-64zM968.96 960c-2.853 0.451-6.144 0.708-9.494 0.708-32.437 0-59.238-24.131-63.43-55.42l-0.036-0.328-55.68-392.96h-264.32v229.76l18.56-19.2c11.6-11.693 27.675-18.931 45.44-18.931s33.84 7.238 45.436 18.927l0.004 0.004c11.693 11.6 18.931 27.675 18.931 45.44s-7.238 33.84-18.927 45.436l-128.004 128.004c-5.905 5.66-12.923 10.212-20.687 13.289l-0.433 0.151c-7.19 3.036-15.549 4.801-24.32 4.801s-17.13-1.764-24.742-4.958l0.422 0.157c-8.197-3.228-15.215-7.78-21.143-13.462l0.023 0.022-128-128c-11.629-11.629-18.822-27.695-18.822-45.44 0-35.491 28.771-64.262 64.262-64.262 17.745 0 33.811 7.193 45.44 18.822v0l18.56 19.2v-229.76h-264.32l-55.68 392.96c-4.553 31.628-31.47 55.664-64 55.664-35.691 0-64.624-28.933-64.624-64.624 0-3.16 0.227-6.268 0.665-9.307l-0.041 0.347 64-443.52v-251.52c0-35.346 28.654-64 64-64v0h704c35.346 0 64 28.654 64 64s-28.654 64-64 64v0h-640v128h704c0.187-0.002 0.408-0.003 0.63-0.003 32.187 0 58.824 23.76 63.329 54.697l0.041 0.346 64 448c0.451 2.853 0.708 6.144 0.708 9.494 0 32.437-24.131 59.238-55.42 63.43l-0.328 0.036z" />
<glyph unicode="&#xe90d;" glyph-name="divi-module-icons-50" d="M576 512h-256c-35.346 0-64-28.654-64-64s28.654-64 64-64v0h256c35.346 0 64 28.654 64 64s-28.654 64-64 64v0zM960 0c-9.021 0.018-17.598 1.9-25.373 5.28l0.413-0.16-286.72 122.88h-584.32c-35.346 0-64 28.654-64 64v0 512c0 35.346 28.654 64 64 64v0h768c35.346 0 64-28.654 64-64v0-307.84l123.52-308.48c2.874-7.013 4.542-15.152 4.542-23.68 0-35.346-28.654-64-64-64-0.022 0-0.044 0-0.065 0h0.003zM128 256h533.12c9.249-0.104 18.032-1.975 26.068-5.291l-0.468 0.171 156.16-67.2-70.4 176.64c-2.838 6.741-4.486 14.576-4.486 22.797 0 0.311 0.002 0.621 0.007 0.93l-0.001-0.047v256h-640z" />
<glyph unicode="&#xe90e;" glyph-name="divi-module-icons-28" d="M64 0c0-35.346 28.654-64 64-64v0h768c35.346 0 64 28.654 64 64v0 576c0 35.346-28.654 64-64 64v0h-128v64c-0.090 64.306-24.361 122.926-64.204 167.271l0.204-0.231c0.057 0.861 0.089 1.867 0.089 2.88s-0.032 2.019-0.096 3.016l0.007-0.136s0 0-4.48 4.48-14.080 12.8-21.76 18.56c-5.068 4.864-10.493 9.477-16.186 13.754l-0.454 0.326c-9.252 5.746-20.176 11.52-31.495 16.569l-1.785 0.711-14.080 7.68c-11.952 5.28-26.064 9.906-40.696 13.152l-1.544 0.288c-1.057 0.137-2.279 0.216-3.52 0.216s-2.463-0.078-3.662-0.231l0.142 0.015c-15.561 4.285-33.555 7.048-52.092 7.67l-0.388 0.010c-141.385 0-256-114.615-256-256v0-64h-128c-35.346 0-64-28.654-64-64v0zM384 704c0 70.692 57.308 128 128 128v0c3.842 0.467 8.29 0.734 12.8 0.734s8.958-0.267 13.329-0.785l-0.529 0.051 16.64-5.12h7.68c5.268-3.69 9.876-7.689 14.037-12.114l0.043-0.046 8.96-5.12 10.24-8.32 9.6-8.96c21.793-22.906 35.2-53.967 35.2-88.16 0-0.056 0-0.113 0-0.169v0.009-64h-256zM192 512h64v-128c0-35.346 28.654-64 64-64s64 28.654 64 64v0 128h256v-128c0-35.346 28.654-64 64-64s64 28.654 64 64v0 128h64v-448h-640z" />
<glyph unicode="&#xe90f;" glyph-name="row" horiz-adv-x="1600" d="M69.12 960h309.76c38.174 0 69.12-30.946 69.12-69.12v-885.76c0-38.174-30.946-69.12-69.12-69.12h-309.76c-38.174 0-69.12 30.946-69.12 69.12v885.76c0 38.174 30.946 69.12 69.12 69.12zM1221.12 960h309.76c38.174 0 69.12-30.946 69.12-69.12v-885.76c0-38.174-30.946-69.12-69.12-69.12h-309.76c-38.174 0-69.12 30.946-69.12 69.12v885.76c0 38.174 30.946 69.12 69.12 69.12zM645.12 960h309.76c38.174 0 69.12-30.946 69.12-69.12v-885.76c0-38.174-30.946-69.12-69.12-69.12h-309.76c-38.174 0-69.12 30.946-69.12 69.12v885.76c0 38.174 30.946 69.12 69.12 69.12z" />
<glyph unicode="&#xe910;" glyph-name="layout" horiz-adv-x="1600" d="M48.64 960h798.72c26.863 0 48.64-21.777 48.64-48.64v-158.72c0-26.863-21.777-48.64-48.64-48.64h-798.72c-26.863 0-48.64 21.777-48.64 48.64v158.72c0 26.863 21.777 48.64 48.64 48.64zM1063.040 960h497.92c21.561 0 39.040-17.479 39.040-39.040v-177.92c0-21.561-17.479-39.040-39.040-39.040h-497.92c-21.561 0-39.040 17.479-39.040 39.040v177.92c0 21.561 17.479 39.040 39.040 39.040zM34.56 192h378.88c19.087 0 34.56-15.473 34.56-34.56v-186.88c0-19.087-15.473-34.56-34.56-34.56h-378.88c-19.087 0-34.56 15.473-34.56 34.56v186.88c0 19.087 15.473 34.56 34.56 34.56zM628.48 192h919.040c28.984 0 52.48-23.496 52.48-52.48v-151.040c0-28.984-23.496-52.48-52.48-52.48h-919.040c-28.984 0-52.48 23.496-52.48 52.48v151.040c0 28.984 23.496 52.48 52.48 52.48zM65.28 576h1469.44c36.053 0 65.28-29.227 65.28-65.28v-125.44c0-36.053-29.227-65.28-65.28-65.28h-1469.44c-36.053 0-65.28 29.227-65.28 65.28v125.44c0 36.053 29.227 65.28 65.28 65.28z" />
<glyph unicode="&#xe90f;" glyph-name="row" horiz-adv-x="1600" d="M64 960h320c35.346 0 64-28.654 64-64v-896c0-35.346-28.654-64-64-64h-320c-35.346 0-64 28.654-64 64v896c0 35.346 28.654 64 64 64zM640 960h320c35.346 0 64-28.654 64-64v-896c0-35.346-28.654-64-64-64h-320c-35.346 0-64 28.654-64 64v896c0 35.346 28.654 64 64 64zM1216 960h320c35.346 0 64-28.654 64-64v-896c0-35.346-28.654-64-64-64h-320c-35.346 0-64 28.654-64 64v896c0 35.346 28.654 64 64 64z" />
<glyph unicode="&#xe910;" glyph-name="layout" horiz-adv-x="1600" d="M60.8 960h774.4c33.579 0 60.8-27.221 60.8-60.8v-134.4c0-33.579-27.221-60.8-60.8-60.8h-774.4c-33.579 0-60.8 27.221-60.8 60.8v134.4c0 33.579 27.221 60.8 60.8 60.8zM1083.52 960h456.96c32.872 0 59.52-26.648 59.52-59.52v-136.96c0-32.872-26.648-59.52-59.52-59.52h-456.96c-32.872 0-59.52 26.648-59.52 59.52v136.96c0 32.872 26.648 59.52 59.52 59.52zM60.8 576h1478.4c33.579 0 60.8-27.221 60.8-60.8v-134.4c0-33.579-27.221-60.8-60.8-60.8h-1478.4c-33.579 0-60.8 27.221-60.8 60.8v134.4c0 33.579 27.221 60.8 60.8 60.8zM63.36 192h257.28c34.993 0 63.36-28.367 63.36-63.36v-129.28c0-34.993-28.367-63.36-63.36-63.36h-257.28c-34.993 0-63.36 28.367-63.36 63.36v129.28c0 34.993 28.367 63.36 63.36 63.36zM571.52 192h968.96c32.872 0 59.52-26.648 59.52-59.52v-136.96c0-32.872-26.648-59.52-59.52-59.52h-968.96c-32.872 0-59.52 26.648-59.52 59.52v136.96c0 32.872 26.648 59.52 59.52 59.52z" />
<glyph unicode="&#xe911;" glyph-name="woo-billing" d="M956.16 673.28c0.115 0.865 0.181 1.865 0.181 2.88s-0.066 2.015-0.193 2.996l0.012-0.116c-3.259 7.357-7.337 13.69-12.234 19.287l0.074-0.087-256 256c-5.432 5.003-11.792 9.104-18.776 12.004l-0.424 0.156h-5.12c-5.925 3.26-12.856 5.528-20.219 6.376l-0.261 0.024h-515.2c-35.346 0-64-28.654-64-64v0-896c0-35.346 28.654-64 64-64v0h768c35.346 0 64 28.654 64 64v0 640s0 0 0 3.84c-1.056 6.485-2.392 12.094-4.082 17.547l0.242-0.907zM741.76 716.8h-37.76v37.76zM192 76.8v768h384v-192c0-35.346 28.654-64 64-64v0h192v-512zM768 396.8c0-35.346-28.654-64-64-64v0h-192c-35.346 0-64 28.654-64 64s28.654 64 64 64v0h192c35.346 0 64-28.654 64-64v0zM256 652.8c0 35.346 28.654 64 64 64v0h128c35.346 0 64-28.654 64-64s-28.654-64-64-64v0h-128c-35.346 0-64 28.654-64 64v0zM378.88 421.12c3.243-6.716 5.138-14.604 5.138-22.935 0-0.487-0.006-0.972-0.019-1.456l0.002 0.071c0.003-0.224 0.004-0.488 0.004-0.752 0-35.346-28.654-64-64-64s-64 28.654-64 64c0 9.058 1.882 17.676 5.276 25.486l-0.16-0.413c3.228 8.197 7.78 15.215 13.462 21.143l-0.022-0.023c11.6 11.693 27.675 18.931 45.44 18.931s33.84-7.238 45.436-18.927l0.004-0.004c5.66-5.905 10.212-12.923 13.289-20.687l0.151-0.433zM365.44 250.24c11.283-11.816 18.307-27.784 18.559-45.39l0.001-0.050c-0.076-17.483-7.15-33.299-18.564-44.804l0.004 0.004c-11.6-11.693-27.675-18.931-45.44-18.931s-33.84 7.238-45.436 18.927l-0.004 0.004c-11.41 11.501-18.484 27.317-18.56 44.785v0.015c-0.001 0.11-0.001 0.24-0.001 0.37 0 17.581 7.089 33.507 18.565 45.074l-0.004-0.004c11.551 11.402 27.429 18.444 44.952 18.444 8.957 0 17.485-1.84 25.225-5.163l-0.416 0.159c8.132-3.447 15.118-7.97 21.179-13.493l-0.059 0.053zM768 204.8c0-35.346-28.654-64-64-64v0h-192c-35.346 0-64 28.654-64 64s28.654 64 64 64v0h192c35.346 0 64-28.654 64-64v0z" />
<glyph unicode="&#xe912;" glyph-name="woo-cart" d="M192 396.8v-128h704c35.346 0 64-28.654 64-64s-28.654-64-64-64v0h-768c-35.346 0-64 28.654-64 64v0 251.52l-64 443.52c-0.397 2.692-0.624 5.8-0.624 8.96 0 35.691 28.933 64.624 64.624 64.624 32.53 0 59.447-24.036 63.959-55.317l0.041-0.347 55.68-392.96h656.64l55.68 392.96c4.228 31.617 31.029 55.748 63.466 55.748 3.351 0 6.641-0.257 9.852-0.754l-0.358 0.046c31.617-4.228 55.748-31.029 55.748-63.466 0-3.351-0.257-6.641-0.754-9.852l0.046 0.358-64-448c-4.546-31.283-31.183-55.043-63.37-55.043-0.221 0-0.443 0.001-0.664 0.003h0.034zM192 76.8c-35.346 0-64-28.654-64-64s28.654-64 64-64c35.346 0 64 28.654 64 64v0c0 35.346-28.654 64-64 64v0zM768 76.8c-35.346 0-64-28.654-64-64s28.654-64 64-64c35.346 0 64 28.654 64 64v0c0 35.346-28.654 64-64 64v0zM352 588.8c53.019 0 96 42.981 96 96s-42.981 96-96 96c-53.019 0-96-42.981-96-96v0c0-53.019 42.981-96 96-96v0zM672 588.8c53.019 0 96 42.981 96 96s-42.981 96-96 96c-53.019 0-96-42.981-96-96v0c0-53.019 42.981-96 96-96v0zM480 780.8c53.019 0 96 42.981 96 96s-42.981 96-96 96c-53.019 0-96-42.981-96-96v0c0-53.019 42.981-96 96-96v0z" />
<glyph unicode="&#xe913;" glyph-name="woo-details" d="M768 460.8c0-35.346-28.654-64-64-64v0h-192c-35.346 0-64 28.654-64 64s28.654 64 64 64v0h192c35.346 0 64-28.654 64-64v0zM704 332.8h-192c-35.346 0-64-28.654-64-64s28.654-64 64-64v0h192c35.346 0 64 28.654 64 64s-28.654 64-64 64v0zM960 908.8v-896c0-35.346-28.654-64-64-64v0h-768c-35.346 0-64 28.654-64 64v0 896c0.136 26.448 16.294 49.089 39.258 58.723l0.422 0.157c7.324 3.164 15.851 5.004 24.808 5.004 17.523 0 33.401-7.042 44.958-18.451l-0.007 0.007 82.56-83.2 82.56 83.2c11.6 11.693 27.675 18.931 45.44 18.931s33.84-7.238 45.436-18.927l0.004-0.004 82.56-83.2 82.56 83.2c11.6 11.693 27.675 18.931 45.44 18.931s33.84-7.238 45.436-18.927l0.004-0.004 82.56-83.2 82.56 83.2c11.551 11.402 27.429 18.444 44.952 18.444 8.957 0 17.485-1.84 25.225-5.163l-0.416 0.159c23.386-9.791 39.544-32.432 39.68-58.863v-0.017zM832 754.56l-18.56-19.2c-11.6-11.693-27.675-18.931-45.44-18.931s-33.84 7.238-45.436 18.927l-0.004 0.004-82.56 83.2-82.56-83.2c-11.6-11.693-27.675-18.931-45.44-18.931s-33.84 7.238-45.436 18.927l-0.004 0.004-82.56 83.2-82.56-83.2c-11.6-11.693-27.675-18.931-45.44-18.931s-33.84 7.238-45.436 18.927l-0.004 0.004-18.56 19.2v-677.76h640v677.76zM274.56 506.24c-11.283-11.816-18.307-27.784-18.559-45.39l-0.001-0.050c-0.011-0.412-0.018-0.898-0.018-1.385 0-8.331 1.895-16.219 5.278-23.258l-0.14 0.323c3.447-8.132 7.97-15.118 13.493-21.179l-0.053 0.059c11.6-11.693 27.675-18.931 45.44-18.931s33.84 7.238 45.436 18.927l0.004 0.004c5.47 6.002 9.993 12.988 13.258 20.639l0.182 0.481c3.138 7.167 5.010 15.511 5.12 24.279v0.041c-0.253 17.656-7.277 33.624-18.585 45.466l0.025-0.026c-11.6 11.693-27.675 18.931-45.44 18.931s-33.84-7.238-45.436-18.927l-0.004-0.004zM365.44 314.24c-11.6 11.693-27.675 18.931-45.44 18.931s-33.84-7.238-45.436-18.927l-0.004-0.004c-5.66-5.905-10.212-12.923-13.289-20.687l-0.151-0.433c-3.243-6.716-5.138-14.604-5.138-22.935 0-0.487 0.006-0.972 0.019-1.456l-0.002 0.071c-0.001-0.11-0.001-0.24-0.001-0.37 0-17.581 7.089-33.507 18.565-45.074l-0.004 0.004c6.002-5.47 12.988-9.993 20.639-13.258l0.481-0.182c6.716-3.243 14.604-5.138 22.935-5.138 0.487 0 0.972 0.006 1.456 0.019l-0.071-0.002c0.11-0.001 0.24-0.001 0.37-0.001 17.581 0 33.507 7.089 45.074 18.565l-0.004-0.004c5.47 6.002 9.993 12.988 13.258 20.639l0.182 0.481c3.244 7.156 5.135 15.517 5.135 24.32s-1.891 17.164-5.288 24.699l0.153-0.379c-3.447 8.132-7.97 15.118-13.493 21.179l0.053-0.059z" />
@ -123,6 +123,7 @@
<glyph unicode="&#xe916;" glyph-name="woo-total" d="M960 204.8c0-35.346-28.654-64-64-64v0h-768c-35.346 0-64 28.654-64 64v0 251.52l-64 443.52c-0.397 2.692-0.624 5.8-0.624 8.96 0 35.691 28.933 64.624 64.624 64.624 32.53 0 59.447-24.036 63.959-55.317l0.041-0.347 55.68-392.96h656.64l55.68 392.96c4.228 31.617 31.029 55.748 63.466 55.748 3.351 0 6.641-0.257 9.852-0.754l-0.358 0.046c31.617-4.228 55.748-31.029 55.748-63.466 0-3.351-0.257-6.641-0.754-9.852l0.046 0.358-64-448c-4.546-31.283-31.183-55.043-63.37-55.043-0.221 0-0.443 0.001-0.664 0.003h-703.966v-128h704c35.346 0 64-28.654 64-64v0zM192 76.8c-35.346 0-64-28.654-64-64s28.654-64 64-64c35.346 0 64 28.654 64 64v0c0 35.346-28.654 64-64 64v0zM768 76.8c-35.346 0-64-28.654-64-64s28.654-64 64-64c35.346 0 64 28.654 64 64v0c0 35.346-28.654 64-64 64v0zM384 844.8h256c35.346 0 64 28.654 64 64s-28.654 64-64 64v0h-256c-35.346 0-64-28.654-64-64s28.654-64 64-64v0zM384 652.8h256c35.346 0 64 28.654 64 64s-28.654 64-64 64v0h-256c-35.346 0-64-28.654-64-64s28.654-64 64-64v0z" />
<glyph unicode="&#xe917;" glyph-name="woo" d="M928 716.8h-832c-53.019 0-96-42.981-96-96v0-320c0-53.019 42.981-96 96-96v0h398.72l176-96.64-39.68 96.64h296.96c53.019 0 96 42.981 96 96v0 320c0 53.019-42.981 96-96 96v0zM424.32 296.96c0.136-1.373 0.213-2.968 0.213-4.582 0-8.136-1.971-15.811-5.463-22.574l0.129 0.276c-4.272-8.114-12.264-13.768-21.645-14.711l-0.115-0.009c-0.243-0.005-0.529-0.008-0.816-0.008-12.277 0-23.348 5.159-31.165 13.428l-0.019 0.020c-42.984 47.864-75 106.462-91.547 171.248l-0.613 2.832c-26.24-52.48-46.72-91.52-59.52-117.76-24.96-46.080-45.44-69.76-64-71.040s-21.76 8.32-28.16 28.16c-29.225 88.393-53.203 193.34-67.5 301.342l-0.98 9.058c-0.38 1.941-0.597 4.174-0.597 6.457 0 7.939 2.628 15.264 7.062 21.153l-0.065-0.090c5.606 8.069 14.595 13.448 24.868 14.076l0.092 0.004c2.082 0.526 4.472 0.828 6.932 0.828 14.288 0 26.199-10.179 28.877-23.681l0.031-0.187c0.135-0.961 0.211-2.072 0.211-3.2s-0.077-2.239-0.226-3.326l0.014 0.126c12.202-86.13 26.963-159.605 45.424-231.598l-3.184 14.638 93.44 170.24c5.325 13.141 17.010 22.701 31.132 24.93l0.228 0.030c18.56 0 30.080-10.24 33.92-34.56 10.241-53.66 23.966-100.655 41.587-145.696l-1.907 5.536c4.2 82.655 23.811 159.721 56.002 229.811l-1.602-3.891c4.975 10.101 14.647 17.223 26.086 18.545l0.154 0.015c0.887 0.081 1.919 0.127 2.961 0.127 8.679 0 16.611-3.199 22.68-8.483l-0.042 0.036c7.429-5.271 12.472-13.484 13.429-22.905l0.011-0.135c0.042-0.659 0.067-1.428 0.067-2.203 0-6.472-1.685-12.551-4.641-17.82l0.095 0.184c-19.899-42.511-34.13-91.846-40.111-143.693l-0.209-2.227c-7.652-39.549-12.030-85.030-12.030-131.535 0-9.561 0.185-19.078 0.552-28.549l-0.042 1.363zM680.32 360.96c-18.296-36.288-55.245-60.753-97.914-60.8h-0.006c-3.356-0.313-7.257-0.491-11.2-0.491s-7.844 0.178-11.696 0.527l0.496-0.036c-27.685 6.506-50.409 23.997-63.745 47.511l-0.255 0.489c-12.911 22.18-20.533 48.816-20.533 77.233 0 1.423 0.019 2.842 0.057 4.256l-0.004-0.209c0.174 42.63 12.297 82.392 33.19 116.155l-0.55-0.955c18.359 36.822 54.978 62.093 97.676 63.991l0.244 0.009c3.356 0.313 7.257 0.491 11.2 0.491s7.844-0.178 11.696-0.527l-0.496 0.036c27.788-6.268 50.595-23.836 63.748-47.507l0.252-0.493c12.902-21.895 20.523-48.238 20.523-76.361 0-1.279-0.016-2.555-0.047-3.827l0.004 0.188c-0.055-43.145-12.44-83.385-33.82-117.401l0.54 0.921zM940.8 360.96c-18.31-36.33-55.318-60.815-98.044-60.815-0.631 0-1.261 0.005-1.89 0.016l0.095-0.001c-3.355-0.302-7.257-0.474-11.2-0.474s-7.845 0.172-11.7 0.51l0.5-0.035c-27.685 6.506-50.409 23.997-63.745 47.511l-0.255 0.489c-12.531 21.972-19.919 48.282-19.919 76.317 0 1.745 0.029 3.484 0.085 5.215l-0.007-0.252c-0.007 0.635-0.011 1.385-0.011 2.136 0 41.844 11.916 80.905 32.54 113.974l-0.529-0.911c18.464 36.732 55.023 61.949 97.658 63.99l0.262 0.010c3.356 0.313 7.257 0.491 11.2 0.491s7.844-0.178 11.696-0.527l-0.496 0.036c27.859-6.103 50.725-23.725 63.751-47.504l0.249-0.496c12.952-20.952 20.627-46.355 20.627-73.55 0-2.269-0.053-4.525-0.159-6.768l0.012 0.317c0.016-1.002 0.026-2.183 0.026-3.367 0-41.781-11.672-80.836-31.934-114.081l0.548 0.968zM896 512c4.354-10.804 6.929-23.325 7.040-36.435v-0.045c0.589-4.611 0.925-9.946 0.925-15.36s-0.336-10.749-0.988-15.985l0.064 0.625c-3.927-23.805-15.181-44.48-31.332-60.133l-0.028-0.027c-7.841-8.333-18.942-13.523-31.255-13.523-0.938 0-1.868 0.030-2.791 0.089l0.126-0.006c-13.026 3.363-23.249 12.953-27.439 25.325l-0.081 0.275c-4.354 10.804-6.929 23.325-7.040 36.435v0.045c-0.453 4.509-0.711 9.744-0.711 15.040s0.258 10.531 0.763 15.695l-0.052-0.655c4.258 18.587 12.030 34.904 22.635 48.965l-0.235-0.325c13.44 19.84 28.16 28.16 42.88 25.6 13.026-3.363 23.249-12.953 27.439-25.325l0.081-0.275zM634.88 512c4.354-10.804 6.929-23.325 7.040-36.435v-0.045c0.589-4.611 0.925-9.946 0.925-15.36s-0.336-10.749-0.988-15.985l0.064 0.625c-3.927-23.805-15.181-44.48-31.332-60.133l-0.028-0.027c-7.844-8.358-18.961-13.565-31.294-13.565-1.15 0-2.288 0.045-3.415 0.134l0.149-0.009c-10.24 0-17.92 10.88-24.32 26.88-4.841 10.738-7.667 23.277-7.68 36.475v0.005c-0.453 4.509-0.711 9.744-0.711 15.040s0.258 10.531 0.763 15.695l-0.052-0.655c4.612 18.544 12.339 34.805 22.68 49.045l-0.28-0.405c13.44 19.84 28.16 28.16 43.52 25.6s18.56-14.080 24.96-26.88z" />
<glyph unicode="&#xe918;" glyph-name="icon" d="M512 972.8c-282.77 0-512-229.23-512-512s229.23-512 512-512c282.77 0 512 229.23 512 512v0c0 282.77-229.23 512-512 512v0zM512 76.8c-212.077 0-384 171.923-384 384s171.923 384 384 384c212.077 0 384-171.923 384-384v0c0-212.077-171.923-384-384-384v0zM579.2 552.32l-65.92 121.6-65.92-121.6-135.68-25.6 94.72-99.84-17.92-136.96 124.8 58.88 124.8-58.88-17.92 136.96 95.36 99.84-136.32 25.6z" />
<glyph unicode="&#xe919;" glyph-name="thumbnail" horiz-adv-x="1600" d="M1536 972.8h-1472c-35.346 0-64-28.654-64-64v0-896c0-35.346 28.654-64 64-64v0h1472c35.346 0 64 28.654 64 64v0 896c0 35.346-28.654 64-64 64v0zM1472 76.8h-1344v768h1344zM640 620.8c0-53.019-42.981-96-96-96s-96 42.981-96 96c0 53.019 42.981 96 96 96s96-42.981 96-96zM270.080 140.8h1137.92v228.48c-0.076 17.483-7.15 33.299-18.564 44.804l0.004-0.004-277.76 278.4c-11.568 11.501-27.514 18.611-45.12 18.611s-33.552-7.109-45.123-18.614l0.003 0.003-407.68-408.32-91.52 91.52c-11.568 11.501-27.514 18.611-45.12 18.611s-33.552-7.109-45.123-18.614l0.003 0.003-184.32-179.84c-6.042-5.829-9.793-13.997-9.793-23.041 0-17.673 14.327-32 32-32 0.068 0 0.136 0 0.204 0.001h-0.010z" />
<glyph unicode="&#x1f324;" glyph-name="conversion_rate" d="M1006.006 606.853c-1.905-28.078-34.335-41.559-54.817-22.983l-53.757 48.966-240.317-278.739c-11.566-13.533-27.96-21.621-45.433-22.77l-225.409-14.455c-18.132-1.126-35.077-9.871-46.672-24.215l-212.357-260.907c-11.726-14.339-32.529-16.319-46.506-4.33l-50.653 43.309c-13.976 11.99-15.873 33.3-4.147 47.639l248.789 305.776c11.59 14.209 28.535 22.954 46.54 24.219l227.656 14.512c17.473 1.149 33.871 9.371 45.433 22.77l204.517 236.825-58.364 53.186c-20.731 18.991-10.789 54.095 16.576 58.688l226.782 38.628c20.992 3.597 39.791-13.974 38.24-35.704z" />
<glyph unicode="&#x1f3b0;" glyph-name="conversions" d="M864.355 295.104l99.34-88.39c38.483 71.892 60.305 154.040 60.305 241.286 0 282.77-229.23 512-512 512s-512-229.23-512-512c0-238.571 163.171-439.032 384-495.87v133.72c-149.145 52.715-256 194.954-256 362.15 0 212.077 171.923 384 384 384s384-171.923 384-384c0-54.341-11.287-106.045-31.645-152.896zM603.722 537.281l196.984-166.058c6.498 24.499 9.961 50.233 9.961 76.777 0 164.949-133.718 298.667-298.667 298.667s-298.667-133.718-298.667-298.667c0-119.142 69.762-221.991 170.667-269.925v288.629c0 52.419 38.91 91.824 88.262 104.756 12.323 3.223 25.031 4.716 37.666 4.524 0.69 0.011 1.38 0.016 2.073 0.016 35.967 0 68.47-14.835 91.722-38.719zM509.805 484.367c-6.24 5.59-16.315 7.8-25.474 5.243-8.987-2.513-14.998-8.97-14.998-16.249v-452.249c0-7.626 6.24-14.213 15.628-16.596l7.156-0.867c7.156 0 14.139 2.557 18.605 6.976l102.182 104.429 71.098-153.696c9.159-19.802 37.552-30.159 63.713-23.182 25.932 6.76 39.842 28.425 30.626 48.054l-69.724 150.966 160.113-23.529c9.789-1.343 19.177 2.037 24.1 8.32 4.923 6.24 4.064 14.213-2.233 19.802l-380.791 342.578z" />
</font></defs></svg>

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Binary file not shown.

View File

@ -248,132 +248,136 @@
} );
},
exportFB: function( exportUrl, postId, content, fileName, importFile, page, timestamp, progress = 0, estimation = 1 ) {
var $this = this;
exportFB: function(exportUrl, postId, content, fileName, importFile, page, timestamp, progress = 0, estimation = 1, layoutId = 0) {
var $this = this;
var context = layoutId !== 0 ? 'et_builder_layouts' : 'et_builder';
var selection = layoutId !== 0 ? JSON.stringify({'id': layoutId}) : false;
// Trigger event which updates VB-UI's progress bar
window.et_fb_export_progress = progress;
window.et_fb_export_estimation = estimation;
// Trigger event which updates VB-UI's progress bar
window.et_fb_export_progress = progress;
window.et_fb_export_estimation = estimation;
var exportEvent = document.createEvent('Event');
exportEvent.initEvent('et_fb_layout_export_in_progress', true, true);
window.dispatchEvent(exportEvent);
var exportEvent = document.createEvent('Event');
exportEvent.initEvent('et_fb_layout_export_in_progress', true, true);
window.dispatchEvent(exportEvent);
page = typeof page === 'undefined' ? 1 : page;
page = typeof page === 'undefined' ? 1 : page;
$.ajax( {
type: 'POST',
url: etCore.ajaxurl,
dataType: 'json',
data: {
action: 'et_core_portability_export',
content: content.shortcode,
global_presets: content.global_presets,
global_colors: content.global_colors,
timestamp: timestamp !== undefined ? timestamp : 0,
nonce: $this.nonces.export,
post: postId,
context: 'et_builder',
page: page,
},
success: function( response ) {
var errorEvent = document.createEvent( 'Event' );
$.ajax({
type: 'POST',
url: etCore.ajaxurl,
dataType: 'json',
data: {
action: 'et_core_portability_export',
content: content.shortcode,
global_presets: content.global_presets,
global_colors: content.global_colors,
timestamp: timestamp !== undefined ? timestamp : 0,
nonce: $this.nonces.export,
post: postId,
context: context,
selection: selection,
page: page,
},
success: function(response) {
var errorEvent = document.createEvent('Event');
errorEvent.initEvent( 'et_fb_layout_export_error', true, true );
errorEvent.initEvent('et_fb_layout_export_error', true, true);
// The error is unknown but most of the time it would be cased by the server max size being exceeded.
if ( 'string' === typeof response && '0' === response ) {
window.et_fb_export_layout_message = $this.text.maxSizeExceeded;
window.dispatchEvent( errorEvent );
// The error is unknown but most of the time it would be cased by the server max size being exceeded.
if ('string' === typeof response && '0' === response) {
window.et_fb_export_layout_message = $this.text.maxSizeExceeded;
window.dispatchEvent(errorEvent);
return;
}
// Memory size set on server is exhausted.
else if ( 'string' === typeof response && response.toLowerCase().indexOf( 'memory size' ) >= 0 ) {
window.et_fb_export_layout_message = $this.text.memoryExhausted;
window.dispatchEvent( errorEvent );
return;
}
// Paginate.
else if ( 'undefined' !== typeof response.page ) {
if ( $this.cancelled ) {
return;
}
return;
}
// Memory size set on server is exhausted.
else if ('string' === typeof response && response.toLowerCase().indexOf('memory size') >= 0) {
window.et_fb_export_layout_message = $this.text.memoryExhausted;
window.dispatchEvent(errorEvent);
return;
}
// Paginate.
else if ('undefined' !== typeof response.page) {
if ($this.cancelled) {
return;
}
// Update progress bar
var updatedProgress = Math.ceil((response.page * 100) / response.total_pages);
var updatedEstimation = Math.ceil(((response.total_pages - response.page) * 6) / 60);
// Update progress bar
var updatedProgress = Math.ceil((response.page * 100) / response.total_pages);
var updatedEstimation = Math.ceil(((response.total_pages - response.page) * 6) / 60);
// If progress param isn't empty, updated progress should continue from it
// because before exportFB(), shortcode should've been prepared via another
// ajax request first
if (0 < progress) {
const remainingProgress = (100 - progress) / 100;
updatedProgress = (updatedProgress * remainingProgress) + progress;
}
// If progress param isn't empty, updated progress should continue from it
// because before exportFB(), shortcode should've been prepared via another
// ajax request first
if (0 < progress) {
const remainingProgress = (100 - updatedProgress) / 100;
updatedProgress = (updatedProgress * remainingProgress) + progress;
}
// Update global variables
window.et_fb_export_progress = updatedProgress;
window.et_fb_export_estimation = updatedEstimation;
// Update global variables
window.et_fb_export_progress = updatedProgress;
window.et_fb_export_estimation = updatedEstimation;
// Dispatch event to trigger UI update
window.dispatchEvent(exportEvent);
// Dispatch event to trigger UI update
window.dispatchEvent(exportEvent);
return $this.exportFB(
exportUrl,
postId,
content,
fileName,
importFile,
(page + 1),
response.timestamp,
updatedProgress,
updatedEstimation
);
} else if ( 'undefined' !== typeof response.data && 'undefined' !== typeof response.data.message ) {
window.et_fb_export_layout_message = $this.text[response.data.message];
window.dispatchEvent( errorEvent );
return;
}
return $this.exportFB(
exportUrl,
postId,
content,
fileName,
importFile,
(page + 1),
response.timestamp,
updatedProgress,
updatedEstimation,
layoutId
);
} else if ('undefined' !== typeof response.data && 'undefined' !== typeof response.data.message) {
window.et_fb_export_layout_message = $this.text[response.data.message];
window.dispatchEvent(errorEvent);
return;
}
var time = ' ' + new Date().toJSON().replace( 'T', ' ' ).replace( ':', 'h' ).substring( 0, 16 ),
downloadURL = exportUrl,
query = {
'timestamp': response.data.timestamp,
'name': '' !== fileName ? fileName : encodeURIComponent( time ),
};
var time = ' ' + new Date().toJSON().replace('T', ' ').replace(':', 'h').substring(0, 16),
downloadURL = exportUrl,
query = {
'timestamp': response.data.timestamp,
'name': '' !== fileName ? fileName : encodeURIComponent(time),
};
$.each( query, function( key, value ) {
if ( value ) {
downloadURL = downloadURL + '&' + key + '=' + value;
}
} );
$.each(query, function(key, value) {
if (value) {
downloadURL = downloadURL + '&' + key + '=' + value;
}
});
// Remove confirmation popup before relocation.
$( window ).off( 'beforeunload' );
// Remove confirmation popup before relocation.
$(window).off('beforeunload');
// Update progress bar's global variables
window.et_fb_export_progress = 100;
window.et_fb_export_estimation = 0;
// Update progress bar's global variables
window.et_fb_export_progress = 100;
window.et_fb_export_estimation = 0;
// Dispatch event to trigger UI update
window.dispatchEvent(exportEvent);
window.location.assign( encodeURI( downloadURL ) );
// Dispatch event to trigger UI update
window.dispatchEvent(exportEvent);
window.location.assign(encodeURI(downloadURL));
// perform import if needed
if ( typeof importFile !== 'undefined' ) {
$this.importFB( importFile, postId );
} else {
var event = document.createEvent( 'Event' );
// perform import if needed
if (typeof importFile !== 'undefined') {
$this.importFB(importFile, postId);
} else {
var event = document.createEvent('Event');
event.initEvent( 'et_fb_layout_export_finished', true, true );
event.initEvent('et_fb_layout_export_finished', true, true);
// trigger event to communicate with FB
window.dispatchEvent( event );
}
}
} );
},
// trigger event to communicate with FB
window.dispatchEvent(event);
}
}
});
},
importFB: function(file, postId, options) {
var $this = this;
@ -401,7 +405,11 @@
}
options = $.extend({
replace: false
replace: false,
context: 'et_builder',
returnJson: false,
useTempPresets: false,
includeGlobalPresets: false,
}, options);
var fileSize = Math.ceil( ( file.size / ( 1024 * 1024 ) ).toFixed( 2 ) ),
@ -409,13 +417,15 @@
requestData = {
action: 'et_core_portability_import',
include_global_presets: options.includeGlobalPresets,
et_cloud_return_json: options.returnJson,
et_cloud_use_temp_presets: options.useTempPresets,
file: file,
content: false,
timestamp: 0,
nonce: $this.nonces.import,
post: postId,
replace: options.replace ? '1' : '0',
context: 'et_builder'
context: options.context
};
/**

View File

@ -963,7 +963,11 @@ class ET_Core_PageResource {
(array) glob( "{$cache_dir}/archive/et-{$_owner}-dynamic*" ),
(array) glob( "{$cache_dir}/search/et-{$_owner}-dynamic*" ),
(array) glob( "{$cache_dir}/notfound/et-{$_owner}-dynamic*" ),
(array) glob( "{$cache_dir}/home/et-{$_owner}-dynamic*" )
(array) glob( "{$cache_dir}/home/et-{$_owner}-dynamic*" ),
// WP Templates and Template Parts.
(array) glob( "{$cache_dir}/*/et-{$_owner}-{$_slug}-*wpe-{$_post_id}*" ),
(array) glob( "{$cache_dir}/*/*/et-{$_owner}-{$_slug}-*wpe-{$_post_id}*" ),
(array) glob( "{$cache_dir}/*/*/*/et-{$_owner}-{$_slug}-*wpe-{$_post_id}*" )
);
self::_remove_files_in_directory( $files, $cache_dir );

View File

@ -82,6 +82,8 @@ class ET_Core_Portability {
$temp_file_id = sanitize_file_name( $timestamp );
$temp_file = $this->has_temp_file( $temp_file_id, 'et_core_import' );
$include_global_presets = isset( $_POST['include_global_presets'] ) ? wp_validate_boolean( $_POST['include_global_presets'] ) : false;
$return_json = isset( $_POST['et_cloud_return_json'] ) ? wp_validate_boolean( sanitize_text_field( $_POST['et_cloud_return_json'] ) ) : false; // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verification is handled earlier.
$temp_presets = isset( $_POST['et_cloud_use_temp_presets'] ) ? wp_validate_boolean( sanitize_text_field( $_POST['et_cloud_use_temp_presets'] ) ) : false; // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verification is handled earlier.
$global_presets = '';
if ( $temp_file ) {
@ -115,6 +117,10 @@ class ET_Core_Portability {
$import = json_decode( $filesystem->get_contents( $temp_file ), true );
$import = $this->validate( $import );
if ( $return_json ) {
return array( 'jsonFromFile' => $import );
}
// Check if Import contains Google Api Settings.
if ( isset( $import['data']['et_google_api_settings'] ) && 'epanel' === $this->instance->context ) {
$et_google_api_settings = $import['data']['et_google_api_settings'];
@ -123,7 +129,7 @@ class ET_Core_Portability {
$import['data'] = $this->apply_query( $import['data'], 'set' );
if ( ! isset( $import['context'] ) || ( isset( $import['context'] ) && $import['context'] !== $this->instance->context ) ) {
$this->delete_temp_files( 'et_core_import' );
$this->delete_temp_files( 'et_core_import', [ $temp_file_id => $temp_file ] );
return array( 'message' => 'importContextFail' );
}
@ -138,13 +144,13 @@ class ET_Core_Portability {
}
if ( ! empty( $import['global_colors'] ) ) {
$import['data'] = $this->_maybe_inject_gcid( $import['data'] );
$import['data'] = $this->_maybe_inject_gcid( $import['data'], $import['global_colors'] );
}
$data = $import['data'];
$success = array( 'timestamp' => $timestamp );
$this->delete_temp_files( 'et_core_import' );
$this->delete_temp_files( 'et_core_import', [ $temp_file_id => $temp_file ] );
if ( 'options' === $this->instance->type ) {
// Reset all data besides excluded data.
@ -178,7 +184,23 @@ class ET_Core_Portability {
// Pass the post content and let js save the post.
if ( 'post' === $this->instance->type ) {
$success['postContent'] = reset( $data );
do_shortcode( $success['postContent'] );
// In some cases we receive the post array instaed of shortcode string. Handle this case.
$shortcode_string = is_array( $success['postContent'] ) && ! empty( $success['postContent']['post_content'] ) ? $success['postContent']['post_content'] : $success['postContent'];
if ( ! empty( $import['presets'] ) ) {
$preset_rewrite_map = $this->prepare_to_import_layout_presets( $import['presets'] );
$global_presets = $import['presets'];
$shortcode_object = et_fb_process_shortcode( $shortcode_string );
$this->rewrite_module_preset_ids( $shortcode_object, $import['presets'], $preset_rewrite_map );
$shortcode_string = et_fb_process_to_shortcode( $shortcode_object, array(), '', false );
}
do_shortcode( $shortcode_string );
$success['postContent'] = $shortcode_string;
$success['migrations'] = ET_Builder_Module_Settings_Migration::$migrated;
$success['presets'] = isset( $import['presets'] ) && is_array( $import['presets'] ) ? $import['presets'] : (object) array();
}
@ -232,7 +254,9 @@ class ET_Core_Portability {
}
}
if ( ! $this->import_posts( $data ) ) {
$imported_posts = $this->import_posts( $data );
if ( false === $imported_posts ) {
/**
* Filters the error message when {@see ET_Core_Portability::import()} fails.
*
@ -245,11 +269,13 @@ class ET_Core_Portability {
}
return $error_message;
} else {
$success['imported_posts'] = $imported_posts;
}
}
if ( ! empty( $global_presets ) ) {
if ( ! $this->import_global_presets( $global_presets ) ) {
if ( ! $this->import_global_presets( $global_presets, $temp_presets ) ) {
if ( $error_message = apply_filters( 'et_core_portability_import_error_message', false ) ) {
$error_message = array( 'message' => $error_message );
}
@ -275,7 +301,7 @@ class ET_Core_Portability {
*
* @return null|array
*/
public function export( $return = false ) {
public function export( $return = false, $include_used_presets = false ) {
$this->prevent_failure();
et_core_nonce_verified_previously();
@ -335,6 +361,28 @@ class ET_Core_Portability {
$post_global_colors = $this->_filter_post_data( $_POST['global_colors'] );
$global_colors = json_decode( stripslashes( $post_global_colors ) );
}
if ( $include_used_presets ) {
$used_global_presets = array();
$used_global_colors = array();
$shortcode_object = et_fb_process_shortcode( $post_data['post_content'] );
$used_global_presets = array_merge(
$this->get_used_global_presets( $shortcode_object, $used_global_presets ),
$used_global_presets
);
if ( ! empty( $used_global_presets ) ) {
$global_presets = (object) $used_global_presets;
}
$used_global_colors = $this->_get_used_global_colors( $shortcode_object, $used_global_colors, $global_presets );
if ( ! empty( $used_global_colors ) ) {
$global_colors = $this->_get_global_colors_data( $used_global_colors );
}
}
}
if ( 'post_type' === $this->instance->type ) {
@ -365,10 +413,6 @@ class ET_Core_Portability {
foreach ( $data as $post ) {
$shortcode_object = et_fb_process_shortcode( $post->post_content );
if ( 'post_type' === $this->instance->type ) {
$used_global_colors = $this->_get_used_global_colors( $shortcode_object, $used_global_colors );
}
if ( $apply_global_presets ) {
$post->post_content = et_fb_process_to_shortcode( $shortcode_object, $options, '', false );
} else {
@ -383,6 +427,10 @@ class ET_Core_Portability {
$global_presets = (object) $used_global_presets;
}
if ( 'post_type' === $this->instance->type ) {
$used_global_colors = $this->_get_used_global_colors( $shortcode_object, $used_global_colors, $global_presets );
}
if ( ! empty( $used_global_colors ) ) {
$global_colors = $this->_get_global_colors_data( $used_global_colors );
}
@ -1053,7 +1101,7 @@ class ET_Core_Portability {
*
* @return boolean
*/
public function import_global_presets( $presets ) {
public function import_global_presets( $presets, $is_temp_presets = false ) {
if ( ! is_array( $presets ) ) {
return false;
}
@ -1061,6 +1109,7 @@ class ET_Core_Portability {
$all_modules = ET_Builder_Element::get_modules();
$module_presets_manager = ET_Builder_Global_Presets_Settings::instance();
$global_presets = $module_presets_manager->get_global_presets();
$temp_presets = $module_presets_manager->get_temp_presets();
$presets_to_import = array();
foreach ( $presets as $module_type => $module_presets ) {
@ -1077,8 +1126,11 @@ class ET_Core_Portability {
$local_presets = $global_presets->$module_type->presets;
$local_preset_names = array();
foreach ( $local_presets as $preset ) {
array_push( $local_preset_names, $preset->name );
foreach ( $local_presets as $preset_id => $preset ) {
// Skip temp presets.
if ( ! isset( $temp_preset[ $module_type ]['presets'][ $preset_id ] ) ) {
array_push( $local_preset_names, $preset->name );
}
}
foreach ( $module_presets['presets'] as $preset_id => $preset ) {
@ -1097,6 +1149,9 @@ class ET_Core_Portability {
}
}
if ( $is_temp_presets ) {
et_update_option( ET_Builder_Global_Presets_Settings::GLOBAL_PRESETS_OPTION_TEMP, $presets_to_import );
}
// Merge existing Global Presets with imported ones
foreach ( $presets_to_import as $module_type => $module_presets ) {
@ -1123,8 +1178,10 @@ class ET_Core_Portability {
et_update_option( ET_Builder_Global_Presets_Settings::GLOBAL_PRESETS_OPTION, $global_presets );
$global_presets_history = ET_Builder_Global_Presets_History::instance();
$global_presets_history->add_global_history_record( $global_presets );
if ( ! $is_temp_presets ) {
$global_presets_history = ET_Builder_Global_Presets_History::instance();
$global_presets_history->add_global_history_record( $global_presets );
}
return true;
}
@ -1175,6 +1232,8 @@ class ET_Core_Portability {
*/
$posts = apply_filters( 'et_core_portability_import_posts', $posts );
$imported_posts = array();
if ( empty( $posts ) ) {
return false;
}
@ -1205,6 +1264,8 @@ class ET_Core_Portability {
) );
}
$imported_posts[] = intval( $layout_exists );
continue;
}
@ -1220,6 +1281,8 @@ class ET_Core_Portability {
continue;
}
$imported_posts[] = $post_id;
// Insert and set terms.
if ( isset( $post['terms'] ) && is_array( $post['terms'] ) ) {
$processed_terms = array();
@ -1292,7 +1355,7 @@ class ET_Core_Portability {
}
}
return true;
return $imported_posts;
}
/**
@ -1399,15 +1462,15 @@ class ET_Core_Portability {
*
* @param array $data - The multidimensional array representing a import object structure.
*/
protected function _maybe_inject_gcid( &$data ) {
protected function _maybe_inject_gcid( &$data, &$gcolors = null ) {
foreach ( $data as $post_id => &$post_data ) {
if ( is_array( $post_data ) ) {
$shortcode_object = et_fb_process_shortcode( $post_data['post_content'] );
$this->_inject_gcid( $shortcode_object );
$this->_inject_gcid( $shortcode_object, $gcolors );
$data[ $post_id ]['post_content'] = et_fb_process_to_shortcode( $shortcode_object, array(), '', false );
} else {
$shortcode_object = et_fb_process_shortcode( $post_data );
$this->_inject_gcid( $shortcode_object );
$this->_inject_gcid( $shortcode_object, $gcolors );
$data[ $post_id ] = et_fb_process_to_shortcode( $shortcode_object, array(), '', false );
}
}
@ -1424,18 +1487,27 @@ class ET_Core_Portability {
*
* @param array $shortcode_object - The multidimensional array representing a page/module structure.
*/
protected function _inject_gcid( &$shortcode_object ) {
protected function _inject_gcid( &$shortcode_object, &$global_colors ) {
foreach ( $shortcode_object as &$module ) {
// No global colors set for this module.
if ( ! empty( $module['attrs']['global_colors_info'] ) ) {
if ( ! empty( $module['attrs']['global_colors_info'] ) && ! empty( $global_colors ) ) {
$colors_array = json_decode( $module['attrs']['global_colors_info'], true );
if ( ! empty( $colors_array ) ) {
foreach ( $colors_array as $color_id => $attrs_array ) {
if ( ! empty( $attrs_array ) ) {
// Get settings for this global color.
$color = '';
foreach ( $global_colors as $gcid ) {
if ( $color_id === $gcid[0] && 'yes' === $gcid[1]['active'] ) {
$color = $gcid[1]['color'];
}
}
foreach ( $attrs_array as $attr_name ) {
if ( isset( $module['attrs'][ $attr_name ] ) && '' !== $module['attrs'][ $attr_name ] ) {
$module['attrs'][ $attr_name ] = $color_id;
// Match substring (needed for attrs like gradient stops).
$module['attrs'][ $attr_name ] = str_replace( $color, $color_id, $module['attrs'][ $attr_name ] );
}
}
}
@ -1444,7 +1516,7 @@ class ET_Core_Portability {
}
if ( isset( $module['content'] ) && is_array( $module['content'] ) ) {
$this->_inject_gcid( $module['content'] );
$this->_inject_gcid( $module['content'], $global_colors );
}
}
}
@ -1472,13 +1544,53 @@ class ET_Core_Portability {
$module_preset_id = $default_preset_id;
}
$preset_settings = array();
if ( isset( $global_presets[ $module_type ]['presets'][ $module_preset_id ] ) ) {
$module['attrs'] = array_merge( $global_presets[ $module_type ]['presets'][ $module_preset_id ]['settings'], $module['attrs'] );
$preset_settings = $global_presets[ $module_type ]['presets'][ $module_preset_id ]['settings'];
} else {
if ( isset( $global_presets[ $module_type ]['presets'][ $default_preset_id ]['settings'] ) ) {
$module['attrs'] = array_merge( $global_presets[ $module_type ]['presets'][ $default_preset_id ]['settings'], $module['attrs'] );
$preset_settings = $global_presets[ $module_type ]['presets'][ $default_preset_id ]['settings'];
}
}
$merged_global_colors_info = array();
if ( isset( $module['attrs']['global_colors_info'] ) ) {
// Retrive global_colors_info from post meta, which saved as string[][].
$gc_info_prepared = str_replace(
array( '&#91;', '&#93;' ),
array( '[', ']' ),
$module['attrs']['global_colors_info']
);
$used_global_colors = json_decode( $gc_info_prepared, true );
$merged_global_colors_info = $used_global_colors;
}
// Merge Global Colors from preset.
if ( isset( $preset_settings['global_colors_info'] ) ) {
$preset_global_colors = json_decode( $preset_settings['global_colors_info'], true );
if ( ! empty( $preset_global_colors ) ) {
foreach ( $preset_global_colors as $color_id => $settings_list ) {
if ( ! empty( $settings_list ) ) {
if ( isset( $used_global_colors[ $color_id ] ) ) {
$merged_global_colors_info[ $color_id ] = array_merge( $used_global_colors[ $color_id ], $settings_list );
} else {
$merged_global_colors_info[ $color_id ] = $settings_list;
}
foreach ( $settings_list as $setting_name ) {
$preset_settings[ $setting_name ] = $color_id;
}
}
}
}
}
$module['attrs'] = array_merge( $preset_settings, $module['attrs'] );
$module['attrs']['global_colors_info'] = wp_json_encode( $merged_global_colors_info );
}
if ( isset( $module['content'] ) && is_array( $module['content'] ) ) {
@ -1639,6 +1751,10 @@ class ET_Core_Portability {
* @return array
*/
protected function get_data_images( $data, $force = false ) {
if ( empty( $data ) ) {
return array();
}
$images = array();
$images_src = array();
$basenames = array(
@ -1663,8 +1779,21 @@ class ET_Core_Portability {
}
foreach ( $data as $value ) {
// If the $value is an object and there is no post_content property,
// it's unlikely to contain any image data so we can continue with the next iteration.
if ( is_object( $value ) && ! property_exists( $value, 'post_content' ) ) {
continue;
}
if ( is_array( $value ) || is_object( $value ) ) {
// If the $value contains the post_content property, set $value to use
// this object's property value instead of the entire object.
if ( is_object( $value ) && property_exists( $value, 'post_content' ) ) {
$value = $value->post_content;
}
$images = array_merge( $images, $this->get_data_images( (array) $value ) );
continue;
}
// Extract images from HTML or shortcodes.
@ -1685,10 +1814,15 @@ class ET_Core_Portability {
}
}
if ( preg_match( '/^.+?\.(jpg|jpeg|jpe|png|gif|webp)/', $value, $match ) || $force ) {
if ( preg_match( '/^.+?\.(jpg|jpeg|jpe|png|gif|svg|webp)/', $value, $match ) || $force ) {
$basename = basename( $value );
// Avoid duplicates.
// Skip if the value is not a valid URL or an image ID (integer).
if ( ! ( wp_http_validate_url( $value ) || is_int( $value ) ) ) {
continue;
}
// Skip if the images array already contains the value to avoid duplicates.
if ( isset( $images[$value] ) ) {
continue;
}
@ -1864,31 +1998,44 @@ class ET_Core_Portability {
protected function upload_images( $images ) {
$filesystem = $this->set_filesystem();
/**
* Filters whether or not to allow duplicate images to be uploaded
* during Portability import.
*
* @since 4.14.8
*
* @param bool $allow_duplicates Whether or not to allow duplicates. Default is `false`.
*/
$allow_duplicates = apply_filters( 'et_core_portability_import_attachment_allow_duplicates', false );
foreach ( $images as $key => $image ) {
$basename = sanitize_file_name( wp_basename( $image['url'] ) );
$attachments = get_posts( array(
'posts_per_page' => -1,
'post_type' => 'attachment',
'meta_key' => '_wp_attached_file',
'meta_value' => pathinfo( $basename, PATHINFO_FILENAME ),
'meta_compare' => 'LIKE',
) );
$id = 0;
$url = '';
$basename = sanitize_file_name( wp_basename( $image['url'] ) );
$id = 0;
$url = '';
// Avoid duplicates.
if ( ! is_wp_error( $attachments ) && ! empty( $attachments ) ) {
foreach ( $attachments as $attachment ) {
$attachment_url = wp_get_attachment_url( $attachment->ID );
$file = get_attached_file( $attachment->ID );
$filename = sanitize_file_name( wp_basename( $file ) );
if ( ! $allow_duplicates ) {
$attachments = get_posts( array(
'posts_per_page' => -1,
'post_type' => 'attachment',
'meta_key' => '_wp_attached_file',
'meta_value' => pathinfo( $basename, PATHINFO_FILENAME ),
'meta_compare' => 'LIKE',
) );
// Use existing image only if the content matches.
if ( $filesystem->get_contents( $file ) === base64_decode( $image['encoded'] ) ) {
$id = isset( $image['id'] ) ? $attachment->ID : 0;
$url = $attachment_url;
// Avoid duplicates.
if ( ! is_wp_error( $attachments ) && ! empty( $attachments ) ) {
foreach ( $attachments as $attachment ) {
$attachment_url = wp_get_attachment_url( $attachment->ID );
$file = get_attached_file( $attachment->ID );
$filename = sanitize_file_name( wp_basename( $file ) );
break;
// Use existing image only if the content matches.
if ( $filesystem->get_contents( $file ) === base64_decode( $image['encoded'] ) ) {
$id = isset( $image['id'] ) ? $attachment->ID : 0;
$url = $attachment_url;
break;
}
}
}
}
@ -1899,13 +2046,25 @@ class ET_Core_Portability {
$filesystem->put_contents( $temp_file, base64_decode( $image['encoded'] ) );
$filetype = wp_check_filetype_and_ext( $temp_file, $basename );
// Avoid further duplicates if the proper_file name match an existing image.
if ( isset( $filetype['proper_filename'] ) && $filetype['proper_filename'] !== $basename ) {
if ( isset( $filename ) && $filename === $filetype['proper_filename'] ) {
// Use existing image only if the basenames and content match.
if ( $filesystem->get_contents( $file ) === $filesystem->get_contents( $temp_file ) ) {
$filesystem->delete( $temp_file );
continue;
if ( ! $allow_duplicates && ! empty( $attachments ) && ! is_wp_error( $attachments ) ) {
// Avoid further duplicates if the proper_filename matches an existing image.
if ( isset( $filetype['proper_filename'] ) && $filetype['proper_filename'] !== $basename ) {
foreach ( $attachments as $attachment ) {
$attachment_url = wp_get_attachment_url( $attachment->ID );
$file = get_attached_file( $attachment->ID );
$filename = sanitize_file_name( wp_basename( $file ) );
if ( isset( $filename ) && $filename === $filetype['proper_filename'] ) {
// Use existing image only if the basenames and content match.
if ( $filesystem->get_contents( $file ) === $filesystem->get_contents( $temp_file ) ) {
$id = isset( $image['id'] ) ? $attachment->ID : 0;
$url = $attachment_url;
$filesystem->delete( $temp_file );
break;
}
}
}
}
}
@ -1914,7 +2073,19 @@ class ET_Core_Portability {
'name' => $basename,
'tmp_name' => $temp_file,
);
$upload = media_handle_sideload( $file, 0 );
$upload = media_handle_sideload( $file );
$attachment_id = is_wp_error( $upload ) ? 0 : $upload;
/**
* Fires when image attachments are created during portability import.
*
* @since 4.14.6
*
* @param int $attachment_id The attachment id or 0 if attachment upload failed.
*/
do_action( 'et_core_portability_import_attachment_created', $attachment_id );
if ( ! is_wp_error( $upload ) ) {
// Set the replacement as an id if the original image was set as an id (for gallery).
@ -2227,7 +2398,11 @@ class ET_Core_Portability {
public function get_timestamp() {
et_core_nonce_verified_previously();
return isset( $_POST['timestamp'] ) && ! empty( $_POST['timestamp'] ) ? sanitize_text_field( $_POST['timestamp'] ) : (string) current_time( 'timestamp' ); // phpcs:ignore WordPress.DateTime.CurrentTimeTimestamp.Requested -- This is used to generate the temporary file ID so we don't need the accuracy.
if ( isset( $_POST['timestamp'] ) && ! empty( $_POST['timestamp'] ) ) {
return sanitize_text_field( $_POST['timestamp'] );
}
return function_exists( 'hrtime' ) ? (string) hrtime( true ) : (string) microtime( true ); // phpcs:ignore PHPCompatibility.FunctionUse.NewFunctions.hrtimeFound -- Intentional use of new PHP function
}
/**
@ -2270,10 +2445,11 @@ class ET_Core_Portability {
*
* @param array $shortcode_object The multidimensional array representing a page structure.
* @param array $used_global_colors List of global colors to merge with.
* @param array $presets Object of presets.
*
* @return array - The list of the Global Colors.
*/
protected function _get_used_global_colors( $shortcode_object, $used_global_colors = array() ) {
protected function _get_used_global_colors( $shortcode_object, $used_global_colors = array(), $presets = array() ) {
foreach ( $shortcode_object as $module ) {
if ( isset( $module['attrs']['global_colors_info'] ) ) {
// Retrive global_colors_info from post meta, which saved as string[][].
@ -2282,11 +2458,25 @@ class ET_Core_Portability {
array( '[', ']' ),
$module['attrs']['global_colors_info']
);
$used_global_colors = array_merge( $used_global_colors, json_decode( $gc_info_prepared, true ) );
// Make sure we pass array to array_merge to avoid Fatal Error.
$gc_info_array = json_decode( $gc_info_prepared, true );
$gc_info_array = is_array( $gc_info_array ) ? $gc_info_array : [];
$used_global_colors = array_merge( $used_global_colors, $gc_info_array );
}
if ( isset( $module['content'] ) && is_array( $module['content'] ) ) {
$used_global_colors = array_merge( $used_global_colors, $this->_get_used_global_colors( $module['content'], $used_global_colors ) );
$used_global_colors = array_merge( $used_global_colors, $this->_get_used_global_colors( $module['content'], $used_global_colors, $presets ) );
}
}
if ( ! empty( $presets ) ) {
foreach ( $presets as $module_type => $module_presets ) {
foreach ( $module_presets->presets as $preset_id => $preset ) {
if ( isset( $preset->settings->global_colors_info ) ) {
$used_global_colors = array_merge( $used_global_colors, json_decode( $preset->settings->global_colors_info, true ) );
}
}
}
}
@ -2450,7 +2640,7 @@ class ET_Core_Portability {
<input type="file">
<div class="et-core-clearfix"></div>
<?php if ( 'post_type' !== $this->instance->type ) : ?>
<label><input type="checkbox" name="et-core-portability-import-backup" /><?php esc_html_e( 'Download backup before importing', ET_CORE_TEXTDOMAIN ); ?></label>
<label><input type="checkbox" name="et-core-portability-import-backup" /><?php esc_html_e( 'Download Backup Before Importing', ET_CORE_TEXTDOMAIN ); // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralDomain -- intentional use of ET_CORE_TEXTDOMAIN ?></label>
<?php endif; ?>
<?php if ( 'post_type' === $this->instance->type ) : ?>
<label><input type="checkbox" name="et-core-portability-import-include-global-presets" /><?php esc_html_e( 'Import Presets', ET_CORE_TEXTDOMAIN ); ?></label>

View File

@ -1391,7 +1391,7 @@ class ET_Core_SupportCenter {
'pass_minus_one' => false,
'pass_zero' => false,
'minimum' => null,
'recommended' => '7.2 or higher',
'recommended' => '7.4 or higher',
'actual' => (float) phpversion(),
'help_text' => et_core_intentionally_unescaped( __( 'We recommend using the latest stable version of PHP. This will not only ensure compatibility with Divi, but it will also greatly speed up your website leading to less memory and CPU related issues.', 'et-core' ), 'html' ),
'learn_more' => 'http://php.net/releases/',
@ -2607,7 +2607,8 @@ class ET_Core_SupportCenter {
);
$response['token'] = '';
if ( ! empty( $site_id ) && is_string( $site_id ) ) {
$response['token'] = $account_settings['token'] . '|' . $site_id;
$account_setting_token = isset( $account_settings['token'] ) ? $account_settings['token'] : '';
$response['token'] = $account_setting_token . '|' . $site_id;
}
$response['message'] = esc_html__(
'ET Support User role has been activated.',
@ -3025,12 +3026,13 @@ class ET_Core_SupportCenter {
$site_id = get_option( 'et_support_site_id' );
$support_token_cta = '';
if ( intval( $is_et_support_user_active ) > 0 && ! empty( $site_id ) && is_string( $site_id ) ) {
$account_settings = get_option( $this->support_user_options_name );
$support_token_cta = '<a class="copy_support_token" data-token="'
. esc_attr( $account_settings['token'] . '|' . $site_id )
. '">'
. esc_html__( 'Copy Support Token', 'et-core' )
. '</a>';
$account_settings = get_option( $this->support_user_options_name );
$account_setting_token = isset( $account_settings['token'] ) ? $account_settings['token'] : '';
$support_token_cta = '<a class="copy_support_token" data-token="'
. esc_attr( $account_setting_token . '|' . $site_id )
. '">'
. esc_html__( 'Copy Support Token', 'et-core' )
. '</a>';
}
$card_content .= '<div class="et_card_cta">'

View File

@ -23,6 +23,8 @@ final class ET_Core_Updates {
private static $_this;
function __construct( $core_url, $product_version ) {
global $wp_version;
// Don't allow more than one instance of the class
if ( isset( self::$_this ) ) {
wp_die( sprintf( esc_html__( '%s: You cannot create a second instance of this class.', 'et-core' ),
@ -49,7 +51,13 @@ final class ET_Core_Updates {
add_filter( 'wp_prepare_themes_for_js', array( $this, 'replace_theme_update_notification' ) );
add_filter( 'upgrader_package_options', array( $this, 'check_upgrading_product' ) );
add_filter( 'upgrader_pre_download', array( $this, 'update_error_message' ), 20, 2 );
// The 4th paramenter, $hook_extra was added in WordPress 5.5.0.
if ( version_compare( $wp_version, '5.5.0', '>=' ) ) {
add_filter( 'upgrader_pre_download', array( $this, 'update_error_message' ), 20, 4 );
} else {
add_filter( 'upgrader_pre_download', array( $this, 'update_error_message' ), 20, 3 );
}
add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_plugins_updates' ) );
add_filter( 'plugins_api', array( $this, 'maybe_modify_plugins_changelog' ), 20, 3 );
@ -103,7 +111,9 @@ final class ET_Core_Updates {
return;
}
$message = et_get_safe_localization( __( 'For all Elegant Themes products, please <a href="http://www.elegantthemes.com/gallery/divi/documentation/update/" target="_blank">authenticate your subscription</a> via the Updates tab in your theme & plugin settings to enable product updates. Make sure that your Username and API Key have been entered correctly.', 'et-core' ) );
$message = empty( $custom_message = $this->get_custom_update_notification_message( $plugin_data['url'] ) )
? et_get_safe_localization( __( 'For all Elegant Themes products, please <a href="http://www.elegantthemes.com/gallery/divi/documentation/update/" target="_blank">authenticate your subscription</a> via the Updates tab in your theme & plugin settings to enable product updates. Make sure that your Username and API Key have been entered correctly.', 'et-core' ) )
: $custom_message;
echo "</p><p>{$message}";
}
@ -128,6 +138,22 @@ final class ET_Core_Updates {
$this->force_update_requests();
}
function get_custom_update_notification_message( $update_message ) {
$is_valid_api_key_status = empty( $account_api_key_status = get_site_option( 'et_account_api_key_status' ) ) || 'invalid' !== $account_api_key_status;
if ( $is_valid_api_key_status && false !== strpos( $update_message, '/wp-json/api/v1/changelog/product_id/' ) ) {
return et_get_safe_localization( __( '<em>The license for this Divi Marketplace product has expired. Please <a target="_blank" href="https://www.elegantthemes.com/members-area/marketplace/">renew the license</a> to continue receiving product updates and support.</em>', 'et-core' ) );
}
if ( false !== strpos( $update_message, 'Automatic update is unavailable for this theme' ) ) {
return 'expired' === $this->account_status
? et_get_safe_localization( __( '<em>Your Elegant Themes subscription has expired. You must <a href="https://www.elegantthemes.com/members-area/renew/" target="_blank">renew your account</a> to regain access to product updates and support.</em>', 'et-core' ) )
: et_get_safe_localization( __( '<em>Before you can receive product updates, you must first authenticate your Elegant Themes subscription. To do this, you need to enter both your Elegant Themes Username and your Elegant Themes API Key into the Updates Tab in your theme and plugin settings. To locate your API Key, <a href="https://www.elegantthemes.com/members-area/api/" target="_blank">log in</a> to your Elegant Themes account and navigate to the <strong>Account > API Key</strong> page. <a href="http://www.elegantthemes.com/gallery/divi/documentation/update/" target="_blank">Learn more here</a></em>. If you still get this message, please make sure that your Username and API Key have been entered correctly', 'et-core' ) );
}
return '';
}
function replace_theme_update_notification( $themes_array ) {
if ( empty( $themes_array ) ) {
return $themes_array;
@ -139,14 +165,16 @@ final class ET_Core_Updates {
foreach ( $themes_array as $id => $theme_data ) {
// replace default error message with custom message for ET themes.
if (
in_array( $id, $this->all_et_products_domains['theme'] )
&& false !== strpos( $theme_data['update'], 'Automatic update is unavailable for this theme' )
) {
if ( ! in_array( $id, $this->all_et_products_domains['theme'] )
|| false === strpos( $theme_data['update'], 'Automatic update is unavailable for this theme' ) ) {
continue;
}
if ( ! empty( $custom_message = $this->get_custom_update_notification_message( $theme_data['update'] ) ) ) {
$themes_array[ $id ]['update'] = sprintf(
'<p>%1$s<br/> %2$s</p>',
$theme_data['update'],
et_get_safe_localization( __( '<em>Before you can receive product updates, you must first authenticate your Elegant Themes subscription. To do this, you need to enter both your Elegant Themes Username and your Elegant Themes API Key into the Updates Tab in your theme and plugin settings. To locate your API Key, <a href="https://www.elegantthemes.com/members-area/api/" target="_blank">log in</a> to your Elegant Themes account and navigate to the <strong>Account > API Key</strong> page. <a href="http://www.elegantthemes.com/gallery/divi/documentation/update/" target="_blank">Learn more here</a></em>. If you still get this message, please make sure that your Username and API Key have been entered correctly', 'et-core' ) )
$custom_message
);
}
}
@ -154,7 +182,7 @@ final class ET_Core_Updates {
return $themes_array;
}
function update_error_message( $reply, $package ) {
function update_error_message( $reply, $package, $upgrader, $hook_extra = array() ) {
if ( ! $this->upgrading_et_product ) {
return $reply;
}
@ -166,8 +194,25 @@ final class ET_Core_Updates {
return $reply;
}
$hook_name = ! empty( $hook_extra['theme'] ) ? 'theme' : 'plugin';
$site_transient = 'theme' === $hook_name ? get_site_transient( 'et_update_themes' ) : get_site_transient( 'et_update_all_plugins' );
$changelog_url = '';
if ( isset( $site_transient->response ) && ! empty( $site_transient->response[ $hook_extra[ $hook_name ] ] ) ) {
$changelog_url = 'theme' === $hook_name
? $site_transient->response[ $hook_extra[ $hook_name ] ]['url']
: $site_transient->response[ $hook_extra[ $hook_name ] ]->url;
}
if ( false !== strpos( $changelog_url, '/wp-json/api/v1/changelog/product_id/' ) ) {
$error_message = $this->get_custom_update_notification_message( $changelog_url );
} else {
$error_message = 'expired' === $this->account_status
? et_get_safe_localization( __( '<em>Your Elegant Themes subscription has expired. You must <a href="https://www.elegantthemes.com/members-area/renew/" target="_blank">renew your account</a> to regain access to product updates and support.</em>', 'et-core' ) )
: et_get_safe_localization( __( '<em>Before you can receive product updates, you must first authenticate your Elegant Themes subscription. To do this, you need to enter both your Elegant Themes Username and your Elegant Themes API Key into the Updates Tab in your theme and plugin settings. To locate your API Key, <a href="https://www.elegantthemes.com/members-area/api/" target="_blank">log in</a> to your Elegant Themes account and navigate to the <strong>Account > API Key</strong> page. <a href="http://www.elegantthemes.com/gallery/divi/documentation/update/" target="_blank">Learn more here</a></em>. If you still get this message, please make sure that your Username and API Key have been entered correctly', 'et-core' ) );
}
// output custom error message for ET Products if package is empty
$error_message = et_get_safe_localization( __( '<em>Before you can receive product updates, you must first authenticate your Elegant Themes subscription. To do this, you need to enter both your Elegant Themes Username and your Elegant Themes API Key into the Updates Tab in your theme and plugin settings. To locate your API Key, <a href="https://www.elegantthemes.com/members-area/api/" target="_blank">log in</a> to your Elegant Themes account and navigate to the <strong>Account > API Key</strong> page. <a href="http://www.elegantthemes.com/gallery/divi/documentation/update/" target="_blank">Learn more here</a></em>. If you still get this message, please make sure that your Username and API Key have been entered correctly', 'et-core' ) );
return new WP_Error( 'no_package', $error_message );
}
@ -360,6 +405,15 @@ final class ET_Core_Updates {
}
foreach ( $_plugins as $file => $plugin ) {
$update_uri = isset( $plugin['UpdateURI'] ) ? $plugin['UpdateURI'] : '';
$is_et_uri = false !== strpos( $update_uri, 'elegantthemes.com' );
// Continue to the next iteration if the Update URI
// is not empty and not using Elegant Themes's domain.
if ( ! empty( $update_uri ) && ! $is_et_uri ) {
continue;
}
$plugins[ $file ] = $plugin['Version'];
}
@ -676,17 +730,15 @@ final class ET_Core_Updates {
return $url;
}
$matches = array();
$update_transient = get_site_transient( 'et_update_all_plugins' );
if ( ! is_object( $update_transient ) || empty( $update_transient->response ) ) {
return $url;
}
$matches = array();
$update_transient = get_site_transient( 'et_update_all_plugins' );
$et_updated_plugins_data = get_transient( 'et_updated_plugins_data' );
$has_last_checked = ! empty( $update_transient->last_checked ) && ! empty( $et_updated_plugins_data->last_checked );
if ( ! is_object( $update_transient ) ) {
return $url;
}
/*
* Attempt to use a cached list of updated plugins.
* Re-save the list, whenever the update transient last checked time changes.
@ -701,14 +753,18 @@ final class ET_Core_Updates {
foreach ( $update_transient->response as $response_plugin_settings ) {
$slug = sanitize_text_field( $response_plugin_settings->slug );
$et_updated_plugins_data->changelogs[ $slug ] = $response_plugin_settings->url . '?TB_iframe=true&width=1024&height=800';
$et_updated_plugins_data->changelogs[ $slug ] = esc_url_raw( $response_plugin_settings->url . '?TB_iframe=true&width=1024&height=800' );
}
set_transient( 'et_updated_plugins_data', $et_updated_plugins_data );
}
if ( empty( $et_updated_plugins_data->changelogs ) ) {
return $url;
if ( ! empty( $update_transient->no_update ) ) {
foreach ( $update_transient->no_update as $no_update_plugin_settings ) {
$slug = sanitize_text_field( $no_update_plugin_settings->slug );
$et_updated_plugins_data->changelogs[ $slug ] = esc_url_raw( $no_update_plugin_settings->url . '?TB_iframe=true&width=1024&height=800' );
}
}
preg_match( '/plugin=([^&]*)/', $path, $matches );

View File

@ -67,8 +67,25 @@ class ET_Core_API_Spam_ReCaptcha extends ET_Core_API_Spam_Provider {
}
public function is_enabled() {
return isset( $this->data['site_key'], $this->data['secret_key'] )
$has_recaptcha_module = true;
if ( class_exists( 'ET_Dynamic_Assets' ) ) {
$et_dynamic_module_framework = et_builder_dynamic_module_framework();
$is_dynamic_framework_enabled = et_builder_is_frontend() && 'on' === $et_dynamic_module_framework;
$is_dynamic_css_enabled = et_builder_is_frontend() && et_use_dynamic_css();
if ( $is_dynamic_framework_enabled && $is_dynamic_css_enabled ) {
$et_dynamic_assets = ET_Dynamic_Assets::init();
$saved_shortcodes = $et_dynamic_assets->get_saved_page_shortcodes();
$recaptcha_modules = array( 'et_pb_contact_form', 'et_pb_signup' );
$has_recaptcha_module = ! empty( array_intersect( $saved_shortcodes, $recaptcha_modules ) );
}
}
$has_key = isset( $this->data['site_key'], $this->data['secret_key'] )
&& et_()->all( array( $this->data['site_key'], $this->data['secret_key'] ) );
return $has_key && $has_recaptcha_module;
}
/**

View File

@ -83,7 +83,7 @@ class ET_Core_Cache_Directory {
}
$this->can_write = $can_write || $can_create;
$this->path = $path;
$this->path = et_()->normalize_path( $path );
$this->url = $url;
$this->_maybe_adjust_path_for_multisite( $uploads_dir_info );

View File

@ -1041,6 +1041,69 @@ class ET_Core_Data_Utils {
$buffer[15]
);
}
/**
* Append/Prepend to comma separated selectors.
*
* Example:
*
* @see UtilsTest::testAppendPrependCommaSeparatedSelectors()
*
* @param string $css_selector Comma separated CSS selectors.
* @param string $value Value to append/prepend.
* @param string $prefix_suffix Values can be `prefix` or `suffix`.
* @param bool $is_space_required Is space required? // phpcs:ignore Squiz.Commenting.FunctionComment.ParamCommentFullStop -- Respecting punctuation.
*
* @return string
*/
public function append_prepend_comma_separated_selectors(
$css_selector,
$value,
$prefix_suffix,
$is_space_required = true
) {
$css_selectors = explode( ',', $css_selector );
$css_selectors_processed = array();
$is_prefix = 'prefix' === $prefix_suffix;
foreach ( $css_selectors as $selector ) {
$selector = rtrim( ltrim( $selector ) );
if ( $is_prefix && $is_space_required ) {
$css_selectors_processed[] = sprintf( '%2$s %1$s', $selector, $value );
} elseif ( $is_prefix && ! $is_space_required ) {
$css_selectors_processed[] = sprintf( '%2$s%1$s', $selector, $value );
} elseif ( ! $is_prefix && $is_space_required ) {
$css_selectors_processed[] = sprintf( '%1$s %2$s', $selector, $value );
} elseif ( ! $is_prefix && ! $is_space_required ) {
$css_selectors_processed[] = sprintf( '%1$s%2$s', $selector, $value );
}
}
return implode( ',', $css_selectors_processed );
}
/**
* Helper function to prepare attributes for SVG.
*
* @param array $props Props.
*
* @return string
*/
public function get_svg_attrs( $props ) {
$result = '';
$attrs = array_merge(
$props,
array(
'xmlns' => 'http://www.w3.org/2000/svg',
)
);
foreach ( $attrs as $key => $value ) {
$result .= " {$key}=\"{$value}\"";
}
return $result;
}
}

View File

@ -57,7 +57,7 @@ function et_safe_mode_maybe_disable_plugins( $plugins = array() ) {
}
/** @var array Collection of plugins that we will NOT disable when Safe Mode is activated. */
$plugins_allowlist = get_option( 'et_safe_mode_plugins_allowlist' );
$plugins_allowlist = (array) get_option( 'et_safe_mode_plugins_allowlist' );
$clean_plugins = $plugins;

View File

@ -265,20 +265,29 @@ function et_core_get_main_fonts() {
endif;
if ( ! function_exists( 'et_core_get_theme_info' ) ):
function et_core_get_theme_info( $key ) {
static $theme_info = null;
if ( ! function_exists( 'et_core_get_theme_info' ) ) :
/**
* Gets Theme Info.
*
* Gets Parent theme's info even when child theme is used.
*
* @param string $key One of WP_Theme class public properties.
*
* @returns string
*/
function et_core_get_theme_info( $key ) {
static $theme_info = null;
if ( ! $theme_info ) {
$theme_info = wp_get_theme();
if ( ! $theme_info ) {
$theme_info = wp_get_theme();
if ( defined( 'STYLESHEETPATH' ) && is_child_theme() ) {
$theme_info = wp_get_theme( $theme_info->parent_theme );
if ( defined( 'STYLESHEETPATH' ) && is_child_theme() ) {
$theme_info = wp_get_theme( $theme_info->parent_theme );
}
}
}
return $theme_info->display( $key );
}
return $theme_info->display( $key );
}
endif;
@ -875,7 +884,8 @@ if ( ! function_exists( 'et_requeue_child_theme_styles' ) ) :
foreach ( $styles->registered as $handle => $style ) {
if ( preg_match( '/' . $template_directory_uri . '.*/', $style->src ) ) {
et_core_replace_enqueued_style( $style->src, '', $theme_version, '', $style_dep, false );
$style_version = isset( $style->ver ) ? $style->ver : $theme_version;
et_core_replace_enqueued_style( $style->src, '', $style_version, '', $style_dep, false );
}
}
}
@ -2049,8 +2059,9 @@ if ( ! function_exists( 'et_dequeue_block_css' ) ) :
$post_id = get_the_id();
$is_page_builder_used = function_exists( 'et_pb_is_pagebuilder_used' ) ? et_pb_is_pagebuilder_used( $post_id ) : false;
$defer_block_css_enabled = ( 'on' === et_get_option( $shortname . '_defer_block_css', 'on' ) );
$is_wp_template_used = ! empty( et_builder_get_wp_editor_templates() );
if ( $is_page_builder_used && $defer_block_css_enabled ) {
if ( $is_page_builder_used && $defer_block_css_enabled && ! $is_wp_template_used ) {
wp_dequeue_style( 'wp-block-library' );
}
}

View File

@ -1,2 +1,2 @@
.footer-widget h4,#main-footer .widget_block h1,#main-footer .widget_block h2,#main-footer .widget_block h3,#main-footer .widget_block h4,#main-footer .widget_block h5,#main-footer .widget_block h6{color:#2EA3F2}.footer-widget li:before{border-color:#2EA3F2}.bottom-nav li.current-menu-item>a{color:#2EA3F2}#main-footer{background-color:#222222}#footer-widgets{padding:6% 0 0}.footer-widget{float:left;color:#fff}.last{margin-right:0}.footer-widget .fwidget:last-child{margin-bottom:0 !important}#footer-widgets .footer-widget li{padding-left:14px;position:relative}#footer-widgets .footer-widget li:before{border-radius:3px;border-style:solid;border-width:3px;content:"";left:0;position:absolute;top:9px}#footer-widgets .footer-widget li a{color:#fff;text-decoration:none}#footer-widgets .footer-widget li a:hover{color:rgba(255,255,255,0.7)}.footer-widget .widget_adsensewidget ins{min-width:160px}#footer-bottom{background-color:#1f1f1f;background-color:rgba(0,0,0,0.32);padding:15px 0 5px}#footer-bottom a{-webkit-transition:all 0.4s ease-in-out;transition:all 0.4s ease-in-out}#footer-info{text-align:left;color:#666;padding-bottom:10px;float:left}#footer-info a{font-weight:700;color:#666}#footer-info a:hover{opacity:.7}#et-footer-nav{background-color:rgba(255,255,255,0.05)}.bottom-nav{padding:15px 0}.bottom-nav li{font-weight:600;display:inline-block;font-size:14px;padding-right:22px}.bottom-nav a{color:#bbb;-webkit-transition:all 0.4s ease-in-out;transition:all 0.4s ease-in-out}.bottom-nav a:hover{opacity:.7}@media all and (max-width: 980px){.footer-widget:nth-child(n){width:46.25% !important;margin:0 7.5% 7.5% 0 !important}.et_pb_footer_columns1 .footer-widget{width:100% !important;margin:0 7.5% 7.5% 0 !important}#footer-widgets .footer-widget .fwidget{margin-bottom:16.21%}.et_pb_gutters1 .footer-widget:nth-child(n){width:50% !important;margin:0 !important}.et_pb_gutters1 #footer-widgets .footer-widget .fwidget{margin-bottom:0}#footer-widgets{padding:8% 0}#footer-widgets .footer-widget:nth-child(2n){margin-right:0 !important}#footer-widgets .footer-widget:nth-last-child(-n+2){margin-bottom:0 !important}.bottom-nav{text-align:center}#footer-info{float:none;text-align:center}}@media all and (max-width: 767px){#footer-widgets .footer-widget,.et_pb_gutters1 #footer-widgets .footer-widget{width:100% !important;margin-right:0 !important}#footer-widgets .footer-widget:nth-child(n),#footer-widgets .footer-widget .fwidget{margin-bottom:9.5% !important}.et_pb_gutters1 #footer-widgets .footer-widget:nth-child(n),.et_pb_gutters1 #footer-widgets .footer-widget .fwidget{margin-bottom:0 !important}#footer-widgets{padding:10% 0}#footer-widgets .footer-widget .fwidget:last-child{margin-bottom:0 !important}#footer-widgets .footer-widget:last-child{margin-bottom:0 !important}}@media all and (max-width: 479px){#footer-widgets .footer-widget:nth-child(n),.footer-widget .fwidget{margin-bottom:11.5% !important}#footer-widgets .footer-widget.last{margin-bottom:0 !important}.et_pb_gutters1 #footer-widgets .footer-widget:nth-child(n),.et_pb_gutters1 #footer-widgets .footer-widget .fwidget{margin-bottom:0 !important}#footer-widgets{padding:12% 0}}
.footer-widget h4,#main-footer .widget_block h1,#main-footer .widget_block h2,#main-footer .widget_block h3,#main-footer .widget_block h4,#main-footer .widget_block h5,#main-footer .widget_block h6{color:#2EA3F2}.footer-widget li:before{border-color:#2EA3F2}.bottom-nav li.current-menu-item>a{color:#2EA3F2}#main-footer{background-color:#222222}#footer-widgets{padding:6% 0 0}.footer-widget{float:left;color:#fff}.last{margin-right:0}.footer-widget .fwidget:last-child{margin-bottom:0 !important}#footer-widgets .footer-widget li{padding-left:14px;position:relative}#footer-widgets .footer-widget li:before{border-radius:3px;border-style:solid;border-width:3px;content:"";left:0;position:absolute;top:9px}#footer-widgets .footer-widget a{color:#fff}#footer-widgets .footer-widget li a{color:#fff;text-decoration:none}#footer-widgets .footer-widget li a:hover{color:rgba(255,255,255,0.7)}.footer-widget .widget_adsensewidget ins{min-width:160px}#footer-bottom{background-color:#1f1f1f;background-color:rgba(0,0,0,0.32);padding:15px 0 5px}#footer-bottom a{-webkit-transition:all 0.4s ease-in-out;transition:all 0.4s ease-in-out}#footer-info{text-align:left;color:#666;padding-bottom:10px;float:left}#footer-info a{font-weight:700;color:#666}#footer-info a:hover{opacity:.7}#et-footer-nav{background-color:rgba(255,255,255,0.05)}.bottom-nav{padding:15px 0}.bottom-nav li{font-weight:600;display:inline-block;font-size:14px;padding-right:22px}.bottom-nav a{color:#bbb;-webkit-transition:all 0.4s ease-in-out;transition:all 0.4s ease-in-out}.bottom-nav a:hover{opacity:.7}@media all and (max-width: 980px){.footer-widget:nth-child(n){width:46.25% !important;margin:0 7.5% 7.5% 0 !important}.et_pb_footer_columns1 .footer-widget{width:100% !important;margin:0 7.5% 7.5% 0 !important}#footer-widgets .footer-widget .fwidget{margin-bottom:16.21%}.et_pb_gutters1 .footer-widget:nth-child(n){width:50% !important;margin:0 !important}.et_pb_gutters1 #footer-widgets .footer-widget .fwidget{margin-bottom:0}#footer-widgets{padding:8% 0}#footer-widgets .footer-widget:nth-child(2n){margin-right:0 !important}#footer-widgets .footer-widget:nth-last-child(-n+2){margin-bottom:0 !important}.bottom-nav{text-align:center}#footer-info{float:none;text-align:center}}@media all and (max-width: 767px){#footer-widgets .footer-widget,.et_pb_gutters1 #footer-widgets .footer-widget{width:100% !important;margin-right:0 !important}#footer-widgets .footer-widget:nth-child(n),#footer-widgets .footer-widget .fwidget{margin-bottom:9.5% !important}.et_pb_gutters1 #footer-widgets .footer-widget:nth-child(n),.et_pb_gutters1 #footer-widgets .footer-widget .fwidget{margin-bottom:0 !important}#footer-widgets{padding:10% 0}#footer-widgets .footer-widget .fwidget:last-child{margin-bottom:0 !important}#footer-widgets .footer-widget:last-child{margin-bottom:0 !important}}@media all and (max-width: 479px){#footer-widgets .footer-widget:nth-child(n),.footer-widget .fwidget{margin-bottom:11.5% !important}#footer-widgets .footer-widget.last{margin-bottom:0 !important}.et_pb_gutters1 #footer-widgets .footer-widget:nth-child(n),.et_pb_gutters1 #footer-widgets .footer-widget .fwidget{margin-bottom:0 !important}#footer-widgets{padding:12% 0}}

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
.widget_search .screen-reader-text,.et_pb_widget .wp-block-search__label{display:none}.widget_search input#s,.widget_search input#searchsubmit,.et_pb_widget .wp-block-search__input,.et_pb_widget .wp-block-search__button{padding:.7em;height:40px !important;margin:0;font-size:14px;line-height:normal !important;border:1px solid #ddd;color:#666}.widget_search #s,.et_pb_widget .wp-block-search__input{width:100%;border-radius:3px}.widget_search #searchform,.et_pb_widget .wp-block-search{position:relative}.widget_search #searchsubmit,.et_pb_widget .wp-block-search__button{background-color:#ddd;width:70px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;position:absolute;right:0;top:0}#searchsubmit,.et_pb_widget .wp-block-search__button{cursor:pointer}
.widget_search .screen-reader-text,.et_pb_widget .wp-block-search__label{display:none}.widget_search input#s,.widget_search input#searchsubmit,.et_pb_widget .wp-block-search__input,.et_pb_widget .wp-block-search__button{padding:.7em;height:40px !important;margin:0;font-size:14px;line-height:normal !important;border:1px solid #ddd;color:#666}.widget_search #s,.et_pb_widget .wp-block-search__input{width:100%;border-radius:3px}.widget_search #searchform,.et_pb_widget .wp-block-search{position:relative}.widget_search #searchsubmit,.et_pb_widget .wp-block-search__button{background-color:#ddd;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;position:absolute;right:0;top:0}#searchsubmit,.et_pb_widget .wp-block-search__button{cursor:pointer}

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
.editor-post-title__block .editor-post-title__input{font-family:Open Sans,Arial,sans-serif;font-size:30px;color:#333;line-height:1.7em;font-weight:500;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.block-editor-default-block-appender textarea.block-editor-default-block-appender__content,.editor-styles-wrapper,div.editor-styles-wrapper button,div.editor-styles-wrapper input,div.editor-styles-wrapper select,div.editor-styles-wrapper textarea{font-family:Open Sans,Arial,sans-serif;font-size:14px;color:#666;line-height:1.7em;font-weight:500;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.block-editor-default-block-appender textarea.block-editor-default-block-appender__content{color:rgba(14,28,46,.62)}.wp-block{max-width:795px}#et-pb-motion-effects-offset-tracker{visibility:hidden!important;opacity:0;position:absolute;top:0;left:0}
.editor-post-title__block .editor-post-title__input{font-family:Open Sans,Arial,sans-serif;font-size:30px;color:#333;line-height:1.7em;font-weight:500;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.block-editor-default-block-appender textarea.block-editor-default-block-appender__content,.editor-styles-wrapper,div.editor-styles-wrapper button,div.editor-styles-wrapper input,div.editor-styles-wrapper select,div.editor-styles-wrapper textarea{font-family:Open Sans,Arial,sans-serif;font-size:14px;color:#666;line-height:1.7em;font-weight:500;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.block-editor-default-block-appender textarea.block-editor-default-block-appender__content{color:rgba(14,28,46,.62)}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container>*,.editor-styles-wrapper .edit-post-visual-editor__post-title-wrapper>*,.wp-block{max-width:823px;margin-left:auto!important;margin-right:auto!important}#et-pb-motion-effects-offset-tracker{visibility:hidden!important;opacity:0;position:absolute;top:0;left:0}

View File

@ -0,0 +1,753 @@
.et-customizer-hidden {
display: none !important; }
h1, h2, h3, h4, h5, h6 {
text-decoration: none !important;
font-style: normal !important;
text-transform: none !important;
letter-spacing: 0px !important;
font-family: "Open Sans",sans-serif !important; }
.customize-control-image .actions {
margin-bottom: 0; }
.customize-control {
margin-bottom: 0; }
.customize-control.customize-control-checkbox .customize-inside-control-row {
margin-left: 0;
padding-top: 0;
padding-bottom: 0; }
.customize-control-nav_menu_auto_add input {
display: block;
float: left;
margin-top: 7.5px !important;
margin-bottom: 7.5px !important; }
.customize-control-nav_menu_auto_add input label {
margin-left: 0; }
.preview-tablet #customize-preview.wp-full-overlay-main, .preview-mobile #customize-preview.wp-full-overlay-main {
background-color: rgba(0, 0, 0, 0);
max-width: 100%;
max-height: 100%;
text-align: center; }
#customize-preview iframe {
position: relative; }
#customize-preview.wp-full-overlay-main.iframe-ready.et_divi_phone, #customize-preview.wp-full-overlay-main.iframe-ready.et_divi_tablet {
-webkit-box-shadow: inset 0px 0px 300px -86px black;
box-shadow: inset 0px 0px 300px -86px black;
text-align: center;
background-color: #3F3F3F; }
#customize-preview.et_divi_phone iframe, #customize-preview.et_divi_tablet iframe {
box-sizing: border-box;
-webkit-box-sizing: border-box;
height: 80%;
border-radius: 20px;
-webkit-border-radius: 20px;
border: 10px solid #d7d7d7;
margin-top: 10%;
width: 90%;
max-width: 479px !important;
box-shadow: 0 0 100px rgba(0, 0, 0, 0.8);
-webkit-box-shadow: 0 0 100px rgba(0, 0, 0, 0.8);
-webkit-transition: all .5s;
transition: all .5s;
-webkit-animation: zoomIn .6s;
animation: zoomIn .6s; }
#customize-preview.et_divi_tablet iframe, .preview-tablet #customize-preview iframe {
max-width: 793px !important; }
.preview-mobile #customize-preview iframe {
max-width: 479px !important; }
#customize-preview.et_divi_phone iframe::-webkit-scrollbar, #customize-preview.et_divi_tablet iframe::-webkit-scrollbar {
width: 5px !important; }
#customize-preview.et_divi_phone iframe::-webkit-scrollbar-track, #customize-preview.et_divi_tablet iframe::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 0 rgba(0, 0, 0, 0.3) !important;
width: 20px !important;
background-color: #d7d7d7; }
#customize-preview.et_divi_phone iframe::-webkit-scrollbar-thumb, #customize-preview.et_divi_tablet iframe::-webkit-scrollbar-thumb {
border-radius: 0 !important;
background: #3F3F3F !important; }
#customize-preview.et_divi_phone iframe::-webkit-thumb:window-inactive, #customize-preview.et_divi_tablet iframe::-webkit-thumb:window-inactive {
background: #d7d7d7 !important; }
#customize-header-actions {
z-index: 100000; }
span.et_divi_reset_slider {
width: 16px;
height: 16px;
margin-left: 5px;
display: inline-block;
position: relative; }
span.et_divi_reset_slider:after {
font-family: 'ETmodules';
content: '\e61f';
font-size: 16px;
line-height: 1em;
color: #D4D4D4;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-transition: background .5s;
transition: background .5s; }
span.et_divi_reset_slider:hover:after {
color: #A7A7A7; }
label {
font-size: 12px;
position: relative; }
input, select, input[type=checkbox], input[type=text] {
width: 100%;
margin-left: 0;
border-radius: 4px;
border: none;
-webkit-box-shadow: none;
box-shadow: none;
background: #f4f4f4;
padding: 5px 10px;
font-size: 14px;
color: #32373c; }
.menu-item-settings input, .menu-item-settings select, .menu-item-settings input[type=checkbox], .menu-item-settings input[type=text] {
background: #ffffff; }
input:focus, select:focus {
-webkit-box-shadow: none !important;
box-shadow: none !important;
outline: none !important;
background: #eaeaea;
-webkit-transition: background .5s;
transition: background .5s; }
.et_filter_text {
background-color: #f4f4f4 !important;
border: none !important; }
.wp-full-overlay-header input {
width: auto; }
input[type=range] {
-webkit-transition: background .5s;
transition: background .5s;
-webkit-appearance: none;
background-color: #f4f4f4;
height: 5px;
width: 165px;
padding: 0; }
input[type="range"]:focus {
-webkit-box-shadow: none !important;
box-shadow: none !important;
outline: none !important; }
input[type="range"]:hover {
background-color: #CAEBFF; }
input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
background-color: #2e86b9;
width: 15px;
height: 15px;
border-radius: 15px;
-webkit-border-radius: 15px; }
input[type="range"]::-moz-range-track {
border: inherit;
background: transparent; }
input[type="range"]::-ms-track {
border: inherit;
color: transparent;
background: transparent; }
input[type="range"]::-ms-fill-lower,
input[type="range"]::-ms-fill-upper {
background: transparent; }
input[type="range"]::-ms-tooltip {
display: none; }
input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
width: 15px;
height: 15px;
border: none;
border-radius: 15px;
background-color: #2e86b9; }
input[type="range"]::-moz-range-thumb {
width: 15px;
height: 15px;
border: none;
border-radius: 15px;
background-color: #2e86b9; }
input[type="range"]::-ms-thumb {
width: 15px;
height: 15px;
border-radius: 15px;
border: 0;
background-color: #2e86b9; }
.customize-control input.et-pb-range-input {
width: 60px;
text-align: center;
margin-left: 4px;
border-radius: 4px;
border: none;
-webkit-box-shadow: none;
box-shadow: none;
background: #F4F4F4;
padding: 3px;
font-size: 11px;
font-weight: 800;
color: #555;
-moz-appearance: textfield; }
.customize-control input.et-pb-range-input:hover,
.customize-control input.et-pb-range-input:focus {
background: #eaeaea;
-webkit-transition: background .5s;
transition: background .5s; }
input.et-pb-range-input::-webkit-outer-spin-button,
input.et-pb-range-input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0; }
input[type=checkbox] {
margin-right: 10px;
margin-top: 0;
width: 25px;
height: 25px; }
input[type=checkbox]:checked:before {
color: #2E86B9;
float: none;
margin: -4px 0 0 -5px; }
.customize-control-title {
margin-top: 15px;
text-transform: uppercase;
font-size: 12px; }
.customize-control-range .customize-control-title {
margin-bottom: -8px; }
.customize-control-checkbox,
.customize-control-nav_menu_auto_add > label,
.customize-control-nav_menu_auto_add .customize-inside-control-row {
font-weight: 600;
font-size: 12px;
text-transform: uppercase;
border: 1px solid #EEEEEE;
background-color: #FDFDFD;
margin-left: 0 !important;
margin-bottom: -1px !important;
padding: 6px 10px;
border-radius: 2px;
box-sizing: border-box;
-webkit-box-sizing: border-box; }
.customize-control-checkbox label {
padding: 0;
margin-left: 0; }
.customize-control button.button {
width: 100%;
border: none;
-webkit-box-shadow: none;
box-shadow: none;
background-color: #2E86B9;
color: #fff;
height: 30px; }
.customize-control button.button:hover {
color: #fff;
background-color: #186EA0;
transition: all .5s ease-in-out;
-webkit-transition: all .5s ease-in-out;
-webkit-transition: all .5s ease-in-out; }
.customize-control button.remove-button {
margin-bottom: 10px; }
.customize-control select, .customize-control-text input {
background: #FDFDFD;
border: 1px solid #eee;
height: 35px; }
.customize-control-image .inner {
line-height: 30px;
top: 0; }
.customize-control-image .current .container {
min-height: 30px; }
.wp-color-result {
width: 100%;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 0 0 0 40px;
box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.5) !important;
-webkit-box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.5) !important;
border: none;
height: 30px;
border-radius: 4px;
margin: 0; }
.wp-color-result:after, .wp-core-ui .button.wp-color-result .wp-color-result-text {
background-color: rgba(0, 0, 0, 0.2);
color: #fff;
height: 30px;
line-height: 30px;
border: none;
-webkit-box-shadow: none;
box-shadow: none;
font-size: 12px;
border-radius: 0 4px 4px 0;
padding: 0 15px; }
.wp-color-result:hover, .wp-color-result:focus:after, .wp-color-result:hover:after {
color: #fff;
border: none; }
.wp-picker-container .iris-picker {
margin: 15px 0 0 0; }
.wp-picker-container .iris-square, .wp-picker-container .iris-palette-container {
margin-left: -1px; }
.wp-picker-container, .wp-picker-input-wrap {
width: 100%;
border-radius: 4px;
overflow: hidden; }
.wp-picker-container input[type=text].wp-color-picker, .wp-core-ui .wp-picker-default, .wp-core-ui .wp-picker-clear {
width: 45% !important;
vertical-align: bottom;
margin-top: 10px; }
.wp-core-ui .wp-picker-default, .wp-core-ui .wp-picker-clear {
margin-left: 10%; }
.wp-core-ui button.wp-color-result + .wp-picker-input-wrap input[type=text].wp-color-picker {
width: 100% !important; }
.wp-core-ui button.wp-color-result + .wp-picker-input-wrap > label {
width: 45%; }
.wp-customizer .wp-picker-active .wp-picker-input-wrap .wp-picker-default, .wp-customizer .wp-picker-active .wp-picker-input-wrap .wp-picker-clear {
display: inline-block !important;
margin-left: 10%; }
.wp-customizer .wp-color-result:after {
background-color: rgba(0, 0, 0, 0.2);
color: #fff;
height: 30px;
line-height: 30px;
content: attr(title);
display: block;
font-size: 12px;
border-radius: 0 4px 4px 0;
padding: 0 15px;
position: relative;
right: 0;
text-align: center;
top: 0;
text-transform: capitalize;
font-weight: 400;
z-index: 9; }
.wp-customizer .wp-color-result-text {
display: none; }
.wp-color-result.wp-picker-open:after {
content: attr(data-current); }
.wp-core-ui .wp-picker-container .wp-color-result.button {
height: 30px !important;
border-radius: 3px;
padding: 0 0 0 40px !important; }
.wp-core-ui .color-alpha {
z-index: 1;
border-radius: 3px; }
.wp-full-overlay-sidebar-content {
z-index: 10000; }
.wp-full-overlay-sidebar-content::-webkit-scrollbar, .et-pb-main-settings::-webkit-scrollbar, ul.et_font_icon::-webkit-scrollbar, .accordion-section-content::-webkit-scrollbar {
width: 5px !important; }
.wp-full-overlay-sidebar-content::-webkit-scrollbar-track, .et-pb-main-settings::-webkit-scrollbar-track, ul.et_font_icon::-webkit-scrollbar-track, .accordion-section-content::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 0 rgba(0, 0, 0, 0.3) !important;
width: 20px !important; }
.wp-full-overlay-sidebar-content::-webkit-scrollbar-thumb, .et-pb-main-settings::-webkit-scrollbar-thumb, ul.et_font_icon::-webkit-scrollbar-thumb, .accordion-section-content::-webkit-scrollbar-thumb {
border-radius: 0 !important;
background: #d8d8d8 !important; }
.wp-full-overlay-sidebar-content::-webkit-thumb:window-inactive, .et-pb-main-settings::-webkit-scrollbar-thumb:window-inactive, ul.et_font_icon::-webkit-scrollbar-thumb:window-inactive, .accordion-section-content::-webkit-scrollbar-thumb:window-inactive {
background: #fff !important; }
#customize-control-et_divi-disable_custom_footer_credits {
margin-top: 15px; }
#customize-control-et_divi-boxed_layout {
margin-top: 20px; }
li#customize-control-et_divi-header_style {
margin-bottom: 20px; }
.accordion-section-content li.customize-control:first-of-type, .accordion-section-content li.customize-control:first-of-type .customize-control-title {
margin-top: 0 !important; }
.accordion-section-content {
padding: 20px;
background-color: #fff !important;
border-bottom: 1px solid #dddddd; }
li#customize-control-et_divi-use_sidebar_width {
margin-top: 15px !important; }
li#customize-control-et_divi-et_pb_sidebar-remove_border {
margin-top: 20px !important; }
/* ET_Select_Image */
.et_select_image_options {
display: none;
background: #eee;
padding: 5px 0;
height: 196px;
overflow: auto; }
.et_filter_text {
position: relative; }
.et_filter_text:before {
content: '';
width: 0;
height: 0;
border-color: #ccc transparent;
border-style: solid;
border-width: 6px 6px 0;
position: absolute;
top: 18px;
right: 8px;
z-index: 1; }
.et_select_image_options, .et_filter_text {
background: #fff;
border: 1px solid #dfdfdf;
border-radius: 3px; }
.et_filter_text, .et_select_image_options li {
display: block;
padding: 5px 10px;
text-indent: -9999px;
background-repeat: no-repeat;
height: 30px;
background-image: url(images/all-fonts.png);
margin-bottom: 0; }
.et_google_font_custom_select {
text-decoration: none;
color: #555d66; }
.et_google_font_custom_select:hover {
color: #555d66; }
.et_google_font_custom_select .et_filter_text {
text-indent: 0;
background-image: none; }
.et_select_image_active, .et_select_image_options li:hover {
background-color: #effbff; }
/* ET_Select_Image + footer columns */
.et_filter_text.et_si_4_column,
.et_select_image_options.et_si_et_divi_footer_columns_ .et_si_4_column {
background: url(../images/footer-layouts.png) center -10px no-repeat; }
.et_filter_text.et_si_3_column,
.et_select_image_options.et_si_et_divi_footer_columns_ .et_si_3_column {
background: url(../images/footer-layouts.png) center -60px no-repeat; }
.et_filter_text.et_si_2_column,
.et_select_image_options.et_si_et_divi_footer_columns_ .et_si_2_column {
background: url(../images/footer-layouts.png) center -110px no-repeat; }
.et_filter_text.et_si_1_column,
.et_select_image_options.et_si_et_divi_footer_columns_ .et_si_1_column {
background: url(../images/footer-layouts.png) center -160px no-repeat; }
.et_filter_text.et_si_1_4__3_4_column,
.et_select_image_options.et_si_et_divi_footer_columns_ .et_si_1_4__3_4_column {
background: url(../images/footer-layouts.png) center -210px no-repeat; }
.et_filter_text.et_si_3_4__1_4_column,
.et_select_image_options.et_si_et_divi_footer_columns_ .et_si_3_4__1_4_column {
background: url(../images/footer-layouts.png) center -260px no-repeat; }
.et_filter_text.et_si_1_3__2_3_column,
.et_select_image_options.et_si_et_divi_footer_columns_ .et_si_1_3__2_3_column {
background: url(../images/footer-layouts.png) center -310px no-repeat; }
.et_filter_text.et_si_2_3__1_3_column,
.et_select_image_options.et_si_et_divi_footer_columns_ .et_si_2_3__1_3_column {
background: url(../images/footer-layouts.png) center -360px no-repeat; }
.et_filter_text.et_si_1_4__1_2_column,
.et_select_image_options.et_si_et_divi_footer_columns_ .et_si_1_4__1_2_column {
background: url(../images/footer-layouts.png) center -410px no-repeat; }
.et_filter_text.et_si_1_2__1_4_column,
.et_select_image_options.et_si_et_divi_footer_columns_ .et_si_1_2__1_4_column {
background: url(../images/footer-layouts.png) center -460px no-repeat; }
.et_filter_text.et_si_1_5__3_5_column,
.et_select_image_options.et_si_et_divi_footer_columns_ .et_si_1_5__3_5_column {
background: url(../images/footer-layouts.png) center -510px no-repeat; }
.et_filter_text.et_si_3_5__1_5_column,
.et_select_image_options.et_si_et_divi_footer_columns_ .et_si_3_5__1_5_column {
background: url(../images/footer-layouts.png) center -560px no-repeat; }
.et_filter_text.et_si_5_column,
.et_select_image_options.et_si_et_divi_footer_columns_ .et_si_5_column {
background: url(../images/footer-layouts.png) center -610px no-repeat; }
.et_filter_text.et_si_3_5__2_5_column,
.et_select_image_options.et_si_et_divi_footer_columns_ .et_si_3_5__2_5_column {
background: url(../images/footer-layouts.png) center -660px no-repeat; }
.et_filter_text.et_si_2_5__3_5_column,
.et_select_image_options.et_si_et_divi_footer_columns_ .et_si_2_5__3_5_column {
background: url(../images/footer-layouts.png) center -710px no-repeat; }
.et_filter_text.et_si_6_column,
.et_select_image_options.et_si_et_divi_footer_columns_ .et_si_6_column {
background: url(../images/footer-layouts.png) center -760px no-repeat; }
.et_filter_text.et_si_1_2__1_6_column,
.et_select_image_options.et_si_et_divi_footer_columns_ .et_si_1_2__1_6_column {
background: url(../images/footer-layouts.png) center -810px no-repeat; }
.et_filter_text.et_si_1_6__1_2_column,
.et_select_image_options.et_si_et_divi_footer_columns_ .et_si_1_6__1_2_column {
background: url(../images/footer-layouts.png) center -860px no-repeat; }
.et_filter_text.et_si_1_4_1_2_1_4_column,
.et_select_image_options.et_si_et_divi_footer_columns_ .et_si_1_4_1_2_1_4_column {
background: url(../images/footer-layouts.png) center -910px no-repeat; }
.et_filter_text.et_si_1_5_3_5_1_5_column,
.et_select_image_options.et_si_et_divi_footer_columns_ .et_si_1_5_3_5_1_5_column {
background: url(../images/footer-layouts.png) center -960px no-repeat; }
.et_select_image_options.et_si_et_divi_footer_columns_ li:hover {
background-color: #effbff; }
/* ET_Font_Style */
span.et_font_style {
margin-left: 0;
border-radius: 4px;
border: none;
-webkit-box-shadow: none;
box-shadow: none;
background: #f4f4f4;
padding: 6px 0;
float: left;
width: 23.5%;
margin-right: 2%;
text-align: center;
font-size: 14px;
color: #32373c; }
span.et_font_style:last-of-type {
margin-right: 0; }
input.et_font_style_checkbox {
display: none; }
span.et_font_style {
display: inline-block;
cursor: pointer; }
span.et_font_style.et_font_style_checked {
background: #2e86b9; }
span.et_font_style:before,
span.et_font_style.et_font_style_checked:before {
font-family: 'ETmodules';
font-size: 24px;
line-height: 40px;
display: inline-block;
vertical-align: middle;
speak: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; }
span.et_font_style:before {
color: #B7B7B7; }
span.et_font_style.et_font_style_checked:before {
color: #FFF;
margin: 0; }
span.et_font_style.et_font_value_bold:before,
span.et_font_style.et_font_style_checked.et_font_value_bold:before {
content: "\e622"; }
span.et_font_style.et_font_value_italic:before,
span.et_font_style.et_font_style_checked.et_font_value_italic:before {
content: "\e623"; }
span.et_font_style.et_font_value_underline:before,
span.et_font_style.et_font_style_checked.et_font_value_underline:before {
content: "\e621"; }
span.et_font_style.et_font_value_uppercase:before,
span.et_font_style.et_font_style_checked.et_font_value_uppercase:before {
content: "\e624"; }
/* Icon Picker styles */
ul.et_font_icon {
position: relative;
height: 120px;
overflow: scroll;
min-width: 260px;
width: 100%; }
.et_font_icon li:before {
font-family: 'ETmodules';
content: attr(data-icon);
speak: none;
font-weight: normal;
-webkit-font-feature-settings: normal;
font-feature-settings: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased; }
.et_font_icon li {
font-size: 16px;
display: inline-block;
background: #F4F4F4;
padding: 10px;
margin: 0;
cursor: pointer;
-webkit-transition: all .2s ease-in-out;
transition: all .2s ease-in-out; }
.et_font_icon .et_active {
background-color: #2E86B9;
color: #FFF;
border-radius: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px; }
/* Hide Widgets Panel in Modules Customizer */
.et_modules_customizer_option_set #accordion-panel-widgets {
display: none !important; }
/* Hide Nav Menus Panel in Modules Customizer */
.et_modules_customizer_option_set #accordion-panel-nav_menus {
display: none !important; }
.et_hidden_section {
display: none !important; }
/*!
Animate.css - http://daneden.me/animate
Licensed under the MIT license - http://opensource.org/licenses/MIT
Copyright (c) 2015 Daniel Eden
*/
@keyframes bounceIn {
0%, 20%, 40%, 60%, 80%, 100% {
-webkit-transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); }
0% {
opacity: 0;
-webkit-transform: scale3d(0.3, 0.3, 0.3);
transform: scale3d(0.3, 0.3, 0.3); }
20% {
-webkit-transform: scale3d(1.1, 1.1, 1.1);
transform: scale3d(1.1, 1.1, 1.1); }
40% {
-webkit-transform: scale3d(0.9, 0.9, 0.9);
transform: scale3d(0.9, 0.9, 0.9); }
60% {
opacity: 1;
-webkit-transform: scale3d(1.03, 1.03, 1.03);
transform: scale3d(1.03, 1.03, 1.03); }
80% {
-webkit-transform: scale3d(0.97, 0.97, 0.97);
transform: scale3d(0.97, 0.97, 0.97); }
100% {
opacity: 1;
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1); } }
@-webkit-keyframes bounceIn {
0%, 20%, 40%, 60%, 80%, 100% {
-webkit-transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); }
0% {
opacity: 0;
-webkit-transform: scale3d(0.3, 0.3, 0.3);
transform: scale3d(0.3, 0.3, 0.3); }
20% {
-webkit-transform: scale3d(1.1, 1.1, 1.1);
transform: scale3d(1.1, 1.1, 1.1); }
40% {
-webkit-transform: scale3d(0.9, 0.9, 0.9);
transform: scale3d(0.9, 0.9, 0.9); }
60% {
opacity: 1;
-webkit-transform: scale3d(1.03, 1.03, 1.03);
transform: scale3d(1.03, 1.03, 1.03); }
80% {
-webkit-transform: scale3d(0.97, 0.97, 0.97);
transform: scale3d(0.97, 0.97, 0.97); }
100% {
opacity: 1;
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1); } }
@-webkit-keyframes zoomIn {
0% {
opacity: 0;
-webkit-transform: scale3d(0.7, 0.7, 0.7);
transform: scale3d(0.7, 0.7, 0.7); }
50% {
opacity: 1; } }
@keyframes zoomIn {
0% {
opacity: 0;
-webkit-transform: scale3d(0.7, 0.7, 0.7);
transform: scale3d(0.7, 0.7, 0.7); }
50% {
opacity: 1; } }
/* End Animate.css */
/*# sourceMappingURL=theme-customizer-controls-styles.css.map*/

View File

@ -54,7 +54,7 @@ if ( ! function_exists( 'et_epanel_admin_js' ) ) {
if ( ! function_exists( 'et_epanel_enable_css_lint' ) ) {
function et_epanel_enable_css_lint( $settings ){
$modes = array( 'text/css', 'css', 'text/x-scss', 'text/x-less', 'text/x-sass' );
if ( in_array( $settings['codemirror']['mode'], $modes, true ) ) {
$settings['codemirror']['lint'] = true;
$settings['codemirror']['gutters'] = array( 'CodeMirror-lint-markers' );
@ -397,7 +397,7 @@ if ( ! function_exists( 'et_build_epanel' ) ) {
$et_upload_button_data = isset( $value['button_text'] ) ? sprintf( ' data-button_text="%1$s"', esc_attr( $value['button_text'] ) ) : '';
?>
<input id="<?php echo esc_attr( $value['id'] ); ?>" class="et-upload-field" type="text" size="90" name="<?php echo esc_attr( $value['id'] ); ?>" value="<?php echo esc_url( et_get_option( $value['id'], '', '', false, $is_new_global_setting, $global_setting_main_name, $global_setting_sub_name ) ); ?>" />
<input id="<?php echo esc_attr( $value['id'] ); ?>" class="et-upload-field" type="text" size="90" name="<?php echo esc_attr( $value['id'] ); ?>" value="<?php echo esc_url( strval( et_get_option( $value['id'], '', '', false, $is_new_global_setting, $global_setting_main_name, $global_setting_sub_name ) ) ); ?>" />
<div class="et-upload-buttons">
<span class="et-upload-image-reset"><?php esc_html_e( 'Reset', $themename ); ?></span>
<input class="et-upload-image-button" type="button"<?php echo et_core_esc_previously( $et_upload_button_data ); ?> value="<?php esc_attr_e( 'Upload', $themename ); ?>" />
@ -414,7 +414,7 @@ if ( ! function_exists( 'et_build_epanel' ) ) {
$et_use_option_values = ( isset( $value['et_array_for'] ) && in_array( $value['et_array_for'], array( 'pages', 'categories' ) ) ) ||
( isset( $value['et_save_values'] ) && $value['et_save_values'] ) ? true : false;
$et_option_db_value = et_get_option( $value['id'] );
$et_option_db_value = strval( et_get_option( $value['id'] ) );
if ( ( $et_use_option_values && ( $et_option_db_value === $option_key ) ) || ( stripslashes( $et_option_db_value ) === trim( stripslashes( $option ) ) ) || ( ! $et_option_db_value && isset( $value['std'] ) && stripslashes( $option ) === stripslashes( $value['std'] ) ) )
$et_select_active = ' selected="selected"';
@ -438,7 +438,7 @@ if ( ! function_exists( 'et_build_epanel' ) ) {
$class_name_last = 0 === $i % 3 ? ' last' : '';
if ( et_get_option( $value['id'] ) ) {
if ( in_array( $option, et_get_option( $value['id'] ) ) ) {
if ( in_array( $option, (array) et_get_option( $value['id'] ), true ) ) {
$checked = "checked=\"checked\"";
}
}
@ -474,7 +474,9 @@ if ( ! function_exists( 'et_build_epanel' ) ) {
foreach ( $value['options'] as $option ) {
$checked = '';
if ( et_get_option( $value['id'] ) !== false ) {
if ( in_array( $option, et_get_option( $value['id'] ) ) ) $checked = "checked=\"checked\"";
if ( in_array( $option, (array) et_get_option( $value['id'] ), true ) ) {
$checked = 'checked="checked"';
}
} elseif ( isset( $value['std'] ) ) {
if ( in_array( $option, $value['std'] ) ) {
$checked = "checked=\"checked\"";
@ -493,10 +495,10 @@ if ( ! function_exists( 'et_build_epanel' ) ) {
call_user_func( $value['function_name'] ); ?>
<?php } elseif ( 'et_color_palette' === $value['type'] ) {
$items_amount = isset( $value['items_amount'] ) ? $value['items_amount'] : 1;
$et_input_value = et_get_option( $value['id'], '', '', false, $is_new_global_setting, $global_setting_main_name, $global_setting_sub_name );
$items_amount = isset( $value['items_amount'] ) ? $value['items_amount'] : 1;
$et_input_value = strval( et_get_option( $value['id'], '', '', false, $is_new_global_setting, $global_setting_main_name, $global_setting_sub_name ) );
$et_input_value_processed = str_replace( '|', '', $et_input_value );
$et_input_value = ! empty( $et_input_value_processed ) ? $et_input_value : $value['std'];
$et_input_value = ! empty( $et_input_value_processed ) ? $et_input_value : $value['std'];
?>
<div class="et_pb_colorpalette_overview">
<?php

View File

@ -787,7 +787,7 @@ if ( ! function_exists( 'show_page_menu' ) ) {
//excluded pages
if ( $menupages = et_get_option( $shortname.'_menupages' ) ) {
$exclude_pages = implode( ",", $menupages );
$exclude_pages = is_array( $menupages ) ? implode( ',', $menupages ) : '';
}
//dropdown for pages
@ -825,7 +825,7 @@ if ( ! function_exists( 'show_categories_menu' ) ) {
//excluded categories
if ( $menucats = et_get_option( $shortname.'_menucats' ) ) {
$exclude_cats = implode( ",", $menucats );
$exclude_cats = implode( ',', (array) $menucats );
}
//hide empty categories
@ -1098,7 +1098,7 @@ if ( ! function_exists( 'elegant_titles_filter' ) ) {
#if the title is being displayed on the homepage
if ( ( is_home() || is_front_page() ) && ! elegant_is_blog_posts_page() ) {
if ( 'on' === et_get_option( $shortname . '_seo_home_title' ) ) {
$custom_title = et_get_option( $shortname . '_seo_home_titletext' );
$custom_title = strval( et_get_option( $shortname . '_seo_home_titletext' ) );
} else {
$seo_home_type = et_get_option( $shortname . '_seo_home_type' );
$seo_home_separate = et_get_option( $shortname . '_seo_home_separate' );
@ -1355,7 +1355,7 @@ function add_favicon(){
// If the `has_site_icon` function doesn't exist (ie we're on < WP 4.3) or if the site icon has not been set,
// and when we have a icon URL from theme option
if ( ( ! function_exists( 'has_site_icon' ) || ! has_site_icon() ) && false !== $favicon_url && '' !== $favicon_url ) {
if ( ( ! function_exists( 'has_site_icon' ) || ! has_site_icon() ) && ! empty( $favicon_url ) ) {
echo '<link rel="shortcut icon" href="' . esc_url( $favicon_url ) . '" />';
} elseif ( function_exists( 'has_site_icon' ) && has_site_icon() ) {
et_update_option( $shortname . '_favicon', '' );
@ -1377,7 +1377,7 @@ function et_create_images_temp_folder(){
if ( false !== $et_images_temp_folder ) return;
$uploads_dir = wp_upload_dir();
$destination_dir = ( false === $uploads_dir['error'] ) ? path_join( $uploads_dir['basedir'], 'et_temp' ) : null;
$destination_dir = ( false === $uploads_dir['error'] ) ? path_join( $uploads_dir['basedir'], 'et_temp' ) : '';
if ( ! wp_mkdir_p( $destination_dir ) ) update_option( 'et_images_temp_folder', '' );
else {

View File

@ -14,7 +14,9 @@ function et_setup_theme() {
$template_directory = get_template_directory();
require_once $template_directory . '/core/init.php';
require_once $template_directory . '/common/init.php';
et_common_setup();
et_core_setup( get_template_directory_uri() );
if ( '3.0.61' === ET_CORE_VERSION ) {
@ -66,6 +68,9 @@ function et_setup_theme() {
add_theme_support( 'customize-selective-refresh-widgets' );
// Block editor supports.
add_theme_support( 'wp-block-styles' );
remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 );
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );
@ -7497,7 +7502,7 @@ function et_pb_print_font_style( $styles = '', $important = '' ) {
// Prepare variable
$font_styles = "";
if ( '' !== $styles && false !== $styles ) {
if ( '' !== $styles && false !== $styles && ! is_null( $styles ) ) {
// Convert string into array
$styles_array = explode( '|', $styles );
@ -7749,7 +7754,7 @@ add_filter( 'admin_body_class', 'et_add_wp_version' );
* @return bool
*/
function et_divi_is_transparent_primary_nav() {
return 'rgba' == substr( et_get_option( 'primary_nav_bg', '#ffffff' ), 0, 4 );
return 'rgba' === substr( strval( et_get_option( 'primary_nav_bg', '#ffffff' ) ), 0, 4 );
}
function et_layout_body_class( $classes ) {
@ -7858,7 +7863,7 @@ function et_layout_body_class( $classes ) {
}
$logo = et_get_option( 'divi_logo', '' );
if ( '.svg' === substr( $logo, -4, 4 ) ) {
if ( '.svg' === substr( strval( $logo ), -4, 4 ) ) {
$classes[] = 'et_pb_svg_logo';
}
}
@ -7922,7 +7927,7 @@ function et_layout_post_class( $classes ) {
$post_id = get_the_ID();
$post_type = get_post_type( $post_id );
$template_name = basename( $template );
$template_name = ! empty( $template ) ? basename( $template ) : ''; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect -- We decided to ignore indentation change.
if ( 'page' === $post_type ) {
// Don't add the class to pages.
@ -7980,9 +7985,9 @@ if ( ! function_exists( 'et_divi_get_top_nav_items' ) ) {
function et_divi_get_top_nav_items() {
$items = new stdClass;
$items->phone_number = trim( et_get_option( 'phone_number' ) );
$items->phone_number = trim( strval( et_get_option( 'phone_number' ) ) );
$items->email = trim( et_get_option( 'header_email' ) );
$items->email = trim( strval( et_get_option( 'header_email' ) ) );
$items->contact_info_defined = $items->phone_number || $items->email;
@ -8502,7 +8507,7 @@ function et_get_footer_credits() {
$footer_credits = et_get_option( 'custom_footer_credits', '' );
if ( '' === trim( $footer_credits ) ) {
if ( '' === trim( strval( $footer_credits ) ) ) { // phpcs:ignore Generic.WhiteSpace.ScopeIndent.IncorrectExact -- We decided to ignore indentation change.
return et_get_safe_localization( sprintf( $credits_format, $original_footer_credits, 'p' ) );
}

View File

@ -65,11 +65,11 @@
<?php if ( $et_contact_info_defined ) : ?>
<div id="et-info">
<?php if ( '' !== ( $et_phone_number = et_get_option( 'phone_number' ) ) ) : ?>
<span id="et-info-phone"><?php echo et_core_esc_previously( et_sanitize_html_input_text( $et_phone_number ) ); ?></span>
<?php if ( ! empty( $et_phone_number = et_get_option( 'phone_number' ) ) ) : ?>
<span id="et-info-phone"><?php echo et_core_esc_previously( et_sanitize_html_input_text( strval( $et_phone_number ) ) ); ?></span>
<?php endif; ?>
<?php if ( '' !== ( $et_email = et_get_option( 'header_email' ) ) ) : ?>
<?php if ( ! empty( $et_email = et_get_option( 'header_email' ) ) ) : ?>
<a href="<?php echo esc_attr( 'mailto:' . $et_email ); ?>"><span id="et-info-email"><?php echo esc_html( $et_email ); ?></span></a>
<?php endif; ?>
@ -174,11 +174,11 @@
<?php if ( $et_contact_info_defined ) : ?>
<div id="et-info">
<?php if ( '' !== ( $et_phone_number = et_get_option( 'phone_number' ) ) ) : ?>
<span id="et-info-phone"><?php echo et_core_esc_previously( et_sanitize_html_input_text( $et_phone_number ) ); ?></span>
<?php if ( ! empty( $et_phone_number = et_get_option( 'phone_number' ) ) ) : ?>
<span id="et-info-phone"><?php echo et_core_esc_previously( et_sanitize_html_input_text( strval( $et_phone_number ) ) ); ?></span>
<?php endif; ?>
<?php if ( '' !== ( $et_email = et_get_option( 'header_email' ) ) ) : ?>
<?php if ( ! empty( $et_email = et_get_option( 'header_email' ) ) ) : ?>
<a href="<?php echo esc_attr( 'mailto:' . $et_email ); ?>"><span id="et-info-email"><?php echo esc_html( $et_email ); ?></span></a>
<?php endif; ?>
</div>

View File

@ -31,7 +31,7 @@ function et_divi_gb_content_widths( $content_widths = array() ) {
// Customizer value
$content_width = absint( et_get_option( 'content_width', '1080' ) ); // pixel
$use_sidebar_width = et_get_option( 'use_sidebar_width', false );
$sidebar_width = $use_sidebar_width ? intval( et_get_option( 'sidebar_width', 21 ) ) : 21; // percentage
$sidebar_width = $use_sidebar_width ? intval( et_get_option( 'sidebar_width', 20.875 ) ) : 20.875; // Format percentage.
$sidebar_padding = 5.5; // percentage
// Content width when no sidebar exist

View File

@ -40,6 +40,39 @@ function _et_pb_autoload_helpers_motion( $class ) {
require_once "module/helpers/motion/{$class}.php";
}
/**
* Autoloader for module mask style.
*
* @param string $class The class name.
*/
function _et_pb_autoload_mask_pattern_helpers( $class ) {
// For multipart classnames.
$class = str_replace( '_', '', $class );
require_once "feature/background-masks/{$class}.php";
}
/**
* Autoloader for module mask style.
*
* @param string $class The class name.
*/
function _et_pb_autoload_mask( $class ) {
// For multipart classnames.
$class = str_replace( '_', '', $class );
require_once "feature/background-masks/mask/{$class}.php";
}
/**
* Autoloader for module pattern style.
*
* @param string $class The class name.
*/
function _et_pb_autoload_pattern( $class ) {
// For multipart classnames.
$class = str_replace( '_', '', $class );
require_once "feature/background-masks/pattern/{$class}.php";
}
/**
* Autoloader for module types.
*
@ -57,9 +90,11 @@ function _et_pb_autoload_types( $class ) {
* @param string $class The class name.
*/
function _et_pb_autoload_woo_modules( $class ) {
// For multipart classnames.
$class = str_replace( '_', '', $class );
require_once "module/woocommerce/{$class}.php";
if ( et_is_woocommerce_plugin_active() ) {
// For multipart classnames.
$class = str_replace( '_', '', $class );
require_once "module/woocommerce/{$class}.php";
}
}
/**
@ -73,6 +108,14 @@ function _et_pb_autoload_modules( $class ) {
if ( file_exists( ET_BUILDER_DIR . "module/{$class}.php" ) ) {
require_once "module/{$class}.php";
} elseif ( 'Shop' === $class && et_is_woocommerce_plugin_active() &&
/*
* ET_Builder_Module_Shop class moved to "woocommerce/" directory
* as part of WooCommerce Modules v2.
*/
file_exists( ET_BUILDER_DIR . "module/woocommerce/{$class}.php" ) ) {
require_once "module/woocommerce/${class}.php";
}
}
@ -111,6 +154,14 @@ function _et_pb_autoload( $class ) {
require_once 'class-et-builder-dynamic-assets-feature.php';
} elseif ( 'ET_Builder_Module_Field_DisplayConditions' === $class ) {
require_once 'module/field/DisplayConditions.php';
} elseif ( strpos( $class, 'ET_Builder_Background_Mask' ) !== false || strpos( $class, 'ET_Builder_Background_Pattern' ) !== false ) {
_et_pb_autoload_mask_pattern_helpers( str_replace( 'ET_Builder_', '', $class ) );
} elseif ( strpos( $class, 'ET_Builder_Mask_' ) !== false ) {
_et_pb_autoload_mask( str_replace( 'ET_Builder_Mask_', '', $class ) );
} elseif ( strpos( $class, 'ET_Builder_Pattern_' ) !== false ) {
_et_pb_autoload_pattern( str_replace( 'ET_Builder_Pattern_', '', $class ) );
} elseif ( 'ET_Builder_Woocommerce_Product_Simple_Placeholder' === $class ) {
require_once 'feature/woocommerce/placeholder/WoocommerceProductSimplePlaceholder.php';
} elseif ( strpos( $class, 'ET_Builder_Module_Helper_Motion_' ) !== false ) {
_et_pb_autoload_helpers_motion( str_replace( 'ET_Builder_Module_Helper_Motion_', '', $class ) );
} elseif ( strpos( $class, 'ET_Builder_Module_Helper_' ) !== false ) {

File diff suppressed because it is too large Load Diff

View File

@ -17,26 +17,26 @@ class ET_Builder_Module_Shortcode_Manager {
/**
* Modules container.
*
* @access private
* @access public
* @var array
*/
private $_modules_map = [];
public static $modules_map = [];
/**
* WooCommerce modules container.
*
* @access private
* @access public
* @var array
*/
private $_woo_modules_map = [];
public static $woo_modules_map = [];
/**
* Structural Modules container.
*
* @access private
* @access public
* @var array
*/
private $_structural_modules_map = [];
public static $structural_modules_map = [];
/**
* Initialize shortcode manager class.
@ -53,6 +53,27 @@ class ET_Builder_Module_Shortcode_Manager {
$this->register_shortcode();
}
/**
* Get modules map.
*
* @since 4.14.5
*
* @param string $type Modules map type.
*
* @return array Modules map.
*/
public static function get_modules_map( $type = false ) {
if ( 'woo_modules' === $type ) {
return self::$woo_modules_map;
}
if ( 'structural_modules' === $type ) {
return self::$structural_modules_map;
}
return self::$modules_map;
}
/**
* Start registering shortcodes.
*
@ -180,9 +201,6 @@ class ET_Builder_Module_Shortcode_Manager {
'et_pb_search' => [
'classname' => 'ET_Builder_Module_Search',
],
'et_pb_shop' => [
'classname' => 'ET_Builder_Module_Shop',
],
'et_pb_sidebar' => [
'classname' => 'ET_Builder_Module_Sidebar',
],
@ -251,7 +269,8 @@ class ET_Builder_Module_Shortcode_Manager {
* @param array $additional_modules Additional modules.
*/
$additional_modules = apply_filters( 'et_module_classes', [] );
$this->_modules_map = array_merge( $this->_modules_map, $modules, $additional_modules );
self::$modules_map = array_merge( self::$modules_map, $modules, $additional_modules );
}
/**
@ -309,7 +328,8 @@ class ET_Builder_Module_Shortcode_Manager {
* @param array $additional_modules Additional modules.
*/
$additional_modules = apply_filters( 'et_fullwidth_module_classes', [] );
$this->_modules_map = array_merge( $this->_modules_map, $modules, $additional_modules );
self::$modules_map = array_merge( self::$modules_map, $modules, $additional_modules );
}
/**
@ -348,8 +368,9 @@ class ET_Builder_Module_Shortcode_Manager {
*
* @param array $additional_modules Additional modules.
*/
$additional_modules = apply_filters( 'et_structural_module_classes', [] );
$this->_structural_modules_map = array_merge( $modules, $additional_modules );
$additional_modules = apply_filters( 'et_structural_module_classes', [] );
self::$structural_modules_map = array_merge( $modules, $additional_modules );
}
/**
@ -366,54 +387,81 @@ class ET_Builder_Module_Shortcode_Manager {
}
$woo_modules = [
'et_pb_wc_add_to_cart' => [
'et_pb_wc_add_to_cart' => [
'classname' => 'ET_Builder_Module_Woocommerce_Add_To_Cart',
],
'et_pb_wc_additional_info' => [
'et_pb_wc_additional_info' => [
'classname' => 'ET_Builder_Module_Woocommerce_Additional_Info',
],
'et_pb_wc_breadcrumb' => [
'et_pb_wc_breadcrumb' => [
'classname' => 'ET_Builder_Module_Woocommerce_Breadcrumb',
],
'et_pb_wc_cart_notice' => [
'et_pb_wc_cart_notice' => [
'classname' => 'ET_Builder_Module_Woocommerce_Cart_Notice',
],
'et_pb_wc_description' => [
'et_pb_wc_description' => [
'classname' => 'ET_Builder_Module_Woocommerce_Description',
],
'et_pb_wc_gallery' => [
'et_pb_wc_gallery' => [
'classname' => 'ET_Builder_Module_Woocommerce_Gallery',
],
'et_pb_wc_images' => [
'et_pb_wc_images' => [
'classname' => 'ET_Builder_Module_Woocommerce_Images',
],
'et_pb_wc_meta' => [
'et_pb_wc_meta' => [
'classname' => 'ET_Builder_Module_Woocommerce_Meta',
],
'et_pb_wc_price' => [
'et_pb_wc_price' => [
'classname' => 'ET_Builder_Module_Woocommerce_Price',
],
'et_pb_wc_rating' => [
'et_pb_wc_rating' => [
'classname' => 'ET_Builder_Module_Woocommerce_Rating',
],
'et_pb_wc_related_products' => [
'et_pb_wc_related_products' => [
'classname' => 'ET_Builder_Module_Woocommerce_Related_Products',
],
'et_pb_wc_reviews' => [
'et_pb_wc_reviews' => [
'classname' => 'ET_Builder_Module_Woocommerce_Reviews',
],
'et_pb_wc_stock' => [
'et_pb_wc_stock' => [
'classname' => 'ET_Builder_Module_Woocommerce_Stock',
],
'et_pb_wc_tabs' => [
'et_pb_wc_tabs' => [
'classname' => 'ET_Builder_Module_Woocommerce_Tabs',
],
'et_pb_wc_title' => [
'et_pb_wc_title' => [
'classname' => 'ET_Builder_Module_Woocommerce_Title',
],
'et_pb_wc_upsells' => [
'et_pb_wc_upsells' => [
'classname' => 'ET_Builder_Module_Woocommerce_Upsells',
],
'et_pb_wc_cart_products' => [
'classname' => 'ET_Builder_Module_Woocommerce_Cart_Products',
],
'et_pb_wc_cross_sells' => [
'classname' => 'ET_Builder_Module_Woocommerce_Cross_Sells',
],
'et_pb_wc_cart_totals' => [
'classname' => 'ET_Builder_Module_Woocommerce_Cart_Totals',
],
'et_pb_wc_checkout_billing' => [
'classname' => 'ET_Builder_Module_Woocommerce_Checkout_Billing',
],
'et_pb_wc_checkout_shipping' => [
'classname' => 'ET_Builder_Module_Woocommerce_Checkout_Shipping',
],
'et_pb_wc_checkout_order_details' => [
'classname' => 'ET_Builder_Module_Woocommerce_Checkout_Order_Details',
],
'et_pb_wc_checkout_payment_info' => [
'classname' => 'ET_Builder_Module_Woocommerce_Checkout_Payment_Info',
],
'et_pb_wc_checkout_additional_info' => [
'classname' => 'ET_Builder_Module_Woocommerce_Checkout_Additional_Info',
],
'et_pb_shop' => [
'classname' => 'ET_Builder_Module_Shop',
],
];
/**
@ -429,9 +477,10 @@ class ET_Builder_Module_Shortcode_Manager {
*
* @param array $additional_modules Additional modules.
*/
$additional_modules = apply_filters( 'et_woo_module_classes', [] );
$this->_woo_modules_map = $woo_modules;
$this->_modules_map = array_merge( $this->_modules_map, $woo_modules, $additional_modules );
$additional_modules = apply_filters( 'et_woo_module_classes', [] );
self::$woo_modules_map = $woo_modules;
self::$modules_map = array_merge( self::$modules_map, $woo_modules, $additional_modules );
}
/**
@ -502,7 +551,7 @@ class ET_Builder_Module_Shortcode_Manager {
public function register_lazy_shortcodes() {
// A fake handler has to be registered for every shortcode, otherways
// code will exit early and the pre_do_shortcode_tag hook won't be executed.
foreach ( $this->_modules_map as $shortcode_slug => $module_data ) {
foreach ( self::$modules_map as $shortcode_slug => $module_data ) {
add_shortcode( $shortcode_slug, '__return_empty_string' );
}
@ -550,7 +599,7 @@ class ET_Builder_Module_Shortcode_Manager {
// Only compute this once.
if ( empty( $module_slugs ) ) {
$module_slugs = array_keys( $this->_woo_modules_map );
$module_slugs = array_keys( self::$woo_modules_map );
}
return array_unique( array_merge( $loaded, $module_slugs ) );
@ -569,7 +618,7 @@ class ET_Builder_Module_Shortcode_Manager {
// Only compute this once.
if ( empty( $module_slugs ) ) {
$module_slugs = array_keys( $this->_modules_map );
$module_slugs = array_keys( self::$modules_map );
}
return array_unique( array_merge( $loaded, $module_slugs ) );
@ -588,7 +637,7 @@ class ET_Builder_Module_Shortcode_Manager {
// Only compute this once.
if ( empty( $structural_module_slugs ) ) {
$structural_module_slugs = array_keys( $this->_structural_modules_map );
$structural_module_slugs = array_keys( self::$structural_modules_map );
}
return array_unique( array_merge( $loaded, $structural_module_slugs ) );
@ -618,12 +667,12 @@ class ET_Builder_Module_Shortcode_Manager {
*/
public function maybe_load_module_from_slug( $tag ) {
if ( empty( $this->_modules_map[ $tag ] ) ) {
if ( empty( self::$modules_map[ $tag ] ) ) {
// None of our business.
return;
}
$module =& $this->_modules_map[ $tag ];
$module =& self::$modules_map[ $tag ];
if ( empty( $module['instance'] ) ) {
/**

View File

@ -223,11 +223,22 @@ class ET_Builder_Post_Feature_Base {
$tb_data[ $tb_id ] = $tb_post->post_modified_gmt;
}
// Ignore WP Editor template if current page use TB.
$wpe_data = [];
if ( empty( $tb_data ) ) {
$wpe_ids = $dynamic_assets->get_wp_editor_template_ids();
foreach ( $wpe_ids as $wpe_id ) {
$wpe_post = get_post( $wpe_id );
$wpe_data[ $wpe_id ] = $wpe_post->post_modified_gmt;
}
}
return array(
'gph' => ET_Builder_Global_Presets_History::instance()->get_global_history_index(),
'divi' => et_get_theme_version(),
'wp' => $wp_version,
'tb' => $tb_data,
'wpe' => $wpe_data,
);
}

View File

@ -77,14 +77,17 @@ class ET_Global_Settings {
);
$background_gradient_defaults = array(
'start' => '#2b87da',
'end' => '#29c4a9',
'stops' => '#2b87da 0%|#29c4a9 100%',
'type' => 'linear',
'direction' => '180deg',
'direction_radial' => 'center',
'repeat' => 'off',
'unit' => '%',
'overlays_image' => 'off',
'start' => '#2b87da',
'end' => '#29c4a9',
'start_position' => '0%',
'end_position' => '100%',
'overlays_image' => 'off',
);
$background_image_defaults = array(
@ -119,14 +122,21 @@ class ET_Global_Settings {
$hover->get_hover_field( 'all_buttons_border_radius' ) => '3',
$hover->get_hover_field( 'all_buttons_spacing' ) => '0',
// Global: Background Gradients.
'all_background_gradient_start' => $background_gradient_defaults['start'],
'all_background_gradient_end' => $background_gradient_defaults['end'],
'all_background_gradient_repeat' => $background_gradient_defaults['repeat'],
'all_background_gradient_type' => $background_gradient_defaults['type'],
'all_background_gradient_direction' => $background_gradient_defaults['direction'],
'all_background_gradient_direction_radial' => $background_gradient_defaults['direction_radial'],
'all_background_gradient_start_position' => $background_gradient_defaults['start_position'],
'all_background_gradient_end_position' => $background_gradient_defaults['end_position'],
'all_background_gradient_stops' => $background_gradient_defaults['stops'],
'all_background_gradient_unit' => $background_gradient_defaults['unit'],
'all_background_gradient_overlays_image' => $background_gradient_defaults['overlays_image'],
// Deprecated.
'all_background_gradient_start' => $background_gradient_defaults['start'],
// Deprecated.
'all_background_gradient_end' => $background_gradient_defaults['end'],
// Deprecated.
'all_background_gradient_start_position' => $background_gradient_defaults['start_position'],
// Deprecated.
'all_background_gradient_end_position' => $background_gradient_defaults['end_position'],
// Global: Filters.
'all_filter_hue_rotate' => $filter_defaults['filter_hue_rotate'],
'all_filter_saturate' => $filter_defaults['filter_saturate'],

View File

@ -79,3 +79,51 @@ if ( defined( 'OP3_VERSION' ) ) {
// because the two aren't compatible.
et_builder_disable_jquery_body();
}
/**
* Sets the loading attr threshold based on Post meta.
*
* @param int $omit_threshold The number of media elements where the `loading`
* attribute will not be added. Default 1.
*
* @return int
*/
function et_builder_set_loading_attr_threshold_by_atf_content( $omit_threshold ) {
global $post;
if ( empty( $post ) ) {
return $omit_threshold;
}
$post_id = $post->ID;
$post_threshold = get_post_meta(
$post_id,
'_et_builder_dynamic_assets_loading_attr_threshold',
true
);
$post_threshold = absint( $post_threshold );
return $post_threshold > 1 ? $post_threshold : $omit_threshold;
}
/**
* Execute the following on `wp` hook.
*
* The loading attribute threshold is set on `wp` hook. This is because framework.php is run on `init` which determines the threshold value.
* Once the value is determined (happens only on first load), it is the saved on to post meta.
* The saved post meta is retrieved on every load until the page is changed or cache cleared.
* The value is then fed to WordPress using the `wp_omit_loading_attr_threshold` filter.
*
* @return void
*/
function et_builder_on_wp() {
add_filter(
'wp_omit_loading_attr_threshold',
'et_builder_set_loading_attr_threshold_by_atf_content'
);
}
add_action( 'wp', 'et_builder_on_wp' );

View File

@ -120,7 +120,7 @@ add_action( 'pre_get_posts', 'et_builder_wc_pre_get_posts' );
*/
function et_builder_wc_body_class( $classes ) {
if ( et_builder_used_in_wc_shop() ) {
$classes = array_diff( $classes, array( 'woocommerce', 'woocommerce-page' ) );
$classes = array_diff( $classes, array( 'woocommerce-page' ) );
}
return $classes;

View File

@ -38,10 +38,11 @@ if ( ! function_exists( 'et_builder_is_frontend' ) ) :
*/
function et_builder_is_frontend() {
// phpcs:disable WordPress.Security.NonceVerification.Recommended -- Only used to disable some FE optmizations.
$is_builder = isset( $_GET['et_fb'] ) || isset( $_GET['et_bfb'] );
$is_builder = isset( $_GET['et_fb'] ) || isset( $_GET['et_bfb'] );
$is_block_layout_preview = isset( $_GET['et_block_layout_preview'] );
// phpcs:enable
return $is_builder || is_admin() || wp_doing_ajax() || wp_doing_cron() ? false : true;
return $is_builder || is_admin() || wp_doing_ajax() || wp_doing_cron() || $is_block_layout_preview ? false : true;
}
endif;

View File

@ -112,7 +112,7 @@ if ( ! function_exists( 'et_builder_should_load_framework' ) ) :
}
$is_admin = is_admin();
$required_admin_pages = array( 'edit.php', 'post.php', 'post-new.php', 'admin.php', 'customize.php', 'edit-tags.php', 'admin-ajax.php', 'export.php', 'options-permalink.php', 'themes.php', 'revision.php', 'widgets.php' ); // list of admin pages where we need to load builder files.
$required_admin_pages = array( 'edit.php', 'post.php', 'post-new.php', 'admin.php', 'customize.php', 'edit-tags.php', 'admin-ajax.php', 'export.php', 'options-permalink.php', 'themes.php', 'revision.php', 'widgets.php', 'site-editor.php' ); // list of admin pages where we need to load builder files.
$specific_filter_pages = array( 'edit.php', 'post.php', 'post-new.php', 'admin.php', 'edit-tags.php' ); // list of admin pages where we need more specific filtering.
$post_id = (int) et_()->array_get( $_GET, 'post', 0 );
@ -149,9 +149,27 @@ if ( ! function_exists( 'et_builder_should_load_framework' ) ) :
}
endif;
if ( ! function_exists( 'et_builder_load_library' ) ) :
/**
* Load Divi Library and Divi Cloud.
*
* @return void
*/
function et_builder_load_library() {
// Initialize the Divi Library.
require_once ET_BUILDER_DIR . 'feature/Library.php';
// Initialize DiviCloud.
if ( defined( 'ET_BUILDER_PLUGIN_ACTIVE' ) ) {
require_once ET_BUILDER_PLUGIN_DIR . '/cloud/cloud-app.php';
} else {
require_once get_template_directory() . '/cloud/cloud-app.php';
}
}
endif;
if ( et_builder_should_load_framework() ) {
// Initialize the Divi Library.
require_once ET_BUILDER_DIR . 'feature/Library.php';
et_builder_load_library();
}
if ( ! function_exists( 'et_builder_maybe_enable_inline_styles' ) ) :
@ -624,6 +642,9 @@ function et_builder_get_enabled_builder_post_types() {
*/
$options = apply_filters( 'et_builder_enabled_builder_post_type_options', array() );
// Ensure $options value type is array.
$options = is_array( $options ) ? $options : array();
foreach ( $default as $post_type ) {
if ( ! isset( $options[ $post_type ] ) ) {
$options[ $post_type ] = 'on';
@ -1400,6 +1421,7 @@ if ( ! function_exists( 'et_pb_add_new_layout' ) ) {
die();
}
$layout_location = et_()->array_get_sanitized( $processed_data_array, 'et_pb_template_cloud', 'local' );
$layout_type = et_()->array_get_sanitized( $processed_data_array, 'new_template_type', 'layout' );
$layout_is_global = 'global' === et_()->array_get( $processed_data_array, 'et_pb_template_global', 'not_global' );
if ( 'layout' === $layout_type ) {
@ -1410,11 +1432,14 @@ if ( ! function_exists( 'et_pb_add_new_layout' ) ) {
$args = array(
'layout_type' => $layout_type,
'layout_selected_cats' => ! empty( $processed_data_array['selected_cats'] ) ? sanitize_text_field( $processed_data_array['selected_cats'] ) : '',
'layout_selected_tags' => ! empty( $processed_data_array['selected_tags'] ) ? sanitize_text_field( $processed_data_array['selected_tags'] ) : '',
'built_for_post_type' => ! empty( $processed_data_array['et_builder_layout_built_for_post_type'] ) ? sanitize_text_field( $processed_data_array['et_builder_layout_built_for_post_type'] ) : 'page',
'layout_new_cat' => ! empty( $processed_data_array['et_pb_new_cat_name'] ) ? sanitize_text_field( $processed_data_array['et_pb_new_cat_name'] ) : '',
'layout_new_tag' => ! empty( $processed_data_array['et_pb_new_tag_name'] ) ? sanitize_text_field( $processed_data_array['et_pb_new_tag_name'] ) : '',
'columns_layout' => ! empty( $processed_data_array['et_columns_layout'] ) ? sanitize_text_field( $processed_data_array['et_columns_layout'] ) : '0',
'module_type' => ! empty( $processed_data_array['et_module_type'] ) ? sanitize_text_field( $processed_data_array['et_module_type'] ) : 'et_pb_unknown',
'layout_scope' => $layout_is_global ? 'global' : 'not_global',
'layout_location' => $layout_location,
'module_width' => 'regular',
'layout_content' => ! empty( $processed_data_array['template_shortcode'] ) ? $processed_data_array['template_shortcode'] : '',
'layout_name' => ! empty( $processed_data_array['et_pb_new_template_name'] ) ? sanitize_text_field( $processed_data_array['et_pb_new_template_name'] ) : '',
@ -1492,12 +1517,18 @@ if ( ! function_exists( 'et_pb_submit_layout' ) ) :
}
$layout_cats_processed = array();
$layout_tags_processed = array();
if ( '' !== $args['layout_selected_cats'] ) {
$layout_cats_array = explode( ',', $args['layout_selected_cats'] );
$layout_cats_processed = array_map( 'intval', $layout_cats_array );
}
if ( '' !== $args['layout_selected_tags'] ) {
$layout_tags_array = explode( ',', $args['layout_selected_tags'] );
$layout_tags_processed = array_map( 'intval', $layout_tags_array );
}
$meta = array();
if ( 'row' === $args['layout_type'] && '0' !== $args['columns_layout'] ) {
@ -1521,9 +1552,11 @@ if ( ! function_exists( 'et_pb_submit_layout' ) ) :
'layout_type' => $args['layout_type'],
'module_width' => $args['module_width'],
'layout_category' => $layout_cats_processed,
'layout_tag' => $layout_tags_processed,
'layout_location' => et_()->array_get_sanitized( $args, 'layout_location', 'local' ),
);
$new_layout_id = et_pb_create_layout( $args['layout_name'], $args['layout_content'], $meta, $tax_input, $args['layout_new_cat'] );
$new_layout_id = et_pb_create_layout( $args['layout_name'], $args['layout_content'], $meta, $tax_input, $args['layout_new_cat'], $args['layout_new_tag'] );
$new_post_data['post_id'] = (int) $new_layout_id;
$new_post_data['edit_link'] = esc_url_raw( get_edit_post_link( $new_layout_id ) );
@ -1543,11 +1576,11 @@ if ( ! function_exists( 'et_pb_create_layout' ) ) :
* @param array $tax_input Array of taxonomy terms keyed by their taxonomy name.
* @param string $new_category The layout category.
*/
function et_pb_create_layout( $name, $content, $meta = array(), $tax_input = array(), $new_category = '' ) {
function et_pb_create_layout( $name, $content, $meta = array(), $tax_input = array(), $new_category = '', $new_tag = '', $post_status = 'publish' ) {
$layout = array(
'post_title' => sanitize_text_field( $name ),
'post_content' => $content,
'post_status' => 'publish',
'post_status' => $post_status,
'post_type' => ET_BUILDER_LAYOUT_POST_TYPE,
);
@ -1558,18 +1591,40 @@ if ( ! function_exists( 'et_pb_create_layout' ) ) :
add_post_meta( $layout_id, $meta_key, sanitize_text_field( $meta_value ) );
}
}
if ( '' !== $new_category ) {
$new_term_id = wp_insert_term( $new_category, 'layout_category' );
$tax_input['layout_category'][] = (int) $new_term_id['term_id'];
// Multiple categories could be provided.
$category_names = explode( ',', $new_category );
foreach ( $category_names as $term_name ) {
$new_term = wp_insert_term( $term_name, 'layout_category' );
if ( ! is_wp_error( $new_term ) && isset( $new_term['term_id'] ) ) {
$tax_input['layout_category'][] = (int) $new_term['term_id'];
}
}
}
if ( '' !== $new_tag ) {
// Multiple tags could be provided.
$tag_names = explode( ',', $new_tag );
foreach ( $tag_names as $term_name ) {
$new_term = wp_insert_term( $term_name, 'layout_tag' );
if ( ! is_wp_error( $new_term ) && isset( $new_term['term_id'] ) ) {
$tax_input['layout_tag'][] = (int) $new_term['term_id'];
}
}
}
if ( ! empty( $tax_input ) ) {
foreach ( $tax_input as $taxonomy => $terms ) {
wp_set_post_terms( $layout_id, $terms, $taxonomy );
}
}
return $layout_id;
return $layout_id;
}
}
endif;
@ -1594,6 +1649,7 @@ function et_pb_save_layout() {
'layout_selected_cats' => isset( $_POST['et_layout_cats'] ) ? sanitize_text_field( $_POST['et_layout_cats'] ) : '',
'built_for_post_type' => isset( $_POST['et_post_type'] ) ? sanitize_text_field( $_POST['et_post_type'] ) : 'page',
'layout_new_cat' => isset( $_POST['et_layout_new_cat'] ) ? sanitize_text_field( $_POST['et_layout_new_cat'] ) : '',
'layout_new_tag' => isset( $_POST['et_layout_new_tag'] ) ? sanitize_text_field( $_POST['et_layout_new_tag'] ) : '',
'columns_layout' => isset( $_POST['et_columns_layout'] ) ? sanitize_text_field( $_POST['et_columns_layout'] ) : '0',
'module_type' => isset( $_POST['et_module_type'] ) ? sanitize_text_field( $_POST['et_module_type'] ) : 'et_pb_unknown',
'layout_scope' => isset( $_POST['et_layout_scope'] ) ? sanitize_text_field( $_POST['et_layout_scope'] ) : 'not_global',
@ -2476,6 +2532,9 @@ function et_fb_get_nonces() {
'processImportedData' => wp_create_nonce( 'et_fb_process_imported_data_nonce' ),
'retrieveLibraryModules' => wp_create_nonce( 'et_fb_retrieve_library_modules_nonce' ),
'saveLibraryModules' => wp_create_nonce( 'et_fb_save_library_modules_nonce' ),
'clearTempPresets' => wp_create_nonce( 'et_fb_clear_temp_presets_nonce' ),
'saveCloudItemContent' => wp_create_nonce( 'et_fb_save_cloud_item_nonce' ),
'removeLibraryModules' => wp_create_nonce( 'et_fb_remove_library_modules_nonce' ),
'preview' => wp_create_nonce( 'et_pb_preview_nonce' ),
'autosave' => wp_create_nonce( 'et_fb_autosave_nonce' ),
'moduleEmailOptinFetchLists' => wp_create_nonce( 'et_builder_email_fetch_lists_nonce' ),
@ -2485,7 +2544,11 @@ function et_fb_get_nonces() {
'abTestingReport' => wp_create_nonce( 'ab_testing_builder_nonce' ),
'libraryLayoutsData' => wp_create_nonce( 'et_builder_library_get_layouts_data' ),
'libraryGetLayout' => wp_create_nonce( 'et_builder_library_get_layout' ),
'libraryUpdateLayout' => wp_create_nonce( 'et_builder_library_update_layout' ),
'libraryUpdateTerms' => wp_create_nonce( 'et_builder_library_update_terms' ),
'libraryUpdateLocation' => wp_create_nonce( 'et_builder_library_toggle_item_location' ),
'libraryUpdateAccount' => wp_create_nonce( 'et_builder_library_update_account' ),
'libraryGetCloudToken' => wp_create_nonce( 'et_builder_library_get_cloud_token' ),
'fetchAttachments' => wp_create_nonce( 'et_fb_fetch_attachments' ),
'droploaderProcess' => wp_create_nonce( 'et_builder_droploader_process_nonce' ),
'resolvePostContent' => wp_create_nonce( 'et_fb_resolve_post_content' ),
@ -2504,8 +2567,11 @@ function et_fb_get_nonces() {
'getTags' => wp_create_nonce( 'et_builder_ajax_get_tags' ),
'searchProducts' => wp_create_nonce( 'et_builder_ajax_search_products' ),
'getDisplayConditionsStatus' => wp_create_nonce( 'et_builder_ajax_get_display_conditions_status' ),
'getPostMetaFields' => wp_create_nonce( 'et_builder_ajax_get_post_meta_fields' ),
'globalColorsSave' => wp_create_nonce( 'et_builder_global_colors_save' ),
'defaultColorsUpdate' => wp_create_nonce( 'et_builder_default_colors_update' ),
'saveDomainToken' => wp_create_nonce( 'et_builder_ajax_save_domain_token' ),
'beforeAfterComponents' => wp_create_nonce( 'et_fb_fetch_before_after_components_nonce' ),
);
return array_merge( $nonces, $fb_nonces );
@ -4832,6 +4898,23 @@ if ( ! function_exists( 'et_fb_is_computed_callback_ajax' ) ) :
}
endif;
if ( ! function_exists( 'et_fb_is_before_after_components_callback_ajax' ) ) :
/**
* Returns whether current request is before & after components callback AJAX call.
*
* @since 4.14.5
*
* @return bool
*/
function et_fb_is_before_after_components_callback_ajax() {
// phpcs:disable WordPress.Security.NonceVerification -- This function does not change any state, and is therefore not susceptible to CSRF.
$action = ! empty( $_REQUEST['action'] ) ? sanitize_text_field( $_REQUEST['action'] ) : '';
return wp_doing_ajax() && 'et_fb_fetch_before_after_components' === $action;
// phpcs:enable
}
endif;
if ( ! function_exists( 'et_fb_is_resolve_post_content_callback_ajax' ) ) :
/**
* Returns whether current request is resolve post content callback AJAX call
@ -6539,7 +6622,10 @@ function et_builder_add_builder_content_wrapper( $content ) {
*
* @param bool $wrap
*/
$wrap = apply_filters( 'et_builder_add_outer_content_wrap', true );
$post_id = is_singular() ? get_the_ID() : 0;
$is_custom_post_type = et_builder_post_is_of_custom_post_type( $post_id ) && ! ET_Builder_Element::is_theme_builder_layout();
$should_content_be_wrapped = $is_custom_post_type || et_is_builder_plugin_active() || et_core_is_fb_enabled();
$wrap = apply_filters( 'et_builder_add_outer_content_wrap', $should_content_be_wrapped );
if ( $wrap ) {
$content = et_builder_get_builder_content_opening_wrapper() . $content . et_builder_get_builder_content_closing_wrapper();
@ -7116,11 +7202,12 @@ function et_builder_filter_main_query_paged_for_blog_module( $query ) {
*
* @var integer
*/
global $__et_blog_module_paged;
global $__et_blog_module_paged, $__et_portfolio_module_paged;
// phpcs:ignore WordPress.Security.NonceVerification -- This function does not change any state, and is therefore not susceptible to CSRF.
if ( isset( $_GET['et_blog'] ) && $query->is_main_query() ) {
$__et_blog_module_paged = $query->get( 'paged' );
if ( ( isset( $_GET['et_blog'] ) || isset( $_GET['et_portfolio'] ) ) && $query->is_main_query() ) {
$__et_blog_module_paged = $query->get( 'paged' );
$__et_portfolio_module_paged = $query->get( 'paged' );
$query->set( 'paged', 0 );
}
}

View File

@ -276,7 +276,16 @@ class ET_Builder_Ajax_Cache {
self::$_instance = new self();
}
return self::$_instance;
/**
* Filters the cache class instance that for caches AJAX requests.
*
* @param ET_Builder_Ajax_Cache Cache Instance
*
* @see GlobalHistoryMigrationTest
*
* @since 4.14.0
*/
return apply_filters( 'et_builder_ajax_cache_instance', self::$_instance );
}
}

View File

@ -214,6 +214,12 @@ class ET_Builder_Block_Editor_Integration {
'status' => get_site_option( 'et_account_status', 'not_active' ),
);
if ( defined( 'ET_CLOUD_PLUGIN_DIR' ) ) {
$library_i18n = require ET_CLOUD_PLUGIN_DIR . '/i18n/library.php';
} else {
$library_i18n = require get_template_directory() . '/cloud/i18n/library.php';
}
// Set helpers needed by our own Gutenberg bundle.
$gutenberg = array(
'helpers' => array(
@ -243,6 +249,7 @@ class ET_Builder_Block_Editor_Integration {
'default' => esc_html__( 'Use Default Editor', 'et_builder' ),
),
),
'library' => $library_i18n,
),
),
@ -267,9 +274,8 @@ class ET_Builder_Block_Editor_Integration {
'et_rest_process_builder_edit_data' => wp_create_nonce( 'et_rest_process_builder_edit_data' ),
),
'urls' => array(
'adminAjax' => admin_url( 'admin-ajax.php' ),
'diviLibrary' => ET_BUILDER_DIVI_LIBRARY_URL,
'home' => home_url( '/' ),
'adminAjax' => admin_url( 'admin-ajax.php' ),
'home' => home_url( '/' ),
),
/**
* Make DOM selectors list filterable so third party can modified it if needed
@ -308,6 +314,30 @@ class ET_Builder_Block_Editor_Integration {
// Set translated strings for the scripts.
wp_set_script_translations( 'et-builder-gutenberg', 'et_builder', ET_BUILDER_DIR . 'languages' );
ET_Cloud_App::load_js( true, true );
// Block Editor Styles.
// Divi Layout Block.
wp_register_style( 'et-block-divi-library-editor', ET_BUILDER_URI . '/frontend-builder/assets/css/block-editor/divi-library-editor.css', array(), ET_BUILDER_VERSION );
wp_register_style( 'et-block-layout-editor', ET_BUILDER_URI . '/frontend-builder/assets/css/block-editor/layout-editor.css', array( 'et-block-divi-library-editor' ), ET_BUILDER_VERSION );
register_block_type(
'et-block-editor/et-block-layout-editor-stylesheets',
array(
'editor_style' => 'et-block-layout-editor',
)
);
// Divi Placeholder Block.
wp_register_style( 'et-block-placeholder-editor', ET_BUILDER_URI . '/frontend-builder/assets/css/block-editor/placeholder-editor.css', array( 'et-core-admin' ), ET_BUILDER_VERSION );
register_block_type(
'et-block-editor/et-block-placeholder-editor-stylesheets',
array(
'editor_style' => 'et-block-placeholder-editor',
)
);
}
/**
@ -675,8 +705,16 @@ class ET_Builder_Block_Editor_Integration {
* @return void
*/
public function init_hooks() {
global $pagenow;
$edit_page_names = array( 'post.php', 'post-new.php', 'site-editor.php' );
$is_editing_page = in_array( $pagenow, $edit_page_names, true );
if ( is_admin() ) {
add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_block_editor_assets' ), 4 );
// Load assets on post editing pages only.
if ( $is_editing_page ) {
add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_block_editor_assets' ), 4 );
}
add_action( 'admin_print_scripts-edit.php', array( $this, 'add_new_button' ), 10 );
add_action( 'admin_init', array( $this, 'add_edit_link_filters' ) );
@ -748,6 +786,13 @@ class ET_Builder_Block_Editor_Integration {
'type' => 'string',
);
register_meta( 'post', '_et_gb_content_width', $args );
if ( $is_editing_page ) {
// Load Library and Cloud.
et_builder_load_library();
}
}
}

View File

@ -1,162 +0,0 @@
<?php
/**
* Block Templates Compatibility.
*
* @package Builder
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Block Templates Compatibility Class.
*
* @since 4.9.8
*/
class ET_Builder_Block_Templates {
/**
* Instance of `ET_Builder_Block_Templates`.
*
* @var ET_Builder_Block_Templates
*/
private static $_instance;
/**
* ET_Builder_Block_Templates constructor.
*/
public function __construct() {
$this->set_query_templates_filters();
}
/**
* Get the class instance.
*
* @since 4.9.8
*
* @return ET_Builder_Block_Templates
*/
public static function instance() {
if ( ! self::$_instance ) {
self::$_instance = new self();
}
return self::$_instance;
}
/**
* Set query templates filters to override block templates.
*
* @since 4.9.8
*/
public function set_query_templates_filters() {
// Bail early if current active builder is not DBP.
if ( ! et_is_builder_plugin_active() ) {
return;
}
// Bail early if `locate_block_template` function doesn't exists (WP 5.8).
if ( ! function_exists( 'locate_block_template' ) ) {
return;
}
// Add those filters only when current active theme supports `block-templates` or
// has block templates index HTML.
if ( ! current_theme_supports( 'block-templates' ) && ! is_readable( get_stylesheet_directory() . '/block-templates/index.html' ) ) {
return;
}
/**
* List of possible hook names:
* - `404_template`
* - `archive_template`
* - `attachment_template` (Not Included)
* - `author_template`
* - `category_template`
* - `date_template`
* - `embed_template` (Not Included)
* - `frontpage_template`
* - `home_template`
* - `index_template`
* - `page_template`
* - `paged_template`
* - `privacypolicy_template`
* - `search_template`
* - `single_template`
* - `singular_template`
* - `tag_template`
* - `taxonomy_template`
*
* However we don't include `attachment`, `paged`, and `embed` because they are not
* modified or attached to TB tempates.
*/
$template_types = array(
'404_template',
'archive_template',
'author_template',
'category_template',
'date_template',
'frontpage_template',
'home_template',
'index_template',
'page_template',
'privacypolicy_template',
'search_template',
'single_template',
'singular_template',
'tag_template',
'taxonomy_template',
);
foreach ( $template_types as $template ) {
add_filter( $template, array( $this, 'get_custom_query_template' ), 30, 3 );
}
}
/**
* Get pre-defined query template to override block template (modified default template
* or custom template).
*
* @since 4.9.8
*
* @param string $template Path to the template. See locate_template().
* @param string $type Sanitized filename without extension.
* @param array $templates A list of template candidates, in descending order of priority.
*
* @return string Modified path to the template.
*/
public function get_custom_query_template( $template, $type, $templates ) {
// Bail early if there is no TB templates for current page request.
if ( empty( et_theme_builder_get_template_layouts() ) ) {
return $template;
}
// 1. Restore - Get pre-defined query template.
$original_template = $template;
$template = locate_template( $templates );
// If the `locate_template` return empty path because there is no template or theme
// theme compat found, use builder block template canvas.
if ( empty( $template ) && 'template-canvas.php' === basename( $original_template ) ) {
$template = ET_BUILDER_DIR . 'templates/block-template-canvas.php';
}
// 2. Remove hooks added for template canvas (block template).
// Remove viewport meta tag.
if ( function_exists( '_block_template_viewport_meta_tag' ) ) {
remove_action( 'wp_head', '_block_template_viewport_meta_tag', 0 );
}
// Render conditional title tag for `title-tag` support.
add_action( 'wp_head', '_wp_render_title_tag', 1 );
// Remove unconditional title tag.
if ( function_exists( '_block_template_render_title_tag' ) ) {
remove_action( 'wp_head', '_block_template_render_title_tag', 1 );
}
return $template;
}
}
ET_Builder_Block_Templates::instance();

View File

@ -31,7 +31,7 @@ class ET_Builder_Do_Not_Cache_Page {
* ET_Builder_Do_Not_Cache_Page constructor.
*/
public function __construct() {
add_action( 'get_header', [ $this, 'maybe_prevent_cache' ] );
add_action( 'template_redirect', [ $this, 'maybe_prevent_cache' ] );
}
/**
@ -118,6 +118,8 @@ class ET_Builder_Do_Not_Cache_Page {
* @return void
*/
public function maybe_prevent_cache() {
global $shortname;
// Bail if the magic already happened.
if ( $this->_processed ) {
return;
@ -128,8 +130,11 @@ class ET_Builder_Do_Not_Cache_Page {
return;
}
$product = in_array( $shortname, [ 'divi', 'extra' ], true ) ? $shortname : 'divi-builder';
$post_id = et_core_page_resource_get_the_ID();
$is_preview = is_preview() || is_et_pb_preview();
$is_preview = is_preview() || is_et_pb_preview() || isset( $_GET['et_pb_preview_nonce'] ) || is_customize_preview(); // phpcs:disable WordPress.Security.NonceVerification.NoNonceVerification -- Only checks if the parameter exists, and is therefore not susceptible to CSRF.
$is_singular = et_core_page_resource_is_singular();
$is_cpt = et_builder_should_wrap_styles();
$forced_in_footer = $post_id && et_builder_setting_is_on( 'et_pb_css_in_footer', $post_id );
$forced_inline = (
! $post_id ||
@ -152,10 +157,11 @@ class ET_Builder_Do_Not_Cache_Page {
return;
}
$unified = ! $forced_inline && ! $forced_in_footer;
$owner = $unified ? 'core' : 'builder';
$slug = $unified ? 'unified' : 'module-design';
$slug .= $unified && et_builder_post_is_of_custom_post_type( $post_id ) ? '-cpt' : '';
$unified = $is_singular && ! $forced_inline && ! $forced_in_footer && et_core_is_builder_used_on_current_request();
$post_id = $unified ? $post_id : 'global';
$owner = $unified ? 'core' : $product;
$slug = $unified ? 'unified' : 'customizer';
$slug .= $is_cpt ? '-cpt' : '';
$slug = et_theme_builder_decorate_page_resource_slug( $post_id, $slug );
$resource = et_core_page_resource_get( $owner, $slug, $post_id );

View File

@ -29,11 +29,12 @@ class ET_Builder_I18n {
switch ( $key ) {
// To avoid breaking tests:
// 1. Do not remove `i18-list-begin` / `i18-list-end` tags.
// 2. One traslation per line.
// 2. One translation per line.
// 3. `et_builder` Text Domain only.
// 4. No comments / empty lines.
// 5. Keep the list ordered, if can't do with your IDE, switch to Emacs.
// i18-list-begin.
case 'Actual Size' : return esc_html__( 'Actual Size', 'et_builder' );
case 'Admin Label' : return esc_html__( 'Admin Label', 'et_builder' );
case 'Advanced' : return esc_html__( 'Advanced', 'et_builder' );
case 'After' : return esc_html__( 'After', 'et_builder' );
@ -51,15 +52,21 @@ class ET_Builder_I18n {
case 'Center Left' : return esc_html__( 'Center Left', 'et_builder' );
case 'Center Right' : return esc_html__( 'Center Right', 'et_builder' );
case 'Center' : return esc_html__( 'Center', 'et_builder' );
case 'Centimeters (cm)' : return esc_html__( 'Centimeters (cm)', 'et_builder' );
case 'Circle' : return esc_html__( 'Circle', 'et_builder' );
case 'Circular' : return esc_html__( 'Circular', 'et_builder' );
case 'Color Burn' : return esc_html__( 'Color Burn', 'et_builder' );
case 'Color Dodge' : return esc_html__( 'Color Dodge', 'et_builder' );
case 'Color' : return esc_html__( 'Color', 'et_builder' );
case 'Conical' : return esc_html__( 'Conical', 'et_builder' );
case 'Content' : return esc_html__( 'Content', 'et_builder' );
case 'Cover' : return esc_html__( 'Cover', 'et_builder' );
case 'Custom CSS' : return esc_html__( 'Custom CSS', 'et_builder' );
case 'Custom Size' : return esc_html__( 'Custom Size', 'et_builder' );
case 'Dark' : return esc_html__( 'Dark', 'et_builder' );
case 'Darken' : return esc_html__( 'Darken', 'et_builder' );
case 'Default' : return esc_html__( 'Default', 'et_builder' );
case 'Degrees (deg)' : return esc_html__( 'Degrees (deg)', 'et_builder' );
case 'Design' : return esc_html__( 'Design', 'et_builder' );
case 'Desktop' : return esc_html__( 'Desktop', 'et_builder' );
case 'Difference' : return esc_html__( 'Difference', 'et_builder' );
@ -70,13 +77,17 @@ class ET_Builder_I18n {
case 'Ease-In-Out' : return esc_html__( 'Ease-In-Out', 'et_builder' );
case 'Ease-Out' : return esc_html__( 'Ease-Out', 'et_builder' );
case 'Elements' : return esc_html__( 'Elements', 'et_builder' );
case 'Elliptical' : return esc_html__( 'Elliptical', 'et_builder' );
case 'Exclusion' : return esc_html__( 'Exclusion', 'et_builder' );
case 'Expand' : return esc_html__( 'Expand', 'et_builder' );
case 'Fade' : return esc_html__( 'Fade', 'et_builder' );
case 'Fit' : return esc_html__( 'Fit', 'et_builder' );
case 'Flip' : return esc_html__( 'Flip', 'et_builder' );
case 'Font size (em)' : return esc_html__( 'Font size (em)', 'et_builder' );
case 'Hard Light' : return esc_html__( 'Hard Light', 'et_builder' );
case 'Hue' : return esc_html__( 'Hue', 'et_builder' );
case 'Image' : return esc_html__( 'Image', 'et_builder' );
case 'Inches (in)' : return esc_html__( 'Inches (in)', 'et_builder' );
case 'Inside' : return esc_html__( 'Inside', 'et_builder' );
case 'Layout' : return esc_html__( 'Layout', 'et_builder' );
case 'Left' : return esc_html__( 'Left', 'et_builder' );
@ -86,7 +97,9 @@ class ET_Builder_I18n {
case 'Link' : return esc_html__( 'Link', 'et_builder' );
case 'Luminosity' : return esc_html__( 'Luminosity', 'et_builder' );
case 'Main Element' : return esc_html__( 'Main Element', 'et_builder' );
case 'Millimeters (mm)' : return esc_html__( 'Millimeters (mm)', 'et_builder' );
case 'Multiply' : return esc_html__( 'Multiply', 'et_builder' );
case 'No Repeat' : return esc_html__( 'No Repeat', 'et_builder' );
case 'No' : return esc_html__( 'No', 'et_builder' );
case 'None' : return esc_html__( 'None', 'et_builder' );
case 'Normal' : return esc_html__( 'Normal', 'et_builder' );
@ -94,17 +107,27 @@ class ET_Builder_I18n {
case 'On' : return esc_html__( 'On', 'et_builder' );
case 'Outside' : return esc_html__( 'Outside', 'et_builder' );
case 'Overlay' : return esc_html__( 'Overlay', 'et_builder' );
case 'Percent (%)' : return esc_html__( 'Percent (%)', 'et_builder' );
case 'Phone' : return esc_html__( 'Phone', 'et_builder' );
case 'Picas (pc)' : return esc_html__( 'Picas (pc)', 'et_builder' );
case 'Pixels (px)' : return esc_html__( 'Pixels (px)', 'et_builder' );
case 'Points (pt)' : return esc_html__( 'Points (pt)', 'et_builder' );
case 'Position' : return esc_html__( 'Position', 'et_builder' );
case 'Radial' : return esc_html__( 'Radial', 'et_builder' );
case 'Repeat X (horizontal)' : return esc_html__( 'Repeat X (horizontal)', 'et_builder' );
case 'Repeat Y (vertical)' : return esc_html__( 'Repeat Y (vertical)', 'et_builder' );
case 'Repeat and Stretch' : return esc_html__( 'Repeat and Stretch', 'et_builder' );
case 'Repeat with space between' : return esc_html__( 'Repeat with space between', 'et_builder' );
case 'Repeat' : return esc_html__( 'Repeat', 'et_builder' );
case 'Right' : return esc_html__( 'Right', 'et_builder' );
case 'Root-level font size (rem)' : return esc_html__( 'Root-level font size (rem)', 'et_builder' );
case 'Saturation' : return esc_html__( 'Saturation', 'et_builder' );
case 'Screen' : return esc_html__( 'Screen', 'et_builder' );
case 'Sizing' : return esc_html__( 'Sizing', 'et_builder' );
case 'Slide' : return esc_html__( 'Slide', 'et_builder' );
case 'Soft Light' : return esc_html__( 'Soft Light', 'et_builder' );
case 'Space' : return esc_html__( 'Space', 'et_builder' );
case 'Square' : return esc_html__( 'Square', 'et_builder' );
case 'Stretch to Fill' : return esc_html__( 'Stretch to Fill', 'et_builder' );
case 'Tablet' : return esc_html__( 'Tablet', 'et_builder' );
case 'Text' : return esc_html__( 'Text', 'et_builder' );
case 'Title' : return esc_html__( 'Title', 'et_builder' );
@ -114,8 +137,14 @@ class ET_Builder_I18n {
case 'Top' : return esc_html__( 'Top', 'et_builder' );
case 'Up' : return esc_html__( 'Up', 'et_builder' );
case 'Upload an image' : return esc_attr__( 'Upload an image', 'et_builder' );
case 'Viewport Height (vh)' : return esc_html__( 'Viewport Height (vh)', 'et_builder' );
case 'Viewport Maximum (vmax)' : return esc_html__( 'Viewport Maximum (vmax)', 'et_builder' );
case 'Viewport Minimum (vmin)' : return esc_html__( 'Viewport Minimum (vmin)', 'et_builder' );
case 'Viewport Width (vw)' : return esc_html__( 'Viewport Width (vw)', 'et_builder' );
case 'Visibility' : return esc_attr__( 'Visibility', 'et_builder' );
case 'X-height (ex)' : return esc_html__( 'X-height (ex)', 'et_builder' );
case 'Yes' : return esc_html__( 'Yes', 'et_builder' );
case 'Zero-width (ch)' : return esc_html__( 'Zero-width (ch)', 'et_builder' );
// i18-list-end.
}
// phpcs:enable

View File

@ -85,7 +85,9 @@ class ET_Builder_Library {
$this->_register_hooks();
$this->_register_ajax_callbacks();
self::$_i18n = require ET_BUILDER_DIR . '/frontend-builder/i18n/library.php';
$root_directory = defined( 'ET_BUILDER_PLUGIN_ACTIVE' ) ? ET_BUILDER_PLUGIN_DIR : get_template_directory();
self::$_i18n = require $root_directory . '/cloud/i18n/library.php';
self::$_standard_post_types = self::_standard_post_types();
}
@ -139,7 +141,7 @@ class ET_Builder_Library {
*/
protected static function _get_image_size_name( $type ) {
$names = array(
'thumbnail' => 'et-pb-portfolio-image',
'thumbnail' => 'full',
'thumbnail_small' => 'et-pb-portfolio-image',
'screenshot' => 'et-pb-portfolio-image-single',
);
@ -206,11 +208,11 @@ class ET_Builder_Library {
'id' => $category->term_id,
'name' => $category_name,
'slug' => $category->slug,
'layouts' => array(),
'items' => array(),
);
}
$layout_categories[ $category->term_id ]['layouts'][] = $index;
$layout_categories[ $category->term_id ]['items'][] = $index;
$layout->categories[] = $category_name;
$layout->category_ids[] = $category->term_id;
@ -231,6 +233,57 @@ class ET_Builder_Library {
}
}
/**
* Processes layout tags for inclusion in the library UI layouts data.
*
* @since 3.0.99
*
* @param WP_POST $post Unprocessed layout.
* @param object $layout Currently processing layout.
* @param int $index The layout's index position.
* @param array[] $layout_tags Processed layouts.
*/
protected function _process_layout_tags( $post, $layout, $index, &$layout_tags ) {
$terms = wp_get_post_terms( $post->ID, $this->layout_tags->name );
if ( ! $terms ) {
return;
}
foreach ( $terms as $tag ) {
$tag_name = self::__( html_entity_decode( $tag->name ), '@tags' );
$tag_name = et_core_intentionally_unescaped( $tag_name, 'react_jsx' );
if ( ! isset( $layout_tags[ $tag->term_id ] ) ) {
$layout_tags[ $tag->term_id ] = array(
'id' => $tag->term_id,
'name' => $tag_name,
'slug' => $tag->slug,
'items' => array(),
);
}
$layout_tags[ $tag->term_id ]['items'][] = $index;
$layout->tags[] = $tag_name;
$layout->tag_ids[] = $tag->term_id;
if ( ! isset( $layout->tag_slug ) ) {
$layout->tag_slug = $tag->slug;
}
$id = get_post_meta( $post->ID, self::$_primary_category_key, true );
if ( $id ) {
// $id is a string, $category->term_id is an int.
if ( $id === $tag->term_id ) {
// This is the primary category (used in the layout URL).
$layout->tag_slug = $tag->slug;
}
}
}
}
/**
* Processes layout packs for inclusion in the library UI layouts data.
*
@ -257,7 +310,7 @@ class ET_Builder_Library {
'name' => $pack_name,
'slug' => $pack->slug,
'date' => $layout->date,
'layouts' => array(),
'items' => array(),
);
}
@ -269,11 +322,14 @@ class ET_Builder_Library {
$layout_packs[ $pack->term_id ]['landing_index'] = $index;
}
$layout_packs[ $pack->term_id ]['layouts'][] = $index;
$layout_packs[ $pack->term_id ]['items'][] = $index;
$layout_packs[ $pack->term_id ]['categories'] = $layout->categories;
$layout_packs[ $pack->term_id ]['category_ids'] = $layout->category_ids;
$layout_packs[ $pack->term_id ]['tags'] = $layout->tags;
$layout_packs[ $pack->term_id ]['tag_ids'] = $layout->tag_ids;
$layout->pack = $pack_name;
$layout->pack_id = $pack->term_id;
}
@ -286,7 +342,15 @@ class ET_Builder_Library {
protected function _register_ajax_callbacks() {
add_action( 'wp_ajax_et_builder_library_get_layouts_data', array( $this, 'wp_ajax_et_builder_library_get_layouts_data' ) );
add_action( 'wp_ajax_et_builder_library_get_layout', array( $this, 'wp_ajax_et_builder_library_get_layout' ) );
add_action( 'wp_ajax_et_builder_library_update_terms', array( $this, 'wp_ajax_et_builder_library_update_terms' ) );
add_action( 'wp_ajax_et_builder_library_save_temp_layout', array( $this, 'wp_ajax_et_builder_library_save_temp_layout' ) );
add_action( 'wp_ajax_et_builder_library_update_item', array( $this, 'wp_ajax_et_builder_library_update_item' ) );
add_action( 'wp_ajax_et_builder_library_upload_thumbnail', array( $this, 'wp_ajax_et_builder_library_upload_thumbnail' ) );
add_action( 'wp_ajax_et_builder_library_update_account', array( $this, 'wp_ajax_et_builder_library_update_account' ) );
add_action( 'wp_ajax_et_builder_library_remove_temp_layout', array( $this, 'wp_ajax_et_builder_library_remove_temp_layout' ) );
add_action( 'wp_ajax_et_builder_toggle_cloud_status', array( $this, 'wp_ajax_et_builder_toggle_cloud_status' ) );
add_action( 'wp_ajax_et_builder_library_get_cloud_token', array( $this, 'wp_ajax_et_builder_library_get_cloud_token' ) );
add_action( 'wp_ajax_et_builder_library_clear_temp_presets', array( $this, 'wp_ajax_et_builder_library_clear_temp_presets' ) );
}
/**
@ -306,11 +370,12 @@ class ET_Builder_Library {
$this->layouts = ET_Builder_Post_Type_Layout::instance();
$this->layout_categories = ET_Builder_Post_Taxonomy_LayoutCategory::instance();
$this->layout_tags = ET_Builder_Post_Taxonomy_LayoutTag::instance();
$this->layout_packs = ET_Builder_Post_Taxonomy_LayoutPack::instance();
$this->layout_types = ET_Builder_Post_Taxonomy_LayoutType::instance();
$this->layout_width = ET_Builder_Post_Taxonomy_LayoutWidth::instance();
ET_Builder_Post_Taxonomy_LayoutScope::instance();
ET_Builder_Post_Taxonomy_LayoutWidth::instance();
// We manually call register_all() now to ensure the CPT and taxonomies are registered
// at exactly the same point during the request that they were in prior releases.
@ -327,6 +392,10 @@ class ET_Builder_Library {
public function _register_hooks() {
add_action( 'admin_init', 'ET_Builder_Library::update_old_layouts' );
add_action( 'admin_enqueue_scripts', array( $this, 'wp_hook_admin_enqueue_scripts' ), 4 );
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
add_action( 'wp_footer', array( $this, 'render_session_expired_modal' ) );
add_filter( 'et_theme_builder_template_settings_options_term_pages', array( $this, 'tb_remove_unsupported_taxonomies' ), 10, 2 );
}
/**
@ -343,12 +412,13 @@ class ET_Builder_Library {
* @type int[] $packs Layout pack ids sorted alphabetically by pack name.
* }
*/
protected static function _sort_builder_library_data( $categories, $packs ) {
protected static function _sort_builder_library_data( $categories, $packs, $tags ) {
$categories = array_values( $categories );
$packs = array_values( $packs );
$tags = array_values( $tags );
$sorted = array();
foreach ( array( 'categories', 'packs' ) as $taxonomy ) {
foreach ( array( 'categories', 'packs', 'tags' ) as $taxonomy ) {
$sorted[ $taxonomy ] = array();
$$taxonomy = self::$_->array_sort_by( $$taxonomy, 'slug' );
@ -384,9 +454,10 @@ class ET_Builder_Library {
*
* @return array $data
*/
public function builder_library_layouts_data() {
public function builder_library_layouts_data( $library_type = 'layout' ) {
$layout_categories = array();
$layout_packs = array();
$layout_tags = array();
$layouts = array();
$index = 0;
@ -399,7 +470,7 @@ class ET_Builder_Library {
$posts = $this->layouts
->query()
->not()->with_meta( '_et_pb_built_for_post_type', $extra_layout_post_type )
->run();
->run( array( 'post_status' => array( 'publish', 'trash' ) ) );
$posts = self::$_->array_sort_by( is_array( $posts ) ? $posts : array( $posts ), 'post_name' );
@ -419,11 +490,22 @@ class ET_Builder_Library {
$layout->type = $types[0]->name;
// For the initial release of new library UI, only 'layouts' are needed.
if ( 'layout' !== $layout->type ) {
if ( $library_type !== $layout->type ) {
continue;
}
$width_values = wp_get_post_terms( $layout->id, $this->layout_width->name, array( 'fields' => 'names' ) );
$layout->width = ! empty( $width_values ) ? $width_values[0] : 'regular';
$layout->row_layout = get_post_meta( $post->ID, '_et_pb_row_layout', true );
$layout->subtype = get_post_meta( $post->ID, '_et_pb_module_type', true );
if ( '' !== $layout->subtype ) {
$module = ET_Builder_Element::get_module( $layout->subtype );
$layout->subtitle = ! empty( $module->name ) ? $module->name : $layout->type;
}
$title = html_entity_decode( $post->post_title );
$short_name = get_post_meta( $post->ID, '_et_builder_library_short_name', true );
@ -458,14 +540,18 @@ class ET_Builder_Library {
$layout->thumbnail_small = esc_url( get_the_post_thumbnail_url( $post->ID, $thumbnail_small ) );
$layout->screenshot = esc_url( get_the_post_thumbnail_url( $post->ID, $screenshot ) );
$layout->is_global = $this->layouts->is_global( $layout->id );
$layout->is_favorite = $this->layouts->is_favorite( $layout->id );
$layout->is_landing = ! empty( $post->post_excerpt );
$layout->description = '';
$layout->isTrash = 'trash' === $post->post_status; // phpcs:ignore ET.Sniffs.ValidVariableName.UsedPropertyNotSnakeCase -- This is valid format for the property in the Cloud App.
$layout->categories = array();
$layout->category_ids = array();
$layout->is_global = $this->layouts->is_global( $layout->id );
$layout->is_landing = ! empty( $post->post_excerpt );
$layout->description = '';
$layout->tags = array();
$layout->tag_ids = array();
$this->_process_layout_categories( $post, $layout, $index, $layout_categories );
$this->_process_layout_tags( $post, $layout, $index, $layout_tags );
$this->_process_layout_packs( $post, $layout, $index, $layout_packs );
wp_reset_postdata();
@ -550,10 +636,10 @@ class ET_Builder_Library {
* }
*/
$saved_layouts_data = array(
'categories' => $layout_categories,
'categories' => $this->_get_processed_terms( 'layout_category' ),
'packs' => $layout_packs,
'layouts' => $layouts,
'sorted' => self::_sort_builder_library_data( $layout_categories, $layout_packs ),
'tags' => $this->_get_processed_terms( 'layout_tag' ),
'items' => $layouts,
);
$saved_layouts_data = apply_filters( 'et_builder_library_saved_layouts', $saved_layouts_data );
@ -585,6 +671,35 @@ class ET_Builder_Library {
);
}
/**
* Gets the terms list and processes it into desired format.
*
* @since 4.17.0
*
* @param string $term_name Term Name.
*
* @return array $terms_by_id
*/
protected function _get_processed_terms( $term_name ) {
$terms = get_terms( $term_name, array( 'hide_empty' => false ) );
$terms_by_id = array();
if ( is_wp_error( $terms ) || empty( $terms ) ) {
return array();
}
foreach ( $terms as $term ) {
$term_id = $term->term_id;
$terms_by_id[ $term_id ]['id'] = $term_id;
$terms_by_id[ $term_id ]['name'] = $term->name;
$terms_by_id[ $term_id ]['slug'] = $term->slug;
$terms_by_id[ $term_id ]['count'] = $term->count;
}
return $terms_by_id;
}
/**
* Filters data for the 'Your Existing Pages' tab.
*
@ -667,9 +782,8 @@ class ET_Builder_Library {
$layouts = array();
$index = 0;
$thumbnail = self::_get_image_size_name( 'thumbnail' );
$thumbnail = self::_get_image_size_name( 'screenshot' );
$thumbnail_small = self::_get_image_size_name( 'thumbnail_small' );
$screenshot = self::_get_image_size_name( 'screenshot' );
/**
* Array of post types that should be listed as categories under "Existing Pages".
@ -700,8 +814,18 @@ class ET_Builder_Library {
// Keep track of slugs in case there are duplicates.
$seen = array();
// List of post types which should be excluded from the Pages tab.
$unsupported_post_types = array(
ET_BUILDER_LAYOUT_POST_TYPE,
ET_THEME_BUILDER_TEMPLATE_POST_TYPE,
ET_THEME_BUILDER_HEADER_LAYOUT_POST_TYPE,
ET_THEME_BUILDER_BODY_LAYOUT_POST_TYPE,
ET_THEME_BUILDER_FOOTER_LAYOUT_POST_TYPE,
ET_THEME_BUILDER_THEME_BUILDER_POST_TYPE,
);
foreach ( $post_types as $post_type ) {
if ( ET_BUILDER_LAYOUT_POST_TYPE === $post_type ) {
if ( in_array( $post_type, $unsupported_post_types, true ) ) {
continue;
}
@ -789,7 +913,6 @@ class ET_Builder_Library {
$layout->thumbnail = esc_url( get_the_post_thumbnail_url( $post->ID, $thumbnail ) );
$layout->thumbnail_small = esc_url( get_the_post_thumbnail_url( $post->ID, $thumbnail_small ) );
$layout->screenshot = esc_url( get_the_post_thumbnail_url( $post->ID, $screenshot ) );
$layout->categories = array();
$layout->category_ids = array( $category_id );
@ -805,7 +928,7 @@ class ET_Builder_Library {
$layout->status = isset( $post_status_object->label ) ? $post_status_object->label : $post->post_status;
$layouts[ $layout_index++ ] = $layout;
$layouts[] = $layout;
$index++;
}
@ -823,7 +946,7 @@ class ET_Builder_Library {
return array(
'categories' => $categories,
'packs' => $packs,
'layouts' => $layouts,
'items' => $layouts,
'options' => array(
'content' => array(
'title' => array(
@ -833,6 +956,7 @@ class ET_Builder_Library {
),
'sidebar' => array(
'title' => et_core_intentionally_unescaped( self::__( 'Find A Page' ), 'react_jsx' ),
'filterTitle' => et_core_intentionally_unescaped( self::__( 'Post Types' ), 'react_jsx' ),
),
'list' => array(
'columns' => array(
@ -1008,7 +1132,10 @@ class ET_Builder_Library {
public function wp_ajax_et_builder_library_get_layout() {
et_core_security_check( 'edit_posts', 'et_builder_library_get_layout', 'nonce' );
$id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0;
$id = isset( $_POST['id'] ) ? (int) sanitize_text_field( $_POST['id'] ) : 0;
$content_type = isset( $_POST['contentType'] ) ? (string) sanitize_text_field( $_POST['contentType'] ) : 'processed';
$library_type = isset( $_POST['libraryType'] ) ? (string) sanitize_text_field( $_POST['libraryType'] ) : 'layout';
$built_for = isset( $_POST['postType'] ) ? (string) sanitize_text_field( $_POST['postType'] ) : 'page';
if ( empty( $id ) ) {
wp_send_json_error();
@ -1021,7 +1148,7 @@ class ET_Builder_Library {
switch ( $post_type ) {
case ET_BUILDER_LAYOUT_POST_TYPE:
$layouts = et_pb_retrieve_templates( 'layout', '', 'all', '0', 'all', 'all', array(), $post_type );
$layouts = et_pb_retrieve_templates( $library_type, '', 'all', '0', $built_for, 'all', array() );
foreach ( $layouts as $layout ) {
if ( $id === $layout['ID'] ) {
@ -1032,24 +1159,34 @@ class ET_Builder_Library {
$result['savedShortcode'] = $result['shortcode'];
if ( ! isset( $_POST['is_BB'] ) ) {
$result['savedShortcode'] = et_fb_process_shortcode( $result['savedShortcode'] );
} else {
$post_content_processed = do_shortcode( $result['shortcode'] );
$result['migrations'] = ET_Builder_Module_Settings_Migration::$migrated;
}
if ( 'processed' === $content_type ) {
if ( ! isset( $_POST['is_BB'] ) ) {
$result['savedShortcode'] = et_fb_process_shortcode( $result['savedShortcode'] );
} else {
$post_content_processed = do_shortcode( $result['shortcode'] );
$result['migrations'] = ET_Builder_Module_Settings_Migration::$migrated;
}
unset( $result['shortcode'] );
unset( $result['shortcode'] );
}
break;
default:
$post_content = $post->post_content;
if ( ! isset( $_POST['is_BB'] ) ) {
$post_content = et_fb_process_shortcode( stripslashes( $post_content ) );
if ( 'processed' === $content_type ) {
if ( ! isset( $_POST['is_BB'] ) ) {
$post_content = et_fb_process_shortcode( stripslashes( $post_content ) );
}
}
$result['savedShortcode'] = $post_content;
break;
}
if ( 'exported' === $content_type ) {
$result['exported'] = get_exported_content( $result['shortcode'] );
}
$response = wp_json_encode(
array(
'success' => true,
@ -1079,6 +1216,499 @@ class ET_Builder_Library {
die( et_core_intentionally_unescaped( $response, 'html' ) );
}
/**
* AJAX Callback: Add/Remove Library terms for layout_tag and layout_category taxonomies.
*
* @since 4.17.0
*
* @global $_POST['payload'] Array with the terms list and update type (add/remove) for each.
*
* @return string JSON encoded.
*/
public function wp_ajax_et_builder_library_update_terms() {
et_core_security_check( 'edit_posts', 'et_builder_library_update_terms', 'nonce' );
$payload = isset( $_POST['payload'] ) ? (array) $_POST['payload'] : array(); // phpcs:ignore ET.Sniffs.ValidatedSanitizedInput -- $_POST['payload'] is an array, it's value sanitization is done at the time of accessing value.
if ( empty( $payload ) ) {
wp_send_json_success();
return;
}
$new_terms = array();
foreach ( $payload as $single_item ) {
$filter_type = $single_item['filterType'];
$taxonomy = 'tags' === $single_item['filterType'] ? 'layout_tag' : 'layout_category';
switch ( $single_item['updateType'] ) {
case 'remove':
$term_id = (int) $single_item['id'];
wp_delete_term( $term_id, $taxonomy );
break;
case 'rename':
$term_id = (int) $single_item['id'];
$new_name = (string) $single_item['newName'];
if ( '' !== $new_name ) {
$updated_term_data = wp_update_term( $term_id, $taxonomy, array( 'name' => $new_name ) );
if ( ! is_wp_error( $updated_term_data ) ) {
$new_terms[] = array(
'name' => $new_name,
'id' => $updated_term_data['term_id'],
'location' => 'local',
);
}
}
break;
case 'add':
$term_name = (string) $single_item['id'];
$new_term_data = wp_insert_term( $term_name, $taxonomy );
if ( ! is_wp_error( $new_term_data ) ) {
$new_terms[] = array(
'name' => $term_name,
'id' => $new_term_data['term_id'],
'location' => 'local',
);
}
break;
}
}
wp_send_json_success(
array(
'newFilters' => $new_terms,
'filterType' => $filter_type,
'localLibraryTerms' => [
'layout_category' => et_fb_prepare_library_terms(),
'layout_tag' => et_fb_prepare_library_terms( 'layout_tag' ),
],
)
);
}
/**
* AJAX Callback: Remove the Library layout after it was moved to the Cloud.
*
* @since 4.17.0
*
* @global $_POST['payload'] Array with the layout data to remove.
*
* @return void|string JSON encoded in case of empty payload
*/
public function wp_ajax_et_builder_toggle_cloud_status() {
et_core_security_check( 'edit_posts', 'et_builder_library_toggle_item_location', 'nonce' );
$payload = isset( $_POST['payload'] ) ? (array) $_POST['payload'] : array(); // phpcs:ignore ET.Sniffs.ValidatedSanitizedInput -- $_POST['payload'] is an array, it's value sanitization is done at the time of accessing value.
if ( empty( $payload ) ) {
wp_send_json_success();
return;
}
$item_id = (int) $payload['id'];
wp_delete_post( $item_id, true );
}
/**
* AJAX Callback: Save the temp layout into database with the 'draft' status
* Uses {@see et_pb_create_layout} to submit the library post
*
* @since 4.17.0
*
* @global $_POST['payload'] Array with the layout data to create.
*
* @return void
*/
public function wp_ajax_et_builder_library_save_temp_layout() {
et_core_security_check( 'edit_posts', 'et_fb_save_library_modules_nonce', 'nonce' );
$payload = isset( $_POST['payload'] ) ? (array) $_POST['payload'] : array(); // phpcs:ignore ET.Sniffs.ValidatedSanitizedInput -- $_POST['payload'] is an array, it's value sanitization is done at the time of accessing value.
$is_draft = 'draft' === $payload['postStatus'];
$name = sanitize_text_field( self::$_->array_get( $payload, 'itemName', '' ) );
$content = self::$_->array_get( $payload, 'itemContent', '' );
$prefix = esc_html__( 'Edit Cloud Item', 'et_builder' );
$name = $is_draft ? $prefix . ': ' . $name : $name;
$layout_type = self::$_->array_get( $payload, 'itemType', 'layout' );
$tax_input = array(
'layout_type' => sanitize_text_field( $layout_type ),
'module_width' => sanitize_text_field( self::$_->array_get( $payload, 'moduleWidth', 'regular' ) ),
);
if ( 'row' === $layout_type ) {
$meta_input['_et_pb_row_layout'] = $payload['rowLayout'];
}
if ( 'module' === $layout_type && isset( $payload['moduleType'] ) ) {
$meta_input['_et_pb_module_type'] = $payload['moduleType'];
}
$meta_input['_et_pb_built_for_post_type'] = 'page';
$new_layout_id = et_pb_create_layout( $name, $content, $meta_input, $tax_input, '', '', $post_status = $payload['postStatus'] );
wp_send_json_success(
array(
'layoutId' => $new_layout_id,
)
);
}
/**
* AJAX Callback: Removes temp layout from the website
*
* @since 4.17.0
*
* @global $_POST['payload'] Array with the layout id to remove.
*
* @return void
*/
public function wp_ajax_et_builder_library_remove_temp_layout() {
et_core_security_check( 'edit_posts', 'et_fb_remove_library_modules_nonce', 'nonce' );
$post_id = isset( $_POST['post_id'] ) ? (int) $_POST['post_id'] : '';
$module_presets_manager = ET_Builder_Global_Presets_Settings::instance();
$module_presets_manager->clear_temp_presets();
if ( 0 === $post_id ) {
$library_layouts = ET_Builder_Post_Type_Layout::instance();
$draft_posts = $library_layouts->query()->run( array( 'post_status' => array( 'draft' ) ) );
if ( ! empty( $draft_posts ) ) {
if ( is_array( $draft_posts ) ) {
// Several posts were returned.
foreach ( $draft_posts as $post ) {
wp_delete_post( $post->ID, true );
}
} else {
// Single post was returned.
wp_delete_post( $draft_posts->ID, true );
}
}
} else {
wp_delete_post( $post_id, true );
}
}
/**
* AJAX Callback: Removes temp presets from the website
*
* @since 4.17.0
*
* @return void
*/
public function wp_ajax_et_builder_library_clear_temp_presets() {
et_core_security_check( 'edit_posts', 'et_fb_clear_temp_presets_nonce', 'nonce' );
$module_presets_manager = ET_Builder_Global_Presets_Settings::instance();
$module_presets_manager->clear_temp_presets();
}
/**
* Returns 'publish' string to set the post correct status for restored library items.
*
* @since 4.17.0
*
* @return string new post status.
*/
public static function et_builder_set_untrash_status() {
return 'publish';
}
/**
* AJAX Callback: Upload thumbnail and assign it to specified post.
*
* @since 4.17.0
*
* @global $_FILES['imageFile'] File to upload.
* @global $_POST['postId'] Post id to set thumbnail for.
*
* @return void
*/
public function wp_ajax_et_builder_library_upload_thumbnail() {
et_core_security_check( 'edit_posts', 'et_builder_library_update_layout', 'nonce' );
$post_id = isset( $_POST['postId'] ) ? (int) $_POST['postId'] : '';
$image_url_raw = isset( $_POST['imageURL'] ) ? esc_url_raw( $_POST['imageURL'] ) : ''; // phpcs:ignore ET.Sniffs.ValidVariableName.VariableNotSnakeCase -- This is valid format for the property in the Cloud App.
// Upload and set featured image.
if ( $image_url_raw && '' !== $image_url_raw ) {
$upload = media_sideload_image( $image_url_raw, $post_id, $post_id, 'id' );
$attachment_id = is_wp_error( $upload ) ? 0 : $upload;
$image_url = get_attached_file( $attachment_id );
$image_metadata = wp_generate_attachment_metadata( $attachment_id, $image_url );
wp_update_attachment_metadata( $attachment_id, $image_metadata );
$result = set_post_thumbnail( $post_id, $attachment_id );
wp_send_json_success();
}
}
/**
* AJAX Callback: Update the library item (layout/section/row/module). Following updates supported:
* - Duplicate
* - Edit Categories/Tags. New categories/tags can be created as well.
* - Rename
* - Toggle Favorite status
* - Delete
*
* @since 4.17.0
*
* @global $_POST['payload'] Array with the update details.
*
* @return string JSON encoded with the updated item details and new terms (which could be created in Duplicate action)
*/
public function wp_ajax_et_builder_library_update_item() {
et_core_security_check( 'edit_posts', 'et_builder_library_update_layout', 'nonce' );
$payload = isset( $_POST['payload'] ) ? (array) $_POST['payload'] : array(); // phpcs:ignore ET.Sniffs.ValidatedSanitizedInput -- $_POST['payload'] is an array, it's value sanitization is done at the time of accessing value.
if ( empty( $payload ) ) {
wp_send_json_success();
return;
}
$update_details = $payload['update_details'];
$update_type = $update_details['updateType'];
$item_id = intval( $payload['item_id'] );
$new_id = '';
$categories = empty( $update_details['itemCategories'] ) ? [] : array_unique( array_map( 'intval', $update_details['itemCategories'] ) );
$tags = empty( $update_details['itemTags'] ) ? [] : array_unique( array_map( 'intval', $update_details['itemTags'] ) );
$new_categories = array();
$new_tags = array();
$item_update = array(
'ID' => $item_id,
);
if ( ! empty( $update_details['newCategoryName'] ) ) {
$new_names_array = explode( ',', $update_details['newCategoryName'] );
foreach ( $new_names_array as $new_name ) {
if ( '' !== $new_name ) {
$new_term = wp_insert_term( $new_name, 'layout_category' );
if ( ! is_wp_error( $new_term ) ) {
$categories[] = $new_term['term_id'];
$new_categories[] = array(
'name' => $new_name,
'id' => $new_term['term_id'],
'count' => 1,
);
} elseif ( ! empty( $new_term->error_data ) && ! empty( $new_term->error_data['term_exists'] ) ) {
$categories[] = $new_term->error_data['term_exists'];
}
}
}
}
if ( ! empty( $update_details['newTagName'] ) ) {
$new_names_array = explode( ',', $update_details['newTagName'] );
foreach ( $new_names_array as $new_name ) {
if ( '' !== $new_name ) {
$new_term = wp_insert_term( $new_name, 'layout_tag' );
if ( ! is_wp_error( $new_term ) ) {
$tags[] = $new_term['term_id'];
$new_tags[] = array(
'name' => $new_name,
'id' => $new_term['term_id'],
'count' => 1,
);
} elseif ( ! empty( $new_term->error_data ) && ! empty( $new_term->error_data['term_exists'] ) ) {
$tags[] = $new_term->error_data['term_exists'];
}
}
}
}
switch ( $update_type ) {
case 'duplicate':
case 'duplicate_and_delete':
case 'duplicate_premade_item':
$is_item_from_cloud = isset( $update_details['shortcode'] );
$title = sanitize_text_field( $update_details['itemName'] );
$meta_input = array();
$item_thumbnail = false;
if ( $is_item_from_cloud ) {
$content = $update_details['shortcode'];
$built_for = 'page';
$scope = ! empty( $update_details['global'] ) && 'on' === $update_details['global'] ? 'global' : 'non_global';
$layout_type = isset( $update_details['layoutType'] ) ? sanitize_text_field( $update_details['layoutType'] ) : 'layout';
$module_width = isset( $update_details['moduleWidth'] ) ? sanitize_text_field( $update_details['moduleWidth'] ) : 'regular';
$favorite_status = isset( $update_details['favoriteStatus'] ) && 'on' === sanitize_text_field( $update_details['favoriteStatus'] ) ? 'favorite' : '';
if ( 'row' === $layout_type ) {
$meta_input['_et_pb_row_layout'] = $update_details['rowLayout'];
}
if ( 'module' === $layout_type ) {
$meta_input['_et_pb_module_type'] = $update_details['moduleType'];
}
if ( '' !== $favorite_status ) {
$meta_input['favorite_status'] = $favorite_status;
}
} else {
$content = get_the_content( null, false, $item_id );
$built_for = get_post_meta( $item_id, '_et_pb_built_for_post_type', true );
$module_width = wp_get_post_terms( $item_id, 'module_width', array( 'fields' => 'names' ) );
$module_width = is_wp_error( $module_width ) ? 'regular' : sanitize_text_field( $module_width[0] );
$layout_type = wp_get_post_terms( $item_id, 'layout_type', array( 'fields' => 'names' ) );
$layout_type = is_wp_error( $layout_type ) || '' === $layout_type ? 'layout' : sanitize_text_field( $layout_type[0] );
$item_thumbnail = get_post_thumbnail_id( $item_id );
if ( ! empty( $update_details['global'] ) ) {
$scope = 'on' === $update_details['global'] ? 'global' : 'non_global';
} else {
$scope = wp_get_post_terms( $item_id, 'scope', array( 'fields' => 'names' ) );
$scope = is_wp_error( $scope ) ? 'non_global' : sanitize_text_field( $scope[0] );
}
if ( 'row' === $layout_type ) {
$row_layout = get_post_meta( $item_id, '_et_pb_row_layout', true );
$meta_input['_et_pb_row_layout'] = $row_layout;
}
if ( 'module' === $layout_type ) {
$module_type = get_post_meta( $item_id, '_et_pb_module_type', true );
$meta_input['_et_pb_module_type'] = $module_type;
}
}
$meta_input['_et_pb_built_for_post_type'] = $built_for;
$new_item = array(
'post_title' => $title,
'post_content' => $content,
'post_status' => 'publish',
'post_type' => 'et_pb_layout',
'tax_input' => array(
'layout_category' => $categories,
'layout_tag' => $tags,
'layout_type' => $layout_type,
'scope' => $scope,
'module_width' => $module_width,
),
'meta_input' => $meta_input,
);
$new_id = wp_insert_post( $new_item );
if ( $item_thumbnail ) {
set_post_thumbnail( $new_id, $item_thumbnail );
}
break;
case 'edit_cats':
wp_set_object_terms( $item_id, $categories, 'layout_category' );
wp_set_object_terms( $item_id, $tags, 'layout_tag' );
break;
case 'rename':
$item_update['post_title'] = sanitize_text_field( $update_details['itemName'] );
wp_update_post( $item_update );
break;
case 'toggle_fav':
$favorite_status = 'on' === sanitize_text_field( $update_details['favoriteStatus'] ) ? 'favorite' : '';
update_post_meta( $item_id, 'favorite_status', $favorite_status );
break;
case 'delete':
wp_trash_post( $item_id );
break;
case 'delete_permanently':
wp_delete_post( $item_id, true );
break;
case 'restore':
// wp_untrash_post() restores the post to `draft` by default, we have to set `publish` status via filter.
add_filter( 'wp_untrash_post_status', array( 'ET_Builder_Library', 'et_builder_set_untrash_status' ) );
wp_untrash_post( $item_id );
remove_filter( 'wp_untrash_post_status', array( 'ET_Builder_Library', 'et_builder_set_untrash_status' ) );
break;
}
$processed_new_tags = array();
$processed_new_cats = array();
$updated_tags = get_terms(
array(
'taxonomy' => 'layout_tag',
'hide_empty' => false,
)
);
$updated_categories = get_terms(
array(
'taxonomy' => 'layout_category',
'hide_empty' => false,
)
);
if ( ! empty( $updated_tags ) ) {
foreach ( $updated_tags as $single_tag ) {
$processed_new_tags[] = array(
'name' => $single_tag->name,
'id' => $single_tag->term_id,
'count' => $single_tag->count,
'location' => 'local',
);
}
}
if ( ! empty( $updated_categories ) ) {
foreach ( $updated_categories as $single_category ) {
$processed_new_cats[] = array(
'name' => $single_category->name,
'id' => $single_category->term_id,
'count' => $single_category->count,
'location' => 'local',
);
}
}
wp_send_json_success(
array(
'updatedItem' => $item_id,
'newItem' => $new_id,
'updateType' => $update_type,
'categories' => $categories,
'tags' => $tags,
'updatedTerms' => array(
'categories' => $processed_new_cats,
'tags' => $processed_new_tags,
),
)
);
}
/**
* AJAX Callback: Gets Cloud access token from DB and send it to client.
*
* @since 4.17.0
*
* @return void
*/
public function wp_ajax_et_builder_library_get_cloud_token() {
et_core_security_check( 'edit_posts', 'et_builder_library_get_cloud_token', 'nonce' );
$access_token = get_transient( 'et_cloud_access_token' );
wp_send_json_success(
array(
'accessToken' => $access_token,
)
);
}
/**
* AJAX Callback: Gets layouts data for the builder's library UI.
*
@ -1090,7 +1720,10 @@ class ET_Builder_Library {
*/
public function wp_ajax_et_builder_library_get_layouts_data() {
et_core_security_check( 'edit_posts', 'et_builder_library_get_layouts_data', 'nonce' );
wp_send_json_success( $this->builder_library_layouts_data() );
$library_type = isset( $_POST['et_library_type'] ) ? (string) sanitize_text_field( $_POST['et_library_type'] ) : 'layout';
wp_send_json_success( $this->builder_library_layouts_data( $library_type ) );
}
/**
@ -1125,6 +1758,86 @@ class ET_Builder_Library {
wp_send_json_success();
}
/**
* Filters out library tags and categories from Theme Builder settings.
* These taxonomies are not available on Frontend and user shouldn't be able to select it.
*
* @param bool $initial_value original value.
* @param object $taxonomy taxonomy to check.
*
* @since 4.17.0
*
* @return bool
*/
public function tb_remove_unsupported_taxonomies( $initial_value, $taxonomy ) {
if ( in_array( $taxonomy->name, array( 'layout_category', 'layout_tag' ), true ) ) {
return false;
}
return $initial_value;
}
/**
* Enqueue styles.
*
* @since 4.17.0
*/
public function enqueue_scripts() {
// Enqueue resource for edit session expire page.
if ( $this->vb_is_editing_session_expired() ) {
et_core_register_admin_assets();
wp_enqueue_style( 'et-core-admin' );
wp_enqueue_script( 'et-core-admin' );
}
}
/**
* Render modal to display a message when editing session expire.
*
* @since 4.17.0
*/
public function render_session_expired_modal() {
if ( ! $this->vb_is_editing_session_expired() ) {
return;
}
?>
<div class="et-core-modal-overlay et-builder-session-expired-modal et-core-active">
<div class="et-core-modal">
<div class="et-core-modal-header">
<h3 class="et-core-modal-title">
<?php esc_html_e( 'Session Expired', 'et_builder' ); ?>
</h3>
<a href="#" class="et-core-modal-close" data-et-core-modal="close"></a>
</div>
<div id="et-builder-session-expired-modal-content">
<div class="et-core-modal-content">
<p>
<?php
esc_html_e( 'Your Cloud item editing session has expired.', 'et_builder' );
?>
</p>
</div>
<a class="et-core-modal-action" href="#" data-et-core-modal="close">
<?php esc_html_e( 'Close', 'et_builder' ); ?>
</a>
</div>
</div>
</div>
<?php
}
/**
* Determine whether editing session is expired.
*
* @since 4.17.0
*/
public function vb_is_editing_session_expired() {
global $wp_query;
// phpcs:ignore WordPress.Security.NonceVerification -- This function does not change any state, and is therefore not susceptible to CSRF.
return $wp_query->is_404() && isset( $_GET['cloudItem'] );
}
/**
* Enqueues library-related styles and scripts in the admin.
* {@see 'admin_enqueue_scripts'}

View File

@ -34,13 +34,14 @@ class ET_Builder_Ajax_Data {
* Registers the AJAX actions when class is constructed.
*/
public function __construct() {
add_action( 'wp_ajax_et_builder_ajax_get_post_types', array( $this, 'et_builder_ajax_get_post_types' ) );
add_action( 'wp_ajax_et_builder_ajax_get_authors', array( $this, 'et_builder_ajax_get_authors' ) );
add_action( 'wp_ajax_et_builder_ajax_get_user_roles', array( $this, 'et_builder_ajax_get_user_roles' ) );
add_action( 'wp_ajax_et_builder_ajax_get_categories', array( $this, 'et_builder_ajax_get_categories' ) );
add_action( 'wp_ajax_et_builder_ajax_get_tags', array( $this, 'et_builder_ajax_get_tags' ) );
add_action( 'wp_ajax_et_builder_ajax_search_products', array( $this, 'et_builder_ajax_search_products' ) );
add_action( 'wp_ajax_et_builder_ajax_get_display_conditions_status', array( $this, 'et_builder_ajax_get_display_conditions_status' ) );
add_action( 'wp_ajax_et_builder_ajax_get_post_types', array( $this, 'get_post_types' ) );
add_action( 'wp_ajax_et_builder_ajax_get_authors', array( $this, 'get_authors' ) );
add_action( 'wp_ajax_et_builder_ajax_get_user_roles', array( $this, 'get_user_roles' ) );
add_action( 'wp_ajax_et_builder_ajax_get_categories', array( $this, 'get_categories' ) );
add_action( 'wp_ajax_et_builder_ajax_get_tags', array( $this, 'get_tags' ) );
add_action( 'wp_ajax_et_builder_ajax_search_products', array( $this, 'search_products' ) );
add_action( 'wp_ajax_et_builder_ajax_get_display_conditions_status', array( $this, 'get_display_conditions_status' ) );
add_action( 'wp_ajax_et_builder_ajax_get_post_meta_fields', array( $this, 'get_post_meta_fields' ) );
}
/**
@ -60,9 +61,24 @@ class ET_Builder_Ajax_Data {
*
* @return void
*/
public function et_builder_ajax_get_display_conditions_status() {
public function get_display_conditions_status() {
et_core_security_check( 'edit_posts', 'et_builder_ajax_get_display_conditions_status', 'nonce', '_POST' );
/**
* Filters "Display Conditions" functionality to determine whether to enable or disable the functionality or not.
*
* Useful for disabling/enabling "Display Condition" feature site-wide.
*
* @since 4.13.1
*
* @param boolean True to enable the functionality, False to disable it.
*/
$is_display_conditions_enabled = apply_filters( 'et_is_display_conditions_functionality_enabled', true );
if ( ! $is_display_conditions_enabled ) {
wp_send_json_error();
}
// $_POST['conditions'] is a JSON so there is no effective way to sanitize it at this level.
// phpcs:ignore ET.Sniffs.ValidatedSanitizedInput -- Conditions is not stored or displayed therefore XSS safe.
$conditions = isset( $_POST['conditions'] ) ? $_POST['conditions'] : '';
@ -82,7 +98,7 @@ class ET_Builder_Ajax_Data {
*
* @return void
*/
public function et_builder_ajax_search_products() {
public function search_products() {
et_core_security_check( 'edit_posts', 'et_builder_ajax_search_products', 'nonce', '_GET' );
$current_page = isset( $_GET['page'] ) ? (int) $_GET['page'] : 0;
@ -139,7 +155,7 @@ class ET_Builder_Ajax_Data {
*
* @return void
*/
public function et_builder_ajax_get_categories() {
public function get_categories() {
et_core_security_check( 'edit_posts', 'et_builder_ajax_get_categories', 'nonce', '_GET' );
$data = [];
@ -191,7 +207,7 @@ class ET_Builder_Ajax_Data {
*
* @return void
*/
public function et_builder_ajax_get_tags() {
public function get_tags() {
et_core_security_check( 'edit_posts', 'et_builder_ajax_get_tags', 'nonce', '_GET' );
$data = [];
@ -249,7 +265,7 @@ class ET_Builder_Ajax_Data {
*
* @return void
*/
public function et_builder_ajax_get_post_types() {
public function get_post_types() {
et_core_security_check( 'edit_posts', 'et_builder_ajax_get_post_types', 'nonce', '_GET' );
$current_page = isset( $_GET['page'] ) ? (int) $_GET['page'] : 0;
@ -303,7 +319,7 @@ class ET_Builder_Ajax_Data {
*
* @return void
*/
public function et_builder_ajax_get_authors() {
public function get_authors() {
et_core_security_check( 'edit_posts', 'et_builder_ajax_get_authors', 'nonce', '_GET' );
$current_page = isset( $_GET['page'] ) ? (int) $_GET['page'] : 0;
@ -375,7 +391,7 @@ class ET_Builder_Ajax_Data {
*
* @return void
*/
public function et_builder_ajax_get_user_roles() {
public function get_user_roles() {
et_core_security_check( 'edit_posts', 'et_builder_ajax_get_user_roles', 'nonce', '_GET' );
$user_roles = [];
@ -403,6 +419,36 @@ class ET_Builder_Ajax_Data {
wp_send_json_success( $results );
}
/**
* AJAX Action for getting a list of all meta fields assigned to a post.
*
* @return void
*/
public function get_post_meta_fields() {
et_core_security_check( 'edit_posts', 'et_builder_ajax_get_post_meta_fields', 'nonce', '_GET' );
$data = [];
$post_id = isset( $_GET['postId'] ) ? sanitize_text_field( $_GET['postId'] ) : '';
$meta_fields = get_post_meta( (int) $post_id );
/**
* Filters included meta fields for `et_builder_ajax_get_post_meta_fields` ajax action.
*
* @since 4.14.3
*
* @param array $meta_fields
*/
$meta_fields = apply_filters( 'et_builder_ajax_get_post_meta_fields', $meta_fields );
$data = is_array( $meta_fields ) ? $meta_fields : [];
$results = [
'results' => $data,
];
wp_send_json_success( $results );
}
}
ET_Builder_Ajax_Data::get_instance();

View File

@ -0,0 +1,234 @@
<?php
/**
* Background Mask Options
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Background_Mask_Options
*
* @since 4.15.0
*/
class ET_Builder_Background_Mask_Options {
/**
* Class instance object.
*
* @var ET_Builder_Background_Mask_Options
*/
private static $_instance;
/**
* Mask Settings.
*
* @var array
*/
private static $_settings = null;
/**
* Get instance of ET_Builder_Background_Mask_Options.
*
* @return ET_Builder_Background_Mask_Options
*/
public static function get() {
if ( empty( self::$_instance ) ) {
self::$_instance = new ET_Builder_Background_Mask_Options();
}
return self::$_instance;
}
/**
* Get SVG Settings for a Mask Style.
*
* @param string $name Style Name.
*
* @return array
*/
public function get_style( $name ) {
// Fetch style when settings already processed.
if ( isset( self::$_settings['styles'][ $name ] ) ) {
return self::$_settings['styles'][ $name ];
}
// Fetch settings for the mask style.
$instance = ET_Builder_Background_Mask_Style_Factory::get( $name );
if ( ! empty( $instance ) ) {
return $instance->settings();
}
return array();
}
/**
* Returns SVG url for Mask style.
*
* @param string $name Style Name.
* @param string $color Color value.
* @param string $type SVG type, valid options: landscape | portrait | square | thumbnail.
* @param bool $rotated Rotated or not.
* @param bool $inverted Inverted or not.
* @param string $size Size value.
*
* @return string
*/
public function get_svg( $name, $color, $type, $rotated, $inverted, $size ) {
if ( strpos( $color, 'gcid-' ) === 0 ) {
$global_color_info = et_builder_get_global_color_info( $color );
$color = $global_color_info['color'];
}
$is_stretch = 'stretch' === $size || '' === $size;
$content = $this->get_svg_content( $name, $type, $rotated, $inverted );
$view_box = $this->get_view_box( $name, $type );
$props = et_()->get_svg_attrs(
array(
'fill' => esc_attr( $color ),
'viewBox' => esc_attr( $view_box ),
'preserveAspectRatio' => $is_stretch ? 'none' : 'xMinYMin slice',
)
);
// Encode the SVG, so we can use it as data for background-image.
// phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode -- base64_encode() used for browser support.
$svg = base64_encode( "<svg {$props}>{$content}</svg>" );
return sprintf( 'url( data:image/svg+xml;base64,%s )', $svg );
}
/**
* Get SVG content for a Mask Style.
*
* @param string $name Style Name.
* @param string $type Valid options: landscape | portrait | square | thumbnail.
* @param bool $rotated Default false, set true to get rotated version.
* @param bool $inverted Default false, set true to get inverted version.
*
* @return string
*/
public function get_svg_content( $name, $type, $rotated = false, $inverted = false ) {
$settings = $this->get_style( $name );
// Return SVG Content for Thumbnail.
// Note: Thumbnail value decided as following:
// 1. Return Thumbnail from the Mask Style settings
// 2. If not defined, return landscape value from default SVG group.
if ( 'thumbnail' === $type ) {
return isset( $settings['svgContent']['thumbnail'] )
? $settings['svgContent']['thumbnail']
: $this->get_svg_content( $name, 'landscape' );
}
// Return SVG Content for Style.
$svg_group = $rotated ? 'rotated' : 'default';
$svg_group = $inverted ? "{$svg_group}-inverted" : $svg_group;
return isset( $settings['svgContent'][ $svg_group ][ $type ] )
? $settings['svgContent'][ $svg_group ][ $type ]
: '';
}
/**
* Get viewBox for a Mask Style.
*
* @param string $name Style name.
* @param string $type viewBox type, valid options: landscape | portrait | square | thumbnail.
*
* @return string
*/
public function get_view_box( $name, $type ) {
$view_box_settings = $this->view_box_settings();
$style_settings = $this->get_style( $name );
// Note: viewBox value decided as following:
// 1. Return viewBox from the Mask Style settings
// 2. If not defined, return viewBox from default settings.
$view_box_default = isset( $view_box_settings[ $type ] )
? $view_box_settings[ $type ]
: '';
return isset( $style_settings['viewBox'][ $type ] )
? $style_settings['viewBox'][ $type ]
: $view_box_default;
}
/**
* Mask SVG Settings.
*
* @return array
*/
public function settings() {
if ( null === self::$_settings ) {
// Look at builder/feature/background-masks/mask directory.
self::$_settings = array(
'styles' => glob( ET_BUILDER_DIR . 'feature/background-masks/mask/*.php' ),
'viewBox' => $this->view_box_settings(),
);
// Default mask style.
$default = self::get_default_style_name();
$style = array(
$default => self::get_style( $default ),
);
$files = array();
foreach ( self::$_settings['styles'] as $file ) {
// Extract name from file (e.g corner-lake).
$name = basename( $file, '.php' );
// Fetch settings for the style.
$style_settings = $default !== $name ? self::get_style( $name ) : array();
// Include the style only when valid settings are found.
if ( ! empty( $style_settings ) ) {
$files[ $name ] = $style_settings;
}
}
// Sort by priority.
et_()->uasort( $files, array( 'ET_Builder_Element', 'compare_by_priority' ) );
self::$_settings['styles'] = array_merge( $style, $files );
// Cleanup.
$default = null;
$files = null;
$style = null;
}
return self::$_settings;
}
/**
* Default viewBox settings for Mask.
*
* @return string[]
*/
public function view_box_settings() {
return array(
'landscape' => '0 0 1920 1440',
'portrait' => '0 0 1920 2560',
'square' => '0 0 1920 1920',
'thumbnail' => '0 0 1920 1440',
);
}
/**
* Get default mask style.
*
* @return string Default Style Name.
*/
public function get_default_style_name() {
return 'layer-blob';
}
}

View File

@ -0,0 +1,26 @@
<?php
/**
* Abstract Class for Mask Style.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* ET_Builder_Background_Mask_Style_Base.
*
* @since 4.15.0
*/
abstract class ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
abstract public function settings();
}

View File

@ -0,0 +1,47 @@
<?php
/**
* Factory Class for Mask Style Options.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Background_Mask_Style_Factory.
*
* @since 4.15.0
*/
class ET_Builder_Background_Mask_Style_Factory {
/**
* Class instance object
*
* @var array Holds all Mask Style instance.
*/
private static $_instance = array();
/**
* Get instance of the Class
*
* @param string $name Mask Style Name.
*
* @return ET_Builder_Background_Mask_Style_Base
*/
public static function get( $name ) {
$name = sanitize_file_name( $name );
if ( ! isset( self::$_instance[ $name ] ) ) {
// Look at feature/background-masks/mask directory.
$file = ET_BUILDER_DIR . "feature/background-masks/mask/$name.php";
$instance = file_exists( $file ) ? require_once $file : null;
self::$_instance[ $name ] = $instance instanceof ET_Builder_Background_Mask_Style_Base ? $instance : null;
}
return self::$_instance[ $name ];
}
}

View File

@ -0,0 +1,252 @@
<?php
/**
* Background Pattern Options
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Background_Pattern_Options
*
* @since 4.15.0
*/
class ET_Builder_Background_Pattern_Options {
/**
* Class instance object.
*
* @var ET_Builder_Background_Pattern_Options
*/
private static $_instance;
/**
* Pattern Settings.
*
* @var array
*/
private static $_settings = null;
/**
* Get instance of ET_Builder_Background_Pattern_Options.
*
* @return ET_Builder_Background_Pattern_Options
*/
public static function get() {
if ( empty( self::$_instance ) ) {
self::$_instance = new ET_Builder_Background_Pattern_Options();
}
return self::$_instance;
}
/**
* Get SVG Settings for a Pattern Style.
*
* @param string $name Style name.
*
* @return array
*/
public function get_style( $name ) {
// Fetch style when settings already processed.
if ( isset( self::$_settings['styles'][ $name ] ) ) {
return self::$_settings['styles'][ $name ];
}
// Fetch settings for the pattern style.
$instance = ET_Builder_Background_Pattern_Style_Factory::get( $name );
if ( ! empty( $instance ) ) {
return $instance->settings();
}
return array();
}
/**
* Returns SVG content for a Pattern style.
*
* @param string $name Style Name.
* @param string $color Color value.
* @param string $type SVG Type.
* @param bool $rotated Default false, set true to get rotated version.
* @param bool $inverted Default false, set true to get inverted version.
*
* @return string
*/
public function get_svg( $name, $color, $type, $rotated = false, $inverted = false ) {
if ( strpos( $color, 'gcid-' ) === 0 ) {
$global_color_info = et_builder_get_global_color_info( $color );
$color = $global_color_info['color'];
}
$content = $this->get_svg_content( $name, $type, $rotated, $inverted );
$props = et_()->get_svg_attrs(
array(
'fill' => esc_attr( $color ),
'height' => esc_attr( $this->get_value( $name, 'height', $rotated ) ),
'width' => esc_attr( $this->get_value( $name, 'width', $rotated ) ),
'viewBox' => esc_attr( $this->get_value( $name, 'viewBox', $rotated ) ),
'preserveAspectRatio' => 'none',
)
);
$svg = "<svg {$props}>{$content}</svg>";
// Encode the SVG so we can use it as data for background-image.
// phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode -- base64_encode() used for browser support.
$svg = base64_encode( $svg );
return sprintf( 'url( data:image/svg+xml;base64,%s )', $svg );
}
/**
* Get SVG content for a Pattern Style.
*
* @param string $name Pattern style name.
* @param string $type Valid options: default | thumbnail.
* @param bool $rotated Default false, set true to get rotated version.
* @param bool $inverted Default false, set true to get inverted version.
*
* @return string
*/
public function get_svg_content( $name, $type, $rotated = false, $inverted = false ) {
$settings = $this->get_style( $name );
// Return SVG Content for Thumbnail.
if ( 'thumbnail' === $type ) {
return isset( $settings['svgContent']['thumbnail'] )
? $settings['svgContent']['thumbnail']
: '';
}
// Return SVG Content for Style.
$svg_type = $rotated ? 'rotated' : $type;
$svg_type = $inverted ? "{$svg_type}-inverted" : $svg_type;
return isset( $settings['svgContent'][ $svg_type ] )
? $settings['svgContent'][ $svg_type ]
: '';
}
/**
* Get Width/Height/viewBox for a Pattern Style.
*
* @param string $name Style name.
* @param string $type Value Style.
* @param bool $rotated Default false, set true to get rotated version.
*
* @return string
*/
public function get_value( $name, $type, $rotated = false ) {
$settings = $this->get_style( $name );
$width = isset( $settings['width'] ) ? $settings['width'] : '';
$height = isset( $settings['height'] ) ? $settings['height'] : '';
switch ( true ) {
case 'width' === $type:
// When rotated, we need to swap the width/height.
return $rotated ? $height : $width;
case 'height' === $type:
// When rotated, we need to swap the width/height.
return $rotated ? $width : $height;
case 'viewBox' === $type:
// The viewBox format is '[x] [y] [width] [height]'.
// When rotated, we need to swap the width/height.
return $rotated
? '0 0 ' . (int) $height . ' ' . (int) $width
: '0 0 ' . (int) $width . ' ' . (int) $height;
default:
return '';
}
}
/**
* Get value for thumbnail settings.
*
* @param string $key Attr key.
*
* @return string
*/
public function get_thumbnail_value( $key ) {
$thumbnail = $this->thumbnail_settings();
return isset( $thumbnail[ $key ] )
? $thumbnail[ $key ]
: '';
}
/**
* Pattern SVG Settings.
*
* @return array
*/
public function settings() {
if ( null === self::$_settings ) {
// Look at builder/feature/background-masks/pattern directory.
self::$_settings = array(
'styles' => glob( ET_BUILDER_DIR . 'feature/background-masks/pattern/*.php' ),
'thumbnail' => $this->thumbnail_settings(),
);
// Default pattern style.
$default = self::get_default_style_name();
$style = array(
$default => self::get_style( $default ),
);
$files = array();
foreach ( self::$_settings['styles'] as $file ) {
// Extract name from file (e.g corner-lake).
$name = basename( $file, '.php' );
// Fetch settings for the style.
$style_settings = $default !== $name ? self::get_style( $name ) : array();
// Include the style only when valid settings are found.
if ( ! empty( $style_settings ) ) {
$files[ $name ] = $style_settings;
}
}
// Sort by priority.
et_()->uasort( $files, array( 'ET_Builder_Element', 'compare_by_priority' ) );
self::$_settings['styles'] = array_merge( $style, $files );
// Cleanup.
$default = null;
$files = null;
$style = null;
}
return self::$_settings;
}
/**
* Default thumbnail settings for Pattern.
*
* @return string[]
*/
public function thumbnail_settings() {
return array(
'height' => '60px',
'width' => '80px',
);
}
/**
* Get default pattern style.
*
* @return string Default Style Name.
*/
public function get_default_style_name() {
return 'polka-dots';
}
}

View File

@ -0,0 +1,24 @@
<?php
/**
* Abstract Class for Pattern Style.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* ET_Builder_Background_Pattern_Style_Base.
*/
abstract class ET_Builder_Background_Pattern_Style_Base {
/**
* Configuration.
*
* @return array
*/
abstract public function settings();
}

View File

@ -0,0 +1,45 @@
<?php
/**
* Background Pattern Config
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Background_Pattern_Style_Factory.
*/
class ET_Builder_Background_Pattern_Style_Factory {
/**
* Class instance object
*
* @var array Holds all Pattern Style instance.
*/
private static $_instance = array();
/**
* Get instance of the Class
*
* @param string $name Pattern Style Name.
*
* @return ET_Builder_Background_Pattern_Style_Base
*/
public static function get( $name ) {
$name = sanitize_file_name( $name );
if ( ! isset( self::$_instance[ $name ] ) ) {
// Look at feature/background-masks/pattern directory.
$file = ET_BUILDER_DIR . "feature/background-masks/pattern/$name.php";
$instance = file_exists( $file ) ? require_once $file : null;
self::$_instance[ $name ] = $instance instanceof ET_Builder_Background_Pattern_Style_Base ? $instance : null;
}
return self::$_instance[ $name ];
}
}

View File

@ -0,0 +1,222 @@
<?php
/**
* Functions needed for the Background Masks QF.
*
* @since 4.15.0
*
* @package Divi
* @subpackage Builder
*/
/**
* Get background pattern option instance.
*
* @since 4.15.0
*
* @return ET_Builder_Background_Pattern_Options
*/
function et_pb_background_pattern_options() {
return ET_Builder_Background_Pattern_Options::get();
}
/**
* Get background mask option instance.
*
* @since 4.15.0
*
* @return ET_Builder_Background_Mask_Options
*/
function et_pb_background_mask_options() {
return ET_Builder_Background_Mask_Options::get();
}
/**
* Returns Pattern style options.
*
* @since 4.15.0
*
* @return array
*/
function et_pb_get_pattern_style_options() {
// Bail, when AJAX isn't calling for Builder Assets/Data.
if ( wp_doing_ajax() && ! et_fb_is_builder_ajax() ) {
return array();
}
$cache_key = 'et_pb_get_pattern_style_options';
if ( ! et_core_cache_has( $cache_key ) ) {
$options = array();
$settings = et_pb_background_pattern_options()->settings();
if ( ! empty( $settings['styles'] ) ) {
// Get the style names.
$names = array_keys( $settings['styles'] );
// Get Label for the styles.
$labels = array_column( $settings['styles'], 'label' );
// Prepare the final style options.
$options = array_combine( $names, $labels );
// Cleanup.
$labels = null;
$names = null;
$settings = null;
}
et_core_cache_set( $cache_key, $options );
} else {
$options = et_core_cache_get( $cache_key );
}
return $options ? $options : array();
}
/**
* Returns Mask style options.
*
* @since 4.15.0
*
* @return array
*/
function et_pb_get_mask_style_options() {
// Bail, when AJAX isn't calling for Builder Assets/Data.
if ( wp_doing_ajax() && ! et_fb_is_builder_ajax() ) {
return array();
}
$cache_key = 'et_pb_get_mask_style_options';
if ( ! et_core_cache_has( $cache_key ) ) {
$options = array();
$settings = et_pb_background_mask_options()->settings();
if ( ! empty( $settings['styles'] ) ) {
// Get the style names.
$names = array_keys( $settings['styles'] );
// Get Label for the styles.
$labels = array_column( $settings['styles'], 'label' );
// Prepare the final style options.
$options = array_combine( $names, $labels );
// Cleanup.
$labels = null;
$names = null;
$settings = null;
}
et_core_cache_set( $cache_key, $options );
} else {
$options = et_core_cache_get( $cache_key );
}
return $options ? $options : array();
}
if ( ! function_exists( 'et_pb_get_background_field_allowed_units' ) ) :
/**
* Return allowed units for width/height/horizontal offset/vertical offset field.
*
* @since 4.15.0
*
* @return string[]
*/
function et_pb_get_background_field_allowed_units() {
return array(
'%',
'em',
'rem',
'px',
'cm',
'mm',
'in',
'pc',
'ex',
'vh',
'vw',
);
}
endif;
if ( ! function_exists( 'et_pb_get_background_blend_mode_options' ) ) :
/**
* Return blend mode options list.
*
* @since 4.15.0
*
* @return array
*/
function et_pb_get_background_blend_mode_options() {
return array(
'normal' => et_builder_i18n( 'Normal' ),
'multiply' => et_builder_i18n( 'Multiply' ),
'screen' => et_builder_i18n( 'Screen' ),
'overlay' => et_builder_i18n( 'Overlay' ),
'darken' => et_builder_i18n( 'Darken' ),
'lighten' => et_builder_i18n( 'Lighten' ),
'color-dodge' => et_builder_i18n( 'Color Dodge' ),
'color-burn' => et_builder_i18n( 'Color Burn' ),
'hard-light' => et_builder_i18n( 'Hard Light' ),
'soft-light' => et_builder_i18n( 'Soft Light' ),
'difference' => et_builder_i18n( 'Difference' ),
'exclusion' => et_builder_i18n( 'Exclusion' ),
'hue' => et_builder_i18n( 'Hue' ),
'saturation' => et_builder_i18n( 'Saturation' ),
'color' => et_builder_i18n( 'Color' ),
'luminosity' => et_builder_i18n( 'Luminosity' ),
);
}
endif;
if ( ! function_exists( 'et_pb_get_background_position_options' ) ) :
/**
* Return Background Position options list.
*
* @since 4.15.0
*
* @return array
*/
function et_pb_get_background_position_options() {
return array(
'top_left' => et_builder_i18n( 'Top Left' ),
'top_center' => et_builder_i18n( 'Top Center' ),
'top_right' => et_builder_i18n( 'Top Right' ),
'center_left' => et_builder_i18n( 'Center Left' ),
'center' => et_builder_i18n( 'Center' ),
'center_right' => et_builder_i18n( 'Center Right' ),
'bottom_left' => et_builder_i18n( 'Bottom Left' ),
'bottom_center' => et_builder_i18n( 'Bottom Center' ),
'bottom_right' => et_builder_i18n( 'Bottom Right' ),
);
}
endif;
if ( ! function_exists( 'et_pb_get_background_repeat_options' ) ) :
/**
* Return Background Repeat options list.
*
* @since 4.15.0
*
* @param bool $no_repeat Whether to include no-repeat option.
*
* @return array
*/
function et_pb_get_background_repeat_options( $no_repeat = true ) {
$options = array(
'repeat' => et_builder_i18n( 'Repeat' ),
'repeat-x' => et_builder_i18n( 'Repeat X (horizontal)' ),
'repeat-y' => et_builder_i18n( 'Repeat Y (vertical)' ),
'space' => et_builder_i18n( 'Repeat with space between' ),
'round' => et_builder_i18n( 'Repeat and Stretch' ),
);
if ( $no_repeat ) {
$options['no-repeat'] = et_builder_i18n( 'No Repeat' );
}
return $options;
}
endif;

View File

@ -0,0 +1,467 @@
<?php
/**
* Functions needed for the Background Pattern Fields.
*
* @since 4.15.0
*
* @package Divi
* @subpackage Builder
*/
/**
* Mask Fields Language Strings.
*
* @since 4.15.0
*
* @return array
*/
function et_pb_mask_i18n() {
static $_i18n = null;
if ( is_null( $_i18n ) ) {
$_i18n = array(
'mask_style' => array(
'label' => esc_html__( 'Mask Style', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Mask Style', 'et_builder' ),
),
'mask_color' => array(
'label' => esc_html__( 'Mask Color', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Mask Color', 'et_builder' ),
),
'mask_transform' => array(
'label' => esc_html__( 'Mask Transform', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Mask Transform', 'et_builder' ),
'options' => array(
'flip_horizontal' => esc_html__( 'Flip Horizontal', 'et_builder' ),
'flip_vertical' => esc_html__( 'Flip Vertical', 'et_builder' ),
'rotate_90_degree' => esc_html__( 'Rotate 90 Degree', 'et_builder' ),
'invert' => esc_html__( 'Invert', 'et_builder' ),
),
),
'mask_aspect_ratio' => array(
'label' => esc_html__( 'Mask Aspect Ratio', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Mask Aspect Ratio', 'et_builder' ),
'options' => array(
'landscape' => esc_html__( 'Landscape', 'et_builder' ),
'square' => esc_html__( 'Square', 'et_builder' ),
'portrait' => esc_html__( 'Portrait', 'et_builder' ),
),
),
'mask_size' => array(
'label' => esc_html__( 'Mask Size', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Mask Size', 'et_builder' ),
'options' => array(
'stretch' => et_builder_i18n( 'Stretch to Fill' ),
'cover' => et_builder_i18n( 'Cover' ),
'contain' => et_builder_i18n( 'Fit' ),
'custom' => et_builder_i18n( 'Custom Size' ),
),
),
'mask_width' => array(
'label' => esc_html__( 'Mask Width', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Mask Width', 'et_builder' ),
),
'mask_height' => array(
'label' => esc_html__( 'Mask Height', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Mask Height', 'et_builder' ),
),
'mask_position' => array(
'label' => esc_html__( 'Mask Position', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Mask Position', 'et_builder' ),
),
'mask_horizontal_offset' => array(
'label' => esc_html__( 'Mask Horizontal Offset', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Mask Horizontal Offset', 'et_builder' ),
),
'mask_vertical_offset' => array(
'label' => esc_html__( 'Mask Vertical Offset', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Mask Vertical Offset', 'et_builder' ),
),
'mask_blend_mode' => array(
'label' => esc_html__( 'Mask Blend Mode', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Mask Blend Mode', 'et_builder' ),
),
);
}
return $_i18n;
}
/**
* Mask Field Templates.
*
* @since 4.15.0
*
* @return array[]
*/
function et_ph_mask_field_templates() {
return array(
'mask_style' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'tab_filler' => true,
'type' => 'select-mask',
),
'mask_color' => array(
'custom_color' => true,
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'type' => 'color-alpha',
),
'mask_transform' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'multi_selection' => true,
'option_category' => 'configuration',
'sticky' => true,
'toggleable' => true,
'type' => 'multiple_buttons',
),
'mask_aspect_ratio' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'multi_selection' => false,
'option_category' => 'configuration',
'sticky' => true,
'toggleable' => true,
'type' => 'multiple_buttons',
),
'mask_size' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'type' => 'select',
),
'mask_width' => array(
'allow_empty' => true,
'default_on_child' => true,
'default_unit' => '%',
'fixed_range' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'range_settings' => array(
'min' => 0,
'min_limit' => 0,
'max' => 100,
'step' => 1,
),
'type' => 'range',
'validate_unit' => true,
),
'mask_height' => array(
'allow_empty' => true,
'default_on_child' => true,
'default_unit' => '%',
'fixed_range' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'range_settings' => array(
'min' => 0,
'min_limit' => 0,
'max' => 100,
'step' => 1,
),
'type' => 'range',
'validate_unit' => true,
),
'mask_position' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'type' => 'select',
),
'mask_horizontal_offset' => array(
'default_on_child' => true,
'default_unit' => '%',
'fixed_range' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'range_settings' => array(
'min' => - 100,
'max' => 100,
'step' => 1,
),
'type' => 'range',
'validate_unit' => true,
),
'mask_vertical_offset' => array(
'default_on_child' => true,
'default_unit' => '%',
'fixed_range' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'range_settings' => array(
'min' => - 100,
'max' => 100,
'step' => 1,
),
'type' => 'range',
'validate_unit' => true,
),
'mask_blend_mode' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'type' => 'select',
),
'enable_mask_style' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'type' => 'skip',
),
);
}
/**
* Generates Background Mask fields.
*
* @since 4.15.0
*
* @param string $base_name background base name.
* @param bool $specialty whether return field for specialty section column.
*
* @return array
*/
function et_pb_get_mask_fields( $base_name, $specialty = false ) {
static $_cache = null;
$suffix = $specialty ? '_%s' : '';
$field_type = "{$base_name}{$suffix}";
if ( ! isset( $_cache[ $field_type ] ) ) {
$i18n = et_pb_mask_i18n();
$label = $specialty ? 'column_label' : 'label';
$options = array();
$options[ "{$base_name}_enable_mask_style{$suffix}" ] = ET_Builder_Element::background_field_template(
'enable_mask_style',
array(
'default' => 'off',
)
);
$options[ "{$base_name}_mask_style{$suffix}" ] = ET_Builder_Element::background_field_template(
'mask_style',
array(
'default' => et_pb_background_mask_options()->get_default_style_name(),
'label' => $i18n['mask_style'][ $label ],
'options' => et_pb_get_mask_style_options(),
'copy_with' => array(
"{$base_name}_enable_mask_style{$suffix}",
),
)
);
$options[ "{$base_name}_mask_color{$suffix}" ] = ET_Builder_Element::background_field_template(
'mask_color',
array(
'default' => '#ffffff',
'label' => $i18n['mask_color'][ $label ],
'show_if_not' => array(
"{$base_name}_enable_mask_style{$suffix}" => 'off',
),
)
);
$options[ "{$base_name}_mask_transform{$suffix}" ] = ET_Builder_Element::background_field_template(
'mask_transform',
array(
'default' => '',
'label' => $i18n['mask_transform'][ $label ],
'options' => array(
'flip_horizontal' => array(
'title' => $i18n['mask_transform']['options']['flip_horizontal'],
'icon' => 'flip-horizontally',
),
'flip_vertical' => array(
'title' => $i18n['mask_transform']['options']['flip_vertical'],
'icon' => 'flip-vertically',
),
'rotate_90_degree' => array(
'title' => $i18n['mask_transform']['options']['rotate_90_degree'],
'icon' => 'rotate-90-degree',
),
'invert' => array(
'title' => $i18n['mask_transform']['options']['invert'],
'icon' => 'invert',
),
),
'show_if_not' => array(
"{$base_name}_enable_mask_style{$suffix}" => 'off',
),
)
);
$options[ "{$base_name}_mask_aspect_ratio{$suffix}" ] = ET_Builder_Element::background_field_template(
'mask_aspect_ratio',
array(
'default' => 'landscape',
'label' => $i18n['mask_aspect_ratio'][ $label ],
'options' => array(
'landscape' => array(
'title' => $i18n['mask_aspect_ratio']['options']['landscape'],
'icon' => 'aspect-ratio-landscape',
),
'square' => array(
'title' => $i18n['mask_aspect_ratio']['options']['square'],
'icon' => 'aspect-ratio-square',
),
'portrait' => array(
'title' => $i18n['mask_aspect_ratio']['options']['portrait'],
'icon' => 'aspect-ratio-portrait',
),
),
'show_if_not' => array(
"{$base_name}_enable_mask_style{$suffix}" => 'off',
),
)
);
$options[ "{$base_name}_mask_size{$suffix}" ] = ET_Builder_Element::background_field_template(
'mask_size',
array(
'default' => 'stretch',
'label' => $i18n['mask_size'][ $label ],
'options' => array(
'stretch' => $i18n['mask_size']['options']['stretch'],
'cover' => $i18n['mask_size']['options']['cover'],
'contain' => $i18n['mask_size']['options']['contain'],
'custom' => $i18n['mask_size']['options']['custom'],
),
'show_if_not' => array(
"{$base_name}_enable_mask_style{$suffix}" => 'off',
),
)
);
$options[ "{$base_name}_mask_width{$suffix}" ] = ET_Builder_Element::background_field_template(
'mask_width',
array(
'allowed_units' => et_pb_get_background_field_allowed_units(),
'allowed_values' => et_builder_get_acceptable_css_string_values( 'background-size' ),
'default' => 'auto',
'label' => $i18n['mask_width'][ $label ],
'show_if' => array(
"{$base_name}_mask_size{$suffix}" => 'custom',
),
)
);
$options[ "{$base_name}_mask_height{$suffix}" ] = ET_Builder_Element::background_field_template(
'mask_height',
array(
'allowed_units' => et_pb_get_background_field_allowed_units(),
'allowed_values' => et_builder_get_acceptable_css_string_values( 'background-size' ),
'default' => 'auto',
'label' => $i18n['mask_height'][ $label ],
'show_if' => array(
"{$base_name}_mask_size{$suffix}" => 'custom',
),
)
);
$options[ "{$base_name}_mask_position{$suffix}" ] = ET_Builder_Element::background_field_template(
'mask_position',
array(
'default' => 'center',
'label' => $i18n['mask_position'][ $label ],
'options' => et_pb_get_background_position_options(),
'show_if' => array(
"{$base_name}_mask_size{$suffix}" => array(
'cover',
'contain',
'custom',
),
),
)
);
$options[ "{$base_name}_mask_horizontal_offset{$suffix}" ] = ET_Builder_Element::background_field_template(
'mask_horizontal_offset',
array(
'allowed_units' => et_pb_get_background_field_allowed_units(),
'default' => '0',
'label' => $i18n['mask_horizontal_offset'][ $label ],
'show_if' => array(
"{$base_name}_mask_position{$suffix}" => array(
'top_left',
'top_right',
'center_left',
'center_right',
'bottom_left',
'bottom_right',
),
),
)
);
$options[ "{$base_name}_mask_vertical_offset{$suffix}" ] = ET_Builder_Element::background_field_template(
'mask_vertical_offset',
array(
'allowed_units' => et_pb_get_background_field_allowed_units(),
'default' => '0',
'label' => $i18n['mask_vertical_offset'][ $label ],
'show_if' => array(
"{$base_name}_mask_position{$suffix}" => array(
'top_left',
'top_center',
'top_right',
'bottom_left',
'bottom_center',
'bottom_right',
),
),
'show_if_not' => array(
"{$base_name}_mask_size{$suffix}" => 'contain',
),
)
);
$options[ "{$base_name}_mask_blend_mode{$suffix}" ] = ET_Builder_Element::background_field_template(
'mask_blend_mode',
array(
'default' => 'normal',
'label' => $i18n['mask_blend_mode'][ $label ],
'options' => et_pb_get_background_blend_mode_options(),
'show_if_not' => array(
"{$base_name}_enable_mask_style{$suffix}" => 'off',
),
)
);
if ( $specialty ) {
foreach ( array_keys( $options ) as $field ) {
$options[ $field ]['sub_toggle'] = 'column_%s';
}
}
$_cache[ $field_type ] = $options;
}
return isset( $_cache[ $field_type ] ) ? $_cache[ $field_type ] : array();
}

View File

@ -0,0 +1,454 @@
<?php
/**
* Functions needed for the Background Pattern Fields.
*
* @package Divi
* @subpackage Builder
* @since 4.15.0
*/
/**
* Pattern Fields Language Strings.
*
* @since 4.15.0
*
* @return array
*/
function et_pb_pattern_i18n() {
static $_i18n = null;
if ( is_null( $_i18n ) ) {
$_i18n = array(
'pattern_style' => array(
'label' => esc_html__( 'Pattern Style', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Pattern Style', 'et_builder' ),
),
'pattern_color' => array(
'label' => esc_html__( 'Pattern Color', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Pattern Color', 'et_builder' ),
),
'pattern_transform' => array(
'label' => esc_html__( 'Pattern Transform', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Pattern Transform', 'et_builder' ),
'options' => array(
'flip_horizontal' => esc_html__( 'Flip Horizontal', 'et_builder' ),
'flip_vertical' => esc_html__( 'Flip Vertical', 'et_builder' ),
'rotate_90_degree' => esc_html__( 'Rotate 90 degree', 'et_builder' ),
'invert' => esc_html__( 'Invert', 'et_builder' ),
),
),
'pattern_size' => array(
'label' => esc_html__( 'Pattern Size', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Pattern Size', 'et_builder' ),
'options' => array(
'initial' => et_builder_i18n( 'Actual Size' ),
'cover' => et_builder_i18n( 'Cover' ),
'contain' => et_builder_i18n( 'Fit' ),
'stretch' => et_builder_i18n( 'Stretch to Fill' ),
'custom' => et_builder_i18n( 'Custom Size' ),
),
),
'pattern_width' => array(
'label' => esc_html__( 'Pattern Width', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Pattern Width', 'et_builder' ),
),
'pattern_height' => array(
'label' => esc_html__( 'Pattern Height', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Pattern Height', 'et_builder' ),
),
'pattern_repeat_origin' => array(
'label' => esc_html__( 'Pattern Repeat Origin', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Pattern Repeat Origin', 'et_builder' ),
),
'pattern_horizontal_offset' => array(
'label' => esc_html__( 'Pattern Horizontal Offset', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Pattern Horizontal Offset', 'et_builder' ),
),
'pattern_vertical_offset' => array(
'label' => esc_html__( 'Pattern Vertical Offset', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Pattern Vertical Offset', 'et_builder' ),
),
'pattern_repeat' => array(
'label' => esc_html__( 'Pattern Repeat', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Pattern Repeat', 'et_builder' ),
),
'pattern_blend_mode' => array(
'label' => esc_html__( 'Pattern Blend Mode', 'et_builder' ),
'column_label' => esc_html__( 'Column %s Background Pattern Blend Mode', 'et_builder' ),
),
);
}
return $_i18n;
}
/**
* Pattern Field Templates.
*
* @since 4.15.0
*
* @return array[]
*/
function et_ph_pattern_field_templates() {
return array(
'pattern_style' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'tab_filler' => true,
'type' => 'select-pattern',
),
'pattern_color' => array(
'custom_color' => true,
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'type' => 'color-alpha',
),
'pattern_transform' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'multi_selection' => true,
'option_category' => 'configuration',
'sticky' => true,
'toggleable' => true,
'type' => 'multiple_buttons',
),
'pattern_size' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'type' => 'select',
),
'pattern_width' => array(
'allow_empty' => true,
'default_on_child' => true,
'default_unit' => 'px',
'fixed_range' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'range_settings' => array(
'min' => 0,
'min_limit' => 0,
'max' => 1000,
'step' => 1,
),
'type' => 'range',
'validate_unit' => true,
),
'pattern_height' => array(
'allow_empty' => true,
'default_on_child' => true,
'default_unit' => 'px',
'fixed_range' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'range_settings' => array(
'min' => 0,
'min_limit' => 0,
'max' => 1000,
'step' => 1,
),
'type' => 'range',
'validate_unit' => true,
),
'pattern_repeat_origin' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'type' => 'select',
),
'pattern_horizontal_offset' => array(
'default_on_child' => true,
'default_unit' => '%',
'fixed_range' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'range_settings' => array(
'min' => - 100,
'max' => 100,
'step' => 1,
),
'type' => 'range',
'validate_unit' => true,
),
'pattern_vertical_offset' => array(
'default_on_child' => true,
'default_unit' => '%',
'fixed_range' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'range_settings' => array(
'min' => - 100,
'max' => 100,
'step' => 1,
),
'type' => 'range',
'validate_unit' => true,
),
'pattern_repeat' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'type' => 'select',
),
'pattern_blend_mode' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'type' => 'select',
),
'enable_pattern_style' => array(
'default_on_child' => true,
'hover' => 'tabs',
'mobile_options' => true,
'option_category' => 'configuration',
'sticky' => true,
'type' => 'skip',
),
);
}
/**
* Generates Background Pattern fields.
*
* @since 4.15.0
*
* @param string $base_name background base name.
* @param bool $specialty whether return field for specialty section column.
*
* @return array
*/
function et_pb_get_pattern_fields( $base_name, $specialty = false ) {
static $_cache = null;
$suffix = $specialty ? '_%s' : '';
$field_type = "{$base_name}{$suffix}";
if ( ! isset( $_cache[ $field_type ] ) ) {
$i18n = et_pb_pattern_i18n();
$label = $specialty ? 'column_label' : 'label';
$options = array();
$options[ "{$base_name}_enable_pattern_style{$suffix}" ] = ET_Builder_Element::background_field_template(
'enable_pattern_style',
array(
'default' => 'off',
)
);
$options[ "{$base_name}_pattern_style{$suffix}" ] = ET_Builder_Element::background_field_template(
'pattern_style',
array(
'default' => et_pb_background_pattern_options()->get_default_style_name(),
'label' => $i18n['pattern_style'][ $label ],
'options' => et_pb_get_pattern_style_options(),
'copy_with' => array(
"{$base_name}_enable_pattern_style{$suffix}",
),
)
);
$options[ "{$base_name}_pattern_color{$suffix}" ] = ET_Builder_Element::background_field_template(
'pattern_color',
array(
'default' => 'rgba(0,0,0,0.2)',
'label' => $i18n['pattern_color'][ $label ],
'show_if_not' => array(
"{$base_name}_enable_pattern_style{$suffix}" => 'off',
),
)
);
$options[ "{$base_name}_pattern_transform{$suffix}" ] = ET_Builder_Element::background_field_template(
'pattern_transform',
array(
'default' => '',
'label' => $i18n['pattern_transform'][ $label ],
'options' => array(
'flip_horizontal' => array(
'title' => $i18n['pattern_transform']['options']['flip_horizontal'],
'icon' => 'flip-horizontally',
),
'flip_vertical' => array(
'title' => $i18n['pattern_transform']['options']['flip_vertical'],
'icon' => 'flip-vertically',
),
'rotate_90_degree' => array(
'title' => $i18n['pattern_transform']['options']['rotate_90_degree'],
'icon' => 'rotate-90-degree',
),
'invert' => array(
'title' => $i18n['pattern_transform']['options']['invert'],
'icon' => 'invert',
),
),
'show_if_not' => array(
"{$base_name}_enable_pattern_style{$suffix}" => 'off',
),
)
);
$options[ "{$base_name}_pattern_size{$suffix}" ] = ET_Builder_Element::background_field_template(
'pattern_size',
array(
'default' => 'initial',
'label' => $i18n['pattern_size'][ $label ],
'options' => array(
'initial' => $i18n['pattern_size']['options']['initial'],
'cover' => $i18n['pattern_size']['options']['cover'],
'contain' => $i18n['pattern_size']['options']['contain'],
'stretch' => $i18n['pattern_size']['options']['stretch'],
'custom' => $i18n['pattern_size']['options']['custom'],
),
'show_if_not' => array(
"{$base_name}_enable_pattern_style{$suffix}" => 'off',
),
)
);
$options[ "{$base_name}_pattern_width" ] = ET_Builder_Element::background_field_template(
'pattern_width',
array(
'allowed_units' => et_pb_get_background_field_allowed_units(),
'allowed_values' => et_builder_get_acceptable_css_string_values( 'background-size' ),
'default' => 'auto',
'label' => $i18n['pattern_width'][ $label ],
'show_if' => array(
"{$base_name}_pattern_size{$suffix}" => 'custom',
),
)
);
$options[ "{$base_name}_pattern_height{$suffix}" ] = ET_Builder_Element::background_field_template(
'pattern_height',
array(
'allowed_units' => et_pb_get_background_field_allowed_units(),
'allowed_values' => et_builder_get_acceptable_css_string_values( 'background-size' ),
'default' => 'auto',
'label' => $i18n['pattern_height'][ $label ],
'show_if' => array(
"{$base_name}_pattern_size{$suffix}" => 'custom',
),
)
);
$options[ "{$base_name}_pattern_repeat_origin{$suffix}" ] = ET_Builder_Element::background_field_template(
'pattern_repeat_origin',
array(
'default' => 'top_left',
'label' => $i18n['pattern_repeat_origin'][ $label ],
'options' => et_pb_get_background_position_options(),
'show_if' => array(
"{$base_name}_pattern_repeat{$suffix}" => array(
'repeat',
'repeat-x',
'repeat-y',
'round',
),
),
)
);
$options[ "{$base_name}_pattern_horizontal_offset{$suffix}" ] = ET_Builder_Element::background_field_template(
'pattern_horizontal_offset',
array(
'allowed_units' => et_pb_get_background_field_allowed_units(),
'default' => '0',
'label' => $i18n['pattern_horizontal_offset'][ $label ],
'show_if' => array(
"{$base_name}_pattern_repeat_origin{$suffix}" => array(
'top_left',
'top_right',
'center_left',
'center_right',
'bottom_left',
'bottom_right',
),
),
)
);
$options[ "{$base_name}_pattern_vertical_offset{$suffix}" ] = ET_Builder_Element::background_field_template(
'pattern_vertical_offset',
array(
'allowed_units' => et_pb_get_background_field_allowed_units(),
'default' => '0',
'label' => $i18n['pattern_vertical_offset'][ $label ],
'show_if' => array(
"{$base_name}_pattern_repeat_origin{$suffix}" => array(
'top_left',
'top_center',
'top_right',
'bottom_left',
'bottom_center',
'bottom_right',
),
),
'show_if_not' => array(
"{$base_name}_pattern_size{$suffix}" => 'contain',
),
)
);
$options[ "{$base_name}_pattern_repeat{$suffix}" ] = ET_Builder_Element::background_field_template(
'pattern_repeat',
array(
'default' => 'repeat',
'label' => $i18n['pattern_repeat'][ $label ],
'options' => et_pb_get_background_repeat_options( false ),
'show_if' => array(
"{$base_name}_pattern_size{$suffix}" => array(
'initial',
'cover',
'contain',
'custom',
),
),
)
);
$options[ "{$base_name}_pattern_blend_mode{$suffix}" ] = ET_Builder_Element::background_field_template(
'pattern_blend_mode',
array(
'default' => 'normal',
'label' => $i18n['pattern_blend_mode'][ $label ],
'options' => et_pb_get_background_blend_mode_options(),
'show_if_not' => array(
"{$base_name}_enable_pattern_style{$suffix}" => 'off',
),
)
);
if ( $specialty ) {
foreach ( array_keys( $options ) as $field ) {
$options[ $field ]['sub_toggle'] = 'column_%s';
}
}
$_cache[ $field_type ] = $options;
}
return isset( $_cache[ $field_type ] ) ? $_cache[ $field_type ] : array();
}

View File

@ -0,0 +1,186 @@
# Adding New Mask Style
To add new Mask style in the Divi Builder follow the Actions Items.
## Action Items
- [ ] Copy Mask Template (see bellow).
- [ ] Replace `NAME`, all the `ET_Builder_Mask_NAME` in the template (3 places).
- [ ] Replace `TITLE` in the template (2 places).
- [ ] Replace `PRIORITY` in the template, lower number will make it show-up early in Mask Style Dropdown list in the VB.
- [ ] Save in a new file, e.g: `some-name.php`, in this folder, add/commit to the repository.
**Tip**:
- For `NAME`, if it's multiple words like `Diagonal Lines`, use `_` to join, e.g `Diagonal_Lines`.
- For `filename`, if it's multiple words like `Diagonal Lines`, use `-` to join and make it lower case, e.g `diagonal-lines.php`.
- Once new `filename.php` placed in this folder, the new mask would automatically appear in the VB (just refresh).
- `landscape`, `portrait` and `square` should only contain all tags inside the `<svg></svg>` file, e.g:
```
'landscape' => '<path d="M28,28H56V56H28ZM0,0H28V28H0Z"/>',
```
<hr>
### Regular Mask Template:
```
<?php
/**
* Background Mask Style - TITLE.
*
* @package Divi
* @sub-package Builder
* @since ??
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_NAME
*
* @since ??
*/
class ET_Builder_Mask_NAME extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'TITLE', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '',
'portrait' => '',
'square' => '',
),
'default-inverted' => array(
'landscape' => '',
'portrait' => '',
'square' => '',
),
'rotated' => array(
'landscape' => '',
'portrait' => '',
'square' => '',
),
'rotated-inverted' => array(
'landscape' => '',
'portrait' => '',
'square' => '',
),
),
// Replace following PRIORITY with number (1-9) and uncomment to make it on top 9 list.
// phpcs:ignore Squiz.PHP.CommentedOutCode.Found -- temporary comment.
// 'priority' => PRIORITY,
);
}
}
return new ET_Builder_Mask_NAME();
```
<hr>
### Extended Mask Template:
We're using following default `viewBox` settings for all masks ([Code Ref](https://github.com/elegantthemes/submodule-builder/blob/a54a40832c4abc5777b1f3fad52ad2cabde6f97f/module/settings/BackgroundMaskOptions.php#L195-L202)).
```
/**
* Default viewBox settings for Mask.
*
* @return string[]
*/
public function view_box_settings() {
return array(
'landscape' => '0 0 1920 1440',
'portrait' => '0 0 1920 2560',
'square' => '0 0 1920 1920',
'thumbnail' => '0 0 1920 1440',
);
}
```
Also, we're using svgContent of `square` to show as `thumbnail` to display in Dropdown Style list in the VB.
In case a mask need any custom value for viewBox and/or custom thumbnail, can be done like following:
```
<?php
/**
* Background Mask Style - TITLE.
*
* @package Divi
* @sub-package Builder
* @since ??
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_NAME
*
* @since ??
*/
class ET_Builder_Mask_NAME extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'TITLE', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '',
'portrait' => '',
'square' => '',
),
'default-inverted' => array(
'landscape' => '',
'portrait' => '',
'square' => '',
),
'rotated' => array(
'landscape' => '',
'portrait' => '',
'square' => '',
),
'rotated-inverted' => array(
'landscape' => '',
'portrait' => '',
'square' => '',
),
// Following is optional, uncomment it if don't want to reuse landscape value.
// 'thumbnail' => '',
),
// Replace following PRIORITY with number (1-9) and uncomment to make it on top 9 list.
// phpcs:ignore Squiz.PHP.CommentedOutCode.Found -- temporary comment.
// 'priority' => PRIORITY,
// Following is optional, remove any number of them if you want to reuse global settings.
'viewBox' => array(
'landscape' => '0 0 1920 1440',
'portrait' => '0 0 1920 2560',
'square' => '0 0 1920 1920',
'thumbnail' => '0 0 1920 1440',
),
);
}
}
return new ET_Builder_Mask_NAME();
```
The Code works as following:
- Look for `viewBox` value from mask file, if not exists, global settings are used.
- Look for `thumbnail` value from `svgContent` array from mask file, if not exists, `square` value is used.
<hr>
**Last Updated**: Feb 10, 2022.

View File

@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Arch.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Arch
*
* @since 4.15.0
*/
class ET_Builder_Mask_Arch extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Arch', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M1175.84,0H0V1440H1176.38c-110.64-207.53-174.88-454.91-174.88-720.5C1001.5,454.33,1065.54,207.33,1175.84,0Z"/>',
'portrait' => '<path d="M1175.43,0H0V2560H1176.38c-196.68-368.95-310.9-808.72-310.9-1280.89C865.48,807.7,979.33,368.58,1175.43,0Z"/>',
'square' => '<path d="M1175.66,0H0V1920H1176.38c-147.51-276.71-233.17-606.54-233.17-960.67C943.21,605.78,1028.59,276.44,1175.66,0Z"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M1920,0H1175.84c-110.3,207.33-174.34,454.33-174.34,719.5,0,265.59,64.24,513,174.88,720.5H1920Z"/>',
'portrait' => '<path d="M1175.43,0H1920V2560H1176.38c-196.68-368.95-310.9-808.72-310.9-1280.89C865.48,807.7,979.33,368.58,1175.43,0Z"/>',
'square' => '<path d="M1175.66,0H1920V1920H1176.38c-147.51-276.71-233.17-606.54-233.17-960.67C943.21,605.78,1028.59,276.44,1175.66,0Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M0,545.16V1440H1920V544.62C1643.29,655.26,1313.46,719.5,959.33,719.5,605.78,719.5,276.44,655.46,0,545.16Z"/>',
'portrait' => '<path d="M0,1048.43V2560H1920V1047.72c-276.71,147.51-606.54,233.17-960.67,233.17C605.78,1280.89,276.44,1195.51,0,1048.43Z"/>',
'square' => '<path d="M0,728.34V1920H1920V727.62c-276.71,147.51-606.54,233.17-960.67,233.17C605.78,960.79,276.44,875.41,0,728.34Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M0,545.16V0H1920V544.62C1643.29,655.26,1313.46,719.5,959.33,719.5,605.78,719.5,276.44,655.46,0,545.16Z"/>',
'portrait' => '<path d="M0,1048.43V0H1920V1047.72c-276.71,147.51-606.54,233.17-960.67,233.17C605.78,1280.89,276.44,1195.51,0,1048.43Z"/>',
'square' => '<path d="M0,728.34V0H1920V727.62c-276.71,147.51-606.54,233.17-960.67,233.17C605.78,960.79,276.44,875.41,0,728.34Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Arch();

View File

@ -0,0 +1,66 @@
<?php
/**
* Background Mask Style - Bean.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Bean
*
* @since 4.15.0
*/
class ET_Builder_Mask_Bean extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Bean', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M0,1440H1920V0H0ZM729.79,450c112.5,8.65,199.22-58.32,293-101.82,36.35-25.81,75.42-47.67,120.66-60.64,411.05-130.29,634.07,288.11,369.08,599.49-3.24,4.19-6.56,8.32-9.91,12.42-47.1,57.67-104.37,106.58-168.16,146.51-333,208.45-851,170.72-1006.95-133.47-18.53-36.13-20.8-89.14-3.36-140-10.74-23.07-22-46.55-26.65-72C253.28,457.35,515.27,433.55,729.79,450Z"/>
<path fill-opacity=".4" d="M1178.93,307.43c-57.11.78-107.59,18.28-156.1,40.78,36.35-25.81,75.42-47.67,120.66-60.64,411.05-130.29,634.07,288.11,369.08,599.49-3.24,4.19-6.56,8.32-9.91,12.42C1683.16,653.44,1539.44,291.86,1178.93,307.43ZM324.19,772.53c-17.44,50.85-15.17,103.86,3.36,140,156,304.19,674,341.92,1007,133.47C1004.57,1239.39,478.65,1104.63,324.19,772.53Z"/>',
'portrait' => '<path d="M0,0V2560H1920V0ZM1512.57,1447.06c-3.24,4.19-6.56,8.32-9.91,12.42-47.1,57.67-104.37,106.58-168.16,146.51-333,208.45-851,170.72-1006.95-133.47-18.53-36.13-20.8-89.14-3.36-140-10.74-23.07-22-46.55-26.65-72-44.26-243.16,217.73-267,432.25-250.48,112.5,8.65,199.22-58.32,293-101.82,36.35-25.81,75.42-47.67,120.67-60.64C1554.54,717.28,1777.56,1135.68,1512.57,1447.06Z"/>
<path fill-opacity=".4" d="M1512.57,1447.06c-3.24,4.19-6.56,8.32-9.91,12.42,180.5-246,36.78-607.62-323.73-592.05-57.11.78-107.59,18.28-156.1,40.78,36.35-25.81,75.42-47.67,120.67-60.64C1554.54,717.28,1777.56,1135.68,1512.57,1447.06ZM324.19,1332.53c-17.44,50.85-15.17,103.86,3.36,140,156,304.19,674,341.92,1007,133.47C1004.57,1799.39,478.65,1664.63,324.19,1332.53Z"/>',
'square' => '<path d="M0,1920H1920V0H0ZM729.79,690c112.5,8.65,199.22-58.32,293-101.82,36.35-25.81,75.42-47.67,120.67-60.64,411-130.29,634.06,288.11,369.07,599.49-3.24,4.19-6.56,8.32-9.91,12.42-47.1,57.67-104.37,106.58-168.16,146.51-333,208.45-851,170.72-1006.95-133.47-18.53-36.13-20.8-89.14-3.36-140-10.74-23.07-22-46.55-26.65-72C253.28,697.35,515.27,673.55,729.79,690Z"/>
<path fill-opacity=".4" d="M1334.5,1286c-333,208.45-851,170.72-1006.95-133.47-18.53-36.13-20.8-89.14-3.36-140C478.65,1344.63,1004.57,1479.39,1334.5,1286Zm168.16-146.51c3.35-4.1,6.67-8.23,9.91-12.42,265-311.38,42-729.78-369.07-599.49-45.25,13-84.32,34.83-120.67,60.64,48.51-22.5,99-40,156.1-40.78C1539.44,531.86,1683.16,893.44,1502.66,1139.48Z"/>',
),
'default-inverted' => array(
'landscape' => '<path fill-opacity=".4" d="M1178.93,307.43c-57.11.78-107.59,18.28-156.1,40.78,36.35-25.81,75.42-47.67,120.66-60.64,411.05-130.29,634.07,288.11,369.08,599.49-3.24,4.19-6.56,8.32-9.91,12.42C1683.16,653.44,1539.44,291.86,1178.93,307.43ZM324.19,772.53c-17.44,50.85-15.17,103.86,3.36,140,156,304.19,674,341.92,1007,133.47C1004.57,1239.39,478.65,1104.63,324.19,772.53Z"/>
<path d="M324.19,772.53c154.46,332.1,680.38,466.86,1010.31,273.46,63.79-39.93,121.06-88.84,168.16-146.51,180.5-246,36.78-607.62-323.73-592-57.11.78-107.59,18.28-156.1,40.78C929,391.71,842.29,458.68,729.79,450c-214.52-16.48-476.51,7.32-432.25,250.48C302.18,726,313.45,749.46,324.19,772.53Z"/>',
'portrait' => '<path fill-opacity=".4" d="M1512.57,1447.06c-3.24,4.19-6.56,8.32-9.91,12.42,180.5-246,36.78-607.62-323.73-592.05-57.11.78-107.59,18.28-156.1,40.78,36.35-25.81,75.42-47.67,120.67-60.64C1554.54,717.28,1777.56,1135.68,1512.57,1447.06ZM324.19,1332.53c-17.44,50.85-15.17,103.86,3.36,140,156,304.19,674,341.92,1007,133.47C1004.57,1799.39,478.65,1664.63,324.19,1332.53Z"/>
<path d="M1178.93,867.43c-57.11.78-107.59,18.28-156.1,40.78-93.82,43.5-180.54,110.47-293,101.82-214.52-16.48-476.51,7.32-432.25,250.48,4.64,25.47,15.91,49,26.65,72,154.46,332.1,680.38,466.86,1010.31,273.46,63.79-39.93,121.06-88.84,168.16-146.51C1683.16,1213.44,1539.44,851.86,1178.93,867.43Z"/>',
'square' => '<path fill-opacity=".4" d="M1334.5,1286c-333,208.45-851,170.72-1006.95-133.47-18.53-36.13-20.8-89.14-3.36-140C478.65,1344.63,1004.57,1479.39,1334.5,1286Zm168.16-146.51c3.35-4.1,6.67-8.23,9.91-12.42,265-311.38,42-729.78-369.07-599.49-45.25,13-84.32,34.83-120.67,60.64,48.51-22.5,99-40,156.1-40.78C1539.44,531.86,1683.16,893.44,1502.66,1139.48Z"/>
<path d="M324.19,1012.53c154.46,332.1,680.38,466.86,1010.31,273.46,63.79-39.93,121.06-88.84,168.16-146.51,180.5-246,36.78-607.62-323.73-592.05-57.11.78-107.59,18.28-156.1,40.78C929,631.71,842.29,698.68,729.79,690c-214.52-16.48-476.51,7.32-432.25,250.48C302.18,966,313.45,989.46,324.19,1012.53Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M0,1440H1920V0H0ZM720.14,861.63c22.44-87.43-18.28-165.06-39.52-245-15.28-32.23-27.07-66-31-103.49-45.54-341.95,315.07-459.52,523.58-207.5,2.85,3.14,5.64,6.32,8.4,9.53,38.9,45.12,69.48,97,92.08,152.84,118,291.28,16.28,694.15-245.05,774.78-31,9.58-73.11,4-110.75-16.79-19.67,5.24-39.74,10.87-60.45,11C659.71,1238.06,677.35,1028.35,720.14,861.63Z"/>
<path fill-opacity=".4" d="M670.18,488c-7.32,45.11-.54,87.31,10.44,128.66-15.28-32.23-27.07-66-31-103.49-45.54-341.95,315.07-459.52,523.58-207.5,2.85,3.14,5.64,6.32,8.4,9.53C1012.83,138.78,708,201.78,670.18,488Zm247.69,738c37.64,20.8,79.72,26.37,110.75,16.79,261.33-80.63,363-483.5,245.05-774.78C1380.2,754.8,1201,1150.42,917.87,1226Z"/>',
'portrait' => '<path d="M0,0V2560H1920V0ZM1220.47,764.83c3.56,3.93,7,7.91,10.51,11.92,48.63,56.4,86.84,121.29,115.09,191,147.47,364.1,20.35,867.69-306.3,968.48-38.8,12-91.4,5-138.44-21-24.59,6.56-49.67,13.59-75.56,13.73-247.15,1.36-225.1-260.77-171.61-469.17,28.05-109.3-22.85-206.33-49.4-306.27-19.1-40.28-33.84-82.56-38.76-129.37C509.07,596.77,959.84,449.8,1220.47,764.83Z"/>
<path fill-opacity=".4" d="M1220.47,764.83c3.56,3.93,7,7.91,10.51,11.92C1020,556.27,639,635,591.72,992.75c-9.15,56.38-.68,109.13,13,160.82-19.1-40.28-33.84-82.56-38.76-129.37C509.07,596.77,959.84,449.8,1220.47,764.83ZM901.33,1915.28c47,26,99.64,33,138.44,21,326.65-100.79,453.77-604.38,306.3-968.48C1479.24,1326.3,1255.2,1820.83,901.33,1915.28Z"/>',
'square' => '<path d="M0,1920H1920V0H0Zm654.16-780.16c28.05-109.3-22.85-206.33-49.4-306.28C585.66,793.29,570.92,751,566,704.2c-56.93-427.43,393.84-574.4,654.47-259.37,3.56,3.93,7,7.91,10.51,11.92,48.63,56.4,86.84,121.29,115.09,191,147.47,364.1,20.35,867.69-306.3,968.48-38.8,12-91.4,5-138.44-21-24.59,6.56-49.67,13.59-75.56,13.73C578.62,1610.37,600.67,1348.24,654.16,1139.84Z"/>
<path fill-opacity=".4" d="M1346.07,647.79c147.47,364.1,20.35,867.69-306.3,968.48-38.8,12-91.4,5-138.44-21C1255.2,1500.83,1479.24,1006.3,1346.07,647.79ZM1231,456.75c-3.46-4-7-8-10.51-11.92C959.84,129.8,509.07,276.77,566,704.2c4.92,46.81,19.66,89.09,38.76,129.36-13.72-51.68-22.19-104.43-13-160.81C639,315,1020,236.27,1231,456.75Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path fill-opacity=".4" d="M670.18,488c-7.32,45.11-.54,87.31,10.44,128.66-15.28-32.23-27.07-66-31-103.49-45.54-341.95,315.07-459.52,523.58-207.5,2.85,3.14,5.64,6.32,8.4,9.53C1012.83,138.78,708,201.78,670.18,488Zm247.69,738c37.64,20.8,79.72,26.37,110.75,16.79,261.33-80.63,363-483.5,245.05-774.78C1380.2,754.8,1201,1150.42,917.87,1226Z"/>
<path d="M917.87,1226c283.1-75.57,462.33-471.19,355.8-758-22.6-55.8-53.18-107.72-92.08-152.84C1012.83,138.78,708,201.78,670.18,488c-7.32,45.11-.54,87.31,10.44,128.66,21.24,80,62,157.58,39.52,245-42.79,166.72-60.43,376.43,137.28,375.34C878.13,1236.86,898.2,1231.23,917.87,1226Z"/>',
'portrait' => '<path fill-opacity=".4" d="M1220.47,764.83c3.56,3.93,7,7.91,10.51,11.92C1020,556.27,639,635,591.72,992.75c-9.15,56.38-.68,109.13,13,160.82-19.1-40.28-33.84-82.56-38.76-129.37C509.07,596.77,959.84,449.8,1220.47,764.83ZM901.33,1915.28c47,26,99.64,33,138.44,21,326.65-100.79,453.77-604.38,306.3-968.48C1479.24,1326.3,1255.2,1820.83,901.33,1915.28Z"/>
<path d="M591.72,992.75c-9.15,56.38-.68,109.13,13,160.82,26.55,99.94,77.45,197,49.4,306.27-53.49,208.4-75.54,470.53,171.61,469.17,25.89-.14,51-7.17,75.56-13.73,353.87-94.45,577.91-589,444.74-947.49-28.25-69.75-66.46-134.64-115.09-191C1020,556.27,639,635,591.72,992.75Z"/>',
'square' => '<path fill-opacity=".4" d="M1346.07,647.79c147.47,364.1,20.35,867.69-306.3,968.48-38.8,12-91.4,5-138.44-21C1255.2,1500.83,1479.24,1006.3,1346.07,647.79ZM1231,456.75c-3.46-4-7-8-10.51-11.92C959.84,129.8,509.07,276.77,566,704.2c4.92,46.81,19.66,89.09,38.76,129.36-13.72-51.68-22.19-104.43-13-160.81C639,315,1020,236.27,1231,456.75Z"/>
<path d="M901.33,1595.28c353.87-94.45,577.91-589,444.74-947.49-28.25-69.75-66.46-134.64-115.09-191C1020,236.27,639,315,591.72,672.75c-9.15,56.38-.68,109.13,13,160.81,26.55,100,77.45,197,49.4,306.28-53.49,208.4-75.54,470.53,171.61,469.17C851.66,1608.87,876.74,1601.84,901.33,1595.28Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Bean();

View File

@ -0,0 +1,59 @@
<?php
/**
* Background Mask Style - Blades.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Blades
*
* @since 4.15.0
*/
class ET_Builder_Mask_Blades extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Blades', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M1919.53,694.81q0-29.94,0-59.74L1648,917.13v-7.3l271.5-282.05c0-131.69-.06-259.19,0-364.49L1005,1213.3V387L1377.55,0H0V1440H1202.22Z"/>
<path d="M1585.93,1440H1920s-.12-146.87-.26-346.79Z"/>',
'portrait' => '<polygon points="1919.53 694.81 1919.51 635.07 1648 917.13 1648 909.83 1919.5 627.78 1919.47 263.29 1005 1213.3 1005 387.03 1377.56 0 0 0 0 1920 740 1920 1919.53 694.81"/>
<polygon points="1124 1920 1920 1920 1919.74 1093.21 1124 1920"/>',
'square' => '<polygon points="1919.74 1093.21 769.79 2288 385.84 2288 1919.53 694.81 1919.51 635.07 1648 917.13 1648 909.83 1919.5 627.78 1919.47 263.29 1005 1213.3 1005 387.03 1377.56 0 0 0 0 2560 1919.5 2560 1920 2560 1919.74 1093.21"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M1920,0V260.31l-915,953V387L1377.55,0ZM1648,909.83v7.3l272-284.59v-7.3ZM1202.22,1440h383.71L1920,1090.83V692Z"/>',
'portrait' => '<path d="M1920,691.2V1090L769.79,2288H385.84ZM1648,909.83v7.3l272-284.62v-7.3ZM1377.55,0,1005,387V1213.3l915-953.45V0Z"/>',
'square' => '<path d="M1920,625.21v7.3L1648,917.13v-7.3ZM740,1920h384l796-829.85V691.29ZM1377.55,0,1005,387V1213.3l915-953.45V0Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M1174.81.47l-59.74,0L1397.13,272h-7.3L1107.78.5c-131.69,0-259.19.06-364.49,0L1693.3,915H867L0,80V1440H1920V717.78Z"/>
<path d="M1920,334.07V0s-146.87.13-346.79.26Z"/>',
'portrait' => '<polygon points="694.81 0.47 635.07 0.49 917.13 272 909.83 272 627.78 0.5 263.29 0.53 1213.3 915 387.03 915 0 542.45 0 2560 1920 2560 1920 1180 694.81 0.47"/>
<polygon points="1920 796 1920 0 1093.21 0.26 1920 796"/>',
'square' => '<polygon points="694.81 0.47 635.07 0.49 917.13 272 909.83 272 627.78 0.5 263.29 0.53 1213.3 915 387.03 915 0 542.45 0 1920 1920 1920 1920 1180 694.81 0.47"/>
<polygon points="1920 796 1920 0 1093.21 0.26 1920 796"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M0,0H741.39L1693.3,915H867L0,80ZM1389.83,272h7.3L1114.57,0h-6.83ZM1175,0l745,717.78V334.07L1573.14,0Z"/>',
'portrait' => '<path d="M0,0,262.32.06,1786.3,1477H960L0,542.45ZM909.83,272h7.3L634.88.15H628.2ZM1920,796,1093.21.26,694.9.16,1920,1180Z"/>',
'square' => '<path d="M0,0,262.32.06,1213.3,915H387L0,542.45ZM909.83,272h7.3L634.88.15H628.2ZM1920,796,1093.21.26,694.9.16,1920,1180Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Blades();

View File

@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Caret.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Caret
*
* @since 4.15.0
*/
class ET_Builder_Mask_Caret extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Caret', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<polygon points="1241.5 0 0 0 0 1440 1241.82 1440 1016 719.5 1241.5 0"/>',
'portrait' => '<polygon points="1327.2 0 0 0 0 2560 1327.76 2560 926.3 1279.11 1327.2 0"/>',
'square' => '<polygon points="1241.4 0 0 0 0 1920 1241.82 1920 940.73 959.33 1241.4 0"/>',
),
'default-inverted' => array(
'landscape' => '<polygon points="1920 0 1241.5 0 1016 719.5 1241.82 1440 1920 1440 1920 0"/>',
'portrait' => '<polygon points="1327.2 0 1920 0 1920 2560 1327.76 2560 926.3 1279.11 1327.2 0"/>',
'square' => '<polygon points="1241.4 0 1920 0 1920 1920 1241.82 1920 940.73 959.33 1241.4 0"/>',
),
'rotated' => array(
'landscape' => '<polygon points="0 428.6 0 1440 1920 1440 1920 428.18 959.33 729.27 0 428.6"/>',
'portrait' => '<polygon points="0 991.6 0 2560 1920 2560 1920 991.18 959.33 1292.27 0 991.6"/>',
'square' => '<polygon points="0 669.6 0 1920 1920 1920 1920 669.18 959.33 970.27 0 669.6"/>',
),
'rotated-inverted' => array(
'landscape' => '<polygon points="0 428.6 0 0 1920 0 1920 428.18 959.33 729.27 0 428.6"/>',
'portrait' => '<polygon points="0 991.6 0 0 1920 0 1920 991.18 959.33 1292.27 0 991.6"/>',
'square' => '<polygon points="0 669.6 0 0 1920 0 1920 669.18 959.33 970.27 0 669.6"/>',
),
),
);
}
}
return new ET_Builder_Mask_Caret();

View File

@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Chevrons.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Chevrons
*
* @since 4.15.0
*/
class ET_Builder_Mask_Chevrons extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Chevrons', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M856.08,720,565.7,1440H0V0H565.7ZM1006.14,0H816.2l290.38,720-1.51,3.74L816.2,1440h189.94l290.39-720ZM1190.7,0H1081.62L1372,720l-290.39,720H1190.7l290.38-720ZM794.63,0H568.2L858.58,720l-.17.43L568.2,1440H794.63L1085,720Zm610.79,0H1374l290.39,720L1374,1440h31.42l290.39-720Z"/>',
'portrait' => '<path d="M1335,1280,818.72,2560H416.17L932.1,1280.77l.3-.77L416.17,0H818.72ZM411.73,0H0V2560H411.73L928,1280ZM1920,984.77,1522.83,0H1328.92l516.24,1280L1328.92,2560h193.91L1920,1575.23ZM1194.74,0H857.06L1373.3,1280l-2.69,6.65L857.06,2560h337.68L1711,1280Z"/>',
'square' => '<path d="M692.18,960,305,1920H0V0H305ZM892.25,0H639l387.17,960-2,5L639,1920H892.26l387.17-960Zm246.08,0H992.89l387.18,960L992.89,1920h145.44l387.18-960ZM610.24,0H308.33L695.51,960l-.24.58L308.33,1920H610.24L997.42,960Zm814.39,0h-41.9l387.18,960-387.18,960h41.9l387.18-960Z"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M1664.39,720,1374,1440H1190.7l290.38-720L1190.7,0H1374Zm-805.81,0L568.2,0h-2.5L856.08,720,565.7,1440h2.5L858.41,720.43Zm223-720h-75.48l290.39,720-290.39,720h75.48L1372,720Zm25,720L816.2,0H794.63L1085,720,794.63,1440H816.2l288.87-716.26Zm589.23,0-290.39,720H1920V0H1405.42Z"/>',
'portrait' => '<path d="M1845.16,1280,1328.92,2560H1194.74L1711,1280,1194.74,0h134.18Zm-912.76,0L416.17,0h-4.44L928,1280,411.73,2560h4.44L932.1,1280.77ZM1522.83,0,1920,984.77V0ZM1373.3,1280,857.06,0H818.72L1335,1280,818.72,2560h38.34l513.55-1273.35ZM1920,2560V1575.23L1522.83,2560Z"/>',
'square' => '<path d="M1024.16,965,639,1920H610.24L997.42,960,610.24,0H639l387.17,960ZM992.89,0H892.25l387.18,960L892.26,1920H992.89l387.18-960Zm389.84,0h-244.4l387.18,960-387.18,960h244.4l387.18-960Zm429.08,960-387.18,960H1920V0H1424.63Zm-1116.3,0L308.33,0H305L692.18,960,305,1920h3.33L695.27,960.58Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M960,677.48l960,387.18v301.92L960.58,979.63l-.58-.23L0,1366.58V1064.66ZM0,1369.91V1440H1920v-70.09L960,982.73ZM620.55,0,0,250.28v41.89L724.43,0Zm678.9,0H1195.57L1920,292.17V250.28ZM0,536.58V682L960,294.83,1920,682V536.58L960,149.4ZM0,782.65v253.26L960,648.73l5,2,955,385.17V782.65L960,395.47Z"/>',
'portrait' => '<path d="M960,1493.73l960,387.18V2560H0V1880.91ZM0,1293.65v253.26l960-387.18,5,2,955,385.17V1293.65L960,906.47Zm0-246.07V1193L960,805.83,1920,1193V1047.58L960,660.4Zm0,528.08v301.92L960,1490.4l.58.23L1920,1877.58V1575.66L960,1188.48ZM0,761.28v41.89L960,416l960,387.18V761.28L960,374.1Z"/>',
'square' => '<path d="M960,1227.82,1920,1615v305H0V1615ZM0,1027.75V1281L960,893.83l5,2L1920,1281V1027.74L960,640.57ZM0,781.67V927.11L960,539.93l960,387.18V781.67L960,394.49Zm0,528.09v301.91l960-387.18.58.24L1920,1611.67V1309.76L960,922.58ZM0,495.37v41.9L960,150.09l960,387.18v-41.9L960,108.19Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M1920,0V250.28L1299.45,0ZM960,648.73,0,1035.91v28.75L960,677.48l960,387.18v-28.75L965,650.74Zm0,330.67L0,1366.58v3.33L960,982.73l960,387.18v-3.33L960.58,979.63ZM0,682V782.65L960,395.47l960,387.18V682L960,294.83ZM724.43,0,0,292.17V536.58L960,149.4l960,387.18V292.17L1195.57,0ZM0,0V250.28L620.55,0Z"/>',
'portrait' => '<path d="M965,1161.74l955,385.17v28.75L960,1188.48,0,1575.66v-28.75l960-387.18Zm-5,328.66L0,1877.58v3.33l960-387.18,960,387.18v-3.33L960.58,1490.63ZM0,1193v100.64L960,906.47l960,387.18V1193L960,805.83ZM0,803.17v244.41L960,660.4l960,387.18V803.17L960,416ZM0,0V761.28L960,374.1l960,387.18V0Z"/>',
'square' => '<path d="M960,539.93l960,387.18v100.63L960,640.57,0,1027.75V927.11Zm0,353.9L0,1281v28.76L960,922.58l960,387.18V1281L965,895.84ZM0,495.37,960,108.19l960,387.18V0H0Zm0,41.9v244.4L960,394.49l960,387.18V537.27L960,150.09Zm960,687.22L0,1611.67V1615l960-387.18L1920,1615v-3.33L960.58,1224.73Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Chevrons();

View File

@ -0,0 +1,66 @@
<?php
/**
* Background Mask Style - Corner Blob.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Corner_Blob
*
* @since 4.15.0
*/
class ET_Builder_Mask_Corner_Blob extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Corner Blob', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M1226.07,328.74c94-75.59,257.39,3.9,344.21-18.37,83.76-21.48,100.79-166,263.41-157.59,34.24,1.76,61.43,23.87,86.31,52.4V0H0V1440H1091.59c-52-65.69-165.68-107.33-188.19-187.31-8.34-29.63-5.63-52.8,1.35-74.62-5.56-51,24.41-80.39,39.63-129.07,2.91-86.63-76.42-153.71-33.64-221a79,79,0,0,1,11.18-15.4,78.9,78.9,0,0,1,6.22-10.79C970,732.76,1083.24,783.57,1159.21,677c.49-.69,1-1.4,1.43-2.12C1196.21,595.86,1126.27,409,1226.07,328.74Z"/>
<path fill-opacity=".3" d="M952.1,1009.94a181.86,181.86,0,0,1-7.72,39.06c2.91-86.63-76.42-153.71-33.64-221a79,79,0,0,1,11.18-15.4C894.22,871,958.69,933.43,952.1,1009.94Zm130,373.3c-42.44-67.36-155.14-109.94-174.26-188.12a133.1,133.1,0,0,1-3-17c-7,21.82-9.69,45-1.35,74.62,22.51,80,136.18,121.62,188.19,187.31h13.8C1099.67,1419.33,1092.54,1399.87,1082.06,1383.24ZM1833.69,152.78C1671.07,144.4,1654,288.89,1570.28,310.37c-86.82,22.27-250.21-57.22-344.21,18.37-99.8,80.25-29.86,267.12-65.43,346.17,43.61-67.06-22.65-252.08,75.63-325.68,89.51-67,238.38,11.83,319.54-6,78.31-17.24,98.7-150.58,249.12-137.63,49.87,4.29,81.92,54.75,115.07,101.64v-102C1895.12,176.65,1867.93,154.54,1833.69,152.78Z"/>',
'portrait' => '<path d="M1072.44,992.64c121.91-98,333.81,5.06,446.41-23.82C1627.5,941,1649.58,753.56,1860.49,764.43c21.8,1.12,41.39,8.6,59.51,20.3V0H0V2560H945.81c-6.7-23.62-11.88-48.5-17.25-73.2a237.7,237.7,0,0,0-21.95-41.23C844,2353.45,684.44,2299.35,653.94,2191c-10.81-38.44-7.3-68.49,1.76-96.79-7.21-66.08,31.66-104.26,51.39-167.39,3.78-112.37-99.12-199.36-43.63-286.59a102.92,102.92,0,0,1,14.5-20,101.63,101.63,0,0,1,8.07-14c54.28-89.61,201.16-23.71,299.68-161.88.64-.9,1.26-1.82,1.86-2.75C1033.7,1339.09,943,1096.72,1072.44,992.64Z"/>
<path fill-opacity=".3" d="M663.46,1640.21a102.92,102.92,0,0,1,14.5-20C642,1696,725.65,1776.91,717.1,1876.13a235.88,235.88,0,0,1-10,50.67C710.87,1814.43,608,1727.44,663.46,1640.21ZM653.94,2191c30.5,108.37,190.1,162.47,252.67,254.59a237.7,237.7,0,0,1,21.95,41.23c-10-45.87-20.61-91.12-42.91-126.51-55-87.37-201.2-142.58-226-244a169.76,169.76,0,0,1-3.94-22.12C646.64,2122.49,643.13,2152.54,653.94,2191ZM1860.49,764.43c-210.91-10.87-233,176.52-341.64,204.39-112.6,28.88-324.5-74.21-446.41,23.82-129.45,104.08-38.74,346.45-84.87,449,56.57-87-29.37-326.94,98.09-422.41,116.1-87,309.17,15.34,414.43-7.83,101.57-22.35,128-195.29,323.1-178.5,38.83,3.34,69.33,28.26,96.81,60.81v-109C1901.88,773,1882.29,765.55,1860.49,764.43Z"/>',
'square' => '<path d="M1116.8,599.88c103.68-83.37,283.89,4.31,379.65-20.25,92.39-23.7,111.17-183.06,290.53-173.83,55.65,2.87,94.41,54.44,133,105.62V0H0V1920H1005.68c-4.12-16.18-7.63-32.86-11.23-49.44a203,203,0,0,0-18.67-35.07c-53.21-78.34-188.94-124.34-214.87-216.51-9.2-32.68-6.21-58.24,1.49-82.31-6.14-56.19,26.92-88.67,43.7-142.35,3.22-95.56-84.29-169.54-37.1-243.72a87.59,87.59,0,0,1,12.33-17,86.8,86.8,0,0,1,6.86-11.9c46.16-76.21,171.07-20.15,254.86-137.66.54-.77,1.07-1.55,1.58-2.34C1083.86,894.52,1006.72,688.4,1116.8,599.88Z"/>
<path fill-opacity=".3" d="M769,1150.6a87.59,87.59,0,0,1,12.33-17c-30.56,64.42,40.55,133.24,33.29,217.62a200.78,200.78,0,0,1-8.52,43.09C809.32,1298.76,721.81,1224.78,769,1150.6ZM760.91,1619c25.93,92.17,161.66,138.17,214.87,216.51a203,203,0,0,1,18.67,35.07c-8.48-39-17.53-77.49-36.49-107.59-46.81-74.3-171.12-121.25-192.21-207.49a144.3,144.3,0,0,1-3.35-18.81C754.7,1560.74,751.71,1586.3,760.91,1619ZM1787,405.8c-179.36-9.23-198.14,150.13-290.53,173.83-95.76,24.56-276-63.12-379.65,20.25-110.08,88.52-32.94,294.64-72.17,381.83,48.1-74-25-278,83.42-359.23,98.73-73.94,262.93,13,352.44-6.66,86.38-19,108.86-166.08,274.77-151.8,73.38,6.31,111.79,103.23,164.74,160.55V511.42C1881.39,460.24,1842.63,408.67,1787,405.8Z"/>',
),
'default-inverted' => array(
'landscape' => '<path fill-opacity=".3" d="M952.1,1009.94a181.86,181.86,0,0,1-7.72,39.06c2.91-86.63-76.42-153.71-33.64-221a79,79,0,0,1,11.18-15.4C894.22,871,958.69,933.43,952.1,1009.94Zm130,373.3c-42.44-67.36-155.14-109.94-174.26-188.12a133.1,133.1,0,0,1-3-17c-7,21.82-9.69,45-1.35,74.62,22.51,80,136.18,121.62,188.19,187.31h13.8C1099.67,1419.33,1092.54,1399.87,1082.06,1383.24Zm154.21-1034c89.51-67,238.38,11.83,319.54-6,78.31-17.24,98.7-150.58,249.12-137.63,49.87,4.29,81.92,54.75,115.07,101.64v-102c-24.88-28.53-52.07-50.64-86.31-52.4C1671.07,144.4,1654,288.89,1570.28,310.37c-86.82,22.27-250.21-57.22-344.21,18.37-99.8,80.25-29.86,267.12-65.43,346.18C1204.25,607.85,1138,422.83,1236.27,349.23Z"/>
<path d="M1804.93,205.56C1654.51,192.61,1634.12,326,1555.81,343.19c-81.16,17.87-230-61-319.54,6-98.28,73.6-32,258.62-75.63,325.69-.47.71-.94,1.42-1.43,2.11-76,106.54-189.22,55.73-231.07,124.82a78.9,78.9,0,0,0-6.22,10.79c-27.7,58.4,36.77,120.79,30.18,197.3a181.86,181.86,0,0,1-7.72,39.06c-15.22,48.68-45.19,78.12-39.63,129.07a133.1,133.1,0,0,0,3,17c19.12,78.18,131.82,120.76,174.26,188.12,10.48,16.63,17.61,36.09,23.33,56.76H1920V307.2C1886.85,260.31,1854.8,209.85,1804.93,205.56Z"/>',
'portrait' => '<path fill-opacity=".3" d="M663.46,1640.21a102.92,102.92,0,0,1,14.5-20C642,1696,725.65,1776.91,717.1,1876.13a235.88,235.88,0,0,1-10,50.67C710.87,1814.43,608,1727.44,663.46,1640.21Zm-3.82,476.1a169.76,169.76,0,0,1-3.94-22.12c-9.06,28.3-12.57,58.35-1.76,96.79,30.5,108.37,190.1,162.47,252.67,254.59a237.7,237.7,0,0,1,21.95,41.23c-10-45.87-20.61-91.12-42.91-126.51C830.62,2272.92,684.45,2217.71,659.64,2116.31Zm426-1097.1c116.1-87,309.17,15.34,414.43-7.83,101.57-22.35,128-195.29,323.1-178.5,38.83,3.34,69.33,28.26,96.81,60.81v-109c-18.12-11.7-37.71-19.18-59.51-20.3-210.91-10.87-233,176.52-341.64,204.39-112.6,28.88-324.5-74.21-446.41,23.82-129.45,104.08-38.74,346.45-84.87,449C1044.14,1354.64,958.2,1114.68,1085.66,1019.21Z"/>
<path d="M1823.19,832.88c-195.09-16.79-221.53,156.15-323.1,178.5-105.26,23.17-298.33-79.12-414.43,7.83-127.46,95.47-41.52,335.43-98.09,422.41-.6.93-1.22,1.85-1.86,2.75-98.52,138.17-245.4,72.27-299.68,161.88a101.63,101.63,0,0,0-8.07,14C642,1696,725.65,1776.91,717.1,1876.13a235.88,235.88,0,0,1-10,50.67c-19.73,63.13-58.6,101.31-51.39,167.39a169.76,169.76,0,0,0,3.94,22.12c24.81,101.4,171,156.61,226,244,22.3,35.39,32.94,80.64,42.91,126.51,5.37,24.7,10.55,49.58,17.25,73.2H1920V893.69C1892.52,861.14,1862,836.22,1823.19,832.88Z"/>',
'square' => '<path fill-opacity=".3" d="M814.62,1351.23a200.78,200.78,0,0,1-8.52,43.09c3.22-95.56-84.29-169.54-37.1-243.72a87.59,87.59,0,0,1,12.33-17C750.77,1198,821.88,1266.85,814.62,1351.23Zm-48.87,204.25a144.3,144.3,0,0,1-3.35-18.81c-7.7,24.07-10.69,49.63-1.49,82.31,25.93,92.17,161.66,138.17,214.87,216.51a203,203,0,0,1,18.67,35.07c-8.48-39-17.53-77.49-36.49-107.59C911.15,1688.67,786.84,1641.72,765.75,1555.48Zm362.3-933c98.73-73.94,262.93,13,352.44-6.66,86.38-19,108.86-166.08,274.77-151.8,73.38,6.31,111.79,103.23,164.74,160.55V511.42c-38.61-51.18-77.37-102.75-133-105.62-179.36-9.23-198.14,150.13-290.53,173.83-95.76,24.56-276-63.12-379.65,20.25-110.08,88.52-32.94,294.64-72.17,381.83C1092.73,907.74,1019.65,703.67,1128.05,622.48Z"/>
<path d="M1755.26,464c-165.91-14.28-188.39,132.79-274.77,151.8-89.51,19.71-253.71-67.28-352.44,6.66-108.4,81.19-35.32,285.26-83.42,359.23-.51.79-1,1.57-1.58,2.34-83.79,117.51-208.7,61.45-254.86,137.66a86.8,86.8,0,0,0-6.86,11.9c-30.56,64.42,40.55,133.24,33.29,217.62a200.78,200.78,0,0,1-8.52,43.09c-16.78,53.68-49.84,86.16-43.7,142.35a144.3,144.3,0,0,0,3.35,18.81C786.84,1641.72,911.15,1688.67,958,1763c19,30.1,28,68.58,36.49,107.59,3.6,16.58,7.11,33.26,11.23,49.44H1920V624.57C1867.05,567.25,1828.64,470.33,1755.26,464Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M852,649.81c-67.45-83.88,3.48-229.67-16.39-307.15-19.17-74.74-148.1-89.94-140.63-235,2.32-45,44-76.37,85.45-107.61H0V1440H1920V739.71c-13.09,3.34-26.58,6.17-40,9.09a163.76,163.76,0,0,0-28.37,15.1C1788.25,807,1751,916.76,1676.47,937.74c-26.45,7.44-47.12,5-66.59-1.21-45.47,5-71.74-21.78-115.17-35.35-77.31-2.61-137.16,68.19-197.18,30a70.27,70.27,0,0,1-13.74-10,69.73,69.73,0,0,1-9.63-5.54c-61.65-37.35-16.3-138.41-111.37-206.19-.62-.44-1.25-.87-1.89-1.28C1090.35,676.46,923.6,738.87,852,649.81Z"/>
<path fill-opacity=".3" d="M1297.53,931.19a70.27,70.27,0,0,1-13.74-10c52.11,24.73,107.79-32.8,176.06-26.93a162.43,162.43,0,0,1,34.86,6.9C1417.4,898.57,1357.55,969.37,1297.53,931.19Zm378.94,6.55c74.56-21,111.78-130.79,175.16-173.84A163.76,163.76,0,0,1,1880,748.8c-31.56,6.86-62.69,14.18-87,29.52-60.11,37.87-98.1,138.43-167.86,155.5a116.53,116.53,0,0,1-15.22,2.71C1629.35,942.76,1650,945.18,1676.47,937.74ZM695,107.61C687.5,252.72,816.43,267.92,835.6,342.66c19.87,77.48-51.06,223.27,16.39,307.15,71.61,89.06,238.36,26.65,308.91,58.39-59.85-38.92-225,20.21-290.63-67.49-59.82-79.88,10.56-212.71-5.38-285.14C849.5,285.69,730.52,267.5,742.07,133.28,747.18,73.92,825.59,42.83,872,0H780.42C739,31.24,697.29,62.6,695,107.61Z"/>',
'portrait' => '<path d="M599.88,1070.93c-83.37-138.24,4.31-378.52-20.25-506.19C555.93,441.54,396.57,416.5,405.8,177.35,408.67,103.16,460.24,51.49,511.42,0H0V2560H1920V1219.1c-16.18,5.49-32.86,10.17-49.44,15a192.73,192.73,0,0,0-35.07,24.89c-78.34,71-124.34,251.92-216.51,286.5-32.68,12.26-58.24,8.28-82.31-2-56.19,8.18-88.67-35.9-142.35-58.27-95.56-4.29-169.54,112.39-243.72,49.47a94,94,0,0,1-17-16.45,84.34,84.34,0,0,1-11.9-9.14c-76.21-61.55-20.15-228.1-137.66-339.81-.77-.73-1.55-1.43-2.34-2.11C894.52,1114.85,688.4,1217.71,599.88,1070.93Z"/>
<path fill-opacity=".3" d="M1150.6,1534.67a94,94,0,0,1-17-16.45c64.42,40.75,133.24-54.06,217.62-44.38a157.54,157.54,0,0,1,43.09,11.36C1298.76,1480.91,1224.78,1597.59,1150.6,1534.67ZM1619,1545.46c92.17-34.58,138.17-215.55,216.51-286.5a192.73,192.73,0,0,1,35.07-24.89c-39,11.31-77.49,23.37-107.59,48.65-74.3,62.41-121.25,228.15-207.49,256.28a113.2,113.2,0,0,1-18.81,4.47C1560.74,1553.74,1586.3,1557.72,1619,1545.46ZM405.8,177.35C396.57,416.5,555.93,441.54,579.63,564.74c24.56,127.67-63.12,368,20.25,506.19,88.52,146.78,294.64,43.92,381.83,96.23-74-64.14-278,33.3-359.23-111.23-73.94-131.64,13-350.56-6.66-469.92-19-115.17-166.08-145.15-151.8-366.36C470.33,121.82,567.25,70.59,624.57,0H511.42C460.24,51.49,408.67,103.16,405.8,177.35Z"/>',
'square' => '<path d="M599.88,803.2c-83.37-103.68,4.31-283.89-20.25-379.65C555.93,331.16,396.57,312.38,405.8,133c2.87-55.65,54.44-94.41,105.62-133H0V1920H1920V914.32c-16.18,4.12-32.86,7.63-49.44,11.23a203,203,0,0,0-35.07,18.67c-78.34,53.21-124.34,188.94-216.51,214.87-32.68,9.2-58.24,6.21-82.31-1.49-56.19,6.14-88.67-26.92-142.35-43.7-95.56-3.22-169.54,84.29-243.72,37.1a87.59,87.59,0,0,1-17-12.33,86.8,86.8,0,0,1-11.9-6.86c-76.21-46.16-20.15-171.07-137.66-254.86-.77-.54-1.55-1.07-2.34-1.58C894.52,836.14,688.4,913.28,599.88,803.2Z"/>
<path fill-opacity=".3" d="M1150.6,1151a87.59,87.59,0,0,1-17-12.33c64.42,30.56,133.24-40.55,217.62-33.29a200.78,200.78,0,0,1,43.09,8.52C1298.76,1110.68,1224.78,1198.19,1150.6,1151Zm468.38,8.09c92.17-25.93,138.17-161.66,216.51-214.87a203,203,0,0,1,35.07-18.67c-39,8.48-77.49,17.53-107.59,36.49-74.3,46.81-121.25,171.12-207.49,192.21a144.3,144.3,0,0,1-18.81,3.35C1560.74,1165.3,1586.3,1168.29,1619,1159.09ZM405.8,133c-9.23,179.36,150.13,198.14,173.83,290.53,24.56,95.76-63.12,276,20.25,379.65,88.52,110.08,294.64,32.94,381.83,72.17-74-48.1-278,25-359.23-83.42-73.94-98.73,13-262.93-6.66-352.44-19-86.38-166.08-108.86-151.8-274.77C470.33,91.36,567.25,53,624.57,0H511.42C460.24,38.61,408.67,77.37,405.8,133Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path fill-opacity=".3" d="M1497.75,968.14a181.86,181.86,0,0,1,39.06,7.72c-86.63-2.92-153.71,76.42-221,33.64a79.4,79.4,0,0,1-15.4-11.18C1358.85,1026,1421.24,961.55,1497.75,968.14Zm373.3-130c-67.36,42.44-109.93,155.14-188.12,174.26a133.1,133.1,0,0,1-17,3c21.82,7,45,9.69,74.62,1.35,80-22.51,121.62-136.18,187.31-188.19v-13.8C1907.14,820.57,1887.68,827.7,1871.05,838.18ZM837,684c-67-89.52,11.83-238.38-6-319.54-17.24-78.31-150.58-98.7-137.63-249.12C697.66,65.44,748.12,33.39,795,.24H693c-28.53,24.88-50.64,52.07-52.4,86.31C632.21,249.17,776.7,266.2,798.18,350c22.27,86.82-57.22,250.21,18.37,344.2C896.8,794,1083.67,724,1162.73,759.6,1095.66,716,910.64,782.24,837,684Z"/>
<path d="M693.37,115.31C680.42,265.73,813.76,286.12,831,364.43c17.87,81.16-61,230,6,319.54,73.6,98.27,258.62,32,325.69,75.63.71.46,1.42.94,2.12,1.43,106.53,76,55.72,189.22,124.81,231.07a80,80,0,0,0,10.79,6.22c58.4,27.7,120.79-36.77,197.3-30.18a181.86,181.86,0,0,1,39.06,7.72c48.68,15.21,78.12,45.18,129.07,39.63a133.1,133.1,0,0,0,17-3c78.19-19.12,120.76-131.82,188.12-174.26,16.63-10.48,36.09-17.61,56.76-23.33V.24H795C748.12,33.39,697.66,65.44,693.37,115.31Z"/>',
'portrait' => '<path fill-opacity=".3" d="M1150.6,1534.67a94,94,0,0,1-17-16.45c64.42,40.75,133.24-54.06,217.62-44.38a157.54,157.54,0,0,1,43.09,11.36C1298.76,1480.91,1224.78,1597.59,1150.6,1534.67ZM1619,1545.46c92.17-34.58,138.17-215.55,216.51-286.5a192.73,192.73,0,0,1,35.07-24.89c-39,11.31-77.49,23.37-107.59,48.65-74.3,62.41-121.25,228.15-207.49,256.28a113.2,113.2,0,0,1-18.81,4.47C1560.74,1553.74,1586.3,1557.72,1619,1545.46ZM405.8,177.35C396.57,416.5,555.93,441.54,579.63,564.74c24.56,127.67-63.12,368,20.25,506.19,88.52,146.78,294.64,43.92,381.83,96.23-74-64.14-278,33.3-359.23-111.23-73.94-131.64,13-350.56-6.66-469.92-19-115.17-166.08-145.15-151.8-366.36C470.33,121.82,567.25,70.59,624.57,0H511.42C460.24,51.49,408.67,103.16,405.8,177.35Z"/>
<path d="M1870.56,1234.07c-39,11.31-77.49,23.37-107.59,48.65-74.3,62.41-121.25,228.15-207.49,256.28a113.2,113.2,0,0,1-18.81,4.47c-56.19,8.18-88.67-35.9-142.35-58.27a157.54,157.54,0,0,0-43.09-11.36c-84.38-9.68-153.2,85.13-217.62,44.38a84.34,84.34,0,0,1-11.9-9.14c-76.21-61.55-20.15-228.1-137.66-339.81-.77-.73-1.55-1.43-2.34-2.11-74-64.14-278,33.3-359.23-111.23-73.94-131.64,13-350.56-6.66-469.92-19-115.17-166.08-145.15-151.8-366.36C470.33,121.82,567.25,70.59,624.57,0L1920-2V1219.1C1903.82,1224.59,1887.14,1229.27,1870.56,1234.07Z"/>',
'square' => '<path fill-opacity=".3" d="M1345,1103.59a200.78,200.78,0,0,1,43.09,8.52c-95.56-3.22-169.54,84.29-243.72,37.1a87.59,87.59,0,0,1-17-12.33C1191.82,1167.44,1260.64,1096.33,1345,1103.59Zm204.25,48.87a144.3,144.3,0,0,1-18.81,3.35c24.07,7.7,49.63,10.69,82.31,1.49,92.17-25.93,138.17-161.66,216.51-214.87a203,203,0,0,1,35.07-18.67c-39,8.48-77.49,17.53-107.59,36.49C1682.46,1007.06,1635.51,1131.36,1549.27,1152.46Zm-933-362.3c-73.94-98.73,13.05-262.93-6.66-352.44-19-86.38-166.08-108.86-151.8-274.77C464.12,89.57,561,51.15,618.36-1.79H505.21C454,36.82,402.46,75.58,399.6,131.22c-9.24,179.36,150.12,198.15,173.82,290.54,24.56,95.76-63.12,276,20.25,379.65,88.52,110.08,294.64,32.94,381.83,72.17C901.53,825.47,697.46,898.56,616.27,790.16Z"/>
<path d="M457.81,163C443.53,328.86,590.6,351.34,609.61,437.72c19.71,89.51-67.28,253.71,6.66,352.44,81.19,108.4,285.26,35.31,359.23,83.42.79.51,1.57,1,2.34,1.58C1095.35,959,1039.3,1083.86,1115.5,1130a86.8,86.8,0,0,0,11.9,6.86c64.42,30.56,133.24-40.55,217.62-33.29a200.78,200.78,0,0,1,43.09,8.52c53.68,16.78,86.16,49.83,142.35,43.7a144.3,144.3,0,0,0,18.81-3.35c86.24-21.1,133.19-145.4,207.49-192.21,30.1-19,68.58-28,107.59-36.49,16.58-3.6,33.27-7.11,49.44-11.23V-1.79H618.36C561,51.15,464.12,89.57,457.81,163Z"/> ',
),
),
);
}
}
return new ET_Builder_Mask_Corner_Blob();

View File

@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Corner Lake.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Corner_Lake
*
* @since 4.15.0
*/
class ET_Builder_Mask_Corner_Lake extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Corner Lake', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M1920,1061.12c-39.16-6.64-124.38-49.91-229-101.12-280.31-137.21-360,168.9-731,168.9C665,1128.9,419,863,419,617,419,141,868.66,0,869.88,0H0V1440H1920Z"/>',
'portrait' => '<path d="M1920,1061.12c-39.16-6.64-124.38-49.91-229-101.12-280.31-137.21-360,168.9-731,168.9C665,1128.9,419,863,419,617,419,141,868.66,0,869.88,0H0V2560H1920Z"/>',
'square' => '<path d="M1920,1061.12c-39.16-6.64-124.38-49.91-229-101.12-280.31-137.21-360,168.9-731,168.9C665,1128.9,419,863,419,617,419,141,868.66,0,869.88,0H0V1920H1920Z"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M1920,1061.12c-39.16-6.64-124.38-49.91-229-101.12-280.31-137.21-360,168.9-731,168.9C665,1128.9,419,863,419,617,419,141,868.66,0,869.88,0H1920Z"/>',
'portrait' => '<path d="M1920,1061.12c-39.16-6.64-124.38-49.91-229-101.12-280.31-137.21-360,168.9-731,168.9C665,1128.9,419,863,419,617,419,141,868.66,0,869.88,0H1920Z"/>',
'square' => '<path d="M1920,1061.12c-39.16-6.64-124.38-49.91-229-101.12-280.31-137.21-360,168.9-731,168.9C665,1128.9,419,863,419,617,419,141,868.66,0,869.88,0H1920Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M795.84,0c-5,29.37-37.43,93.29-75.84,171.75C617.09,382,846.68,441.75,846.68,720c0,221.25-199.43,405.75-383.93,405.75C105.73,1125.75,0,788.51,0,787.59V1440H1920V0Z"/>',
'portrait' => '<path d="M1061.12,0c-6.64,39.16-49.91,124.38-101.12,229-137.21,280.31,168.9,360,168.9,731,0,295-265.9,541-511.9,541C141,1501,0,1051.34,0,1050.12V2560H1920V0Z"/>',
'square' => '<path d="M1061.12,0c-6.64,39.16-49.91,124.38-101.12,229-137.21,280.31,168.9,360,168.9,731,0,295-265.9,541-511.9,541C141,1501,0,1051.34,0,1050.12V1920H1920V0Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M795.84,0c-5,29.37-37.43,93.29-75.84,171.75C617.09,382,846.68,441.75,846.68,720c0,221.25-199.43,405.75-383.93,405.75C105.73,1125.75,0,788.51,0,787.59V0Z"/>',
'portrait' => '<path d="M1061.12,0c-6.64,39.16-49.91,124.38-101.12,229-137.21,280.31,168.9,360,168.9,731,0,295-265.9,541-511.9,541C141,1501,0,1051.34,0,1050.12V0Z"/>',
'square' => '<path d="M1061.12,0c-6.64,39.16-49.91,124.38-101.12,229-137.21,280.31,168.9,360,168.9,731,0,295-265.9,541-511.9,541C141,1501,0,1051.34,0,1050.12V0Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Corner_Lake();

View File

@ -0,0 +1,63 @@
<?php
/**
* Background Mask Style - Corner Paint.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Corner_Paint
*
* @since 4.15.0
*/
class ET_Builder_Mask_Corner_Paint extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Corner Paint', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M1897.91,761c-108.84,85.71-243.64,272.72-358.87,364.85-40.53,32.41-117.39,145.61-144.5,95.37-3.43-6.34,24.11-14.4,32.15-27,35-54.92,15.21-52.52,12.43-114.64-1.41-31.46-22.88-49.87-22.77-79.55.07-20.86,41.76-26.62,53-45.1,22.5-37.08,107.59-113.32,64.62-118.8C1431,823,1480.73,897.9,1352.75,942.83c-53.09,18.63-40,31.2-98,48.18-34.22,10-47,100.9-78.38,85.7-12.52-6.07,12.86-20.41,17.93-30.87,6-12.49-32.49,1.7-30.35-12,4-25.89,77.29-74.23,43.54-70.2-32.32,3.86-114.09,121.48-114.2,68.3-.1-48.79,130.3-85.05,96-116.26-8.56-7.8-11.48-2.09-19.08-1.74-11.57.53-21.86,41.07-31.24,34.24-28.1-20.46,155.9-163.66,121.21-155.82-5.65,1.28-15.57,17.15-15.57,17.15-23.92-45.91,47.83-51,28.08-85.56-12.52-21.87-41-9.86-61.87,2.83-19.87,12.1-24.65,29.35-31.36,15.19-14.92-31.48-36.87-6.9-62.36,15.45-25.1,22,10.39-30.82,1.85-49.45C1080.56,624.06,986.93,826.3,928,832c-46.94,4.54-96,86-104.9,76.86C811,896.41,943.78,769.67,1005.49,701.3c131.22-145.4,45.54-66.26,5.73-128.07-36.22-56.23,15.29-51.41,39-130.93,3.66-12.28-1-14.57,13.89-30.63,17.26-18.62,47.88-6,61.16-16.41,8.17-6.39,7.57-2.21,16.7-11.43,6-6.07-1.5-9.42,2.64-12.8,13.09-10.67-16.84-16.73-16.26-27.15,2-36.37-13.94-62.73-18.2-108.42-3.28-35.22-23.88,5.36-36.64,7-98.25,13,11.51-167.61,73.21-201.1C1167.14,30.33,1186.17,16,1204.4,0H0V1440H1920V740.4C1910.13,750.29,1902.37,757.5,1897.91,761Zm-863.57,124.8c-12.16-1-5.62-.11-13.07,6.64-4.41,4-3.62,11.6-7.6,15.83-8.33,8.85,10.91-4.55,12.61,3.29.41,1.86-7,9.5-1.15,14.52.74.62-13.64,17.53-14.14,8.76-.53-9.27,14.1-10.35-2.27-13.81-10.47-2.21-13.63-18.41-19.2-26.83-2.81-4.25-9.8-3.31-11.62-8.55-1.12-3.25,24.57-4.22,3.91-10.89-17.72-5.72,3.31-8.25,4.42-21.82.74-8.94,7.45-7.39,9.77-16.11,5.59-21,42.49-52.28,57.87-37.65,19.35,18.41-1.13,5.82,6.14,17,1.93,3,4.72-5.63,7.55-4.46,1.61.66,1.07,5.89-.3,7C1055,828.37,1081,843,1080.2,849.2,1077.4,870.75,1052.74,887.38,1034.34,885.82Z"/>
<path d="M1121.73,560.21c-22.33,29.93,34.74-16,26.41-28.13C1139.13,519,1126.83,553.37,1121.73,560.21Z"/>
<path d="M1148.8,357.83c-.07.15.58.31.58.31C1149.67,357.86,1148.91,357.6,1148.8,357.83Z"/>',
'portrait' => '<path d="M1702.91,1301c-108.84,85.71-243.64,272.72-358.87,364.85-40.53,32.41-117.39,145.61-144.5,95.37-3.43-6.34,24.11-14.4,32.15-27,35-54.92,15.21-52.52,12.43-114.64-1.41-31.46-22.88-49.87-22.77-79.55.07-20.86,41.76-26.62,53-45.1,22.5-37.08,107.59-113.32,64.62-118.8-102.94-13.15-53.21,61.75-181.19,106.68-53.09,18.63-40,31.2-98,48.18-34.22,10-47,100.9-78.38,85.7-12.52-6.07,12.86-20.41,17.93-30.87,6-12.49-32.49,1.7-30.35-12,4-25.89,77.29-74.23,43.54-70.2-32.32,3.86-114.09,121.48-114.2,68.3-.1-48.79,130.3-85.05,96-116.26-8.56-7.8-11.48-2.09-19.08-1.74-11.57.53-21.86,41.07-31.24,34.24-28.1-20.46,155.9-163.66,121.21-155.82-5.65,1.28-15.57,17.15-15.57,17.15-23.92-45.91,47.83-51,28.08-85.56-12.52-21.87-41-9.86-61.87,2.83-19.87,12.1-24.65,29.35-31.36,15.19-14.92-31.48-36.87-6.9-62.36,15.45-25.1,22,10.39-30.82,1.85-49.45C885.56,1164.06,791.93,1366.3,733,1372c-46.94,4.54-96,86-104.9,76.86C616,1436.41,748.78,1309.67,810.49,1241.3c131.22-145.4,45.54-66.26,5.73-128.07-36.22-56.23,15.29-51.41,39-130.93,3.66-12.28-1-14.57,13.89-30.63,17.26-18.62,47.88-6,61.16-16.41,8.17-6.39,7.57-2.21,16.7-11.43,6-6.07-1.5-9.42,2.64-12.8,13.09-10.67-16.84-16.73-16.26-27.15,2-36.37-13.94-62.73-18.2-108.42-3.28-35.22-23.88,5.36-36.64,7-98.25,13,11.51-167.61,73.21-201.1C1024.39,542,1320.08,208.19,1528.74,0H0V2560H1920V1073.7C1806.44,1196.23,1713.5,1292.68,1702.91,1301Zm-863.57,124.8c-12.16-1-5.62-.11-13.07,6.64-4.41,4-3.62,11.6-7.6,15.83-8.33,8.85,10.91-4.55,12.61,3.29.41,1.86-7,9.5-1.15,14.52.74.62-13.64,17.53-14.14,8.76-.53-9.27,14.1-10.35-2.27-13.81-10.47-2.21-13.63-18.41-19.2-26.83-2.81-4.25-9.8-3.31-11.62-8.55-1.12-3.25,24.57-4.22,3.91-10.89-17.72-5.72,3.31-8.25,4.42-21.82.73-8.94,7.45-7.39,9.77-16.11,5.59-21,42.49-52.28,57.87-37.65,19.35,18.41-1.13,5.82,6.14,17,1.93,3,4.72-5.63,7.55-4.46,1.61.66,1.07,5.9-.3,7C860,1368.37,886,1383,885.2,1389.2,882.4,1410.75,857.74,1427.38,839.34,1425.82Z"/>
<path d="M926.73,1100.21c-22.33,29.93,34.74-16,26.41-28.13C944.13,1059,931.83,1093.37,926.73,1100.21Z"/>
<path d="M953.8,897.83c-.07.15.58.31.58.31C954.67,897.86,953.91,897.6,953.8,897.83Z"/>',
'square' => '<path d="M1811.91,966c-108.84,85.71-243.64,272.72-358.87,364.85-40.53,32.41-117.39,145.61-144.5,95.37-3.43-6.34,24.11-14.4,32.15-27,35-54.92,15.21-52.52,12.43-114.64-1.41-31.46-22.88-49.87-22.77-79.55.07-20.86,41.76-26.62,53-45.1,22.5-37.08,107.59-113.32,64.62-118.8-102.94-13.15-53.21,61.75-181.19,106.68-53.09,18.63-40,31.2-98,48.18-34.22,10-47,100.9-78.38,85.7-12.52-6.07,12.86-20.41,17.93-30.87,6-12.49-32.49,1.7-30.35-12,4-25.89,77.29-74.23,43.54-70.2-32.32,3.86-114.09,121.48-114.2,68.3-.1-48.79,130.3-85.05,96-116.26-8.56-7.8-11.48-2.09-19.08-1.74-11.57.53-21.86,41.07-31.24,34.24-28.1-20.46,155.9-163.66,121.21-155.82-5.65,1.28-15.57,17.15-15.57,17.15-23.92-45.91,47.83-51,28.08-85.56-12.52-21.87-41-9.86-61.87,2.83-19.87,12.1-24.65,29.35-31.36,15.19-14.92-31.48-36.87-6.9-62.36,15.45-25.1,22,10.39-30.82,1.85-49.45C994.56,829.06,900.93,1031.3,842,1037c-46.94,4.54-96,86-104.9,76.86C725,1101.41,857.78,974.67,919.49,906.3,1050.71,760.9,965,840,925.22,778.23,889,722,940.51,726.82,964.23,647.3c3.66-12.28-1-14.57,13.89-30.63,17.26-18.62,47.88-6,61.16-16.41,8.17-6.39,7.57-2.21,16.7-11.43,6-6.07-1.5-9.42,2.64-12.8,13.09-10.67-16.84-16.73-16.26-27.15,2-36.37-13.94-62.73-18.2-108.42-3.28-35.22-23.88,5.36-36.64,7.05-98.25,13,11.51-167.61,73.21-201.1,38.32-20.8,138.68-123.47,255.58-246.41H0V1920H1920V855.09C1860.47,917.94,1818.79,960.6,1811.91,966Zm-863.57,124.8c-12.16-1-5.62-.11-13.07,6.64-4.41,4-3.62,11.6-7.6,15.83-8.33,8.85,10.91-4.55,12.61,3.29.41,1.86-7,9.5-1.15,14.52.74.62-13.64,17.53-14.14,8.76-.53-9.27,14.1-10.35-2.27-13.81-10.47-2.21-13.63-18.41-19.2-26.83-2.81-4.25-9.8-3.31-11.62-8.55-1.12-3.25,24.57-4.22,3.91-10.89-17.72-5.72,3.31-8.25,4.42-21.82.74-8.94,7.45-7.39,9.77-16.11,5.59-21,42.49-52.28,57.87-37.65,19.35,18.41-1.13,5.82,6.14,17,1.93,3,4.72-5.63,7.55-4.46,1.61.66,1.07,5.89-.3,7C969,1033.37,995,1048,994.2,1054.2,991.4,1075.75,966.74,1092.38,948.34,1090.82Z"/>
<path d="M1062.8,562.83c-.07.15.58.31.58.31C1063.67,562.86,1062.91,562.6,1062.8,562.83Z"/>
<path d="M1035.73,765.21c-22.33,29.93,34.74-16,26.41-28.13C1053.13,724,1040.83,758.37,1035.73,765.21Z"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M1067.26,818.72c1.37-1.07,1.91-6.31.3-7-2.83-1.17-5.62,7.43-7.55,4.46-7.27-11.19,13.21,1.4-6.14-17-15.38-14.63-52.28,16.63-57.87,37.65-2.32,8.72-9,7.17-9.77,16.11-1.11,13.57-22.14,16.1-4.42,21.82,20.66,6.67-5,7.64-3.91,10.89,1.82,5.24,8.81,4.3,11.62,8.55,5.57,8.42,8.73,24.62,19.2,26.83,16.37,3.46,1.74,4.54,2.27,13.81.5,8.77,14.88-8.14,14.14-8.76-5.86-5,1.56-12.66,1.15-14.52-1.7-7.84-20.94,5.56-12.61-3.29,4-4.23,3.19-11.84,7.6-15.83,7.45-6.75.91-7.67,13.07-6.64,18.4,1.56,43.06-15.07,45.86-36.62C1081,843,1055,828.37,1067.26,818.72Z"/>
<path d="M1204.4,0c-18.23,16-37.26,30.33-57.67,41.41-61.7,33.49-171.46,214.12-73.21,201.1,12.76-1.69,33.36-42.27,36.64-7,4.26,45.69,20.24,72,18.2,108.42-.58,10.42,29.35,16.48,16.26,27.15-4.14,3.38,3.37,6.73-2.64,12.8-9.13,9.22-8.53,5-16.7,11.43-13.28,10.4-43.9-2.21-61.16,16.41-14.9,16.06-10.23,18.35-13.89,30.63-23.72,79.52-75.23,74.7-39,130.93C1051,635,1136.71,555.9,1005.49,701.3,943.78,769.67,811,896.41,823.1,908.86,832,918,881.06,836.54,928,832c58.93-5.7,152.56-207.94,191-124.07,8.54,18.63-27,71.46-1.85,49.45,25.49-22.35,47.44-46.93,62.36-15.45,6.71,14.16,11.49-3.09,31.36-15.19,20.83-12.69,49.35-24.7,61.87-2.83,19.75,34.52-52,39.65-28.08,85.56,0,0,9.92-15.87,15.57-17.15,34.69-7.84-149.31,135.36-121.21,155.82,9.38,6.83,19.67-33.71,31.24-34.24,7.6-.35,10.52-6.06,19.08,1.74,34.27,31.21-96.13,67.47-96,116.26.11,53.18,81.88-64.44,114.2-68.3,33.75-4-39.52,44.31-43.54,70.2-2.14,13.74,36.39-.45,30.35,12-5.07,10.46-30.45,24.8-17.93,30.87,31.39,15.2,44.16-75.68,78.38-85.7,58-17,44.9-29.55,98-48.18,128-44.93,78.25-119.83,181.19-106.68,43,5.48-42.12,81.72-64.62,118.8-11.21,18.48-52.9,24.24-53,45.1-.11,29.68,21.36,48.09,22.77,79.55,2.78,62.12,22.57,59.72-12.43,114.64-8,12.6-35.58,20.66-32.15,27,27.11,50.24,104-63,144.5-95.37,115.23-92.13,250-279.14,358.87-364.85,4.46-3.52,12.22-10.73,22.09-20.62V0Zm-82.67,560.21c5.1-6.84,17.4-41.21,26.41-28.13C1156.47,544.17,1099.4,590.14,1121.73,560.21Zm27.65-202.07s-.65-.16-.58-.31S1149.67,357.86,1149.38,358.14Z"/>',
'portrait' => '<path d="M872.26,1358.72c1.37-1.07,1.91-6.31.3-7-2.83-1.17-5.62,7.43-7.55,4.46-7.27-11.19,13.21,1.4-6.14-17-15.38-14.63-52.28,16.63-57.87,37.65-2.32,8.72-9,7.17-9.77,16.11-1.11,13.57-22.14,16.1-4.42,21.82,20.66,6.67-5,7.64-3.91,10.89,1.82,5.24,8.81,4.3,11.62,8.55,5.57,8.42,8.73,24.62,19.2,26.83,16.37,3.46,1.74,4.54,2.27,13.81.5,8.77,14.88-8.14,14.14-8.76-5.86-5,1.56-12.66,1.15-14.52-1.7-7.84-20.94,5.56-12.61-3.29,4-4.23,3.19-11.84,7.6-15.83,7.45-6.75.91-7.67,13.07-6.64,18.4,1.56,43.06-15.07,45.86-36.62C886,1383,860,1368.37,872.26,1358.72Z"/>
<path d="M1528.74,0c-208.66,208.19-504.35,542-577,581.41C890,614.9,780.27,795.53,878.52,782.51c12.76-1.69,33.36-42.27,36.64-7,4.26,45.69,20.24,72,18.2,108.42-.58,10.42,29.35,16.48,16.26,27.15-4.14,3.38,3.37,6.73-2.64,12.8-9.13,9.22-8.53,5-16.7,11.43-13.28,10.4-43.9-2.21-61.16,16.41-14.9,16.06-10.23,18.35-13.89,30.63-23.72,79.52-75.23,74.7-39,130.93C856,1175,941.71,1095.9,810.49,1241.3,748.78,1309.67,616,1436.41,628.1,1448.86c8.9,9.14,58-72.32,104.9-76.86,58.93-5.7,152.56-207.94,191-124.07,8.54,18.63-27,71.46-1.85,49.45,25.49-22.35,47.44-46.93,62.36-15.45,6.71,14.16,11.49-3.09,31.36-15.19,20.83-12.69,49.35-24.7,61.87-2.83,19.75,34.52-52,39.65-28.08,85.56,0,0,9.92-15.87,15.57-17.15,34.69-7.84-149.31,135.36-121.21,155.82,9.38,6.83,19.67-33.71,31.24-34.24,7.6-.35,10.52-6.06,19.08,1.74,34.27,31.21-96.13,67.47-96,116.26.11,53.18,81.88-64.44,114.2-68.3,33.75-4-39.52,44.31-43.54,70.2-2.14,13.74,36.39-.45,30.35,12-5.07,10.46-30.45,24.8-17.93,30.87,31.39,15.2,44.16-75.68,78.38-85.7,58-17,44.9-29.55,98-48.18,128-44.93,78.25-119.83,181.19-106.68,43,5.48-42.12,81.72-64.62,118.8-11.21,18.48-52.9,24.24-53,45.1-.11,29.68,21.36,48.09,22.77,79.55,2.78,62.12,22.57,59.72-12.43,114.64-8,12.6-35.58,20.66-32.15,27,27.11,50.24,104-63,144.5-95.37,115.23-92.13,250-279.14,358.87-364.85,10.59-8.34,103.53-104.79,217.09-227.32V0Zm-602,1100.21c5.1-6.84,17.4-41.21,26.41-28.13C961.47,1084.17,904.4,1130.14,926.73,1100.21Zm27.65-202.07s-.65-.16-.58-.31S954.67,897.86,954.38,898.14Z"/>',
'square' => '<path d="M981.26,1023.72c1.37-1.07,1.91-6.31.3-7-2.83-1.17-5.62,7.43-7.55,4.46-7.27-11.19,13.21,1.4-6.14-17-15.38-14.63-52.28,16.63-57.87,37.65-2.32,8.72-9,7.17-9.77,16.11-1.11,13.57-22.14,16.1-4.42,21.82,20.66,6.67-5,7.64-3.91,10.89,1.82,5.24,8.81,4.3,11.62,8.55,5.57,8.42,8.73,24.62,19.2,26.83,16.37,3.46,1.74,4.54,2.27,13.81.5,8.77,14.88-8.14,14.14-8.76-5.86-5,1.56-12.66,1.15-14.52-1.7-7.84-20.94,5.56-12.61-3.29,4-4.23,3.19-11.84,7.6-15.83,7.45-6.75.91-7.67,13.07-6.64,18.4,1.56,43.06-15.07,45.86-36.62C995,1048,969,1033.37,981.26,1023.72Z"/>
<path d="M1316.31,0c-116.9,122.94-217.26,225.61-255.58,246.41C999,279.9,889.27,460.53,987.52,447.51c12.76-1.69,33.36-42.27,36.64-7.05,4.26,45.69,20.24,72.05,18.2,108.42-.58,10.42,29.35,16.48,16.26,27.15-4.14,3.38,3.37,6.73-2.64,12.8-9.13,9.22-8.53,5-16.7,11.43-13.28,10.4-43.9-2.21-61.16,16.41-14.9,16.06-10.23,18.35-13.89,30.63-23.72,79.52-75.23,74.7-39,130.93C965,840,1050.71,760.9,919.49,906.3,857.78,974.67,725,1101.41,737.1,1113.86c8.9,9.14,58-72.32,104.9-76.86,58.93-5.7,152.56-207.94,191-124.07,8.54,18.63-27,71.46-1.85,49.45,25.49-22.35,47.44-46.93,62.36-15.45,6.71,14.16,11.49-3.09,31.36-15.19,20.83-12.69,49.35-24.7,61.87-2.83,19.75,34.52-52,39.65-28.08,85.56,0,0,9.92-15.87,15.57-17.15,34.69-7.84-149.31,135.36-121.21,155.82,9.38,6.83,19.67-33.71,31.24-34.24,7.6-.35,10.52-6.06,19.08,1.74,34.27,31.21-96.13,67.47-96,116.26.11,53.18,81.88-64.44,114.2-68.3,33.75-4-39.52,44.31-43.54,70.2-2.14,13.74,36.39-.45,30.35,12-5.07,10.46-30.45,24.8-17.93,30.87,31.39,15.2,44.16-75.68,78.38-85.7,58-17,44.9-29.55,98-48.18,128-44.93,78.25-119.83,181.19-106.68,43,5.48-42.12,81.72-64.62,118.8-11.21,18.48-52.9,24.24-53,45.1-.11,29.68,21.36,48.09,22.77,79.55,2.78,62.12,22.57,59.72-12.43,114.64-8,12.6-35.58,20.66-32.15,27,27.11,50.24,104-63,144.5-95.37,115.23-92.13,250-279.14,358.87-364.85,6.88-5.43,48.56-48.08,108.09-110.93V0ZM1035.73,765.21c5.1-6.84,17.4-41.21,26.41-28.13C1070.47,749.17,1013.4,795.14,1035.73,765.21Zm27.65-202.07s-.65-.16-.58-.31S1063.67,562.86,1063.38,563.14Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M761,22.09C846.73,130.93,1033.74,265.73,1125.87,381c32.41,40.53,145.61,117.39,95.37,144.5-6.34,3.43-14.4-24.11-27-32.15-54.92-35-52.52-15.21-114.64-12.43-31.46,1.41-49.87,22.88-79.55,22.77-20.86-.07-26.62-41.76-45.1-53-37.08-22.5-113.32-107.59-118.8-64.62C823,489,897.9,439.27,942.83,567.25c18.63,53.09,31.2,40,48.18,98,10,34.22,100.9,47,85.7,78.38-6.07,12.52-20.41-12.86-30.87-17.93-12.49-6,1.7,32.49-12,30.35-25.89-4-74.23-77.29-70.2-43.54,3.86,32.32,121.48,114.09,68.3,114.2-48.79.1-85.05-130.3-116.26-96-7.8,8.56-2.09,11.48-1.74,19.08.53,11.57,41.07,21.86,34.24,31.24-20.46,28.1-163.66-155.9-155.82-121.21,1.28,5.65,17.15,15.57,17.15,15.57-45.91,23.92-51-47.83-85.56-28.08-21.87,12.52-9.86,41,2.83,61.87,12.1,19.87,29.35,24.65,15.19,31.36-31.48,14.92-6.9,36.87,15.45,62.36,22,25.1-30.82-10.39-49.45-1.85C624.06,839.44,826.3,933.07,832,992c4.54,46.94,86,96,76.86,104.9C896.41,1109,769.67,976.22,701.3,914.51,555.9,783.29,635,869,573.23,908.78,517,945,521.82,893.49,442.3,869.77c-12.28-3.66-14.57,1-30.63-13.89-18.62-17.26-6-47.88-16.41-61.16-6.39-8.17-2.21-7.57-11.43-16.7-6.07-6-9.42,1.5-12.8-2.64-10.67-13.09-16.73,16.84-27.15,16.26-36.37-2-62.73,13.94-108.42,18.2-35.22,3.28,5.36,23.88,7,36.64,13,98.25-167.61-11.51-201.1-73.21C30.33,752.86,16,733.83,0,715.6V1440H1920V0H740.4C750.29,9.87,757.5,17.63,761,22.09Zm124.8,863.57c-1,12.16-.11,5.62,6.64,13.07,4,4.41,11.6,3.62,15.83,7.6,8.85,8.33-4.55-10.91,3.29-12.61,1.86-.41,9.5,7,14.52,1.15.62-.74,17.53,13.64,8.76,14.14-9.27.53-10.35-14.1-13.81,2.27-2.21,10.47-18.41,13.63-26.83,19.2-4.25,2.81-3.31,9.8-8.55,11.62-3.25,1.12-4.22-24.57-10.89-3.91-5.72,17.72-8.25-3.31-21.82-4.42-8.94-.74-7.39-7.45-16.11-9.77-21-5.59-52.28-42.49-37.65-57.87,18.41-19.35,5.82,1.13,17-6.14,3-1.93-5.63-4.72-4.46-7.55.66-1.61,5.89-1.07,7,.3C828.37,865,843,839,849.2,839.8,870.75,842.6,887.38,867.26,885.82,885.66ZM532.08,771.86c12.09-8.33,58.06,48.74,28.13,26.41C553.37,793.17,519,780.87,532.08,771.86Zm-173.94-1.24s-.16.65-.31.58S357.86,770.33,358.14,770.62Z"/>',
'portrait' => '<path d="M1009.41,113c89.56,113.73,285,254.58,381.25,375,33.86,42.36,152.15,122.67,99.65,151-6.62,3.58-15-25.2-28.21-33.59-57.39-36.58-54.89-15.9-119.79-13-32.88,1.47-52.12,23.9-83.13,23.79-21.79-.08-27.81-43.63-47.12-55.35-38.75-23.51-118.41-112.42-124.14-67.53-13.74,107.57,64.53,55.6,111.47,189.33,19.47,55.48,32.6,41.84,50.34,102.39,10.48,35.76,105.44,49.11,89.55,81.91C1333,880,1318,853.45,1307,848.16c-13-6.32,1.77,33.94-12.58,31.71-27-4.21-77.57-80.76-73.36-45.5,4,33.77,126.94,119.21,71.37,119.33-51,.1-88.87-136.15-121.48-100.34-8.14,8.94-2.18,12-1.82,19.93.56,12.1,42.92,22.85,35.79,32.65-21.38,29.36-171-162.91-162.83-126.66,1.34,5.91,17.92,16.27,17.92,16.27-48,25-53.33-50-89.4-29.34-22.86,13.08-10.3,42.88,3,64.65,12.64,20.76,30.67,25.76,15.87,32.77-32.9,15.59-7.21,38.52,16.15,65.16,23,26.23-32.21-10.85-51.68-1.93-87.64,40.15,123.69,138,129.64,199.57,4.75,49,89.87,100.31,80.31,109.61-13,12.66-145.43-126.1-216.88-190.58-151.93-137.12-69.23-47.59-133.82-6-58.76,37.84-53.72-16-136.81-40.76-12.84-3.83-15.23,1-32-14.52-19.45-18-6.28-50-17.14-63.91-6.68-8.54-2.31-7.9-12-17.45-6.34-6.28-9.84,1.57-13.37-2.76-11.16-13.67-17.49,17.6-28.37,17-38-2.13-65.55,14.57-113.29,19-36.81,3.43,5.6,25,7.37,38.29,13.6,102.67-175.14-12-210.14-76.5C235.74,857.83,128.46,753,0,630.81V2560H1920V0H893.51C959.18,62.2,1003.75,105.76,1009.41,113Zm130.41,902.36c-1.07,12.7-.11,5.88,6.94,13.66,4.17,4.6,12.12,3.77,16.54,7.94,9.25,8.7-4.75-11.4,3.44-13.18,1.94-.42,9.93,7.33,15.17,1.2.65-.77,18.32,14.26,9.15,14.78-9.69.55-10.81-14.74-14.43,2.37-2.31,10.94-19.24,14.24-28,20.06-4.45,2.94-3.46,10.24-8.93,12.14-3.4,1.18-4.41-25.67-11.38-4.08-6,18.51-8.62-3.46-22.8-4.62-9.35-.77-7.73-7.79-16.84-10.21-22-5.84-54.62-44.4-39.34-60.46,19.24-20.23,6.09,1.17,17.77-6.42,3.11-2-5.88-4.94-4.66-7.89.7-1.68,6.16-1.13,7.29.31,10.08,12.83,25.37-14.36,31.85-13.52C1124.07,970.31,1141.45,996.08,1139.82,1015.31ZM588.44,895.1s-.17.68-.33.61S588.14,894.8,588.44,895.1Zm181.75,1.3c12.64-8.7,60.67,50.92,29.39,27.59C792.44,918.66,756.52,905.81,770.19,896.4Z"/>',
'square' => '<path d="M966,108.09c85.71,108.84,272.72,243.64,364.85,358.87,32.41,40.53,145.61,117.39,95.37,144.5-6.34,3.43-14.4-24.11-27-32.15-54.92-35-52.52-15.21-114.64-12.43-31.46,1.41-49.87,22.88-79.55,22.77-20.86-.07-26.62-41.76-45.1-53-37.08-22.5-113.32-107.59-118.8-64.62C1028,575,1102.9,525.27,1147.83,653.25c18.63,53.09,31.2,40,48.18,98,10,34.22,100.9,47,85.7,78.38-6.07,12.52-20.41-12.86-30.87-17.93-12.49-6,1.7,32.49-12,30.35-25.89-4-74.23-77.29-70.2-43.54,3.86,32.32,121.48,114.09,68.3,114.2-48.79.1-85.05-130.3-116.26-96-7.8,8.56-2.09,11.48-1.74,19.08.53,11.57,41.07,21.86,34.24,31.24-20.46,28.1-163.66-155.9-155.82-121.21,1.28,5.65,17.15,15.57,17.15,15.57-45.91,23.92-51-47.83-85.56-28.08-21.87,12.52-9.86,41,2.83,61.87,12.1,19.87,29.35,24.65,15.19,31.36-31.48,14.92-6.9,36.87,15.45,62.36,22,25.1-30.82-10.39-49.45-1.85-83.87,38.43,118.37,132.06,124.07,191,4.54,46.94,86,96,76.86,104.9-12.45,12.12-139.19-120.68-207.56-182.39C760.9,869.29,840,955,778.23,994.78c-56.23,36.22-51.41-15.29-130.93-39-12.28-3.66-14.57,1-30.63-13.89-18.62-17.26-6-47.88-16.41-61.16-6.39-8.17-2.21-7.57-11.43-16.7-6.07-6-9.42,1.5-12.8-2.64-10.67-13.09-16.73,16.84-27.15,16.26-36.37-2-62.73,13.94-108.42,18.2-35.22,3.28,5.36,23.88,7.05,36.64,13,98.25-167.61-11.51-201.1-73.21C225.61,821,122.94,720.59,0,603.69V1920H1920V0H855.09C917.94,59.53,960.6,101.21,966,108.09Zm124.8,863.57c-1,12.16-.11,5.62,6.64,13.07,4,4.41,11.6,3.62,15.83,7.6,8.85,8.33-4.55-10.91,3.29-12.61,1.86-.41,9.5,7,14.52,1.15.62-.74,17.53,13.64,8.76,14.14-9.27.53-10.35-14.1-13.81,2.27-2.21,10.47-18.41,13.63-26.83,19.2-4.25,2.81-3.31,9.8-8.55,11.62-3.25,1.12-4.22-24.57-10.89-3.91-5.72,17.72-8.25-3.31-21.82-4.42-8.94-.74-7.39-7.45-16.11-9.77-21-5.59-52.28-42.49-37.65-57.87,18.41-19.35,5.82,1.13,17-6.14,3-1.93-5.63-4.72-4.46-7.55.66-1.61,5.89-1.07,7,.3C1033.37,951,1048,925,1054.2,925.8,1075.75,928.6,1092.38,953.26,1090.82,971.66Zm-527.68-115s-.16.65-.31.58S562.86,856.33,563.14,856.62Zm173.94,1.24c12.09-8.33,58.06,48.74,28.13,26.41C758.37,879.17,724,866.87,737.08,857.86Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M242.51,846.48c-1.69-12.76-42.27-33.36-7-36.64,45.69-4.26,72-20.24,108.42-18.2,10.42.58,16.48-29.35,27.15-16.26,3.38,4.14,6.73-3.37,12.8,2.64,9.22,9.13,5,8.53,11.43,16.7,10.4,13.28-2.21,43.9,16.41,61.16,16.06,14.9,18.35,10.23,30.63,13.89,79.52,23.72,74.7,75.23,130.93,39C635,869,555.9,783.29,701.3,914.51,769.67,976.22,896.41,1109,908.86,1096.9c9.14-8.9-72.32-58-76.86-104.9-5.7-58.93-207.94-152.56-124.07-191,18.63-8.54,71.46,27,49.45,1.85-22.35-25.49-46.93-47.44-15.45-62.36,14.16-6.71-3.09-11.49-15.19-31.36-12.69-20.83-24.7-49.35-2.83-61.87,34.52-19.75,39.65,52,85.56,28.08,0,0-15.87-9.92-17.15-15.57C784.48,625.09,927.68,809.09,948.14,781c6.83-9.38-33.71-19.67-34.24-31.24-.35-7.6-6.06-10.52,1.74-19.08,31.21-34.27,67.47,96.13,116.26,96,53.18-.11-64.44-81.88-68.3-114.2-4-33.75,44.31,39.52,70.2,43.54,13.74,2.14-.45-36.39,12-30.35,10.46,5.07,24.8,30.45,30.87,17.93,15.2-31.39-75.68-44.16-85.7-78.38-17-58-29.55-44.9-48.18-98C897.9,439.27,823,489,836.15,386.06c5.48-43,81.72,42.12,118.8,64.62,18.48,11.21,24.24,52.9,45.1,53,29.68.11,48.09-21.36,79.55-22.77,62.12-2.78,59.72-22.57,114.64,12.43,12.6,8,20.66,35.58,27,32.15,50.24-27.11-63-104-95.37-144.5C1033.74,265.73,846.73,130.93,761,22.09,757.5,17.63,750.29,9.87,740.4,0H0V715.6c16,18.23,30.33,37.26,41.41,57.67C74.9,835,255.53,944.73,242.51,846.48Zm289.57-74.62c12.09-8.33,58.06,48.74,28.13,26.41C553.37,793.17,519,780.87,532.08,771.86Zm-173.94-1.24s-.16.65-.31.58S357.86,770.33,358.14,770.62ZM934.86,909c-9.27.53-10.35-14.1-13.81,2.27-2.21,10.47-18.41,13.63-26.83,19.2-4.25,2.81-3.31,9.8-8.55,11.62-3.25,1.12-4.22-24.57-10.89-3.91-5.72,17.72-8.25-3.31-21.82-4.42-8.94-.74-7.39-7.45-16.11-9.77-21-5.59-52.28-42.49-37.65-57.87,18.41-19.35,5.82,1.13,17-6.14,3-1.93-5.63-4.72-4.46-7.55.66-1.61,5.89-1.07,7,.3C828.37,865,843,839,849.2,839.8c21.55,2.8,38.18,27.46,36.62,45.86-1,12.16-.11,5.62,6.64,13.07,4,4.41,11.6,3.62,15.83,7.6,8.85,8.33-4.55-10.91,3.29-12.61,1.86-.41,9.5,7,14.52,1.15C926.72,894.13,943.63,908.51,934.86,909Z"/>',
'portrait' => '<path d="M1191.06,1039.71c-9.69.55-10.81-14.74-14.43,2.37-2.31,10.94-19.24,14.24-28,20.06-4.45,2.94-3.46,10.24-8.93,12.14-3.4,1.18-4.41-25.67-11.38-4.08-6,18.51-8.62-3.46-22.8-4.62-9.35-.77-7.73-7.79-16.84-10.21-22-5.84-54.62-44.4-39.34-60.46,19.24-20.23,6.09,1.17,17.77-6.42,3.11-2-5.88-4.94-4.66-7.89.7-1.68,6.16-1.13,7.29.31,10.08,12.83,25.37-14.36,31.85-13.52,22.51,2.92,39.89,28.69,38.26,47.92-1.07,12.7-.11,5.88,6.94,13.66,4.17,4.6,12.12,3.77,16.54,7.94,9.25,8.7-4.75-11.4,3.44-13.18,1.94-.42,9.93,7.33,15.17,1.2C1182.56,1024.16,1200.23,1039.19,1191.06,1039.71ZM0,630.81V0H893.51c65.67,62.2,110.24,105.76,115.9,113,89.56,113.73,285,254.58,381.25,375,33.86,42.36,152.15,122.67,99.65,151-6.62,3.58-15-25.2-28.21-33.59-57.39-36.58-54.89-15.9-119.79-13-32.88,1.47-52.12,23.9-83.13,23.79-21.79-.08-27.81-43.63-47.12-55.35-38.75-23.52-118.41-112.42-124.14-67.53-13.74,107.57,64.53,55.6,111.47,189.33,19.47,55.48,32.6,41.84,50.34,102.39,10.48,35.76,105.44,49.11,89.55,81.91C1333,880,1318,853.45,1307,848.16c-13-6.32,1.77,33.94-12.58,31.71-27-4.21-77.57-80.76-73.36-45.5,4,33.77,126.94,119.21,71.37,119.33-51,.1-88.87-136.15-121.48-100.34-8.14,8.94-2.18,12-1.82,19.93.56,12.1,42.92,22.85,35.79,32.65-21.38,29.36-171-162.91-162.83-126.66,1.34,5.91,17.92,16.27,17.92,16.27-48,25-53.33-50-89.4-29.34-22.86,13.08-10.3,42.88,3,64.65,12.64,20.76,30.67,25.76,15.87,32.77-32.9,15.59-7.21,38.52,16.15,65.16,23,26.23-32.21-10.85-51.68-1.93-87.64,40.16,123.69,138,129.64,199.57,4.75,49,89.87,100.31,80.31,109.61-13,12.66-145.43-126.1-216.88-190.58-151.93-137.12-69.23-47.59-133.82-6-58.76,37.84-53.72-16-136.81-40.76-12.84-3.83-15.23,1-32-14.52-19.45-18-6.28-50-17.14-63.91-6.68-8.54-2.31-7.9-11.94-17.45-6.35-6.28-9.85,1.57-13.38-2.76-11.16-13.67-17.49,17.6-28.37,17-38-2.13-65.55,14.57-113.29,19-36.81,3.43,5.6,25,7.37,38.29,13.6,102.67-175.14-12-210.14-76.5C235.74,857.83,128.46,753,0,630.81ZM799.58,924c31.28,23.33-16.75-36.29-29.39-27.59C756.52,905.81,792.44,918.66,799.58,924ZM588.11,895.71c.16.07.33-.61.33-.61C588.14,894.8,587.87,895.6,588.11,895.71Z"/>',
'square' => '<path d="M1139.86,995c-9.27.53-10.35-14.1-13.81,2.27-2.21,10.47-18.41,13.63-26.83,19.2-4.25,2.81-3.31,9.8-8.55,11.62-3.25,1.12-4.22-24.57-10.89-3.91-5.72,17.72-8.25-3.31-21.82-4.42-8.94-.74-7.39-7.45-16.11-9.77-21-5.59-52.28-42.49-37.65-57.87,18.41-19.35,5.82,1.13,17-6.14,3-1.93-5.63-4.72-4.46-7.55.66-1.61,5.9-1.07,7,.3C1033.37,951,1048,925,1054.2,925.8c21.55,2.8,38.18,27.46,36.62,45.86-1,12.16-.11,5.62,6.64,13.07,4,4.41,11.6,3.62,15.83,7.6,8.85,8.33-4.55-10.91,3.29-12.61,1.86-.41,9.5,7,14.52,1.15C1131.72,980.13,1148.63,994.51,1139.86,995ZM0,603.69V0H855.09C917.94,59.53,960.59,101.21,966,108.09c85.71,108.84,272.72,243.64,364.85,358.87,32.41,40.53,145.61,117.39,95.37,144.5-6.34,3.43-14.4-24.11-27-32.15-54.92-35-52.52-15.21-114.64-12.43-31.46,1.41-49.87,22.88-79.55,22.77-20.86-.07-26.62-41.76-45.1-53-37.08-22.5-113.32-107.59-118.8-64.62C1028,575,1102.9,525.27,1147.83,653.25c18.63,53.09,31.2,40,48.18,98,10,34.22,100.9,47,85.7,78.38-6.07,12.52-20.41-12.86-30.87-17.93-12.49-6,1.7,32.49-12,30.35-25.89-4-74.23-77.29-70.2-43.54,3.86,32.32,121.48,114.09,68.3,114.2-48.79.1-85.05-130.3-116.26-96-7.8,8.56-2.09,11.48-1.74,19.08.53,11.57,41.07,21.86,34.24,31.24-20.46,28.1-163.66-155.9-155.82-121.21,1.28,5.65,17.15,15.57,17.15,15.57-45.91,23.92-51-47.83-85.56-28.08-21.87,12.52-9.86,41,2.83,61.87,12.1,19.87,29.35,24.65,15.19,31.36-31.48,14.92-6.9,36.87,15.45,62.36,22,25.1-30.82-10.39-49.45-1.85-83.87,38.43,118.37,132.06,124.07,191,4.54,46.94,86,96,76.86,104.9-12.45,12.12-139.19-120.68-207.56-182.39C760.9,869.29,840,955,778.23,994.78c-56.23,36.22-51.41-15.29-130.93-39-12.28-3.66-14.57,1-30.63-13.89-18.62-17.26-6-47.88-16.41-61.16-6.39-8.17-2.21-7.57-11.43-16.7-6.07-6-9.42,1.5-12.8-2.64-10.67-13.09-16.73,16.84-27.15,16.26-36.37-2-62.73,13.94-108.42,18.2-35.22,3.28,5.36,23.88,7.05,36.64,13,98.25-167.61-11.51-201.1-73.21C225.61,821,122.94,720.59,0,603.69ZM765.21,884.27c29.93,22.33-16-34.74-28.13-26.41C724,866.87,758.37,879.17,765.21,884.27ZM562.83,857.2c.15.07.31-.58.31-.58C562.86,856.33,562.6,857.09,562.83,857.2Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Corner_Paint();

View File

@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Corner Pill.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Corner_Pill
*
* @since 4.15.0
*/
class ET_Builder_Mask_Corner_Pill extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Corner Pill', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M1056.87,850.36h0c-112.36-168-67.24-395.33,100.78-507.7L1670.06,0H0V1440H1920V713.45L1564.57,951.14C1396.54,1063.51,1169.24,1018.39,1056.87,850.36Z"/>',
'portrait' => '<path d="M1003.61,1013.35h0c-126-188.46-75.42-443.4,113-569.43L1780.48,0H0V2560H1920V894.36l-347,232C1384.58,1252.42,1129.64,1201.81,1003.61,1013.35Z"/>',
'square' => '<path d="M1081.61,887.35h0c-126-188.46-75.42-443.4,113-569.43L1670.06,0H0V1920H1920V820.52l-269,179.87C1462.58,1126.42,1207.64,1075.81,1081.61,887.35Z"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M1670.06,0,1157.65,342.66c-168,112.37-213.14,339.67-100.78,507.7h0c112.37,168,339.67,213.15,507.7,100.78L1920,713.45V0Z"/>',
'portrait' => '<path d="M1780.48,0,1116.65,443.92c-188.46,126-239.07,381-113,569.43h0c126,188.46,381,239.07,569.43,113l347-232V0Z"/>',
'square' => '<path d="M1670.06,0,1194.65,317.92c-188.46,126-239.07,381-113,569.43h0c126,188.46,381,239.07,569.43,113l269-179.87V0Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M850.36,863.13h0c-168,112.36-395.33,67.24-507.7-100.78L0,249.94V1440H1920V0H713.45L951.14,355.43C1063.51,523.46,1018.39,750.76,850.36,863.13Z"/>',
'portrait' => '<path d="M0,139.52,443.92,803.35c126,188.46,381,239.07,569.43,113h0c188.46-126,239.07-381,113-569.43L894.36,0H1920V2560H0Z"/>',
'square' => '<path d="M0,249.94,317.92,725.35c126,188.46,381,239.07,569.43,113h0c188.46-126,239.07-381,113-569.43L820.52,0H1920V1920H0Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M850.36,863.13h0c-168,112.36-395.33,67.24-507.7-100.78L0,249.94V0H713.45L951.14,355.43C1063.51,523.46,1018.39,750.76,850.36,863.13Z"/>',
'portrait' => '<path d="M0,139.52,443.92,803.35c126,188.46,381,239.07,569.43,113h0c188.46-126,239.07-381,113-569.43L894.36,0H0Z"/>',
'square' => '<path d="M0,249.94,317.92,725.35c126,188.46,381,239.07,569.43,113h0c188.46-126,239.07-381,113-569.43L820.52,0H0Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Corner_Pill();

View File

@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Corner Square.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Corner_Square
*
* @since 4.15.0
*/
class ET_Builder_Mask_Corner_Square extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Corner Square', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M1423.43,1145.79a147.64,147.64,0,0,1-190.28-85.94L832.83,0H0V1440H1920V958.23Z"/>',
'portrait' => '<path d="M1423.43,1145.79a147.64,147.64,0,0,1-190.28-85.94L832.83,0H0V2560H1920V958.23Z"/>',
'square' => '<path d="M1423.43,1145.79a147.64,147.64,0,0,1-190.28-85.94L832.83,0H0V1920H1920V958.23Z"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M1423.43,1145.79,1920,958.23V0H832.83l400.32,1059.85A147.64,147.64,0,0,0,1423.43,1145.79Z"/>',
'portrait' => '<path d="M1423.43,1145.79,1920,958.23V0H832.83l400.32,1059.85A147.64,147.64,0,0,0,1423.43,1145.79Z"/>',
'square' => '<path d="M1423.43,1145.79,1920,958.23V0H832.83l400.32,1059.85A147.64,147.64,0,0,0,1423.43,1145.79Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M1145.79,496.57a147.64,147.64,0,0,1-85.94,190.28L0,1087.17V1440H1920V0H958.23Z"/>',
'portrait' => '<path d="M1145.79,496.57a147.64,147.64,0,0,1-85.94,190.28L0,1087.17V2560H1920V0H958.23Z"/>',
'square' => '<path d="M1145.79,496.57a147.64,147.64,0,0,1-85.94,190.28L0,1087.17V1920H1920V0H958.23Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M1145.79,496.57a147.64,147.64,0,0,1-85.94,190.28L0,1087.17V0H958.23Z"/>',
'portrait' => '<path d="M1145.79,496.57a147.64,147.64,0,0,1-85.94,190.28L0,1087.17V0H958.23Z"/>',
'square' => '<path d="M1145.79,496.57a147.64,147.64,0,0,1-85.94,190.28L0,1087.17V0H958.23Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Corner_Square();

View File

@ -0,0 +1,62 @@
<?php
/**
* Background Mask Style - Diagonal Bars 2.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Diagonal_Bars_2
*
* @since 4.15.0
*/
class ET_Builder_Mask_Diagonal_Bars_2 extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Diagonal Bars 2', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<polygon points="390 803.5 390 389.7 779.86 0 558 0 390.5 167.5 390.5 0 0 0 0 1440 1920 1440 1920 0 1829 0 389.5 1439.5 389.5 1025.7 1415.61 0 1193.5 0 390 803.5"/>',
'portrait' => '<polygon points="390 1284.5 390 870.7 1261.05 0 1038.5 0 390 648.5 390 234.7 624.8 0 0 0 0 2560 1920 2560 1920 1026 389.5 2556.5 389.5 2142.7 1920 612.81 1920 390.5 390 1920.5 390 1506.7 1897.3 0 1674.5 0 390 1284.5"/>',
'square' => '<polygon points="1920 1920 1920 390 390 1920 1920 1920"/>
<polygon points="390 1284.5 390 870.7 1261.05 0 1039 0 390.5 648.5 390.5 234.7 625.3 0 0 0 0 1920 389.5 1920 389.5 1506.7 1896.8 0 1674.5 0 390 1284.5"/>',
),
'default-inverted' => array(
'landscape' => '<polygon points="389.5 1439.5 1829 0 1415.61 0 389.5 1025.7 389.5 1439.5"/>
<polygon points="390 803.5 1193.5 0 779.86 0 390 389.7 390 803.5"/>
<polygon points="558 0 390.5 0 390.5 167.5 558 0"/>',
'portrait' => '<polygon points="389.5 2556.5 1920 1026 1920 612.81 389.5 2142.7 389.5 2556.5"/>
<polygon points="390 1920.5 1920 390.5 1920 0 1897.3 0 390 1506.7 390 1920.5"/>
<polygon points="390 1284.5 1674.5 0 1261.05 0 390 870.7 390 1284.5"/>
<polygon points="390 648.5 1038.5 0 624.8 0 390 234.7 390 648.5"/>',
'square' => '<polygon points="389.5 1920 390 1920 1920 390 1920 0 1896.8 0 389.5 1506.7 389.5 1920"/>
<polygon points="390 1284.5 1674.5 0 1261.05 0 390 870.7 390 1284.5"/>
<polygon points="390.5 648.5 1039 0 625.3 0 390.5 234.7 390.5 648.5"/>',
),
'rotated' => array(
'landscape' => '<path d="M234.5,0H456.62L1506.7,1050.5H1920V1440H0V814.7l234.7,234.8H648.5L0,401V179L870.7,1050h413.8ZM1920,0H870L1920,1050Z"/>',
'portrait' => '<path d="M1920.5,1530.5,390,0H1920Zm2.5,638H1509.2L0,659V881L1287,2168H873.2L0,1294.7V2560H1920l.1-616.1L0,23.2V245.5Z"/>',
'square' => '<path d="M1920,1530,390,0H1920Zm-635.5,0H870.7L0,659V881l648.5,648.5H234.7L0,1294.7V1920H1920V1530.5H1506.7L0,23.2V245.5Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M234.7,1049.5,0,814.7V401l648.5,648.5ZM456.62,0,1506.7,1050.5H1920v-.5L870,0ZM1284.5,1050,234.5,0H0V179L870.7,1050Z"/>',
'portrait' => '<path d="M1920,2165.5l.06.06v2.94H1920Zm-633,2.5L0,881v413.7L873.2,2168Zm633-638L390,0H0V23.2L1920,1943.8Zm0,638.5v-3L0,245.5V659L1509.2,2168.5Z"/>',
'square' => '<path d="M234.7,1529.5,0,1294.7V881l648.5,648.5Zm1049.8.5L0,245.5V659L870.7,1530ZM0,0V23.2L1506.7,1530.5H1920v-.5L390,0Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Diagonal_Bars_2();

View File

@ -0,0 +1,66 @@
<?php
/**
* Background Mask Style - Diagonal Lines.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Diagonal_Bars
*
* @since 4.15.0
*/
class ET_Builder_Mask_Diagonal_Bars extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Diagonal Lines', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<polygon points="0 0 0 1440 1431.18 1440 955.79 0 0 0"/>
<polygon points="1291.92 0 1767.32 1440 1816.13 1440 1340.73 0 1291.92 0"/>
<polygon points="1725.68 0 1676.87 0 1920 736.45 1920 588.61 1725.68 0"/>',
'portrait' => '<polygon points="0 0 0 2560 1801.04 2560 955.79 0 0 0"/>
<polygon points="1920 1754.63 1340.73 0 1291.92 0 1920 1902.48 1920 1754.63"/>
<polygon points="1920 588.61 1725.68 0 1676.87 0 1920 736.45 1920 588.61"/>',
'square' => '<polygon points="1725.68 0 1676.87 0 1920 736.45 1920 588.61 1725.68 0"/>
<polygon points="1291.92 0 1920 1902.48 1920 1754.63 1340.73 0 1291.92 0"/>
<polygon points="0 0 0 1920 1589.65 1920 955.79 0 0 0"/>',
),
'default-inverted' => array(
'landscape' => '<polygon points="955.79 0 1431.18 1440 1767.32 1440 1291.92 0 955.79 0"/>
<polygon points="1340.73 0 1816.13 1440 1920 1440 1920 736.45 1676.87 0 1340.73 0"/>
<polygon points="1920 0 1725.68 0 1920 588.61 1920 0"/>',
'portrait' => '<polygon points="955.79 0 1801 2560 1920 2560 1920 1902.48 1291.92 0 955.79 0"/>
<polygon points="1340.73 0 1920 1754.63 1920 736.45 1676.87 0 1340.73 0"/>
<polygon points="1920 0 1725.68 0 1920 588.61 1920 0"/>',
'square' => '<polygon points="955.79 0 1589.65 1920 1920 1920 1920 1902.48 1291.92 0 955.79 0"/>
<polygon points="1340.73 0 1920 1754.63 1920 736.45 1676.87 0 1340.73 0"/>
<polygon points="1920 0 1725.68 0 1920 588.61 1920 0"/>',
),
'rotated' => array(
'landscape' => '<path d="M588.61,0H736.45L0,243.13V194.32ZM0,628.08,1902.48,0H1754.63L0,579.27ZM0,1440H1920V330.35L0,964.21Z"/>',
'portrait' => '<path d="M588.61,0H736.45L0,243.13V194.32ZM0,628.08,1902.48,0H1754.63L0,579.27ZM0,2560H1920V330.35L0,964.21Z"/>',
'square' => '<path d="M588.61,0H736.45L0,243.13V194.32ZM0,628.08,1902.48,0H1754.63L0,579.27ZM0,1920H1920V330.35L0,964.21Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M0,628.08,1902.48,0H1920V330.35L0,964.21Zm0-48.81L1754.63,0H736.45L0,243.13ZM0,0V194.32L588.61,0Z"/>',
'portrait' => '<path d="M0,628.08,1902.48,0H1920V330.35L0,964.21Zm0-48.81L1754.63,0H736.45L0,243.13ZM0,0V194.32L588.61,0Z"/>',
'square' => '<path d="M0,628.08,1902.48,0H1920V330.35L0,964.21Zm0-48.81L1754.63,0H736.45L0,243.13ZM0,0V194.32L588.61,0Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Diagonal_Bars();

View File

@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Diagonal Pills.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Diagonal_Pills
*
* @since 4.15.0
*/
class ET_Builder_Mask_Diagonal_Pills extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Diagonal Pills', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M1731.17,1001.24h0a118.5,118.5,0,0,1-26.62-165.46l215.45-298V429L1556.62,931.63a118.49,118.49,0,0,1-165.45,26.61h0a118.5,118.5,0,0,1-26.62-165.46L1920,24.4V0h-61.84L1526.62,458.63a118.49,118.49,0,0,1-165.45,26.61h0a118.5,118.5,0,0,1-26.62-165.46L1565.72,0H0V1440H525l637.07-881.3a118.5,118.5,0,0,1,165.46-26.62h0a118.5,118.5,0,0,1,26.62,165.46L817.48,1440H897l295.15-408.3a118.5,118.5,0,0,1,165.46-26.62h0a118.51,118.51,0,0,1,26.62,165.46L1189.4,1440h78.65l264.06-365.3a118.5,118.5,0,0,1,165.46-26.62h0a118.51,118.51,0,0,1,26.62,165.46L1560.48,1440H1920V942.29l-23.38,32.34A118.49,118.49,0,0,1,1731.17,1001.24Z"/>',
'portrait' => '<path d="M1731.17,1001.24h0a118.5,118.5,0,0,1-26.62-165.46l215.45-298V429L1556.62,931.63a118.49,118.49,0,0,1-165.45,26.61h0a118.5,118.5,0,0,1-26.62-165.46L1920,24.4V0h-61.84L1526.62,458.63a118.49,118.49,0,0,1-165.45,26.61h0a118.5,118.5,0,0,1-26.62-165.46L1565.72,0H0V2560H1920V942.29l-23.38,32.34A118.49,118.49,0,0,1,1731.17,1001.24ZM480.91,1501.05l681.2-942.35a118.5,118.5,0,0,1,165.46-26.62h0a118.5,118.5,0,0,1,26.62,165.46L673,1639.89a118.5,118.5,0,0,1-165.46,26.62h0A118.5,118.5,0,0,1,480.91,1501.05Zm56.61,638.46h0a118.5,118.5,0,0,1-26.61-165.46l681.2-942.35a118.5,118.5,0,0,1,165.46-26.62h0a118.51,118.51,0,0,1,26.62,165.46L703,2112.89A118.5,118.5,0,0,1,537.52,2139.51Zm1186.67-926-261.55,361.81A118.49,118.49,0,0,1,1297.18,1602h0a118.5,118.5,0,0,1-26.61-165.45l261.54-361.81a118.5,118.5,0,0,1,165.46-26.62h0A118.51,118.51,0,0,1,1724.19,1213.54Z"/>',
'square' => '<path d="M1731.17,1001.24h0a118.5,118.5,0,0,1-26.62-165.46l215.45-298V429L1556.62,931.63a118.49,118.49,0,0,1-165.45,26.61h0a118.5,118.5,0,0,1-26.62-165.46L1920,24.4V0h-61.84L1526.62,458.63a118.49,118.49,0,0,1-165.45,26.61h0a118.5,118.5,0,0,1-26.62-165.46L1565.72,0H0V1920H550l642.13-888.3a118.5,118.5,0,0,1,165.46-26.62h0a118.51,118.51,0,0,1,26.62,165.46L842.42,1920H1920V942.29l-23.38,32.34A118.49,118.49,0,0,1,1731.17,1001.24ZM673,1639.89a118.5,118.5,0,0,1-165.46,26.62h0a118.5,118.5,0,0,1-26.61-165.46l681.2-942.35a118.5,118.5,0,0,1,165.46-26.62h0a118.5,118.5,0,0,1,26.62,165.46Zm1051.21-426.35-261.55,361.81A118.49,118.49,0,0,1,1297.18,1602h0a118.5,118.5,0,0,1-26.61-165.45l261.54-361.81a118.5,118.5,0,0,1,165.46-26.62h0A118.51,118.51,0,0,1,1724.19,1213.54Z"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M1354.19,697.54,817.48,1440H525l637.07-881.3a118.5,118.5,0,0,1,165.46-26.62h0A118.51,118.51,0,0,1,1354.19,697.54Zm7-212.3h0a118.49,118.49,0,0,0,165.45-26.61L1858.16,0H1565.72L1334.55,319.78A118.5,118.5,0,0,0,1361.17,485.24Zm-3.6,519.84h0a118.5,118.5,0,0,0-165.46,26.62L897,1440H1189.4l194.79-269.46A118.51,118.51,0,0,0,1357.57,1005.08Zm33.6-46.84h0a118.49,118.49,0,0,0,165.45-26.61L1920,429V24.4L1364.55,792.78A118.5,118.5,0,0,0,1391.17,958.24Zm306.4,89.84h0a118.5,118.5,0,0,0-165.46,26.62L1268.05,1440h292.43l163.71-226.46A118.51,118.51,0,0,0,1697.57,1048.08Zm7-212.3a118.5,118.5,0,0,0,26.62,165.46h0a118.49,118.49,0,0,0,165.45-26.61L1920,942.29V537.74Z"/>',
'portrait' => '<path d="M480.91,1501.05l681.2-942.35a118.5,118.5,0,0,1,165.46-26.62h0a118.51,118.51,0,0,1,26.62,165.46L673,1639.89a118.5,118.5,0,0,1-165.46,26.62h0A118.5,118.5,0,0,1,480.91,1501.05ZM1361.17,485.24h0a118.49,118.49,0,0,0,165.45-26.61L1858.16,0H1565.72L1334.55,319.78A118.5,118.5,0,0,0,1361.17,485.24Zm-3.6,519.84h0a118.5,118.5,0,0,0-165.46,26.62l-681.2,942.35a118.5,118.5,0,0,0,26.61,165.46h0A118.5,118.5,0,0,0,703,2112.89l681.21-942.35A118.51,118.51,0,0,0,1357.57,1005.08Zm33.6-46.84h0a118.49,118.49,0,0,0,165.45-26.61L1920,429V24.4L1364.55,792.78A118.5,118.5,0,0,0,1391.17,958.24Zm306.4,89.84h0a118.5,118.5,0,0,0-165.46,26.62l-261.54,361.81A118.5,118.5,0,0,0,1297.18,1602h0a118.49,118.49,0,0,0,165.46-26.61l261.55-361.81A118.51,118.51,0,0,0,1697.57,1048.08Zm7-212.3a118.5,118.5,0,0,0,26.62,165.46h0a118.49,118.49,0,0,0,165.45-26.61L1920,942.29V537.74Z"/>',
'square' => '<path d="M1354.19,697.54,673,1639.89a118.5,118.5,0,0,1-165.46,26.62h0a118.5,118.5,0,0,1-26.61-165.46l681.2-942.35a118.5,118.5,0,0,1,165.46-26.62h0A118.51,118.51,0,0,1,1354.19,697.54Zm7-212.3h0a118.49,118.49,0,0,0,165.45-26.61L1858.16,0H1565.72L1334.55,319.78A118.5,118.5,0,0,0,1361.17,485.24Zm-3.6,519.84h0a118.5,118.5,0,0,0-165.46,26.62L550,1920H842.42l541.77-749.46A118.51,118.51,0,0,0,1357.57,1005.08Zm33.6-46.84h0a118.49,118.49,0,0,0,165.45-26.61L1920,429V24.4L1364.55,792.78A118.5,118.5,0,0,0,1391.17,958.24Zm306.4,89.84h0a118.5,118.5,0,0,0-165.46,26.62l-261.54,361.81A118.5,118.5,0,0,0,1297.18,1602h0a118.49,118.49,0,0,0,165.46-26.61l261.55-361.81A118.51,118.51,0,0,0,1697.57,1048.08Zm7-212.3a118.5,118.5,0,0,0,26.62,165.46h0a118.49,118.49,0,0,0,165.45-26.61L1920,942.29V537.74Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M1005.08,562.43a118.51,118.51,0,0,1,165.46-26.62L1920,1077.58V0H942.29l32.34,23.38a118.49,118.49,0,0,1,26.61,165.45h0a118.5,118.5,0,0,1-165.46,26.62L537.74,0H429L931.63,363.38a118.49,118.49,0,0,1,26.61,165.45h0a118.5,118.5,0,0,1-165.46,26.62L24.4,0H0V61.84L458.63,393.38a118.49,118.49,0,0,1,26.61,165.45h0a118.5,118.5,0,0,1-165.46,26.62L0,354.28V1440H1502.34l-1.29-.91L558.7,757.89a118.5,118.5,0,0,1-26.62-165.46h0a118.5,118.5,0,0,1,165.46-26.62L1639.89,1247a118.55,118.55,0,0,1-1.23,193H1920v-70L1031.7,727.89a118.5,118.5,0,0,1-26.62-165.46Zm43-340h0a118.51,118.51,0,0,1,165.46-26.62l361.81,261.55A118.49,118.49,0,0,1,1602,622.82h0a118.5,118.5,0,0,1-165.45,26.61L1074.7,387.89A118.5,118.5,0,0,1,1048.08,222.43Z"/>',
'portrait' => '<path d="M1001.24,188.83h0a118.5,118.5,0,0,1-165.46,26.62L537.74,0H429L931.63,363.38a118.49,118.49,0,0,1,26.61,165.45h0a118.5,118.5,0,0,1-165.46,26.62L24.4,0H0V61.84L458.63,393.38a118.49,118.49,0,0,1,26.61,165.45h0a118.5,118.5,0,0,1-165.46,26.62L0,354.28V2560H1920V1370L1031.7,727.89a118.5,118.5,0,0,1-26.62-165.46h0a118.51,118.51,0,0,1,165.46-26.62L1920,1077.58V0H942.29l32.34,23.38A118.49,118.49,0,0,1,1001.24,188.83ZM1639.89,1247a118.5,118.5,0,0,1,26.62,165.46h0a118.5,118.5,0,0,1-165.46,26.61L558.7,757.89a118.5,118.5,0,0,1-26.62-165.46h0a118.5,118.5,0,0,1,165.46-26.62ZM1213.54,195.81l361.81,261.55A118.49,118.49,0,0,1,1602,622.82h0a118.5,118.5,0,0,1-165.45,26.61L1074.7,387.89a118.5,118.5,0,0,1-26.62-165.46h0A118.51,118.51,0,0,1,1213.54,195.81Z"/>',
'square' => '<path d="M1001.24,188.83h0a118.5,118.5,0,0,1-165.46,26.62L537.74,0H429L931.63,363.38a118.49,118.49,0,0,1,26.61,165.45h0a118.5,118.5,0,0,1-165.46,26.62L24.4,0H0V61.84L458.63,393.38a118.49,118.49,0,0,1,26.61,165.45h0a118.5,118.5,0,0,1-165.46,26.62L0,354.28V1920H1920V1370L1031.7,727.89a118.5,118.5,0,0,1-26.62-165.46h0a118.51,118.51,0,0,1,165.46-26.62L1920,1077.58V0H942.29l32.34,23.38A118.49,118.49,0,0,1,1001.24,188.83ZM1639.89,1247a118.5,118.5,0,0,1,26.62,165.46h0a118.5,118.5,0,0,1-165.46,26.61L558.7,757.89a118.5,118.5,0,0,1-26.62-165.46h0a118.5,118.5,0,0,1,165.46-26.62ZM1213.54,195.81l361.81,261.55A118.49,118.49,0,0,1,1602,622.82h0a118.5,118.5,0,0,1-165.45,26.61L1074.7,387.89a118.5,118.5,0,0,1-26.62-165.46h0A118.51,118.51,0,0,1,1213.54,195.81Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M792.78,555.45,24.4,0H429L931.63,363.38a118.49,118.49,0,0,1,26.61,165.45h0A118.5,118.5,0,0,1,792.78,555.45Zm208.46-366.62h0A118.49,118.49,0,0,0,974.63,23.38L942.29,0H537.74l298,215.45A118.5,118.5,0,0,0,1001.24,188.83Zm73.46,199.06,361.81,261.54A118.5,118.5,0,0,0,1602,622.82h0a118.49,118.49,0,0,0-26.61-165.46L1213.54,195.81a118.51,118.51,0,0,0-165.46,26.62h0A118.5,118.5,0,0,0,1074.7,387.89Zm95.84,147.92a118.51,118.51,0,0,0-165.46,26.62h0a118.5,118.5,0,0,0,26.62,165.46L1920,1370V1077.58ZM458.63,393.38,0,61.84V354.28L319.78,585.45a118.5,118.5,0,0,0,165.46-26.62h0A118.49,118.49,0,0,0,458.63,393.38Zm1207.88,1019.1A118.5,118.5,0,0,0,1639.89,1247L697.54,565.81a118.51,118.51,0,0,0-165.46,26.62h0A118.5,118.5,0,0,0,558.7,757.89l942.35,681.2,1.29.91h136.32A118.18,118.18,0,0,0,1666.51,1412.48Z"/>',
'portrait' => '<path d="M697.54,565.81,1639.89,1247a118.5,118.5,0,0,1,26.62,165.46h0a118.5,118.5,0,0,1-165.46,26.61L558.7,757.89a118.5,118.5,0,0,1-26.62-165.46h0A118.51,118.51,0,0,1,697.54,565.81Zm-212.3-7h0a118.49,118.49,0,0,0-26.61-165.45L0,61.84V354.28L319.78,585.45A118.5,118.5,0,0,0,485.24,558.83Zm519.84,3.6h0a118.5,118.5,0,0,0,26.62,165.46L1920,1370V1077.58L1170.54,535.81A118.51,118.51,0,0,0,1005.08,562.43Zm-46.84-33.6h0a118.49,118.49,0,0,0-26.61-165.45L429,0H24.4L792.78,555.45A118.5,118.5,0,0,0,958.24,528.83Zm89.84-306.4h0a118.5,118.5,0,0,0,26.62,165.46l361.81,261.54A118.5,118.5,0,0,0,1602,622.82h0a118.49,118.49,0,0,0-26.61-165.46L1213.54,195.81A118.51,118.51,0,0,0,1048.08,222.43Zm-212.3-7a118.5,118.5,0,0,0,165.46-26.62h0A118.49,118.49,0,0,0,974.63,23.38L942.29,0H537.74Z"/>',
'square' => '<path d="M697.54,565.81,1639.89,1247a118.5,118.5,0,0,1,26.62,165.46h0a118.5,118.5,0,0,1-165.46,26.61L558.7,757.89a118.5,118.5,0,0,1-26.62-165.46h0A118.51,118.51,0,0,1,697.54,565.81Zm-212.3-7h0a118.49,118.49,0,0,0-26.61-165.45L0,61.84V354.28L319.78,585.45A118.5,118.5,0,0,0,485.24,558.83Zm519.84,3.6h0a118.5,118.5,0,0,0,26.62,165.46L1920,1370V1077.58L1170.54,535.81A118.51,118.51,0,0,0,1005.08,562.43Zm-46.84-33.6h0a118.49,118.49,0,0,0-26.61-165.45L429,0H24.4L792.78,555.45A118.5,118.5,0,0,0,958.24,528.83Zm89.84-306.4h0a118.5,118.5,0,0,0,26.62,165.46l361.81,261.54A118.5,118.5,0,0,0,1602,622.82h0a118.49,118.49,0,0,0-26.61-165.46L1213.54,195.81A118.51,118.51,0,0,0,1048.08,222.43Zm-212.3-7a118.5,118.5,0,0,0,165.46-26.62h0A118.49,118.49,0,0,0,974.63,23.38L942.29,0H537.74Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Diagonal_Pills();

View File

@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Diagonal.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Diagonal
*
* @since 4.15.0
*/
class ET_Builder_Mask_Diagonal extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Diagonal', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M0,1440H1920V0H0Zm1023.07-137.75,307.2-1187.92A85.83,85.83,0,0,1,1413.36,50h384.43A72.21,72.21,0,0,1,1870,122.21V1317.79a72.21,72.21,0,0,1-72.21,72.21H1091A70.18,70.18,0,0,1,1023.07,1302.25Z"/>',
'portrait' => '<path d="M0,0V2560H1920V0ZM1870,2437.79a72.21,72.21,0,0,1-72.21,72.21h-823a70.18,70.18,0,0,1-67.94-87.76L1503.73,114.33A85.83,85.83,0,0,1,1586.81,50h211A72.21,72.21,0,0,1,1870,122.21Z"/>',
'square' => '<path d="M0,1920H1920V0H0Zm970.41-137.75L1401.74,114.33A85.81,85.81,0,0,1,1484.82,50h313A72.21,72.21,0,0,1,1870,122.21V1797.79a72.21,72.21,0,0,1-72.21,72.21H1038.35A70.18,70.18,0,0,1,970.41,1782.25Z"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M1023.07,1302.25l307.2-1187.92A85.83,85.83,0,0,1,1413.36,50h384.43A72.21,72.21,0,0,1,1870,122.21V1317.79a72.21,72.21,0,0,1-72.21,72.21H1091A70.18,70.18,0,0,1,1023.07,1302.25Z"/>',
'portrait' => '<path d="M906.87,2422.24,1503.73,114.33A85.83,85.83,0,0,1,1586.81,50h211A72.21,72.21,0,0,1,1870,122.21V2437.79a72.21,72.21,0,0,1-72.21,72.21h-823A70.18,70.18,0,0,1,906.87,2422.24Z"/>',
'square' => '<path d="M970.41,1782.25,1401.74,114.33A85.81,85.81,0,0,1,1484.82,50h313A72.21,72.21,0,0,1,1870,122.21V1797.79a72.21,72.21,0,0,1-72.21,72.21H1038.35A70.18,70.18,0,0,1,970.41,1782.25Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M1920,1440V0H0V1440ZM1782.25,949.59,114.33,518.26A85.81,85.81,0,0,1,50,435.18v-313A72.21,72.21,0,0,1,122.21,50H1797.79A72.21,72.21,0,0,1,1870,122.21V881.65A70.18,70.18,0,0,1,1782.25,949.59Z"/>',
'portrait' => '<path d="M1920,2560V0H0V2560ZM1782.25,1360.59,114.33,929.26A85.81,85.81,0,0,1,50,846.18v-724A72.21,72.21,0,0,1,122.21,50H1797.79A72.21,72.21,0,0,1,1870,122.21V1292.65A70.18,70.18,0,0,1,1782.25,1360.59Z"/>',
'square' => '<path d="M1920,1920V0H0V1920ZM1782.25,949.59,114.33,518.26A85.81,85.81,0,0,1,50,435.18v-313A72.21,72.21,0,0,1,122.21,50H1797.79A72.21,72.21,0,0,1,1870,122.21V881.65A70.18,70.18,0,0,1,1782.25,949.59Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M1782.25,949.59,114.33,518.26A85.81,85.81,0,0,1,50,435.18v-313A72.21,72.21,0,0,1,122.21,50H1797.79A72.21,72.21,0,0,1,1870,122.21V881.65A70.18,70.18,0,0,1,1782.25,949.59Z"/>',
'portrait' => '<path d="M1782.25,1360.59,114.33,929.26A85.81,85.81,0,0,1,50,846.18v-724A72.21,72.21,0,0,1,122.21,50H1797.79A72.21,72.21,0,0,1,1870,122.21V1292.65A70.18,70.18,0,0,1,1782.25,1360.59Z"/>',
'square' => '<path d="M1782.25,949.59,114.33,518.26A85.81,85.81,0,0,1,50,435.18v-313A72.21,72.21,0,0,1,122.21,50H1797.79A72.21,72.21,0,0,1,1870,122.21V881.65A70.18,70.18,0,0,1,1782.25,949.59Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Diagonal();

View File

@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Ellipse.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Ellipse
*
* @since 4.15.0
*/
class ET_Builder_Mask_Ellipse extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Ellipse', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M0,1440H1920V0H0ZM870.4,382.19c386.66-102.56,740.21-34.45,789.7,152.12s-223.85,421-610.5,523.5-740.21,34.45-789.7-152.12S483.75,484.74,870.4,382.19Z"/>',
'portrait' => '<path d="M0,0V2560H1920V0ZM1049.6,1617.81c-386.66,102.56-740.21,34.45-789.7-152.12s223.85-420.95,610.5-523.5,740.21-34.45,789.7,152.12S1436.25,1515.26,1049.6,1617.81Z"/>',
'square' => '<path d="M0,1920H1920V0H0ZM870.4,622.19c386.66-102.56,740.21-34.45,789.7,152.12s-223.85,421-610.5,523.5-740.21,34.45-789.7-152.12S483.75,724.74,870.4,622.19Z"/>',
),
'default-inverted' => array(
'landscape' => '<ellipse cx="960" cy="720" rx="724.3" ry="349.49" transform="matrix(0.97, -0.26, 0.26, 0.97, -152.5, 270.17)"/>',
'portrait' => '<ellipse cx="960" cy="1280" rx="724.3" ry="349.49" transform="translate(-296.06 288.89) rotate(-14.85)"/>',
'square' => '<ellipse cx="960" cy="960" rx="724.3" ry="349.49" transform="translate(-214.03 278.19) rotate(-14.85)"/>',
),
'rotated' => array(
'landscape' => '<path d="M1920,1440V0H0V1440ZM689.75,791.68c-82-309.32-27.55-592.17,121.7-631.76s336.76,179.08,418.8,488.4,27.55,592.17-121.7,631.76S771.79,1101,689.75,791.68Z"/>',
'portrait' => '<path d="M0,2560H1920V0H0ZM1297.81,1190.4c102.56,386.66,34.45,740.21-152.12,789.7s-420.95-223.85-523.5-610.5S587.74,629.39,774.31,579.9,1195.26,803.75,1297.81,1190.4Z"/>',
'square' => '<path d="M1920,1920V0H0V1920ZM622.19,1049.6C519.63,662.94,587.74,309.39,774.31,259.9s421,223.85,523.5,610.5,34.45,740.21-152.12,789.7S724.74,1436.25,622.19,1049.6Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<ellipse cx="960" cy="720" rx="279.6" ry="579.44" transform="translate(-152.5 270.17) rotate(-14.85)"/>',
'portrait' => '<ellipse cx="960" cy="1280" rx="349.49" ry="724.3" transform="translate(-296.06 288.89) rotate(-14.85)"/>',
'square' => '<ellipse cx="960" cy="960" rx="349.49" ry="724.3" transform="matrix(0.97, -0.26, 0.26, 0.97, -214.03, 278.19)"/>',
),
),
);
}
}
return new ET_Builder_Mask_Ellipse();

View File

@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Floating Squares.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Floating_Squares
*
* @since 4.15.0
*/
class ET_Builder_Mask_Floating_Squares extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Floating Squares', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M1723.8,1226.09l122,213.91H1920V0H849.49L628.61,596.91a131.67,131.67,0,0,1-169.19,77.8L0,504.71V1440H953.29l503.22-287C1550.51,1099.35,1670.18,1132.08,1723.8,1226.09ZM1637,210.26l82.29-33.21a18,18,0,0,1,23.44,10L1776,269.3a18,18,0,0,1-10,23.44L1683.7,326a18,18,0,0,1-23.44-10l-33.21-82.29A18,18,0,0,1,1637,210.26Z"/>',
'portrait' => '<path d="M546.09,1827.2,1384.51,1349c94-53.61,213.67-20.88,267.29,73.13L1920,1892.28V0H662.32l41.59,15.39a131.67,131.67,0,0,1,77.8,169.19L556.61,792.91a131.67,131.67,0,0,1-169.19,77.8L0,727.35V2560H738.49L473,2094.49C419.35,2000.49,452.08,1880.82,546.09,1827.2ZM1565,406.26l82.29-33.21a18,18,0,0,1,23.44,10L1704,465.3a18,18,0,0,1-10,23.44L1611.7,522a18,18,0,0,1-23.44-10l-33.21-82.29A18,18,0,0,1,1565,406.26Z"/>',
'square' => '<path d="M538.09,1667.2,1376.51,1189c94-53.61,213.67-20.88,267.29,73.13L1920,1746.31V0H780.21a132,132,0,0,1-6.5,24.58L548.61,632.91a131.67,131.67,0,0,1-169.19,77.8L0,570.31V1920H457.48C414.83,1828.52,448.85,1718.1,538.09,1667.2ZM1557,246.26l82.29-33.21a18,18,0,0,1,23.44,10L1696,305.3a18,18,0,0,1-10,23.44L1603.7,362a18,18,0,0,1-23.44-10l-33.21-82.29A18,18,0,0,1,1557,246.26Z"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M459.42,674.71,0,504.71V0H849.49L628.61,596.91A131.67,131.67,0,0,1,459.42,674.71ZM1723.8,1226.09c-53.62-94-173.29-126.74-267.29-73.13L953.29,1440h892.53ZM1660.26,316a18,18,0,0,0,23.44,10L1766,292.74a18,18,0,0,0,10-23.44L1742.74,187a18,18,0,0,0-23.44-10L1637,210.26a18,18,0,0,0-10,23.44Z"/>',
'portrait' => '<path d="M387.42,870.71,0,727.35V0H662.32l41.59,15.39a131.67,131.67,0,0,1,77.8,169.19L556.61,792.91A131.67,131.67,0,0,1,387.42,870.71ZM1920,1892.28l-268.2-470.19c-53.62-94-173.29-126.74-267.29-73.13L546.09,1827.2c-94,53.62-126.74,173.29-73.13,267.29L738.49,2560H1920ZM1588.26,512a18,18,0,0,0,23.44,10L1694,488.74a18,18,0,0,0,10-23.44L1670.74,383a18,18,0,0,0-23.44-10L1565,406.26a18,18,0,0,0-10,23.44Z"/>',
'square' => '<path d="M379.42,710.71,0,570.31V0H780.21a132,132,0,0,1-6.5,24.58L548.61,632.91A131.67,131.67,0,0,1,379.42,710.71ZM1920,1746.31l-276.2-484.22c-53.62-94-173.29-126.74-267.29-73.13L538.09,1667.2c-89.24,50.9-123.26,161.32-80.61,252.8H1920ZM1580.26,352a18,18,0,0,0,23.44,10L1686,328.74a18,18,0,0,0,10-23.44L1662.74,223a18,18,0,0,0-23.44-10L1557,246.26a18,18,0,0,0-10,23.44Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M1700.21,1201.49l-415.8-729A170.37,170.37,0,0,1,1348,240.14L1769,0H0V831.79a132,132,0,0,1,24.58,6.5l608.33,225.1a131.67,131.67,0,0,1,77.8,169.19L634,1440H1920V1271.57A170.37,170.37,0,0,1,1700.21,1201.49ZM352,339.74,269.7,373a18,18,0,0,1-23.44-10L213.05,280.7a18,18,0,0,1,10-23.44l82.29-33.21a18,18,0,0,1,23.44,10L362,316.3A18,18,0,0,1,352,339.74Z"/>',
'portrait' => '<path d="M1667.2,1381.91,1189,543.49c-53.61-94-20.88-213.67,73.13-267.29L1746.31,0H0V1139.4l632.6,231.5a130.82,130.82,0,0,1,77.9,167.81L468.44,2200.17a130.82,130.82,0,0,1-167.81,77.9L0,2168.05V2560H1920V1462.52C1828.52,1505.17,1718.1,1471.15,1667.2,1381.91ZM352,339.74,269.7,373a18,18,0,0,1-23.44-10L213.05,280.7a18,18,0,0,1,10-23.44l82.29-33.21a18,18,0,0,1,23.44,10L362,316.3A18,18,0,0,1,352,339.74Z"/>',
'square' => '<path d="M1667.2,1381.91,1189,543.49c-53.61-94-20.88-213.67,73.13-267.29L1746.31,0H0V1139.79a132,132,0,0,1,24.58,6.5l608.33,225.1a131.67,131.67,0,0,1,77.8,169.19L570.31,1920H1920V1462.52C1828.52,1505.17,1718.1,1471.15,1667.2,1381.91ZM352,339.74,269.7,373a18,18,0,0,1-23.44-10L213.05,280.7a18,18,0,0,1,10-23.44l82.29-33.21a18,18,0,0,1,23.44,10L362,316.3A18,18,0,0,1,352,339.74Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M213.05,280.7a18,18,0,0,1,10-23.44l82.29-33.21a18,18,0,0,1,23.44,10L362,316.3a18,18,0,0,1-10,23.44L269.7,373a18,18,0,0,1-23.44-10ZM634,1440l76.75-207.42a131.67,131.67,0,0,0-77.8-169.19L24.58,838.29A132,132,0,0,0,0,831.79V1440ZM1769,0,1348,240.14a170.37,170.37,0,0,0-63.57,232.39l415.8,729A170.37,170.37,0,0,0,1920,1271.57V0Z"/>',
'portrait' => '<path d="M1746.31,0,1262.09,276.2c-94,53.62-126.74,173.29-73.13,267.29l478.24,838.42c50.9,89.24,161.32,123.26,252.8,80.61V0ZM352,339.74a18,18,0,0,0,10-23.44L328.74,234a18,18,0,0,0-23.44-10L223,257.26a18,18,0,0,0-10,23.44L246.26,363a18,18,0,0,0,23.44,10Zm358.51,1199L468.44,2200.17a130.82,130.82,0,0,1-167.81,77.9L0,2168.05V1139.4l632.6,231.5A130.82,130.82,0,0,1,710.5,1538.71Z"/>',
'square' => '<path d="M710.71,1540.58,570.31,1920H0V1139.79a132,132,0,0,1,24.58,6.5l608.33,225.1A131.67,131.67,0,0,1,710.71,1540.58ZM1746.31,0,1262.09,276.2c-94,53.62-126.74,173.29-73.13,267.29l478.24,838.42c50.9,89.24,161.32,123.26,252.8,80.61V0ZM352,339.74a18,18,0,0,0,10-23.44L328.74,234a18,18,0,0,0-23.44-10L223,257.26a18,18,0,0,0-10,23.44L246.26,363a18,18,0,0,0,23.44,10Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Floating_Squares();

View File

@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Honeycomb.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Honeycomb
*
* @since 4.15.0
*/
class ET_Builder_Mask_Honeycomb extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Honeycomb', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M1864.72,1098.91,1785.26,1053a33.58,33.58,0,0,1-16.74-29V932.3a33.58,33.58,0,0,1,16.74-29l79.46-45.87a33.58,33.58,0,0,1,33.48,0L1920,870V560l-25.61,14.78a28.2,28.2,0,0,1-28.1,0L1795.72,534a28.19,28.19,0,0,1-14-24.34V428.18a28.19,28.19,0,0,1,14-24.34l70.57-40.74a28.2,28.2,0,0,1,28.1,0L1920,377.89V0H1718.91V12.52a40.94,40.94,0,0,1-20.41,35.36l-91.57,52.87a41,41,0,0,1-37.74,1.59q-1.31-.84-2.64-1.62L1475,47.86c-1-.61-2.11-1.17-3.17-1.71a41,41,0,0,1-17.7-33.63V0h-29.77V12.38a41,41,0,0,1-20.42,35.36l-91.57,52.87a40.94,40.94,0,0,1-40.83,0L1180,47.74a40.94,40.94,0,0,1-20.41-35.36V0H0V1440H1197.13v-1.21a26.68,26.68,0,0,1,13.31-23l68.12-39.33a26.71,26.71,0,0,1,26.61,0l68.12,39.33a26.67,26.67,0,0,1,13.3,23V1440H1920V1086.33l-21.8,12.58A33.58,33.58,0,0,1,1864.72,1098.91Zm-18.17-463.22A41,41,0,0,1,1867,671.05V776.79a41,41,0,0,1-20.42,35.36L1755,865a40.93,40.93,0,0,1-39.36.79c-.45-.27-.89-.55-1.35-.81l-91.57-52.87c-.48-.28-1-.54-1.47-.81a40.93,40.93,0,0,1-19.06-34.52V671.05a40.94,40.94,0,0,1,20.41-35.36l91.57-52.87a41,41,0,0,1,40.83,0ZM1678.94,192.14a14.87,14.87,0,0,1,7.41-12.83l38.86-22.44a14.86,14.86,0,0,1,14.82,0l38.86,22.44a14.87,14.87,0,0,1,7.41,12.83V237a14.87,14.87,0,0,1-7.41,12.83L1740,272.29a14.86,14.86,0,0,1-14.82,0l-38.86-22.44a14.87,14.87,0,0,1-7.41-12.83Zm-92.1,130.47a40.74,40.74,0,0,1,20.41,5.46l91.57,52.86a40.93,40.93,0,0,1,20.42,35.36V522a40.93,40.93,0,0,1-20.42,35.36l-91.57,52.87a40.92,40.92,0,0,1-37.68,1.61c-1-.61-1.91-1.21-2.9-1.77l-91.57-52.87c-1-.6-2.08-1.16-3.14-1.7a40.94,40.94,0,0,1-17.52-33.5V416.29a40.93,40.93,0,0,1,19.07-34.52q.73-.39,1.47-.81l91.57-52.87c.45-.26.89-.53,1.33-.8A40.9,40.9,0,0,1,1586.84,322.61ZM1307.46,161.54a41,41,0,0,1,20.42-35.36l91.57-52.87a41,41,0,0,1,40.83,0l91.57,52.87a40.94,40.94,0,0,1,20.41,35.36V267.27a41,41,0,0,1-20.41,35.37l-91.57,52.86a40.94,40.94,0,0,1-40.83,0l-91.57-52.86a41,41,0,0,1-20.42-35.37Zm-35.61,166.39a41,41,0,0,1,40.83,0l91.57,52.87a41,41,0,0,1,20.42,35.36V521.89a41,41,0,0,1-20.42,35.36l-91.57,52.87a41,41,0,0,1-37.68,1.62c-1.06-.69-2.13-1.36-3.22-2l-91.57-52.87c-1-.57-2-1.12-3-1.64a41,41,0,0,1-17.31-33.35V416.16a41,41,0,0,1,20.42-35.36Zm-240.24-159.8a33.86,33.86,0,0,1,16.88-29.24l79.92-46.14a33.84,33.84,0,0,1,33.76,0l79.92,46.14A33.86,33.86,0,0,1,1259,168.13v92.28a33.86,33.86,0,0,1-16.88,29.24l-79.92,46.14a33.86,33.86,0,0,1-33.76,0l-79.92-46.14a33.86,33.86,0,0,1-16.88-29.24ZM1012.7,776.3V670.57a40.94,40.94,0,0,1,20.41-35.36l91.57-52.87a40.9,40.9,0,0,1,40.83,0l91.57,52.87a41,41,0,0,1,20.42,35.36V776.3a41,41,0,0,1-20.42,35.36l-91.57,52.87a40.94,40.94,0,0,1-40.83,0l-91.57-52.87A40.94,40.94,0,0,1,1012.7,776.3ZM1240.34,1264a26.88,26.88,0,0,1-13.41,23.21l-68.43,39.51a26.88,26.88,0,0,1-26.8,0l-68.44-39.51a26.87,26.87,0,0,1-13.4-23.21v-79a26.87,26.87,0,0,1,13.4-23.21l68.44-39.51a26.87,26.87,0,0,1,26.8,0l68.43,39.51a26.88,26.88,0,0,1,13.41,23.21Zm123.25-254.81a17.53,17.53,0,0,1-8.75,15.15L1301.76,1055a17.56,17.56,0,0,1-17.49,0l-53.08-30.65a17.54,17.54,0,0,1-8.74-15.15V947.89a17.55,17.55,0,0,1,8.74-15.15l53.08-30.64a17.51,17.51,0,0,1,17.49,0l53.08,30.64a17.54,17.54,0,0,1,8.75,15.15ZM1328,812a41,41,0,0,1-20.42-35.36V670.91A41,41,0,0,1,1328,635.55l91.57-52.87a41,41,0,0,1,40.83,0L1552,635.55a40.94,40.94,0,0,1,20.41,35.36V776.65A40.94,40.94,0,0,1,1552,812l-91.57,52.87a40.94,40.94,0,0,1-40.83,0Zm136.1,434.77-23.36,13.49-23.37-13.49v-27l23.37-13.48,23.36,13.48Zm103.07-127-91.57-52.87a40.93,40.93,0,0,1-20.42-35.36V925.81a40.93,40.93,0,0,1,20.42-35.36l91.57-52.87a41,41,0,0,1,40.83,0l91.57,52.87A40.94,40.94,0,0,1,1720,925.81v105.73a40.94,40.94,0,0,1-20.41,35.36L1608,1119.77A40.94,40.94,0,0,1,1567.18,1119.77Zm300.54,166.53a40.94,40.94,0,0,1-20.41,35.36l-91.57,52.87a40.94,40.94,0,0,1-40.83,0l-91.57-52.87a40.93,40.93,0,0,1-20.42-35.36V1180.56a40.93,40.93,0,0,1,20.42-35.36l91.56-52.87a41,41,0,0,1,40.84,0l91.57,52.87a40.94,40.94,0,0,1,20.41,35.36Z"/>',
'portrait' => '<path d="M1808.38,1912.2V1774.92a53.15,53.15,0,0,1,26.5-45.91l85.12-49.14v-44.51L1815,1696a53.2,53.2,0,0,1-53,0l-118.89-68.64a53.15,53.15,0,0,1-26.5-45.91V1444.17a53.15,53.15,0,0,1,26.5-45.91L1762,1329.62a53.15,53.15,0,0,1,53,0l105,60.64v-44.07l-85.94-49.62c-.74-.42-1.49-.84-2.24-1.24a53.17,53.17,0,0,1-24.42-44.64V1113.42a53.15,53.15,0,0,1,26.5-45.91l86.1-49.71V973.29l-106,61.2a53.18,53.18,0,0,1-48.93,2.1q-1.85-1.2-3.75-2.31l-118.89-68.64q-2.07-1.18-4.19-2.26a53.16,53.16,0,0,1-22.64-43.44V782.67A53.2,53.2,0,0,1,1640,738c.75-.4,1.5-.81,2.23-1.23l118.89-68.64c.59-.34,1.16-.7,1.74-1a53.07,53.07,0,0,1,51.11,1l106,61.2V311.54L1813.58,373a53.14,53.14,0,0,1-49,2.07c-1.12-.72-2.26-1.42-3.43-2.1l-118.89-68.63c-1.37-.8-2.77-1.55-4.18-2.26a53.17,53.17,0,0,1-22.91-43.62V121.16a53.16,53.16,0,0,1,26.51-45.91L1760.57,6.61A52.86,52.86,0,0,1,1780.06,0H1412.74a52.73,52.73,0,0,1,18.39,6.43L1550,75.07A53.16,53.16,0,0,1,1576.52,121V258.26A53.16,53.16,0,0,1,1550,304.17l-118.88,68.64a53.18,53.18,0,0,1-53,0l-118.89-68.64a53.15,53.15,0,0,1-26.5-45.91V121a53.15,53.15,0,0,1,26.5-45.91L1378.12,6.43A52.73,52.73,0,0,1,1396.51,0H0V2560H1920V2007.25l-85.12-49.14A53.15,53.15,0,0,1,1808.38,1912.2Zm-185-913.51,118.89,68.64a53.17,53.17,0,0,1,26.5,45.91v137.28a53.16,53.16,0,0,1-26.5,45.9l-118.89,68.64a53.15,53.15,0,0,1-53,0l-118.89-68.64a53.14,53.14,0,0,1-26.5-45.9V1113.24a53.15,53.15,0,0,1,26.5-45.91l118.89-68.64a53.15,53.15,0,0,1,53,0Zm-125.7,474.15v79.58a22.76,22.76,0,0,1-11.36,19.66l-68.91,39.79a22.74,22.74,0,0,1-22.71,0l-68.91-39.79a22.76,22.76,0,0,1-11.36-19.66v-79.58a22.77,22.77,0,0,1,11.36-19.67l68.91-39.78a22.73,22.73,0,0,1,22.71,0l68.91,39.78A22.77,22.77,0,0,1,1497.65,1472.84ZM1424.78,451.91A53.16,53.16,0,0,1,1451.29,406l118.88-68.64a53.22,53.22,0,0,1,53,0L1742.07,406a53.15,53.15,0,0,1,26.5,45.91V589.19a53.15,53.15,0,0,1-26.5,45.91l-118.89,68.64a53.15,53.15,0,0,1-53,0L1451.29,635.1a53.16,53.16,0,0,1-26.51-45.91Zm-46.24,216a53.15,53.15,0,0,1,53,0l118.89,68.64a53.15,53.15,0,0,1,26.5,45.91V919.76a53.15,53.15,0,0,1-26.5,45.91l-118.89,68.64a53.16,53.16,0,0,1-48.92,2.1c-1.37-.89-2.76-1.76-4.18-2.58l-118.89-68.64c-1.34-.78-2.71-1.5-4.08-2.21a53.17,53.17,0,0,1-22.33-43.22V782.49a53.16,53.16,0,0,1,26.51-45.91Zm-311.9-207.47a44,44,0,0,1,21.92-38l103.75-59.91a44,44,0,0,1,43.84,0l103.75,59.91a44,44,0,0,1,21.92,38v119.8a44,44,0,0,1-21.92,38l-103.75,59.9a44,44,0,0,1-43.84,0l-103.75-59.9a44,44,0,0,1-21.92-38Zm-24.56,789.6V1112.79a53.16,53.16,0,0,1,26.51-45.91l118.88-68.64a53.15,53.15,0,0,1,53,0l118.89,68.64a53.15,53.15,0,0,1,26.5,45.91v137.28a53.14,53.14,0,0,1-26.5,45.9l-118.89,68.64a53.15,53.15,0,0,1-53,0L1068.59,1296A53.15,53.15,0,0,1,1042.08,1250.07Zm154.5,714.6-88.85-51.3a34.91,34.91,0,0,1-17.4-30.14V1780.64a34.9,34.9,0,0,1,17.4-30.14l88.85-51.3a34.88,34.88,0,0,1,34.8,0l88.85,51.3a34.9,34.9,0,0,1,17.4,30.14v102.59a34.91,34.91,0,0,1-17.4,30.14l-88.85,51.3A34.93,34.93,0,0,1,1196.58,1964.67Zm330.93,247.64a34.63,34.63,0,0,1-17.27,29.92l-88.44,51.06a34.66,34.66,0,0,1-34.55,0l-88.44-51.06a34.65,34.65,0,0,1-17.27-29.92V2110.19a34.64,34.64,0,0,1,17.27-29.92l88.44-51.06a34.61,34.61,0,0,1,34.55,0l88.44,51.06a34.62,34.62,0,0,1,17.27,29.92Zm100.64-351.42-30.33,17.52-30.33-17.52v-35l30.33-17.51,30.33,17.51ZM1813.58,6.61A53,53,0,0,0,1794.09,0H1920V68.05Z"/>',
'square' => '<path d="M1864.72,1098.91,1785.26,1053a33.58,33.58,0,0,1-16.74-29V932.3a33.58,33.58,0,0,1,16.74-29l79.46-45.87a33.58,33.58,0,0,1,33.48,0L1920,870V560l-25.61,14.78a28.2,28.2,0,0,1-28.1,0L1795.72,534a28.19,28.19,0,0,1-14-24.34V428.18a28.19,28.19,0,0,1,14-24.34l70.57-40.74a28.2,28.2,0,0,1,28.1,0L1920,377.89V0H1718.91V12.52a40.94,40.94,0,0,1-20.41,35.36l-91.57,52.87a41,41,0,0,1-37.74,1.59q-1.31-.84-2.64-1.62L1475,47.86c-1-.61-2.1-1.17-3.17-1.71a41,41,0,0,1-17.7-33.63V0h-29.77V12.38a41,41,0,0,1-20.42,35.36l-91.57,52.87a40.94,40.94,0,0,1-40.83,0L1180,47.74a40.94,40.94,0,0,1-20.41-35.36V0H0V1920H1920V1086.33l-21.8,12.58A33.58,33.58,0,0,1,1864.72,1098.91Zm-18.17-463.22A41,41,0,0,1,1867,671.05V776.79a41,41,0,0,1-20.42,35.36L1755,865a40.93,40.93,0,0,1-39.36.79c-.45-.27-.89-.55-1.35-.81l-91.57-52.87c-.48-.28-1-.54-1.47-.81a40.93,40.93,0,0,1-19.06-34.52V671.05a40.94,40.94,0,0,1,20.41-35.36l91.57-52.87a41,41,0,0,1,40.83,0ZM1679.4,192.34a14.76,14.76,0,0,1,7.35-12.73l38.52-22.24a14.76,14.76,0,0,1,14.7,0l38.52,22.24a14.75,14.75,0,0,1,7.34,12.73v44.48a14.75,14.75,0,0,1-7.34,12.73L1740,271.79a14.78,14.78,0,0,1-14.7,0l-38.52-22.24a14.76,14.76,0,0,1-7.35-12.73Zm-92.56,130.27a40.74,40.74,0,0,1,20.41,5.46l91.57,52.86a40.93,40.93,0,0,1,20.42,35.36V522a40.93,40.93,0,0,1-20.42,35.36l-91.57,52.87a40.92,40.92,0,0,1-37.68,1.61c-1-.61-1.91-1.21-2.9-1.77l-91.57-52.87c-1-.6-2.08-1.16-3.14-1.7a40.94,40.94,0,0,1-17.52-33.5V416.29a40.93,40.93,0,0,1,19.07-34.52q.73-.39,1.47-.81l91.57-52.87c.45-.26.89-.53,1.33-.8A40.9,40.9,0,0,1,1586.84,322.61ZM1328,812a41,41,0,0,1-20.42-35.36V670.91A41,41,0,0,1,1328,635.55l91.57-52.87a41,41,0,0,1,40.83,0L1552,635.55a40.94,40.94,0,0,1,20.41,35.36V776.65A40.94,40.94,0,0,1,1552,812l-91.57,52.87a40.94,40.94,0,0,1-40.83,0Zm35.58,135.88v61.29a17.53,17.53,0,0,1-8.75,15.15L1301.76,1055a17.56,17.56,0,0,1-17.49,0l-53.08-30.65a17.54,17.54,0,0,1-8.74-15.15V947.89a17.55,17.55,0,0,1,8.74-15.15l53.08-30.64a17.51,17.51,0,0,1,17.49,0l53.08,30.64A17.54,17.54,0,0,1,1363.59,947.89Zm-56.13-786.35a41,41,0,0,1,20.42-35.36l91.57-52.87a41,41,0,0,1,40.83,0l91.57,52.87a40.94,40.94,0,0,1,20.41,35.36V267.27a41,41,0,0,1-20.41,35.37l-91.57,52.86a40.94,40.94,0,0,1-40.83,0l-91.57-52.86a41,41,0,0,1-20.42-35.37Zm-35.61,166.39a41,41,0,0,1,40.83,0l91.57,52.87a41,41,0,0,1,20.42,35.36V521.89a41,41,0,0,1-20.42,35.36l-91.57,52.87a41,41,0,0,1-37.68,1.62c-1.06-.69-2.13-1.36-3.22-2l-91.57-52.87c-1-.57-2-1.12-3-1.64a41,41,0,0,1-17.31-33.35V416.16a41,41,0,0,1,20.42-35.36Zm-240.24-159.8a33.86,33.86,0,0,1,16.88-29.24l79.92-46.14a33.84,33.84,0,0,1,33.76,0l79.92,46.14A33.86,33.86,0,0,1,1259,168.13v92.28a33.86,33.86,0,0,1-16.88,29.24l-79.92,46.14a33.86,33.86,0,0,1-33.76,0l-79.92-46.14a33.86,33.86,0,0,1-16.88-29.24ZM1012.7,776.3V670.57a40.94,40.94,0,0,1,20.41-35.36l91.57-52.87a40.9,40.9,0,0,1,40.83,0l91.57,52.87a41,41,0,0,1,20.42,35.36V776.3a41,41,0,0,1-20.42,35.36l-91.57,52.87a40.94,40.94,0,0,1-40.83,0l-91.57-52.87A40.94,40.94,0,0,1,1012.7,776.3Zm119,550.41-68.44-39.51a26.87,26.87,0,0,1-13.4-23.21v-79a26.87,26.87,0,0,1,13.4-23.21l68.44-39.51a26.87,26.87,0,0,1,26.8,0l68.43,39.51a26.88,26.88,0,0,1,13.41,23.21v79a26.88,26.88,0,0,1-13.41,23.21l-68.43,39.51A26.88,26.88,0,0,1,1131.7,1326.71Zm254.89,190.74a26.68,26.68,0,0,1-13.3,23l-68.12,39.33a26.72,26.72,0,0,1-26.61,0l-68.12-39.33a26.69,26.69,0,0,1-13.31-23v-78.66a26.68,26.68,0,0,1,13.31-23l68.12-39.33a26.71,26.71,0,0,1,26.61,0l68.12,39.33a26.67,26.67,0,0,1,13.3,23Zm77.52-270.67-23.36,13.49-23.37-13.49v-27l23.37-13.48,23.36,13.48Zm103.07-127-91.57-52.87a40.93,40.93,0,0,1-20.42-35.36V925.81a40.93,40.93,0,0,1,20.42-35.36l91.57-52.87a41,41,0,0,1,40.83,0l91.57,52.87A40.94,40.94,0,0,1,1720,925.81v105.73a40.94,40.94,0,0,1-20.41,35.36L1608,1119.77A40.94,40.94,0,0,1,1567.18,1119.77Zm300.54,166.53a40.94,40.94,0,0,1-20.41,35.36l-91.57,52.87a40.94,40.94,0,0,1-40.83,0l-91.57-52.87a40.93,40.93,0,0,1-20.42-35.36V1180.56a40.93,40.93,0,0,1,20.42-35.36l91.56-52.87a41,41,0,0,1,40.84,0l91.57,52.87a40.94,40.94,0,0,1,20.41,35.36Z"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M1180.28,380.8l91.57-52.87a41,41,0,0,1,40.83,0l91.57,52.87a41,41,0,0,1,20.42,35.36V521.89a41,41,0,0,1-20.42,35.36l-91.57,52.87a41,41,0,0,1-37.68,1.62c-1.06-.69-2.13-1.36-3.22-2l-91.57-52.87c-1-.57-2-1.12-3-1.64a41,41,0,0,1-17.31-33.35V416.16A41,41,0,0,1,1180.28,380.8Zm193,1035-68.12-39.33a26.71,26.71,0,0,0-26.61,0l-68.12,39.33a26.68,26.68,0,0,0-13.31,23V1440h189.46v-1.21A26.67,26.67,0,0,0,1373.29,1415.75ZM1566.55,328.09,1475,381q-.74.42-1.47.81a40.93,40.93,0,0,0-19.07,34.52V522a40.94,40.94,0,0,0,17.52,33.5c1.06.54,2.11,1.1,3.14,1.7l91.57,52.87c1,.56,1.95,1.16,2.9,1.77a40.92,40.92,0,0,0,37.68-1.61l91.57-52.87A40.93,40.93,0,0,0,1719.24,522V416.29a40.93,40.93,0,0,0-20.42-35.36l-91.57-52.86a40.81,40.81,0,0,0-39.37-.78C1567.44,327.56,1567,327.83,1566.55,328.09Zm119.8-78.24,38.86,22.44a14.86,14.86,0,0,0,14.82,0l38.86-22.44A14.87,14.87,0,0,0,1786.3,237V192.14a14.87,14.87,0,0,0-7.41-12.83L1740,156.87a14.86,14.86,0,0,0-14.82,0l-38.86,22.44a14.87,14.87,0,0,0-7.41,12.83V237A14.87,14.87,0,0,0,1686.35,249.85Zm194,109.5a28.15,28.15,0,0,0-14,3.75l-70.57,40.74a28.19,28.19,0,0,0-14,24.34v81.48a28.19,28.19,0,0,0,14,24.34l70.57,40.74a28.2,28.2,0,0,0,28.1,0L1920,560V377.89l-25.61-14.79A28.1,28.1,0,0,0,1880.34,359.35ZM1460.41,864.88,1552,812a40.94,40.94,0,0,0,20.41-35.36V670.91A40.94,40.94,0,0,0,1552,635.55l-91.57-52.87a41,41,0,0,0-40.83,0L1328,635.55a41,41,0,0,0-20.42,35.36V776.65A41,41,0,0,0,1328,812l91.57,52.87A40.94,40.94,0,0,0,1460.41,864.88Zm-294.9-.35,91.57-52.87a41,41,0,0,0,20.42-35.36V670.57a41,41,0,0,0-20.42-35.36l-91.57-52.87a40.9,40.9,0,0,0-40.83,0l-91.57,52.87a40.94,40.94,0,0,0-20.41,35.36V776.3a40.94,40.94,0,0,0,20.41,35.36l91.57,52.87A40.94,40.94,0,0,0,1165.51,864.53Zm61.42,297.22-68.43-39.51a26.87,26.87,0,0,0-26.8,0l-68.44,39.51a26.87,26.87,0,0,0-13.4,23.21v79a26.87,26.87,0,0,0,13.4,23.21l68.44,39.51a26.88,26.88,0,0,0,26.8,0l68.43-39.51a26.88,26.88,0,0,0,13.41-23.21v-79A26.88,26.88,0,0,0,1226.93,1161.75Zm507.64-584.38a40.9,40.9,0,0,0-20.42,5.45l-91.57,52.87a40.94,40.94,0,0,0-20.41,35.36V776.79a40.93,40.93,0,0,0,19.06,34.52c.5.27,1,.53,1.47.81L1714.27,865c.46.26.9.54,1.35.81A40.93,40.93,0,0,0,1755,865l91.57-52.86A41,41,0,0,0,1867,776.79V671.05a41,41,0,0,0-20.42-35.36L1755,582.82A40.83,40.83,0,0,0,1734.57,577.37ZM1354.84,932.74l-53.08-30.64a17.51,17.51,0,0,0-17.49,0l-53.08,30.64a17.55,17.55,0,0,0-8.74,15.15v61.29a17.54,17.54,0,0,0,8.74,15.15l53.08,30.65a17.56,17.56,0,0,0,17.49,0l53.08-30.65a17.53,17.53,0,0,0,8.75-15.15V947.89A17.54,17.54,0,0,0,1354.84,932.74Zm344.74,134.16a40.94,40.94,0,0,0,20.41-35.36V925.81a40.94,40.94,0,0,0-20.41-35.36L1608,837.58a41,41,0,0,0-40.83,0l-91.57,52.87a40.93,40.93,0,0,0-20.42,35.36v105.73a40.93,40.93,0,0,0,20.42,35.36l91.57,52.87a40.94,40.94,0,0,0,40.83,0ZM1898.2,857.43a33.58,33.58,0,0,0-33.48,0l-79.46,45.87a33.58,33.58,0,0,0-16.74,29V1024a33.58,33.58,0,0,0,16.74,29l79.46,45.87a33.58,33.58,0,0,0,33.48,0l21.8-12.58V870ZM1417.38,1219.8v27l23.37,13.49,23.36-13.49v-27l-23.36-13.48Zm429.93-74.6-91.57-52.87a41,41,0,0,0-40.84,0l-91.56,52.87a40.93,40.93,0,0,0-20.42,35.36V1286.3a40.93,40.93,0,0,0,20.42,35.36l91.57,52.87a40.94,40.94,0,0,0,40.83,0l91.57-52.87a40.94,40.94,0,0,0,20.41-35.36V1180.56A40.94,40.94,0,0,0,1847.31,1145.2ZM1180,47.74l91.57,52.87a40.94,40.94,0,0,0,40.83,0l91.57-52.87a41,41,0,0,0,20.42-35.36V0h-264.8V12.38A40.94,40.94,0,0,0,1180,47.74Zm291.86-1.59c1.06.54,2.12,1.1,3.17,1.71l91.57,52.86q1.34.78,2.64,1.62a41,41,0,0,0,37.74-1.59l91.57-52.87a40.94,40.94,0,0,0,20.41-35.36V0h-264.8V12.52A41,41,0,0,0,1471.81,46.15Zm-423.32,243.5,79.92,46.14a33.86,33.86,0,0,0,33.76,0l79.92-46.14A33.86,33.86,0,0,0,1259,260.41V168.13a33.86,33.86,0,0,0-16.88-29.24l-79.92-46.14a33.84,33.84,0,0,0-33.76,0l-79.92,46.14a33.86,33.86,0,0,0-16.88,29.24v92.28A33.86,33.86,0,0,0,1048.49,289.65Zm279.39,13,91.57,52.86a40.94,40.94,0,0,0,40.83,0l91.57-52.86a41,41,0,0,0,20.41-35.37V161.54a40.94,40.94,0,0,0-20.41-35.36l-91.57-52.87a41,41,0,0,0-40.83,0l-91.57,52.87a41,41,0,0,0-20.42,35.36V267.27A41,41,0,0,0,1327.88,302.64Z"/>',
'portrait' => '<path d="M1259.66,736.58l118.88-68.64a53.15,53.15,0,0,1,53,0l118.89,68.64a53.15,53.15,0,0,1,26.5,45.91V919.76a53.15,53.15,0,0,1-26.5,45.91l-118.89,68.64a53.16,53.16,0,0,1-48.92,2.1c-1.37-.89-2.76-1.76-4.18-2.58l-118.89-68.64c-1.34-.78-2.71-1.5-4.08-2.21a53.17,53.17,0,0,1-22.33-43.22V782.49A53.16,53.16,0,0,1,1259.66,736.58Zm250.58,1343.69-88.44-51.06a34.61,34.61,0,0,0-34.55,0l-88.44,51.06a34.64,34.64,0,0,0-17.27,29.92v102.12a34.65,34.65,0,0,0,17.27,29.92l88.44,51.06a34.66,34.66,0,0,0,34.55,0l88.44-51.06a34.63,34.63,0,0,0,17.27-29.92V2110.19A34.62,34.62,0,0,0,1510.24,2080.27ZM1787.5,661a53.12,53.12,0,0,0-24.61,6.06c-.58.35-1.15.71-1.74,1l-118.89,68.64c-.73.42-1.48.83-2.23,1.23a53.2,53.2,0,0,0-24.43,44.65V919.94a53.16,53.16,0,0,0,22.64,43.44q2.12,1.08,4.19,2.26l118.89,68.64q1.9,1.11,3.75,2.31a53.18,53.18,0,0,0,48.93-2.1l106-61.2v-244l-106-61.19A53,53,0,0,0,1787.5,661ZM1570.34,998.69l-118.89,68.64a53.15,53.15,0,0,0-26.5,45.91v137.28a53.14,53.14,0,0,0,26.5,45.9l118.89,68.64a53.15,53.15,0,0,0,53,0l118.89-68.64a53.16,53.16,0,0,0,26.5-45.9V1113.24a53.17,53.17,0,0,0-26.5-45.91l-118.89-68.64a53.15,53.15,0,0,0-53,0Zm-329.86,365.92L1359.37,1296a53.14,53.14,0,0,0,26.5-45.9V1112.79a53.15,53.15,0,0,0-26.5-45.91l-118.89-68.64a53.15,53.15,0,0,0-53,0l-118.88,68.64a53.16,53.16,0,0,0-26.51,45.91v137.28a53.15,53.15,0,0,0,26.51,45.9l118.88,68.64A53.15,53.15,0,0,0,1240.48,1364.61Zm97.15,518.62V1780.64a34.9,34.9,0,0,0-17.4-30.14l-88.85-51.3a34.88,34.88,0,0,0-34.8,0l-88.85,51.3a34.9,34.9,0,0,0-17.4,30.14v102.59a34.91,34.91,0,0,0,17.4,30.14l88.85,51.3a34.93,34.93,0,0,0,34.8,0l88.85-51.3A34.91,34.91,0,0,0,1337.63,1883.23Zm469.77-769.81v137.27a53.17,53.17,0,0,0,24.42,44.64c.75.4,1.5.82,2.24,1.24l85.94,49.62V1017.8l-86.1,49.71A53.15,53.15,0,0,0,1807.4,1113.42Zm-390,300a22.73,22.73,0,0,0-22.71,0l-68.91,39.78a22.77,22.77,0,0,0-11.36,19.67v79.58a22.76,22.76,0,0,0,11.36,19.66l68.91,39.79a22.74,22.74,0,0,0,22.71,0l68.91-39.79a22.76,22.76,0,0,0,11.36-19.66v-79.58a22.77,22.77,0,0,0-11.36-19.67Zm371.1-90.85a53,53,0,0,0-26.51,7.08l-118.89,68.64a53.15,53.15,0,0,0-26.5,45.91v137.28a53.15,53.15,0,0,0,26.5,45.91L1762,1696a53.2,53.2,0,0,0,53,0l105-60.64V1390.25l-105-60.63A53,53,0,0,0,1788.48,1322.54Zm-221,503.33v35l30.33,17.52,30.33-17.52v-35l-30.33-17.51ZM1834.88,1729a53.15,53.15,0,0,0-26.5,45.91V1912.2a53.15,53.15,0,0,0,26.5,45.91l85.12,49.14V1679.87ZM1259.23,75.07a53.15,53.15,0,0,0-26.5,45.91V258.26a53.15,53.15,0,0,0,26.5,45.91l118.89,68.64a53.18,53.18,0,0,0,53,0L1550,304.17a53.16,53.16,0,0,0,26.51-45.91V121A53.16,53.16,0,0,0,1550,75.07L1431.13,6.43A52.73,52.73,0,0,0,1412.74,0h-16.23a52.73,52.73,0,0,0-18.39,6.43Zm382.45.18a53.16,53.16,0,0,0-26.51,45.91V258.44a53.17,53.17,0,0,0,22.91,43.62c1.41.71,2.81,1.46,4.18,2.26L1761.15,373c1.17.68,2.31,1.38,3.43,2.1a53.14,53.14,0,0,0,49-2.07L1920,311.54V68.05L1813.58,6.61A53,53,0,0,0,1794.09,0h-14a52.86,52.86,0,0,0-19.49,6.61Zm-553.12,543,103.75,59.9a44,44,0,0,0,43.84,0l103.75-59.9a44,44,0,0,0,21.92-38V460.47a44,44,0,0,0-21.92-38L1236.15,362.6a44,44,0,0,0-43.84,0l-103.75,59.91a44,44,0,0,0-21.92,38v119.8A44,44,0,0,0,1088.56,618.24Zm362.73,16.86,118.88,68.64a53.15,53.15,0,0,0,53,0l118.89-68.64a53.15,53.15,0,0,0,26.5-45.91V451.91a53.15,53.15,0,0,0-26.5-45.91l-118.89-68.64a53.22,53.22,0,0,0-53,0L1451.29,406a53.16,53.16,0,0,0-26.51,45.91V589.19A53.16,53.16,0,0,0,1451.29,635.1Z"/>',
'square' => '<path d="M1180.28,380.8l91.57-52.87a41,41,0,0,1,40.83,0l91.57,52.87a41,41,0,0,1,20.42,35.36V521.89a41,41,0,0,1-20.42,35.36l-91.57,52.87a41,41,0,0,1-37.68,1.62c-1.06-.69-2.13-1.36-3.22-2l-91.57-52.87c-1-.57-2-1.12-3-1.64a41,41,0,0,1-17.31-33.35V416.16A41,41,0,0,1,1180.28,380.8Zm193,1035-68.12-39.33a26.71,26.71,0,0,0-26.61,0l-68.12,39.33a26.68,26.68,0,0,0-13.31,23v78.66a26.69,26.69,0,0,0,13.31,23l68.12,39.33a26.72,26.72,0,0,0,26.61,0l68.12-39.33a26.68,26.68,0,0,0,13.3-23v-78.66A26.67,26.67,0,0,0,1373.29,1415.75ZM1566.55,328.09,1475,381q-.74.42-1.47.81a40.93,40.93,0,0,0-19.07,34.52V522a40.94,40.94,0,0,0,17.52,33.5c1.06.54,2.11,1.1,3.14,1.7l91.57,52.87c1,.56,1.95,1.16,2.9,1.77a40.92,40.92,0,0,0,37.68-1.61l91.57-52.87A40.93,40.93,0,0,0,1719.24,522V416.29a40.93,40.93,0,0,0-20.42-35.36l-91.57-52.86a40.81,40.81,0,0,0-39.37-.78C1567.44,327.56,1567,327.83,1566.55,328.09Zm120.2-78.54,38.52,22.24a14.78,14.78,0,0,0,14.7,0l38.52-22.24a14.75,14.75,0,0,0,7.34-12.73V192.34a14.75,14.75,0,0,0-7.34-12.73L1740,157.37a14.76,14.76,0,0,0-14.7,0l-38.52,22.24a14.76,14.76,0,0,0-7.35,12.73v44.48A14.76,14.76,0,0,0,1686.75,249.55Zm193.59,109.8a28.15,28.15,0,0,0-14,3.75l-70.57,40.74a28.19,28.19,0,0,0-14,24.34v81.48a28.19,28.19,0,0,0,14,24.34l70.57,40.74a28.2,28.2,0,0,0,28.1,0L1920,560V377.89l-25.61-14.79A28.1,28.1,0,0,0,1880.34,359.35ZM1460.41,864.88,1552,812a40.94,40.94,0,0,0,20.41-35.36V670.91A40.94,40.94,0,0,0,1552,635.55l-91.57-52.87a41,41,0,0,0-40.83,0L1328,635.55a41,41,0,0,0-20.42,35.36V776.65A41,41,0,0,0,1328,812l91.57,52.87A40.94,40.94,0,0,0,1460.41,864.88Zm-294.9-.35,91.57-52.87a41,41,0,0,0,20.42-35.36V670.57a41,41,0,0,0-20.42-35.36l-91.57-52.87a40.9,40.9,0,0,0-40.83,0l-91.57,52.87a40.94,40.94,0,0,0-20.41,35.36V776.3a40.94,40.94,0,0,0,20.41,35.36l91.57,52.87A40.94,40.94,0,0,0,1165.51,864.53ZM1240.34,1264v-79a26.88,26.88,0,0,0-13.41-23.21l-68.43-39.51a26.87,26.87,0,0,0-26.8,0l-68.44,39.51a26.87,26.87,0,0,0-13.4,23.21v79a26.87,26.87,0,0,0,13.4,23.21l68.44,39.51a26.88,26.88,0,0,0,26.8,0l68.43-39.51A26.88,26.88,0,0,0,1240.34,1264Zm494.23-686.62a40.9,40.9,0,0,0-20.42,5.45l-91.57,52.87a40.94,40.94,0,0,0-20.41,35.36V776.79a40.93,40.93,0,0,0,19.06,34.52c.5.27,1,.53,1.47.81L1714.27,865c.46.26.9.54,1.35.81A40.93,40.93,0,0,0,1755,865l91.57-52.86A41,41,0,0,0,1867,776.79V671.05a41,41,0,0,0-20.42-35.36L1755,582.82A40.83,40.83,0,0,0,1734.57,577.37ZM1301.76,902.1a17.51,17.51,0,0,0-17.49,0l-53.08,30.64a17.55,17.55,0,0,0-8.74,15.15v61.29a17.54,17.54,0,0,0,8.74,15.15l53.08,30.65a17.56,17.56,0,0,0,17.49,0l53.08-30.65a17.53,17.53,0,0,0,8.75-15.15V947.89a17.54,17.54,0,0,0-8.75-15.15Zm397.82,164.8a40.94,40.94,0,0,0,20.41-35.36V925.81a40.94,40.94,0,0,0-20.41-35.36L1608,837.58a41,41,0,0,0-40.83,0l-91.57,52.87a40.93,40.93,0,0,0-20.42,35.36v105.73a40.93,40.93,0,0,0,20.42,35.36l91.57,52.87a40.94,40.94,0,0,0,40.83,0ZM1898.2,857.43a33.58,33.58,0,0,0-33.48,0l-79.46,45.87a33.58,33.58,0,0,0-16.74,29V1024a33.58,33.58,0,0,0,16.74,29l79.46,45.87a33.58,33.58,0,0,0,33.48,0l21.8-12.58V870ZM1417.38,1219.8v27l23.37,13.49,23.36-13.49v-27l-23.36-13.48Zm429.93-74.6-91.57-52.87a41,41,0,0,0-40.84,0l-91.56,52.87a40.93,40.93,0,0,0-20.42,35.36V1286.3a40.93,40.93,0,0,0,20.42,35.36l91.57,52.87a40.94,40.94,0,0,0,40.83,0l91.57-52.87a40.94,40.94,0,0,0,20.41-35.36V1180.56A40.94,40.94,0,0,0,1847.31,1145.2ZM1180,47.74l91.57,52.87a40.94,40.94,0,0,0,40.83,0l91.57-52.87a41,41,0,0,0,20.42-35.36V0h-264.8V12.38A40.94,40.94,0,0,0,1180,47.74Zm291.86-1.59c1.07.54,2.12,1.1,3.17,1.71l91.57,52.86q1.34.78,2.64,1.62a41,41,0,0,0,37.74-1.59l91.57-52.87a40.94,40.94,0,0,0,20.41-35.36V0h-264.8V12.52A41,41,0,0,0,1471.81,46.15Zm-423.32,243.5,79.92,46.14a33.86,33.86,0,0,0,33.76,0l79.92-46.14A33.86,33.86,0,0,0,1259,260.41V168.13a33.86,33.86,0,0,0-16.88-29.24l-79.92-46.14a33.84,33.84,0,0,0-33.76,0l-79.92,46.14a33.86,33.86,0,0,0-16.88,29.24v92.28A33.86,33.86,0,0,0,1048.49,289.65Zm279.39,13,91.57,52.86a40.94,40.94,0,0,0,40.83,0l91.57-52.86a41,41,0,0,0,20.41-35.37V161.54a40.94,40.94,0,0,0-20.41-35.36l-91.57-52.87a41,41,0,0,0-40.83,0l-91.57,52.87a41,41,0,0,0-20.42,35.36V267.27A41,41,0,0,0,1327.88,302.64Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M1098.91,55.28,1053,134.74a33.58,33.58,0,0,1-29,16.74H932.3a33.58,33.58,0,0,1-29-16.74L857.43,55.28a33.58,33.58,0,0,1,0-33.48L870,0H560l14.78,25.61a28.2,28.2,0,0,1,0,28.1L534,124.28a28.19,28.19,0,0,1-24.34,14H428.18a28.19,28.19,0,0,1-24.34-14L363.1,53.71a28.2,28.2,0,0,1,0-28.1L377.89,0H0V201.09H12.52A40.94,40.94,0,0,1,47.88,221.5l52.87,91.57a41,41,0,0,1,1.59,37.74q-.84,1.31-1.62,2.64L47.86,445c-.61,1.05-1.17,2.1-1.71,3.17a41,41,0,0,1-33.63,17.7H0v29.77H12.38a41,41,0,0,1,35.36,20.42l52.87,91.57a40.94,40.94,0,0,1,0,40.83L47.74,740.05a40.94,40.94,0,0,1-35.36,20.41H0V1440H1920V0H1086.33l12.58,21.8A33.58,33.58,0,0,1,1098.91,55.28ZM635.69,73.45A41,41,0,0,1,671.05,53H776.79a41,41,0,0,1,35.36,20.42L865,165a40.93,40.93,0,0,1,.79,39.36c-.27.45-.55.89-.81,1.35L812.12,297.3c-.28.48-.54,1-.81,1.47a40.93,40.93,0,0,1-34.52,19.06H671.05a40.94,40.94,0,0,1-35.36-20.41l-52.87-91.57a41,41,0,0,1,0-40.83ZM192.34,240.6a14.76,14.76,0,0,1-12.73-7.35l-22.24-38.52a14.76,14.76,0,0,1,0-14.7l22.24-38.52a14.75,14.75,0,0,1,12.73-7.34h44.48a14.75,14.75,0,0,1,12.73,7.34L271.79,180a14.78,14.78,0,0,1,0,14.7l-22.24,38.52a14.76,14.76,0,0,1-12.73,7.35Zm130.27,92.56a40.74,40.74,0,0,1,5.46-20.41l52.86-91.57a40.93,40.93,0,0,1,35.36-20.42H522a40.93,40.93,0,0,1,35.36,20.42l52.87,91.57a40.92,40.92,0,0,1,1.61,37.68c-.61.95-1.21,1.91-1.77,2.9L557.23,444.9c-.6,1-1.16,2.08-1.7,3.14A40.94,40.94,0,0,1,522,465.56H416.29a40.93,40.93,0,0,1-34.52-19.07q-.39-.74-.81-1.47l-52.87-91.57c-.26-.45-.53-.89-.8-1.33A40.9,40.9,0,0,1,322.61,333.16ZM812,592a41,41,0,0,1-35.36,20.42H670.91A41,41,0,0,1,635.55,592l-52.87-91.57a41,41,0,0,1,0-40.83L635.55,368a40.94,40.94,0,0,1,35.36-20.41H776.65A40.94,40.94,0,0,1,812,368l52.87,91.57a40.94,40.94,0,0,1,0,40.83Zm135.88-35.58h61.29a17.53,17.53,0,0,1,15.15,8.75L1055,618.24a17.56,17.56,0,0,1,0,17.49l-30.65,53.08a17.54,17.54,0,0,1-15.15,8.74H947.89a17.55,17.55,0,0,1-15.15-8.74L902.1,635.73a17.51,17.51,0,0,1,0-17.49l30.64-53.08A17.54,17.54,0,0,1,947.89,556.41ZM161.54,612.54a41,41,0,0,1-35.36-20.42L73.31,500.55a41,41,0,0,1,0-40.83l52.87-91.57a40.94,40.94,0,0,1,35.36-20.41H267.27a41,41,0,0,1,35.37,20.41l52.86,91.57a40.94,40.94,0,0,1,0,40.83l-52.86,91.57a41,41,0,0,1-35.37,20.42Zm166.39,35.61a41,41,0,0,1,0-40.83l52.87-91.57a41,41,0,0,1,35.36-20.42H521.89a41,41,0,0,1,35.36,20.42l52.87,91.57A41,41,0,0,1,611.74,645c-.69,1.06-1.36,2.13-2,3.22l-52.87,91.57c-.57,1-1.12,2-1.64,3a41,41,0,0,1-33.35,17.31H416.16a41,41,0,0,1-35.36-20.42ZM168.13,888.39a33.86,33.86,0,0,1-29.24-16.88L92.75,791.59a33.84,33.84,0,0,1,0-33.76l46.14-79.92A33.86,33.86,0,0,1,168.13,661h92.28a33.86,33.86,0,0,1,29.24,16.88l46.14,79.92a33.86,33.86,0,0,1,0,33.76l-46.14,79.92a33.86,33.86,0,0,1-29.24,16.88ZM776.3,907.3H670.57a40.94,40.94,0,0,1-35.36-20.41l-52.87-91.57a40.9,40.9,0,0,1,0-40.83l52.87-91.57a41,41,0,0,1,35.36-20.42H776.3a41,41,0,0,1,35.36,20.42l52.87,91.57a40.94,40.94,0,0,1,0,40.83l-52.87,91.57A40.94,40.94,0,0,1,776.3,907.3Zm550.41-119-39.51,68.44a26.87,26.87,0,0,1-23.21,13.4h-79a26.87,26.87,0,0,1-23.21-13.4l-39.51-68.44a26.87,26.87,0,0,1,0-26.8l39.51-68.43A26.88,26.88,0,0,1,1185,679.66h79a26.88,26.88,0,0,1,23.21,13.41l39.51,68.43A26.88,26.88,0,0,1,1326.71,788.3Zm190.74-254.89a26.68,26.68,0,0,1,23,13.3l39.33,68.12a26.72,26.72,0,0,1,0,26.61l-39.33,68.12a26.69,26.69,0,0,1-23,13.31h-78.66a26.68,26.68,0,0,1-23-13.31l-39.33-68.12a26.71,26.71,0,0,1,0-26.61l39.33-68.12a26.67,26.67,0,0,1,23-13.3Zm-270.67-77.52,13.49,23.36-13.49,23.37h-27l-13.48-23.37,13.48-23.36Zm-127-103.07-52.87,91.57a40.93,40.93,0,0,1-35.36,20.42H925.81a40.93,40.93,0,0,1-35.36-20.42l-52.87-91.57a41,41,0,0,1,0-40.83l52.87-91.57A40.94,40.94,0,0,1,925.81,200h105.73a40.94,40.94,0,0,1,35.36,20.41L1119.77,312A40.94,40.94,0,0,1,1119.77,352.82ZM1286.3,52.28a40.94,40.94,0,0,1,35.36,20.41l52.87,91.57a40.94,40.94,0,0,1,0,40.83l-52.87,91.57a40.93,40.93,0,0,1-35.36,20.42H1180.56a40.93,40.93,0,0,1-35.36-20.42l-52.87-91.56a41,41,0,0,1,0-40.84l52.87-91.57a40.94,40.94,0,0,1,35.36-20.41Z"/>',
'portrait' => '<path d="M1849.45,926.93l-51.38-89a34.87,34.87,0,0,1,0-34.76l51.38-89a34.87,34.87,0,0,1,30.11-17.38H1920V0H1419.11l16.44,28.48a43.85,43.85,0,0,1,0,43.74L1375.63,176a43.87,43.87,0,0,1-37.88,21.87H1217.9A43.86,43.86,0,0,1,1180,176L1120.09,72.22a43.87,43.87,0,0,1,0-43.74L1136.53,0h-405l19.32,33.45a36.84,36.84,0,0,1,0,36.71l-53.23,92.19A36.79,36.79,0,0,1,665.8,180.7H559.35a36.79,36.79,0,0,1-31.79-18.35L474.33,70.16a36.83,36.83,0,0,1,0-36.71L493.65,0H0V262.69H16.35a53.5,53.5,0,0,1,46.2,26.67L131.61,409a53.52,53.52,0,0,1,2.08,49.3c-.72,1.13-1.43,2.28-2.11,3.45L62.52,581.35c-.79,1.37-1.53,2.75-2.24,4.14a53.48,53.48,0,0,1-43.93,23.12H0V647.5H16.17a53.5,53.5,0,0,1,46.2,26.67l69.06,119.62a53.48,53.48,0,0,1,0,53.34L62.37,966.75a53.5,53.5,0,0,1-46.2,26.67H0V2560H1920V944.31h-40.44A34.87,34.87,0,0,1,1849.45,926.93ZM1427,214.58,1496,95a53.5,53.5,0,0,1,46.2-26.67h138.12A53.5,53.5,0,0,1,1726.54,95l69.06,119.62a53.48,53.48,0,0,1,0,53.34l-69.06,119.62a53.5,53.5,0,0,1-46.2,26.67H1542.22a53.5,53.5,0,0,1-46.2-26.67L1427,267.92a53.51,53.51,0,0,1,0-53.34Zm219.38,411.49-17.62,30.52h-35.24l-17.62-30.52,17.62-30.52h35.24Zm-885-410.5L830.43,96a53.49,53.49,0,0,1,46.19-26.67h138.13A53.49,53.49,0,0,1,1060.94,96L1130,215.57a53.46,53.46,0,0,1,1,51.43c-.35.58-.71,1.16-1,1.75l-69.06,119.62c-.37.63-.72,1.28-1.07,1.92a53.48,53.48,0,0,1-45.09,24.91H876.62a53.49,53.49,0,0,1-46.19-26.67L761.36,268.91a53.51,53.51,0,0,1,0-53.34Zm-332.79,193,69.06-119.62a53.49,53.49,0,0,1,46.19-26.67H682a53.49,53.49,0,0,1,46.19,26.67l69.07,119.62a53.49,53.49,0,0,1,2.1,49.24c-.79,1.24-1.57,2.49-2.32,3.77L727.93,581.18c-.78,1.36-1.51,2.73-2.22,4.11A53.49,53.49,0,0,1,682,608.18H543.82a53.45,53.45,0,0,1-45.09-24.91c-.35-.64-.7-1.28-1.07-1.92L428.6,461.73c-.34-.59-.7-1.16-1.05-1.74a53.36,53.36,0,0,1,1-51.44Zm-223-173.37,29.06-50.32a19.22,19.22,0,0,1,16.62-9.59h58.11A19.25,19.25,0,0,1,326,184.86l29.06,50.32a19.3,19.3,0,0,1,0,19.2L326,304.7a19.25,19.25,0,0,1-16.62,9.6H251.26a19.23,19.23,0,0,1-16.62-9.6l-29.06-50.32a19.28,19.28,0,0,1,0-19.2ZM95.77,653.89a53.51,53.51,0,0,1,0-53.34l69.06-119.62A53.49,53.49,0,0,1,211,454.26H349.15a53.47,53.47,0,0,1,46.19,26.67l69.07,119.62a53.5,53.5,0,0,1,0,53.34L395.34,773.51a53.47,53.47,0,0,1-46.19,26.67H211a53.49,53.49,0,0,1-46.19-26.67Zm342.88,380.2-60.27,104.39a44.23,44.23,0,0,1-38.2,22.06H219.63a44.21,44.21,0,0,1-38.19-22.06l-60.28-104.39a44.24,44.24,0,0,1,0-44.11l60.28-104.39a44.21,44.21,0,0,1,38.19-22.06H340.18a44.23,44.23,0,0,1,38.2,22.06L438.65,990A44.23,44.23,0,0,1,438.65,1034.09Zm286.68-63.7A53.5,53.5,0,0,1,681.77,993H543.64a53.49,53.49,0,0,1-46.19-26.67L428.39,846.7a53.43,53.43,0,0,1,0-53.33l69.06-119.62a53.49,53.49,0,0,1,46.19-26.67H681.77A53.49,53.49,0,0,1,728,673.75L797,793.37a53.45,53.45,0,0,1,2.12,49.22q-1.35,2.07-2.6,4.21L727.48,966.42C726.72,967.72,726,969.05,725.33,970.39Zm404,68.57-69.06,119.62a53.5,53.5,0,0,1-46.2,26.67H876a53.5,53.5,0,0,1-46.2-26.67L760.73,1039a53.51,53.51,0,0,1,0-53.34L829.79,866A53.5,53.5,0,0,1,876,839.33h138.12a53.5,53.5,0,0,1,46.2,26.67l69.06,119.62A53.48,53.48,0,0,1,1129.37,1039Zm.45-385.24-69.06,119.62A53.49,53.49,0,0,1,1014.57,800H876.44a53.49,53.49,0,0,1-46.19-26.67L761.18,653.72a53.51,53.51,0,0,1,0-53.34l69.07-119.62a53.49,53.49,0,0,1,46.19-26.67h138.13a53.49,53.49,0,0,1,46.19,26.67l69.06,119.62A53.48,53.48,0,0,1,1129.82,653.72Zm248.34,176.76-40,69.34a22.91,22.91,0,0,1-19.78,11.42h-80.07a22.92,22.92,0,0,1-19.79-11.42l-40-69.34a22.86,22.86,0,0,1,0-22.85l40-69.34a22.91,22.91,0,0,1,19.79-11.43h80.07a22.9,22.9,0,0,1,19.78,11.43l40,69.34A22.91,22.91,0,0,1,1378.16,830.48ZM1347.54,607.2H1209.42a53.47,53.47,0,0,1-46.19-26.67l-69.07-119.62a53.51,53.51,0,0,1,0-53.34L1163.23,288a53.47,53.47,0,0,1,46.19-26.67h138.12a53.5,53.5,0,0,1,46.2,26.67l69.06,119.62a53.48,53.48,0,0,1,0,53.34l-69.06,119.62A53.5,53.5,0,0,1,1347.54,607.2Zm385.59,422.59-51.61,89.4a35.11,35.11,0,0,1-30.32,17.51H1548a35.13,35.13,0,0,1-30.33-17.51l-51.61-89.4a35.08,35.08,0,0,1,0-35l51.61-89.4A35.13,35.13,0,0,1,1548,887.87H1651.2a35.11,35.11,0,0,1,30.32,17.51l51.61,89.4A35.08,35.08,0,0,1,1733.13,1029.79Z"/>',
'square' => '<path d="M1805,906.87a33.46,33.46,0,0,1-28.91-16.69l-49.34-85.46a33.46,33.46,0,0,1,0-33.38l49.34-85.46A33.46,33.46,0,0,1,1805,669.19h98.68a33.36,33.36,0,0,1,16.28,4.26V0H1362.85l15.79,27.35a42.13,42.13,0,0,1,0,42L1321.09,169a42.12,42.12,0,0,1-36.38,21h-115.1a42.12,42.12,0,0,1-36.37-21l-57.55-99.67a42.13,42.13,0,0,1,0-42L1091.48,0h-389L721,32.13a35.33,35.33,0,0,1,0,35.25l-51.11,88.53a35.36,35.36,0,0,1-30.53,17.62H537.17a35.36,35.36,0,0,1-30.53-17.62L455.53,67.38a35.33,35.33,0,0,1,0-35.25L474.08,0H0V252.27H15.7a51.37,51.37,0,0,1,44.37,25.62l66.32,114.87a51.39,51.39,0,0,1,2,47.35c-.7,1.09-1.38,2.19-2,3.32L60,558.31c-.76,1.3-1.47,2.63-2.15,4a51.37,51.37,0,0,1-42.19,22.2H0v37.35H15.53a51.37,51.37,0,0,1,44.36,25.62l66.33,114.87a51.38,51.38,0,0,1,0,51.23L59.89,928.43A51.38,51.38,0,0,1,15.53,954H0v966H1920V902.6a33.26,33.26,0,0,1-16.28,4.27ZM1370.39,206.08,1436.71,91.2a51.38,51.38,0,0,1,44.37-25.61h132.65a51.36,51.36,0,0,1,44.36,25.61l66.32,114.88a51.36,51.36,0,0,1,0,51.22l-66.32,114.88a51.36,51.36,0,0,1-44.36,25.61H1481.08a51.38,51.38,0,0,1-44.37-25.61L1370.39,257.3a51.36,51.36,0,0,1,0-51.22Zm210.68,395.17-16.92,29.31h-33.84l-16.92-29.31,16.92-29.31h33.84ZM731.18,207,797.51,92.14a51.38,51.38,0,0,1,44.36-25.61H974.52a51.38,51.38,0,0,1,44.36,25.61L1085.2,207a51.32,51.32,0,0,1,1,49.39c-.33.56-.68,1.12-1,1.68L1018.85,373c-.35.61-.69,1.23-1,1.85a51.38,51.38,0,0,1-43.31,23.92H841.87a51.37,51.37,0,0,1-44.36-25.62L731.18,258.25a51.38,51.38,0,0,1,0-51.23ZM411.58,392.36,477.9,277.48a51.37,51.37,0,0,1,44.36-25.62H654.91a51.39,51.39,0,0,1,44.37,25.62L765.6,392.36a51.37,51.37,0,0,1,2,47.28c-.77,1.19-1.52,2.39-2.23,3.62L699.07,558.14c-.75,1.3-1.45,2.62-2.13,4a51.36,51.36,0,0,1-42,22H522.26A51.38,51.38,0,0,1,479,560.15c-.33-.62-.67-1.24-1-1.85L411.61,443.43c-.33-.57-.67-1.12-1-1.68a51.28,51.28,0,0,1,1-49.39ZM197.43,225.86l27.9-48.33a18.5,18.5,0,0,1,16-9.21h55.8a18.49,18.49,0,0,1,16,9.21L341,225.86a18.51,18.51,0,0,1,0,18.44l-27.9,48.32a18.48,18.48,0,0,1-16,9.22H241.3a18.49,18.49,0,0,1-16-9.22l-27.9-48.32a18.51,18.51,0,0,1,0-18.44ZM92,628a51.38,51.38,0,0,1,0-51.23L158.3,461.86a51.38,51.38,0,0,1,44.36-25.61H335.31a51.38,51.38,0,0,1,44.36,25.61L446,576.74A51.38,51.38,0,0,1,446,628L379.67,742.84a51.37,51.37,0,0,1-44.36,25.62H202.66a51.37,51.37,0,0,1-44.36-25.62ZM421.26,993.09l-57.88,100.26a42.49,42.49,0,0,1-36.69,21.18H210.93a42.5,42.5,0,0,1-36.69-21.18L116.36,993.09a42.46,42.46,0,0,1,0-42.36l57.88-100.25a42.48,42.48,0,0,1,36.69-21.18H326.69a42.47,42.47,0,0,1,36.69,21.18l57.88,100.25A42.49,42.49,0,0,1,421.26,993.09Zm275.32-61.18a51.38,51.38,0,0,1-41.84,21.72H522.09A51.38,51.38,0,0,1,477.73,928L411.4,813.14a51.38,51.38,0,0,1,0-51.23L477.73,647a51.37,51.37,0,0,1,44.36-25.62H654.74A51.37,51.37,0,0,1,699.1,647l66.33,114.87a51.4,51.4,0,0,1,2,47.28c-.87,1.32-1.7,2.66-2.5,4L698.64,928.1C697.91,929.36,697.23,930.63,696.58,931.91Zm388,65.86-66.33,114.88a51.38,51.38,0,0,1-44.36,25.61H841.26a51.38,51.38,0,0,1-44.36-25.61L730.57,997.77a51.38,51.38,0,0,1,0-51.23L796.9,831.67a51.37,51.37,0,0,1,44.36-25.62H973.91a51.37,51.37,0,0,1,44.36,25.62l66.33,114.87A51.38,51.38,0,0,1,1084.6,997.77Zm.43-370-66.32,114.87a51.39,51.39,0,0,1-44.37,25.62H841.69a51.37,51.37,0,0,1-44.36-25.62L731,627.81a51.38,51.38,0,0,1,0-51.23L797.33,461.7a51.36,51.36,0,0,1,44.36-25.61H974.34a51.38,51.38,0,0,1,44.37,25.61L1085,576.58A51.38,51.38,0,0,1,1085,627.81Zm238.49,169.74-38.45,66.59a22,22,0,0,1-19,11h-76.89a22,22,0,0,1-19-11l-38.44-66.59a22,22,0,0,1,0-21.94L1170.17,709a22,22,0,0,1,19-11h76.89a22,22,0,0,1,19,11l38.45,66.59A22,22,0,0,1,1323.52,797.55Zm-29.4-214.42H1161.47a51.37,51.37,0,0,1-44.36-25.62l-66.33-114.87a51.38,51.38,0,0,1,0-51.23l66.33-114.88a51.36,51.36,0,0,1,44.36-25.61h132.65a51.36,51.36,0,0,1,44.36,25.61l66.33,114.88a51.36,51.36,0,0,1,0,51.22l-66.33,114.88A51.37,51.37,0,0,1,1294.12,583.13ZM1664.42,989l-49.56,85.85a33.74,33.74,0,0,1-29.13,16.82H1486.6a33.71,33.71,0,0,1-29.12-16.82L1407.91,989a33.73,33.73,0,0,1,0-33.63l49.57-85.85a33.71,33.71,0,0,1,29.12-16.82h99.13a33.74,33.74,0,0,1,29.13,16.82l49.56,85.85A33.71,33.71,0,0,1,1664.42,989Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M380.8,739.72l-52.87-91.57a41,41,0,0,1,0-40.83l52.87-91.57a41,41,0,0,1,35.36-20.42H521.89a41,41,0,0,1,35.36,20.42l52.87,91.57A41,41,0,0,1,611.74,645c-.69,1.06-1.36,2.13-2,3.22l-52.87,91.57c-.57,1-1.12,2-1.64,3a41,41,0,0,1-33.35,17.31H416.16A41,41,0,0,1,380.8,739.72Zm1035-193-39.33,68.12a26.71,26.71,0,0,0,0,26.61l39.33,68.12a26.68,26.68,0,0,0,23,13.31h78.66a26.69,26.69,0,0,0,23-13.31l39.33-68.12a26.72,26.72,0,0,0,0-26.61l-39.33-68.12a26.68,26.68,0,0,0-23-13.3h-78.66A26.67,26.67,0,0,0,1415.75,546.71ZM328.09,353.45,381,445q.42.74.81,1.47a40.93,40.93,0,0,0,34.52,19.07H522A40.94,40.94,0,0,0,555.53,448c.54-1.06,1.1-2.11,1.7-3.14l52.87-91.57c.56-1,1.16-1.95,1.77-2.9a40.92,40.92,0,0,0-1.61-37.68l-52.87-91.57A40.93,40.93,0,0,0,522,200.76H416.29a40.93,40.93,0,0,0-35.36,20.42l-52.86,91.57a40.81,40.81,0,0,0-.78,39.37C327.56,352.56,327.83,353,328.09,353.45Zm-78.54-120.2,22.24-38.52a14.78,14.78,0,0,0,0-14.7l-22.24-38.52a14.75,14.75,0,0,0-12.73-7.34H192.34a14.75,14.75,0,0,0-12.73,7.34L157.37,180a14.76,14.76,0,0,0,0,14.7l22.24,38.52a14.76,14.76,0,0,0,12.73,7.35h44.48A14.76,14.76,0,0,0,249.55,233.25ZM359.35,39.66a28.15,28.15,0,0,0,3.75,14.05l40.74,70.57a28.19,28.19,0,0,0,24.34,14h81.48a28.19,28.19,0,0,0,24.34-14l40.74-70.57a28.2,28.2,0,0,0,0-28.1L560,0H377.89L363.1,25.61A28.1,28.1,0,0,0,359.35,39.66ZM864.88,459.59,812,368a40.94,40.94,0,0,0-35.36-20.41H670.91A40.94,40.94,0,0,0,635.55,368l-52.87,91.57a41,41,0,0,0,0,40.83L635.55,592a41,41,0,0,0,35.36,20.42H776.65A41,41,0,0,0,812,592l52.87-91.57A40.94,40.94,0,0,0,864.88,459.59Zm-.35,294.9-52.87-91.57A41,41,0,0,0,776.3,642.5H670.57a41,41,0,0,0-35.36,20.42l-52.87,91.57a40.9,40.9,0,0,0,0,40.83l52.87,91.57a40.94,40.94,0,0,0,35.36,20.41H776.3a40.94,40.94,0,0,0,35.36-20.41l52.87-91.57A40.94,40.94,0,0,0,864.53,754.49ZM1264,679.66h-79a26.88,26.88,0,0,0-23.21,13.41l-39.51,68.43a26.87,26.87,0,0,0,0,26.8l39.51,68.44a26.87,26.87,0,0,0,23.21,13.4h79a26.87,26.87,0,0,0,23.21-13.4l39.51-68.44a26.88,26.88,0,0,0,0-26.8l-39.51-68.43A26.88,26.88,0,0,0,1264,679.66ZM577.37,185.43a40.9,40.9,0,0,0,5.45,20.42l52.87,91.57a40.94,40.94,0,0,0,35.36,20.41H776.79a40.93,40.93,0,0,0,34.52-19.06c.27-.5.53-1,.81-1.47L865,205.73c.26-.46.54-.9.81-1.35A40.93,40.93,0,0,0,865,165L812.15,73.45A41,41,0,0,0,776.79,53H671.05a41,41,0,0,0-35.36,20.42L582.82,165A40.83,40.83,0,0,0,577.37,185.43ZM902.1,618.24a17.51,17.51,0,0,0,0,17.49l30.64,53.08a17.55,17.55,0,0,0,15.15,8.74h61.29a17.54,17.54,0,0,0,15.15-8.74L1055,635.73a17.56,17.56,0,0,0,0-17.49l-30.65-53.08a17.53,17.53,0,0,0-15.15-8.75H947.89a17.54,17.54,0,0,0-15.15,8.75Zm164.8-397.82A40.94,40.94,0,0,0,1031.54,200H925.81a40.94,40.94,0,0,0-35.36,20.41L837.58,312a41,41,0,0,0,0,40.83l52.87,91.57a40.93,40.93,0,0,0,35.36,20.42h105.73a40.93,40.93,0,0,0,35.36-20.42l52.87-91.57a40.94,40.94,0,0,0,0-40.83ZM857.43,21.8a33.58,33.58,0,0,0,0,33.48l45.87,79.46a33.58,33.58,0,0,0,29,16.74H1024a33.58,33.58,0,0,0,29-16.74l45.87-79.46a33.58,33.58,0,0,0,0-33.48L1086.33,0H870ZM1219.8,502.62h27l13.49-23.37-13.49-23.36h-27l-13.48,23.36ZM1145.2,72.69l-52.87,91.57a41,41,0,0,0,0,40.84l52.87,91.56a40.93,40.93,0,0,0,35.36,20.42H1286.3a40.93,40.93,0,0,0,35.36-20.42l52.87-91.57a40.94,40.94,0,0,0,0-40.83l-52.87-91.57a40.94,40.94,0,0,0-35.36-20.41H1180.56A40.94,40.94,0,0,0,1145.2,72.69ZM47.74,740.05l52.87-91.57a40.94,40.94,0,0,0,0-40.83L47.74,516.08a41,41,0,0,0-35.36-20.42H0v264.8H12.38A40.94,40.94,0,0,0,47.74,740.05ZM46.15,448.19c.54-1.07,1.1-2.12,1.71-3.17l52.86-91.57q.78-1.33,1.62-2.64a41,41,0,0,0-1.59-37.74L47.88,221.5a40.94,40.94,0,0,0-35.36-20.41H0v264.8H12.52A41,41,0,0,0,46.15,448.19Zm243.5,423.32,46.14-79.92a33.86,33.86,0,0,0,0-33.76l-46.14-79.92A33.86,33.86,0,0,0,260.41,661H168.13a33.86,33.86,0,0,0-29.24,16.88L92.75,757.83a33.84,33.84,0,0,0,0,33.76l46.14,79.92a33.86,33.86,0,0,0,29.24,16.88h92.28A33.86,33.86,0,0,0,289.65,871.51Zm13-279.39,52.86-91.57a40.94,40.94,0,0,0,0-40.83l-52.86-91.57a41,41,0,0,0-35.37-20.41H161.54a40.94,40.94,0,0,0-35.36,20.41L73.31,459.72a41,41,0,0,0,0,40.83l52.87,91.57a41,41,0,0,0,35.36,20.42H267.27A41,41,0,0,0,302.64,592.12Z"/>',
'portrait' => '<path d="M474.33,70.16a36.83,36.83,0,0,1,0-36.71L493.65,0H731.49l19.32,33.45a36.84,36.84,0,0,1,0,36.71l-53.23,92.19A36.79,36.79,0,0,1,665.8,180.7H559.35a36.79,36.79,0,0,1-31.79-18.35ZM428.6,461.73l69.06,119.62c.37.64.72,1.28,1.07,1.92a53.45,53.45,0,0,0,45.09,24.91H682a53.49,53.49,0,0,0,43.76-22.89c.71-1.38,1.44-2.75,2.22-4.1L797,461.56c.75-1.28,1.53-2.53,2.32-3.77a53.49,53.49,0,0,0-2.1-49.24L728.14,288.93A53.49,53.49,0,0,0,682,262.26H543.82a53.49,53.49,0,0,0-46.19,26.67L428.57,408.55a53.36,53.36,0,0,0-1,51.44C427.9,460.57,428.26,461.14,428.6,461.73Zm-194-157a19.23,19.23,0,0,0,16.62,9.6h58.11A19.25,19.25,0,0,0,326,304.7l29.06-50.32a19.3,19.3,0,0,0,0-19.2L326,184.86a19.25,19.25,0,0,0-16.62-9.59H251.26a19.22,19.22,0,0,0-16.62,9.59l-29.06,50.32a19.28,19.28,0,0,0,0,19.2Zm-146,322.52a53.31,53.31,0,0,0,7.12,26.67l69.06,119.62A53.49,53.49,0,0,0,211,800.18H349.15a53.47,53.47,0,0,0,46.19-26.67l69.07-119.62a53.5,53.5,0,0,0,0-53.34L395.34,480.93a53.47,53.47,0,0,0-46.19-26.67H211a53.49,53.49,0,0,0-46.19,26.67L95.77,600.55A53.33,53.33,0,0,0,88.65,627.22ZM1180,176a43.86,43.86,0,0,0,37.88,21.87h119.85A43.87,43.87,0,0,0,1375.63,176l59.92-103.79a43.85,43.85,0,0,0,0-43.74L1419.11,0H1136.53l-16.44,28.48a43.87,43.87,0,0,0,0,43.74Zm395.84,450.06,17.62,30.52h35.24l17.62-30.52-17.62-30.52h-35.24Zm-156-384.82a53.28,53.28,0,0,0,7.12,26.67L1496,387.54a53.5,53.5,0,0,0,46.2,26.67h138.12a53.5,53.5,0,0,0,46.2-26.67l69.06-119.62a53.48,53.48,0,0,0,0-53.34L1726.54,95a53.5,53.5,0,0,0-46.2-26.67H1542.22A53.5,53.5,0,0,0,1496,95L1427,214.58A53.33,53.33,0,0,0,1419.84,241.25ZM761.36,268.91l69.07,119.62a53.49,53.49,0,0,0,46.19,26.67h138.13a53.48,53.48,0,0,0,45.09-24.91c.35-.64.7-1.29,1.07-1.92L1130,268.75c.34-.59.7-1.17,1-1.75a53.46,53.46,0,0,0-1-51.43L1060.94,96a53.49,53.49,0,0,0-46.19-26.67H876.62A53.49,53.49,0,0,0,830.43,96L761.36,215.57a53.51,53.51,0,0,0,0,53.34ZM131.43,793.79,62.37,674.17a53.5,53.5,0,0,0-46.2-26.67H0V993.42H16.17a53.5,53.5,0,0,0,46.2-26.67l69.06-119.62A53.48,53.48,0,0,0,131.43,793.79ZM60.28,585.49c.71-1.39,1.45-2.78,2.24-4.14l69.06-119.62c.68-1.17,1.39-2.32,2.11-3.45a53.52,53.52,0,0,0-2.08-49.3L62.55,289.36a53.5,53.5,0,0,0-46.2-26.67H0V608.61H16.35A53.48,53.48,0,0,0,60.28,585.49ZM1879.56,696.81a34.87,34.87,0,0,0-30.11,17.38l-51.38,89a34.87,34.87,0,0,0,0,34.76l51.38,89a34.87,34.87,0,0,0,30.11,17.38H1920V696.81ZM1462.8,407.57,1393.74,288a53.5,53.5,0,0,0-46.2-26.67H1209.42A53.47,53.47,0,0,0,1163.23,288l-69.07,119.62a53.51,53.51,0,0,0,0,53.34l69.07,119.62a53.47,53.47,0,0,0,46.19,26.67h138.12a53.5,53.5,0,0,0,46.2-26.67l69.06-119.62A53.48,53.48,0,0,0,1462.8,407.57Zm218.72,497.81a35.11,35.11,0,0,0-30.32-17.51H1548a35.13,35.13,0,0,0-30.33,17.51L1466,994.78a35.08,35.08,0,0,0,0,35l51.61,89.4A35.13,35.13,0,0,0,1548,1136.7H1651.2a35.11,35.11,0,0,0,30.32-17.51l51.61-89.4a35.08,35.08,0,0,0,0-35ZM1060.31,866a53.5,53.5,0,0,0-46.2-26.67H876A53.5,53.5,0,0,0,829.79,866L760.73,985.62a53.51,53.51,0,0,0,0,53.34l69.06,119.62a53.5,53.5,0,0,0,46.2,26.67h138.12a53.5,53.5,0,0,0,46.2-26.67L1129.37,1039a53.48,53.48,0,0,0,0-53.34Zm277.81-127.71a22.9,22.9,0,0,0-19.78-11.43h-80.07a22.91,22.91,0,0,0-19.79,11.43l-40,69.34a22.86,22.86,0,0,0,0,22.85l40,69.34a22.92,22.92,0,0,0,19.79,11.42h80.07a22.91,22.91,0,0,0,19.78-11.42l40-69.34a22.91,22.91,0,0,0,0-22.85ZM378.38,885.59a44.23,44.23,0,0,0-38.2-22.06H219.63a44.21,44.21,0,0,0-38.19,22.06L121.16,990a44.24,44.24,0,0,0,0,44.11l60.28,104.39a44.21,44.21,0,0,0,38.19,22.06H340.18a44.23,44.23,0,0,0,38.2-22.06l60.27-104.39a44.23,44.23,0,0,0,0-44.11Zm420.76-43A53.45,53.45,0,0,0,797,793.37L728,673.75a53.49,53.49,0,0,0-46.19-26.67H543.64a53.49,53.49,0,0,0-46.19,26.67L428.39,793.37a53.45,53.45,0,0,0,0,53.34l69.06,119.62A53.49,53.49,0,0,0,543.64,993H681.77a53.5,53.5,0,0,0,43.56-22.61c.69-1.34,1.39-2.67,2.15-4L796.54,846.8Q797.79,844.66,799.14,842.59Zm261.62-361.83a53.49,53.49,0,0,0-46.19-26.67H876.44a53.49,53.49,0,0,0-46.19,26.67L761.18,600.38a53.51,53.51,0,0,0,0,53.34l69.07,119.62A53.49,53.49,0,0,0,876.44,800h138.13a53.49,53.49,0,0,0,46.19-26.67l69.06-119.62a53.48,53.48,0,0,0,0-53.34Z"/>',
'square' => '<path d="M15.7,584.48H0V252.27H15.7a51.37,51.37,0,0,1,44.37,25.62l66.32,114.88a51.37,51.37,0,0,1,2,47.34c-.7,1.09-1.38,2.19-2,3.32L60,558.31c-.76,1.3-1.47,2.63-2.15,4A51.37,51.37,0,0,1,15.7,584.48ZM225.33,292.62a18.49,18.49,0,0,0,16,9.22h55.8a18.48,18.48,0,0,0,16-9.22L341,244.3a18.51,18.51,0,0,0,0-18.44l-27.9-48.33a18.49,18.49,0,0,0-16-9.21H241.3a18.5,18.5,0,0,0-16,9.21l-27.9,48.33a18.51,18.51,0,0,0,0,18.44ZM411.61,443.43,477.93,558.3c.35.61.69,1.23,1,1.85a51.38,51.38,0,0,0,43.31,23.92H654.91a51.36,51.36,0,0,0,42-22c.68-1.33,1.38-2.65,2.13-4L765.4,443.26c.71-1.23,1.46-2.43,2.22-3.62a51.34,51.34,0,0,0-2-47.28L699.28,277.48a51.39,51.39,0,0,0-44.37-25.62H522.26a51.37,51.37,0,0,0-44.36,25.62L411.58,392.36a51.28,51.28,0,0,0-1,49.39C410.94,442.31,411.28,442.86,411.61,443.43Zm951.94-211.74a51.2,51.2,0,0,0,6.84,25.61l66.32,114.88a51.38,51.38,0,0,0,44.37,25.61h132.65a51.36,51.36,0,0,0,44.36-25.61l66.32-114.88a51.36,51.36,0,0,0,0-51.22L1658.09,91.2a51.36,51.36,0,0,0-44.36-25.61H1481.08a51.38,51.38,0,0,0-44.37,25.61l-66.32,114.88A51.18,51.18,0,0,0,1363.55,231.69ZM85.13,602.35A51.24,51.24,0,0,0,92,628L158.3,742.84a51.37,51.37,0,0,0,44.36,25.62H335.31a51.37,51.37,0,0,0,44.36-25.62L446,628a51.38,51.38,0,0,0,0-51.23L379.67,461.86a51.38,51.38,0,0,0-44.36-25.61H202.66a51.38,51.38,0,0,0-44.36,25.61L92,576.74A51.23,51.23,0,0,0,85.13,602.35ZM506.64,155.91a35.36,35.36,0,0,0,30.53,17.62H639.4a35.36,35.36,0,0,0,30.53-17.62L721,67.38a35.33,35.33,0,0,0,0-35.25L702.49,0H474.08L455.53,32.13a35.33,35.33,0,0,0,0,35.25ZM1133.24,169a42.12,42.12,0,0,0,36.37,21h115.1a42.12,42.12,0,0,0,36.38-21l57.55-99.67a42.13,42.13,0,0,0,0-42L1362.85,0H1091.48l-15.79,27.35a42.13,42.13,0,0,0,0,42Zm380.15,432.22,16.92,29.31h33.84l16.92-29.31-16.92-29.31h-33.84Zm-782.21-343,66.33,114.87a51.37,51.37,0,0,0,44.36,25.62H974.52a51.38,51.38,0,0,0,43.31-23.92c.33-.62.67-1.24,1-1.85l66.33-114.88c.32-.56.67-1.12,1-1.68a51.32,51.32,0,0,0-1-49.39L1018.88,92.14a51.38,51.38,0,0,0-44.36-25.61H841.87a51.38,51.38,0,0,0-44.36,25.61L731.18,207a51.38,51.38,0,0,0,0,51.23ZM1018.71,461.7a51.38,51.38,0,0,0-44.37-25.61H841.69a51.36,51.36,0,0,0-44.36,25.61L731,576.58a51.38,51.38,0,0,0,0,51.23l66.32,114.87a51.37,51.37,0,0,0,44.36,25.62H974.34a51.39,51.39,0,0,0,44.37-25.62L1085,627.81a51.38,51.38,0,0,0,0-51.23Zm885,207.49H1805a33.46,33.46,0,0,0-28.91,16.69l-49.34,85.46a33.46,33.46,0,0,0,0,33.38l49.34,85.46A33.46,33.46,0,0,0,1805,906.87h98.68A33.26,33.26,0,0,0,1920,902.6V673.45A33.36,33.36,0,0,0,1903.72,669.19Zm-288.86,200.3a33.74,33.74,0,0,0-29.13-16.82H1486.6a33.71,33.71,0,0,0-29.12,16.82l-49.57,85.85a33.73,33.73,0,0,0,0,33.63l49.57,85.85a33.71,33.71,0,0,0,29.12,16.82h99.13a33.74,33.74,0,0,0,29.13-16.82L1664.42,989a33.71,33.71,0,0,0,0-33.63ZM126.22,762.32,59.89,647.45a51.37,51.37,0,0,0-44.36-25.62H0V954H15.53a51.38,51.38,0,0,0,44.36-25.61l66.33-114.88A51.38,51.38,0,0,0,126.22,762.32ZM1404.81,391.41l-66.33-114.88a51.36,51.36,0,0,0-44.36-25.61H1161.47a51.36,51.36,0,0,0-44.36,25.61l-66.33,114.88a51.38,51.38,0,0,0,0,51.23l66.33,114.87a51.37,51.37,0,0,0,44.36,25.62h132.65a51.37,51.37,0,0,0,44.36-25.62l66.33-114.88A51.36,51.36,0,0,0,1404.81,391.41ZM767.46,809.19a51.4,51.4,0,0,0-2-47.28L699.1,647a51.37,51.37,0,0,0-44.36-25.62H522.09A51.37,51.37,0,0,0,477.73,647L411.4,761.91a51.38,51.38,0,0,0,0,51.23L477.73,928a51.38,51.38,0,0,0,44.36,25.61H654.74a51.4,51.4,0,0,0,41.84-21.71c.65-1.29,1.33-2.56,2.06-3.82L765,813.23C765.76,811.85,766.59,810.51,767.46,809.19ZM1285.07,709a22,22,0,0,0-19-11h-76.89a22,22,0,0,0-19,11l-38.44,66.59a22,22,0,0,0,0,21.94l38.44,66.59a22,22,0,0,0,19,11h76.89a22,22,0,0,0,19-11l38.45-66.59a22,22,0,0,0,0-21.94ZM363.38,850.48a42.47,42.47,0,0,0-36.69-21.18H210.93a42.48,42.48,0,0,0-36.69,21.18L116.36,950.73a42.46,42.46,0,0,0,0,42.36l57.88,100.26a42.5,42.5,0,0,0,36.69,21.18H326.69a42.49,42.49,0,0,0,36.69-21.18l57.88-100.26a42.49,42.49,0,0,0,0-42.36Zm654.89-18.81a51.37,51.37,0,0,0-44.36-25.62H841.26a51.37,51.37,0,0,0-44.36,25.62L730.57,946.54a51.38,51.38,0,0,0,0,51.23l66.33,114.88a51.38,51.38,0,0,0,44.36,25.61H973.91a51.38,51.38,0,0,0,44.36-25.61l66.33-114.88a51.38,51.38,0,0,0,0-51.23Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Honeycomb();

View File

@ -0,0 +1,78 @@
<?php
/**
* Background Mask Style - Layer Blob.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Layer_Blob
*
* @since 4.15.0
*/
class ET_Builder_Mask_Layer_Blob extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Layer Blob', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path fill-opacity=".2" d="M1563.9,270.35c-7.56-5.89-9.15-17.15-6.22-26.28a35.21,35.21,0,0,1,18.3-20.81c16.44-7.72,45.26-2.27,45.33,19.61,0,8.95-5,17.45-12.08,22.91s-16,8.12-24.94,8.93C1577.2,275.36,1569.52,274.73,1563.9,270.35ZM1920,0V257.8q-21.74-23.88-46.58-46.35c-120.07-108.24-330.64-127.15-434-2.82-96.83,116.49-72,311-190.33,405.5-66.33,53-157.62,56.81-240,77.14S837.37,767.76,837,852.64s81.93,132.7,138.57,181.23c77.74,66.61,100.39,114,97.62,217.68-2.07,77.73,4,141.69,64.37,188.45H0V0ZM915.94,473.16c-8.74,40.26,19.23,76.38,55,95.31,58.7,31,135.19,19.25,190.09-14.4,42.32-25.93,75.61-66.93,91.82-113.9,13.42-38.89,15.28-82.59.14-120.84s-48.51-70-88.78-78.42-86,9.39-106.06,45.29c-10.78,19.28-14,42.08-24.79,61.37a93.18,93.18,0,0,1-6.15,9.56c-14.08,19.33-34.79,33.45-54.33,47.69-19.85,14.48-42.9,31.47-52.72,54.88A77.22,77.22,0,0,0,915.94,473.16ZM671.61,699.81a46.88,46.88,0,0,0-4.68-9.31c-14-21.44-43.39-26.88-67.81-20.46-36.4,9.57-74.36,62.06-45.67,97.11,10.75,13.13,28.35,19.46,45.31,19.13C640.84,785.48,688.85,746.1,671.61,699.81Zm155.72,530.1a31.69,31.69,0,0,0-5.68-12,21.33,21.33,0,0,0-9.9-7c-4.57-1.52-8-.83-12.11,1.32a21.92,21.92,0,0,0-10,10.48,19,19,0,0,0,.25,16.16c2.76,5.21,8.15,8.54,13.7,10.53,6.09,2.19,13.37,2.88,18.65-.87C828.1,1244.28,829,1236.87,827.33,1229.91Zm55-5.49c-.16,13.52-6.35,24.62-3.77,38.73,2.7,14.81,14,26.78,24.74,33.67,24.08,15.5,50.53,14.89,67.84-1.57s24.92-48.25,19.54-81.53l.4,4c-4.06-28.83-18-58.52-36.83-78.55s-42.26-30-61.95-26.42c-15.39,2.81-29.32,16.25-28.48,38.3C864.79,1175.24,882.67,1200.67,882.38,1224.42Zm770.84,162.78c-37.63,19.33-80,37.33-123.65,52.8H1920V1159.48C1849.68,1253.37,1759.09,1332.79,1653.22,1387.2Z"/>
<path fill-opacity=".5" d="M1621.31,242.87c0,8.95-5,17.45-12.08,22.91s-16,8.12-24.94,8.93c-7.09.65-14.77,0-20.39-4.36-7.56-5.89-9.15-17.15-6.22-26.28a35.21,35.21,0,0,1,18.3-20.81C1592.42,215.54,1621.24,221,1621.31,242.87ZM1920,1440V1294.47A788.66,788.66,0,0,1,1717.55,1440ZM1920,0V170.18c-76-67.47-182.35-105.59-280.83-103.24-78.3,1.86-151.64,29.29-200.84,87.89-104.16,124-70.95,336.48-199.66,436-72.12,55.74-173.36,57.31-264.26,77.07S785.94,746.2,788,838.59s94.77,146.81,159,201.26c88.23,74.75,114.73,126.94,114.64,239.78,0,61.6,4.5,115.36,33.4,160.37H0V0ZM971.63,583.69c60.69,33.94,139.29,22,195.48-13.77,43.31-27.54,77.19-71.38,93.44-121.8,13.46-41.75,15-88.79-1-130.11s-50.56-75.82-92.07-85.25-88.39,9.32-108.73,47.79c-10.92,20.67-14,45.18-25,65.85a100.26,100.26,0,0,1-6.58,10.73c-14.08,19.33-34.79,33.45-54.33,47.69-19.85,14.48-42.9,31.47-52.72,54.88a77.22,77.22,0,0,0-4.27,13.46C902.19,519.33,932.49,561.8,971.63,583.69ZM597.7,793.78c50.52-1.65,107.52-46.59,86-98.11A51.27,51.27,0,0,0,678,685.33c-17.16-23.75-52.56-29.32-81.78-21.69C552.63,675,507.91,734.45,543,773.17,556.09,787.68,577.33,794.45,597.7,793.78Zm229.63,436.13a31.69,31.69,0,0,0-5.68-12,21.33,21.33,0,0,0-9.9-7c-4.57-1.52-8-.83-12.11,1.32a21.92,21.92,0,0,0-10,10.48,19,19,0,0,0,.25,16.16c2.76,5.21,8.15,8.54,13.7,10.53,6.09,2.19,13.37,2.88,18.65-.87C828.1,1244.28,829,1236.87,827.33,1229.91Zm71.37,80.61c27.74,18.17,58.48,17.74,78.85-1.11s29.72-55.5,24-94l.4,4.66c-4.26-33.37-20-67.83-41.55-91.18s-48.64-35.15-71.57-31.19c-17.93,3.09-34.33,18.48-33.7,44,.68,27.94,21.06,57.52,20.35,85-.4,15.64-7.77,28.4-5,44.74C873.38,1288.48,886.37,1302.44,898.7,1310.52Z"/>
<path d="M1621.31,242.87c0,8.95-5,17.45-12.08,22.91s-16,8.12-24.94,8.93c-7.09.65-14.77,0-20.39-4.36-7.56-5.89-9.15-17.15-6.22-26.28a35.21,35.21,0,0,1,18.3-20.81C1592.42,215.54,1621.24,221,1621.31,242.87ZM1920,1440V1294.47A788.66,788.66,0,0,1,1717.55,1440Zm-875.71-160.37c0,61.6,4.49,115.36,33.39,160.37H0V0H1920V170.18c-76-67.47-182.35-105.59-280.83-103.24-84.73-2-165.38,25-218.2,87.89-104.15,124-71,336.48-199.66,436-72.12,55.74-173.36,57.31-264.26,77.07S768.59,746.2,770.59,838.59s94.78,146.81,159,201.26C1017.87,1114.6,1044.37,1166.79,1044.29,1279.63ZM971.63,583.69c60.69,33.94,139.29,22,195.48-13.77,43.31-27.54,77.19-71.38,93.44-121.8,13.46-41.75,15-88.79-1-130.11s-50.56-75.82-92.07-85.25-88.39,9.32-108.73,47.79c-10.92,20.67-14,45.18-25,65.85a100.26,100.26,0,0,1-6.58,10.73c-14.08,19.33-34.79,33.45-54.33,47.69-19.85,14.48-42.9,31.47-52.72,54.88a77.22,77.22,0,0,0-4.27,13.46C902.19,519.33,932.49,561.8,971.63,583.69ZM702.31,705.78a67.79,67.79,0,0,0-3.6-14c-12.48-33-49.34-48-82.88-45.38-50,3.91-113.57,66.46-85.57,122,10.48,20.79,31.72,34,53.92,37.84C639.22,815.79,712.36,773.84,702.31,705.78Zm125,524.13a31.69,31.69,0,0,0-5.68-12,21.33,21.33,0,0,0-9.9-7c-4.57-1.52-8-.83-12.11,1.32a21.92,21.92,0,0,0-10,10.48,19,19,0,0,0,.25,16.16c2.76,5.21,8.15,8.54,13.7,10.53,6.09,2.19,13.37,2.88,18.65-.87C828.1,1244.28,829,1236.87,827.33,1229.91Zm177.9-18.29.32,5c-3.89-35.78-20.87-72.39-44.93-96.88s-54.72-36.37-81.13-31.44c-20.65,3.86-39.9,20.9-39.94,48.32,0,30,22.44,61.26,20.81,90.81-.92,16.84-9.74,30.79-7.05,48.29,2.82,18.36,17.3,33,31.19,41.32,31.26,18.73,66.52,17.35,90.44-3.53S1010.66,1252.9,1005.23,1211.62Z"/>',
'portrait' => '<path fill-opacity=".2" d="M1701,1001.36c-10.23-8-12.37-23.19-8.41-35.53a47.59,47.59,0,0,1,24.75-28.16c22.23-10.44,61.2-3.07,61.3,26.52,0,12.11-6.76,23.61-16.34,31s-21.68,11-33.73,12.07C1719,1008.14,1708.6,1007.28,1701,1001.36ZM1920,0V816.64c-141.15-36-295.51-9.19-387.3,101.25-131,157.55-97.32,420.59-257.41,548.41-89.71,71.62-213.17,76.83-324.61,104.33S718.43,1674.07,717.9,1788.87c-.54,114.62,110.8,179.46,187.4,245.09,105.14,90.09,135.77,154.12,132,294.41-2.47,92.77,3.63,171.05,61.23,231.63H0V0ZM824.69,1275.65c-11.83,54.45,26,103.3,74.46,128.9,79.38,42,182.83,26,257.08-19.47,57.23-35.07,102.26-90.52,124.17-154,18.15-52.59,20.66-111.69.19-163.42s-65.6-94.68-120.07-106.06-116.27,12.69-143.43,61.25c-14.59,26.08-19,56.9-33.53,83a127.75,127.75,0,0,1-8.31,12.94c-19,26.14-47,45.23-73.48,64.5-26.85,19.57-58,42.55-71.3,74.21A104.38,104.38,0,0,0,824.69,1275.65ZM494.25,1582.17a63.9,63.9,0,0,0-6.32-12.59c-18.93-29-58.69-36.35-91.71-27.67-49.23,12.94-100.58,83.94-61.77,131.33,14.54,17.76,38.34,26.32,61.28,25.88C452.63,1698,517.57,1644.78,494.25,1582.17Zm210.6,716.92a42.9,42.9,0,0,0-7.68-16.25,28.82,28.82,0,0,0-13.39-9.51c-6.18-2-10.78-1.12-16.38,1.79a29.54,29.54,0,0,0-13.57,14.17c-3,6.91-3.19,15.19.34,21.86,3.72,7,11,11.55,18.52,14.24,8.24,3,18.08,3.89,25.22-1.18C705.9,2318.54,707.06,2308.51,704.85,2299.09Zm221-21.89.54,5.45c-5.48-39-24.3-79.14-49.8-106.23s-57.16-40.6-83.78-35.73c-20.82,3.8-39.65,22-38.52,51.8,1.24,32.67,25.42,67.06,25,99.17-.22,18.3-8.59,33.3-5.1,52.39,3.65,20,19,36.22,33.46,45.54,32.57,21,68.34,20.13,91.75-2.13S933.12,2322.21,925.83,2277.2ZM1715.91,2560H1920V2454a999.53,999.53,0,0,1-98.2,57.8C1788.77,2528.79,1753.06,2545,1715.91,2560Z"/>
<path fill-opacity=".5" d="M1778.65,964.19c0,12.11-6.76,23.61-16.34,31s-21.68,11-33.73,12.07c-9.59.88-20,0-27.57-5.9-10.23-8-12.37-23.19-8.41-35.53a47.59,47.59,0,0,1,24.75-28.16C1739.58,927.23,1778.55,934.6,1778.65,964.19ZM1920,0V736.93a530.62,530.62,0,0,0-117.2-10.67c-105.89,2.52-205.08,39.62-271.62,118.87-140.86,167.74-96,455.06-270,589.61-97.53,75.38-234.45,77.51-357.39,104.23s-254.88,105.94-252.17,230.89c2.7,124.76,128.18,198.55,215.11,272.2,119.32,101.09,155.16,171.68,155,324.28,0,73,4.66,137.79,32.07,193.66H0V0ZM900,1425.13c82.08,45.9,188.38,29.7,264.38-18.62,58.56-37.24,104.4-96.53,126.37-164.73,18.2-56.46,20.24-120.08-1.3-176s-68.38-102.55-124.52-115.29-119.54,12.6-147,64.63c-14.78,27.95-19,61.1-33.74,89.06a137.3,137.3,0,0,1-8.9,14.51c-19,26.14-47,45.23-73.48,64.5-26.85,19.57-58,42.55-71.3,74.21a104.38,104.38,0,0,0-5.78,18.21C806.1,1338.09,847.07,1395.53,900,1425.13ZM394.29,1709.27c68.32-2.24,145.42-63,116.37-132.7a69.28,69.28,0,0,0-7.81-14c-23.2-32.13-71.08-39.65-110.6-29.34-58.9,15.37-119.38,95.76-72,148.13C338,1701,366.74,1710.17,394.29,1709.27Zm310.56,589.82a42.9,42.9,0,0,0-7.68-16.25,28.82,28.82,0,0,0-13.39-9.51c-6.18-2-10.78-1.12-16.38,1.79a29.54,29.54,0,0,0-13.57,14.17c-3,6.91-3.19,15.19.34,21.86,3.72,7,11,11.55,18.52,14.24,8.24,3,18.08,3.89,25.22-1.18C705.9,2318.54,707.06,2308.51,704.85,2299.09Zm96.52,109c37.52,24.58,79.09,24,106.64-1.49s40.2-75.07,32.45-127.18l.54,6.31c-5.76-45.13-27-91.73-56.2-123.32S819,2114.9,788,2120.25c-24.25,4.18-46.42,25-45.58,59.47.93,37.78,28.48,77.78,27.53,114.9-.55,21.15-10.51,38.4-6.76,60.51C767.14,2378.31,784.7,2397.19,801.37,2408.11Z"/>
<path d="M1778.65,964.19c0,12.11-6.76,23.61-16.34,31s-21.68,11-33.73,12.07c-9.59.88-20,0-27.57-5.9-10.23-8-12.37-23.19-8.41-35.53a47.59,47.59,0,0,1,24.75-28.16C1739.58,927.23,1778.55,934.6,1778.65,964.19ZM998.27,2366.34c-.06,73,4.65,137.79,32.07,193.66H0V0H1920V736.93a530.62,530.62,0,0,0-117.2-10.67c-114.59-2.71-223.66,33.79-295.1,118.87-140.85,167.74-96,455.06-270,589.61-97.54,75.38-234.46,77.51-357.39,104.23s-254.88,105.94-252.18,230.89c2.7,124.76,128.18,198.55,215.11,272.2C962.54,2143.15,998.39,2213.74,998.27,2366.34ZM900,1425.13c82.08,45.9,188.38,29.7,264.38-18.62,58.56-37.24,104.4-96.53,126.37-164.73,18.2-56.46,20.24-120.08-1.3-176s-68.38-102.55-124.52-115.29-119.54,12.6-147,64.63c-14.78,27.95-19,61.1-33.74,89.06a137.3,137.3,0,0,1-8.9,14.51c-19,26.14-47,45.23-73.48,64.5-26.85,19.57-58,42.55-71.3,74.21a104.38,104.38,0,0,0-5.78,18.21C806.1,1338.09,847.07,1395.53,900,1425.13ZM535.77,1590.25a91.53,91.53,0,0,0-4.87-18.92c-16.88-44.69-66.73-64.92-112.09-61.37-67.63,5.29-153.59,89.89-115.73,164.94,14.18,28.12,42.9,45.94,72.93,51.17C450.45,1739,549.36,1682.29,535.77,1590.25Zm169.08,708.84a42.9,42.9,0,0,0-7.68-16.25,28.82,28.82,0,0,0-13.39-9.51c-6.18-2-10.78-1.12-16.38,1.79a29.54,29.54,0,0,0-13.57,14.17c-3,6.91-3.19,15.19.34,21.86,3.72,7,11,11.55,18.52,14.24,8.24,3,18.08,3.89,25.22-1.18C705.9,2318.54,707.06,2308.51,704.85,2299.09Zm240.6-24.74.43,6.77c-5.26-48.39-28.22-97.9-60.77-131s-74-49.19-109.72-42.52c-27.92,5.22-54,28.27-54,65.35,0,40.63,30.35,82.85,28.15,122.82-1.25,22.77-13.18,41.63-9.54,65.3,3.83,24.83,23.4,44.63,42.19,55.88,42.28,25.33,90,23.47,122.31-4.77S952.79,2330.19,945.45,2274.35Z"/>',
'square' => '<path fill-opacity=".2" d="M1787.6,508.31c-9.13-7.11-11-20.7-7.5-31.72a42.41,42.41,0,0,1,22.08-25.12c19.84-9.32,54.62-2.74,54.71,23.66,0,10.81-6,21.08-14.59,27.66s-19.34,9.8-30.09,10.78C1803.65,514.35,1794.38,513.59,1787.6,508.31ZM1920,0V332.19c-106.89-11-214.22,19.33-282.61,101.62-116.87,140.61-86.85,375.36-229.73,489.44-80.06,63.91-190.24,68.56-289.69,93.1s-207.28,92.32-207.75,194.77c-.48,102.29,98.88,160.16,167.25,218.74,93.83,80.4,121.16,137.54,117.83,262.74-2.5,93.78,4.83,171,77.62,227.4H0V0ZM1005.52,753.09c-10.55,48.6,23.21,92.2,66.45,115,70.85,37.44,163.17,23.23,229.44-17.38,51.07-31.31,91.26-80.79,110.82-137.48,16.2-46.94,18.44-99.69.16-145.85s-58.55-84.5-107.15-94.65-103.77,11.32-128,54.66c-13,23.27-16.91,50.78-29.92,74.07a115.11,115.11,0,0,1-7.42,11.54c-17,23.33-42,40.37-65.58,57.56-24,17.47-51.78,38-63.63,66.24A93.48,93.48,0,0,0,1005.52,753.09Zm-294.9,273.56a56.48,56.48,0,0,0-5.65-11.23c-16.88-25.88-52.37-32.45-81.84-24.7-43.93,11.55-89.76,74.91-55.13,117.21,13,15.85,34.22,23.49,54.7,23.1C673.48,1130.06,731.43,1082.53,710.62,1026.65Zm188,639.83a38.29,38.29,0,0,0-6.85-14.51,25.79,25.79,0,0,0-12-8.49c-5.52-1.82-9.63-1-14.63,1.6A26.44,26.44,0,0,0,853,1657.72c-2.68,6.17-2.84,13.57.31,19.51,3.32,6.29,9.83,10.31,16.53,12.71,7.36,2.64,16.14,3.48,22.51-1C899.5,1683.83,900.55,1674.88,898.57,1666.48Zm197.22-19.54.48,4.86c-4.89-34.8-21.69-70.63-44.44-94.81s-51-36.23-74.78-31.89c-18.58,3.4-35.39,19.62-34.38,46.23,1.11,29.17,22.69,59.85,22.35,88.52-.2,16.33-7.67,29.71-4.56,46.75,3.26,17.87,16.95,32.32,29.86,40.64,29.07,18.71,61,18,81.88-1.9S1102.29,1687.11,1095.79,1646.94ZM1746.31,1920H1920v-76.82q-12.18,6.75-24.6,13.14C1850,1879.64,1799,1901.34,1746.31,1920Z"/>
<path fill-opacity=".5" d="M1856.89,475.13c0,10.81-6,21.08-14.59,27.66s-19.34,9.8-30.09,10.78c-8.56.78-17.83,0-24.61-5.26-9.13-7.11-11-20.7-7.5-31.72a42.41,42.41,0,0,1,22.08-25.12C1822,442.15,1856.8,448.73,1856.89,475.13ZM1920,0V263.76c-13.93-1-27.81-1.3-41.56-1-94.5,2.25-183,35.36-242.41,106.08-125.71,149.71-85.63,406.13-241,526.2-87,67.28-209.24,69.18-319,93s-227.47,94.55-225,206.06c2.4,111.34,114.39,177.19,192,242.92,106.49,90.22,138.48,153.22,138.37,289.41-.05,74.32,5.43,139.2,40.28,193.51H0V0ZM932.11,1559.94c.83,33.72,25.42,69.42,24.57,102.55-.49,18.87-9.38,34.27-6,54,3.51,20.69,19.18,37.54,34.06,47.29,33.48,21.93,70.59,21.41,95.17-1.34s35.88-67,29-113.49l.48,5.62c-5.14-40.27-24.09-81.86-50.15-110s-58.7-42.42-86.39-37.65C951.15,1510.59,931.36,1529.17,932.11,1559.94ZM725.26,1021.66a62.07,62.07,0,0,0-7-12.48c-20.72-28.67-63.45-35.38-98.71-26.18C567,996.72,513,1068.47,555.34,1115.2c15.85,17.51,41.48,25.68,66.07,24.88C682.38,1138.08,751.19,1083.84,725.26,1021.66Zm128.08,655.57c3.32,6.29,9.83,10.31,16.53,12.71,7.36,2.64,16.14,3.48,22.51-1,7.12-5.06,8.17-14,6.19-22.41a38.29,38.29,0,0,0-6.85-14.51,25.79,25.79,0,0,0-12-8.49c-5.52-1.82-9.63-1-14.63,1.6A26.44,26.44,0,0,0,853,1657.72C850.35,1663.89,850.19,1671.29,853.34,1677.23Zm567-1111.4c-19.23-49.88-61-91.52-111.13-102.89s-106.68,11.24-131.23,57.68c-13.18,25-16.94,54.53-30.11,79.48a121.81,121.81,0,0,1-7.94,12.95c-17,23.33-42,40.37-65.58,57.56-24,17.47-51.78,38-63.63,66.24a93.48,93.48,0,0,0-5.16,16.24c-16.59,55.73,20,107,67.22,133.41,73.25,41,168.12,26.51,235.94-16.62,52.27-33.23,93.17-86.15,112.78-147C1437.7,672.48,1439.53,615.71,1420.3,565.83Z"/>
<path d="M1856.89,475.13c0,10.81-6,21.08-14.59,27.66s-19.34,9.8-30.09,10.78c-8.56.78-17.83,0-24.61-5.26-9.13-7.11-11-20.7-7.5-31.72a42.41,42.41,0,0,1,22.08-25.12C1822,442.15,1856.8,448.73,1856.89,475.13ZM1160.43,1726.49c0,74.32,5.43,139.2,40.28,193.51H0V0H1920V263.76c-13.93-1-27.81-1.3-41.56-1-102.27-2.42-199.6,30.16-263.36,106.08-125.71,149.71-85.63,406.13-241,526.2-87,67.28-209.24,69.18-319,93s-227.47,94.55-225.05,206.06c2.4,111.34,114.39,177.19,192,242.92C1128.55,1527.3,1160.54,1590.3,1160.43,1726.49Zm-87.69-840c73.25,41,168.12,26.51,235.94-16.62,52.27-33.23,93.17-86.15,112.78-147,16.24-50.39,18.07-107.16-1.16-157s-61-91.52-111.13-102.89-106.68,11.24-131.23,57.68c-13.18,25-16.94,54.53-30.11,79.48a121.81,121.81,0,0,1-7.94,12.95c-17,23.33-42,40.37-65.58,57.56-24,17.47-51.78,38-63.63,66.24a93.48,93.48,0,0,0-5.16,16.24C988.93,808.82,1025.5,860.08,1072.74,886.5ZM747.67,1033.86a81.7,81.7,0,0,0-4.34-16.88c-15.07-39.89-59.55-57.94-100-54.77-60.35,4.72-137.07,80.22-103.28,147.2,12.66,25.09,38.29,41,65.08,45.67C671.53,1166.65,759.81,1116,747.67,1033.86Zm150.9,632.62a38.29,38.29,0,0,0-6.85-14.51,25.79,25.79,0,0,0-12-8.49c-5.52-1.82-9.63-1-14.63,1.6A26.44,26.44,0,0,0,853,1657.72c-2.68,6.17-2.84,13.57.31,19.51,3.32,6.29,9.83,10.31,16.53,12.71,7.36,2.64,16.14,3.48,22.51-1C899.5,1683.83,900.55,1674.88,898.57,1666.48Zm214.72-22.08.39,6c-4.69-43.19-25.19-87.38-54.23-116.94s-66.05-43.9-97.93-37.94c-24.92,4.65-48.16,25.23-48.2,58.32-.05,36.26,27.08,73.94,25.12,109.61-1.12,20.32-11.76,37.15-8.51,58.28,3.41,22.16,20.88,39.83,37.64,49.87,37.74,22.61,80.3,20.95,109.16-4.26S1119.85,1694.23,1113.29,1644.4Z"/>',
),
'default-inverted' => array(
'landscape' => '<path fill-opacity=".2" d="M827.33,1229.91c1.64,7,.77,14.37-5.13,18.57-5.28,3.75-12.56,3.06-18.65.87-5.55-2-10.94-5.32-13.7-10.53a19,19,0,0,1-.25-16.16,21.92,21.92,0,0,1,10-10.48c4.14-2.15,7.54-2.84,12.11-1.32a21.33,21.33,0,0,1,9.9,7A31.69,31.69,0,0,1,827.33,1229.91ZM1920,170.18V1294.47A788.66,788.66,0,0,1,1717.55,1440H1077.68c-28.9-45-33.44-98.77-33.39-160.37.08-112.84-26.42-165-114.65-239.78-64.27-54.45-157.06-109-159-201.26s95.56-151,186.46-170.73,192.14-21.33,264.26-77.07c128.71-99.48,95.51-311.93,199.66-436,52.82-62.91,133.47-89.9,218.2-87.89C1737.65,64.59,1844,102.71,1920,170.18Zm-298.69,72.69c-.07-21.88-28.89-27.33-45.33-19.61a35.21,35.21,0,0,0-18.3,20.81c-2.93,9.13-1.34,20.39,6.22,26.28,5.62,4.38,13.3,5,20.39,4.36,8.91-.81,17.85-3.47,24.94-8.93S1621.34,251.82,1621.31,242.87ZM698.71,691.79c-12.48-33-49.34-48-82.88-45.38-50,3.91-113.57,66.47-85.57,122,10.48,20.79,31.72,34,53.92,37.84,55,9.58,128.18-32.37,118.13-100.43A67.79,67.79,0,0,0,698.71,691.79Zm272.92-108.1c60.69,33.94,139.29,22,195.48-13.77,43.31-27.54,77.19-71.38,93.44-121.8,13.46-41.75,15-88.79-1-130.11s-50.56-75.82-92.07-85.25-88.39,9.32-108.73,47.79c-10.92,20.67-14,45.18-25,65.85a100.26,100.26,0,0,1-6.58,10.73c-14.08,19.33-34.79,33.45-54.33,47.69-19.85,14.48-42.9,31.47-52.72,54.88a77.22,77.22,0,0,0-4.27,13.46C902.19,519.33,932.49,561.8,971.63,583.69Zm33.92,632.93c-3.89-35.78-20.87-72.39-44.93-96.88s-54.72-36.37-81.13-31.44c-20.65,3.86-39.9,20.9-39.94,48.32,0,30,22.44,61.26,20.81,90.81-.92,16.84-9.74,30.79-7.05,48.29,2.82,18.36,17.3,33,31.19,41.32,31.26,18.73,66.52,17.35,90.44-3.53s35.72-60.61,30.29-101.89Z"/>
<path fill-opacity=".5" d="M915.94,473.16a77.22,77.22,0,0,1,4.27-13.46c9.82-23.41,32.87-40.4,52.72-54.88,19.54-14.24,40.25-28.36,54.33-47.69a93.18,93.18,0,0,0,6.15-9.56c10.78-19.29,14-42.09,24.79-61.37,20.09-35.9,65.79-53.7,106.06-45.29s73.64,40.17,88.78,78.42,13.28,81.95-.14,120.84c-16.21,47-49.5,88-91.82,113.9-54.9,33.65-131.39,45.43-190.09,14.4C935.17,549.54,907.2,513.42,915.94,473.16Zm-94.29,744.73a21.33,21.33,0,0,0-9.9-7c-4.57-1.52-8-.83-12.11,1.32a21.92,21.92,0,0,0-10,10.48,19,19,0,0,0,.25,16.16c2.76,5.21,8.15,8.54,13.7,10.53,6.09,2.19,13.37,2.88,18.65-.87,5.9-4.2,6.77-11.61,5.13-18.57A31.69,31.69,0,0,0,821.65,1217.89ZM1920,170.18V1294.47A788.66,788.66,0,0,1,1717.55,1440H1095c-28.9-45-33.44-98.77-33.4-160.37.09-112.84-26.41-165-114.64-239.78-64.28-54.45-157.06-109-159-201.26s95.56-151,186.46-170.73,192.14-21.33,264.26-77.07c128.71-99.48,95.5-311.93,199.66-436,49.2-58.6,122.54-86,200.84-87.89C1737.65,64.59,1844,102.71,1920,170.18Zm-344,53.08a35.21,35.21,0,0,0-18.3,20.81c-2.93,9.13-1.34,20.39,6.22,26.28,5.62,4.38,13.3,5,20.39,4.36,8.91-.81,17.85-3.47,24.94-8.93s12.11-14,12.08-22.91C1621.24,221,1592.42,215.54,1576,223.26Zm-574,996.78c-4.26-33.37-20-67.83-41.55-91.18s-48.64-35.15-71.57-31.19c-17.93,3.09-34.33,18.48-33.7,44,.68,27.94,21.06,57.52,20.35,85-.4,15.64-7.77,28.4-5,44.74,2.9,17.14,15.89,31.1,28.22,39.18,27.74,18.17,58.48,17.74,78.85-1.11s29.72-55.5,24-94ZM678,685.33c-17.16-23.75-52.56-29.32-81.78-21.69C552.63,675,507.91,734.45,543,773.17c13.13,14.51,34.37,21.28,54.74,20.61,50.52-1.65,107.52-46.59,86-98.11A51.27,51.27,0,0,0,678,685.33Z"/>
<path d="M671.61,699.81c17.24,46.29-30.77,85.67-72.85,86.47-17,.33-34.56-6-45.31-19.13-28.69-35,9.27-87.54,45.67-97.11,24.42-6.42,53.82-1,67.81,20.46A46.88,46.88,0,0,1,671.61,699.81ZM971,568.47c58.7,31,135.19,19.25,190.09-14.4,42.32-25.93,75.61-66.93,91.82-113.9,13.42-38.89,15.28-82.59.14-120.84s-48.51-70-88.78-78.42-86,9.39-106.06,45.29c-10.78,19.28-14,42.08-24.79,61.37a93.18,93.18,0,0,1-6.15,9.56c-14.08,19.33-34.79,33.45-54.33,47.69-19.85,14.48-42.9,31.47-52.72,54.88a77.22,77.22,0,0,0-4.27,13.46C907.2,513.42,935.17,549.54,971,568.47ZM821.65,1217.89a21.33,21.33,0,0,0-9.9-7c-4.57-1.52-8-.83-12.11,1.32a21.92,21.92,0,0,0-10,10.48,19,19,0,0,0,.25,16.16c2.76,5.21,8.15,8.54,13.7,10.53,6.09,2.19,13.37,2.88,18.65-.87,5.9-4.2,6.77-11.61,5.13-18.57A31.69,31.69,0,0,0,821.65,1217.89ZM1920,257.8v901.68c-70.32,93.89-160.91,173.31-266.78,227.72-37.63,19.33-80,37.33-123.65,52.8h-392c-60.36-46.76-66.44-110.72-64.37-188.45,2.77-103.72-19.88-151.07-97.62-217.68-56.64-48.53-139-96.48-138.57-181.23s89.72-141,172.12-161.37,173.69-24.18,240-77.14c118.38-94.51,93.5-289,190.33-405.5,103.33-124.33,313.9-105.42,434,2.82Q1898.3,233.88,1920,257.8Zm-298.69-14.93c-.07-21.88-28.89-27.33-45.33-19.61a35.21,35.21,0,0,0-18.3,20.81c-2.93,9.13-1.34,20.39,6.22,26.28,5.62,4.38,13.3,5,20.39,4.36,8.91-.81,17.85-3.47,24.94-8.93S1621.34,251.82,1621.31,242.87ZM991.13,1217.75c-4.06-28.83-18-58.52-36.83-78.55s-42.26-30-61.95-26.42c-15.39,2.81-29.32,16.25-28.48,38.3.92,24.16,18.8,49.59,18.51,73.34-.16,13.52-6.35,24.62-3.77,38.73,2.7,14.81,14,26.78,24.74,33.67,24.08,15.5,50.53,14.89,67.84-1.57s24.92-48.25,19.54-81.53Z"/>',
'portrait' => '<path fill-opacity=".2" d="M704.85,2299.09c2.21,9.42,1,19.45-6.94,25.12-7.14,5.07-17,4.13-25.22,1.18-7.51-2.69-14.8-7.2-18.52-14.24-3.53-6.67-3.35-15-.34-21.86a29.54,29.54,0,0,1,13.57-14.17c5.6-2.91,10.2-3.84,16.38-1.79a28.82,28.82,0,0,1,13.39,9.51A42.9,42.9,0,0,1,704.85,2299.09ZM1920,736.93V2560H1030.34c-27.42-55.87-32.13-120.7-32.07-193.66.12-152.6-35.73-223.19-155-324.28-86.93-73.65-212.41-147.44-215.11-272.2-2.7-124.95,129.24-204.16,252.18-230.89s259.85-28.85,357.39-104.23c174.07-134.55,129.17-421.87,270-589.61,71.44-85.08,180.51-121.58,295.1-118.87A530.62,530.62,0,0,1,1920,736.93ZM1778.65,964.19c-.1-29.59-39.07-37-61.3-26.52a47.59,47.59,0,0,0-24.75,28.16c-4,12.34-1.82,27.57,8.41,35.53,7.59,5.92,18,6.78,27.57,5.9,12.05-1.09,24.14-4.69,33.73-12.07S1778.7,976.3,1778.65,964.19ZM530.9,1571.33c-16.88-44.69-66.73-64.92-112.09-61.37-67.63,5.29-153.59,89.89-115.73,164.94,14.18,28.12,42.9,45.94,72.93,51.17,74.44,13,173.35-43.78,159.76-135.82A91.53,91.53,0,0,0,530.9,1571.33ZM900,1425.13c82.08,45.9,188.38,29.7,264.38-18.62,58.56-37.24,104.4-96.53,126.37-164.73,18.2-56.46,20.24-120.08-1.3-176s-68.38-102.55-124.52-115.29-119.54,12.6-147,64.63c-14.78,27.95-19,61.1-33.74,89.06a137.3,137.3,0,0,1-8.9,14.51c-19,26.14-47,45.23-73.48,64.5-26.85,19.57-58,42.55-71.3,74.21a104.38,104.38,0,0,0-5.78,18.21C806.1,1338.09,847.07,1395.53,900,1425.13Zm45.88,856c-5.26-48.39-28.22-97.9-60.77-131s-74-49.19-109.72-42.52c-27.92,5.22-54,28.27-54,65.35,0,40.63,30.35,82.85,28.15,122.82-1.25,22.77-13.18,41.63-9.54,65.3,3.83,24.83,23.4,44.63,42.19,55.88,42.28,25.33,90,23.47,122.31-4.77s48.31-82,41-137.81Z"/>
<path fill-opacity=".5" d="M824.69,1275.65a104.38,104.38,0,0,1,5.78-18.21c13.28-31.66,44.45-54.64,71.3-74.21,26.43-19.27,54.43-38.36,73.48-64.5a127.75,127.75,0,0,0,8.31-12.94c14.58-26.09,18.94-56.91,33.53-83,27.16-48.56,89-72.62,143.43-61.25s99.59,54.33,120.07,106.06,18,110.83-.19,163.42c-21.91,63.53-66.94,119-124.17,154-74.25,45.51-177.7,61.43-257.08,19.47C850.7,1379,812.86,1330.1,824.69,1275.65ZM697.17,2282.84a28.82,28.82,0,0,0-13.39-9.51c-6.18-2-10.78-1.12-16.38,1.79a29.54,29.54,0,0,0-13.57,14.17c-3,6.91-3.19,15.19.34,21.86,3.72,7,11,11.55,18.52,14.24,8.24,3,18.08,3.89,25.22-1.18,8-5.67,9.15-15.7,6.94-25.12A42.9,42.9,0,0,0,697.17,2282.84ZM1920,736.93V2560H1053.81c-27.41-55.87-32.12-120.7-32.07-193.66.12-152.6-35.72-223.19-155-324.28-86.93-73.65-212.41-147.44-215.11-272.2C648.88,1644.91,780.83,1565.7,903.76,1539s259.86-28.85,357.39-104.23c174.08-134.55,129.17-421.87,270-589.61,66.54-79.25,165.73-116.35,271.62-118.87A530.62,530.62,0,0,1,1920,736.93Zm-191.42,270.33c12.05-1.09,24.14-4.69,33.73-12.07s16.39-18.89,16.34-31c-.1-29.59-39.07-37-61.3-26.52a47.59,47.59,0,0,0-24.75,28.16c-4,12.34-1.82,27.57,8.41,35.53C1708.6,1007.28,1719,1008.14,1728.58,1007.26ZM941,2285.75c-5.76-45.13-27-91.73-56.2-123.32S819,2114.9,788,2120.25c-24.25,4.18-46.42,25-45.58,59.47.93,37.78,28.48,77.78,27.53,114.9-.55,21.15-10.51,38.4-6.76,60.51,3.94,23.18,21.5,42.06,38.17,53,37.52,24.58,79.09,24,106.64-1.49s40.2-75.07,32.45-127.18ZM502.85,1562.6c-23.2-32.13-71.08-39.65-110.6-29.34-58.9,15.37-119.38,95.76-72,148.13,17.76,19.62,46.48,28.78,74,27.88,68.32-2.24,145.42-63,116.37-132.7A69.28,69.28,0,0,0,502.85,1562.6Z"/>
<path d="M925.83,2277.2c7.29,45-3,88-26.42,110.26s-59.18,23.09-91.75,2.13c-14.47-9.32-29.81-25.51-33.46-45.54-3.49-19.09,4.88-34.09,5.1-52.39.39-32.11-23.79-66.5-25-99.17-1.13-29.82,17.7-48,38.52-51.8,26.62-4.87,58.29,8.63,83.78,35.73s44.32,67.24,49.8,106.23Zm-437.9-707.62c-18.93-29-58.69-36.35-91.71-27.67-49.23,12.94-100.58,83.94-61.77,131.33,14.54,17.76,38.34,26.32,61.28,25.88,56.9-1.09,121.84-54.34,98.52-116.95A63.9,63.9,0,0,0,487.93,1569.58Zm411.22-165c79.38,42,182.83,26,257.08-19.47,57.23-35.08,102.26-90.52,124.17-154,18.15-52.59,20.66-111.69.19-163.42s-65.6-94.68-120.07-106.06-116.27,12.69-143.43,61.25c-14.59,26.08-19,56.9-33.53,83a127.75,127.75,0,0,1-8.31,12.94c-19,26.14-47,45.23-73.48,64.5-26.85,19.57-58,42.55-71.3,74.21a104.38,104.38,0,0,0-5.78,18.21C812.86,1330.1,850.7,1379,899.15,1404.55ZM1920,816.64V2454a999.53,999.53,0,0,1-98.2,57.8c-33,17-68.74,33.18-105.89,48.19H1098.56c-57.6-60.58-63.7-138.86-61.23-231.63,3.74-140.29-26.89-204.32-132-294.41-76.6-65.63-187.94-130.47-187.4-245.09.53-114.8,121.34-190.75,232.78-218.24s234.9-32.71,324.61-104.33c160.09-127.82,126.45-390.86,257.41-548.41C1624.49,807.45,1778.85,780.59,1920,816.64ZM1778.65,964.19c-.1-29.59-39.07-37-61.3-26.52a47.59,47.59,0,0,0-24.75,28.16c-4,12.34-1.82,27.57,8.41,35.53,7.59,5.92,18,6.78,27.57,5.9,12.05-1.09,24.14-4.69,33.73-12.07S1778.7,976.3,1778.65,964.19ZM697.17,2282.84a28.82,28.82,0,0,0-13.39-9.51c-6.18-2-10.78-1.12-16.38,1.79a29.54,29.54,0,0,0-13.57,14.17c-3,6.91-3.19,15.19.34,21.86,3.72,7,11,11.55,18.52,14.24,8.24,3,18.08,3.89,25.22-1.18,8-5.67,9.15-15.7,6.94-25.12A42.9,42.9,0,0,0,697.17,2282.84Z"/>',
'square' => '<path fill-opacity=".2" d="M898.57,1666.48c2,8.4.93,17.35-6.19,22.41-6.37,4.53-15.15,3.69-22.51,1-6.7-2.4-13.21-6.42-16.53-12.71-3.15-5.94-3-13.34-.31-19.51a26.44,26.44,0,0,1,12.11-12.64c5-2.59,9.11-3.42,14.63-1.6a25.79,25.79,0,0,1,12,8.49A38.29,38.29,0,0,1,898.57,1666.48ZM1920,263.76V1920H1200.71c-34.85-54.31-40.33-119.19-40.28-193.51.11-136.19-31.88-199.19-138.37-289.41-77.58-65.73-189.57-131.58-192-242.92C827.67,1082.65,945.43,1012,1055.14,988.1s231.91-25.75,319-93c155.35-120.07,115.27-376.49,241-526.2,63.76-75.92,161.09-108.5,263.36-106.08C1892.19,262.46,1906.07,262.8,1920,263.76Zm-63.11,211.37c-.09-26.4-34.87-33-54.71-23.66a42.41,42.41,0,0,0-22.08,25.12c-3.54,11-1.63,24.61,7.5,31.72,6.78,5.28,16.05,6,24.61,5.26,10.75-1,21.54-4.19,30.09-10.78S1856.93,485.94,1856.89,475.13ZM743.33,1017c-15.07-39.89-59.55-57.94-100-54.77-60.35,4.72-137.07,80.22-103.28,147.2,12.66,25.09,38.29,41,65.08,45.67,66.44,11.57,154.72-39.07,142.58-121.22A81.7,81.7,0,0,0,743.33,1017ZM1072.74,886.5c73.25,41,168.12,26.51,235.94-16.62,52.27-33.23,93.17-86.15,112.78-147,16.24-50.39,18.07-107.16-1.16-157s-61-91.52-111.13-102.89-106.68,11.24-131.23,57.68c-13.18,25-16.94,54.53-30.11,79.48a121.81,121.81,0,0,1-7.94,12.95c-17,23.33-42,40.37-65.58,57.56-24,17.47-51.78,38-63.63,66.24a93.48,93.48,0,0,0-5.16,16.24C988.93,808.82,1025.5,860.08,1072.74,886.5Zm40.94,763.94c-4.69-43.19-25.19-87.38-54.23-116.94s-66.05-43.9-97.93-37.94c-24.92,4.65-48.16,25.23-48.2,58.32-.05,36.26,27.08,73.94,25.12,109.61-1.12,20.32-11.76,37.16-8.51,58.28,3.41,22.16,20.88,39.83,37.64,49.87,37.74,22.61,80.3,20.95,109.16-4.26s43.12-73.15,36.56-123Z"/>
<path fill-opacity=".5" d="M1005.52,753.09a93.48,93.48,0,0,1,5.16-16.24c11.85-28.26,39.67-48.77,63.63-66.24,23.59-17.19,48.58-34.23,65.58-57.56a115.11,115.11,0,0,0,7.42-11.54c13-23.29,16.9-50.8,29.92-74.07,24.24-43.34,79.41-64.82,128-54.66s88.88,48.48,107.15,94.65,16,98.91-.16,145.85c-19.56,56.69-59.75,106.17-110.82,137.48-66.27,40.61-158.59,54.82-229.44,17.38C1028.73,845.29,995,801.69,1005.52,753.09ZM891.72,1652a25.79,25.79,0,0,0-12-8.49c-5.52-1.82-9.63-1-14.63,1.6A26.44,26.44,0,0,0,853,1657.72c-2.68,6.17-2.84,13.57.31,19.51,3.32,6.29,9.83,10.31,16.53,12.71,7.36,2.64,16.14,3.48,22.51-1,7.12-5.06,8.17-14,6.19-22.41A38.29,38.29,0,0,0,891.72,1652ZM1920,263.76V1920H1221.66c-34.85-54.31-40.33-119.19-40.28-193.51.11-136.19-31.88-199.19-138.37-289.41-77.58-65.73-189.57-131.58-192-242.92-2.42-111.51,115.34-182.21,225-206.06s231.91-25.75,319-93C1550.4,775,1510.32,518.58,1636,368.87c59.39-70.72,147.91-103.83,242.41-106.08C1892.19,262.46,1906.07,262.8,1920,263.76ZM1802.18,451.47a42.41,42.41,0,0,0-22.08,25.12c-3.54,11-1.63,24.61,7.5,31.72,6.78,5.28,16.05,6,24.61,5.26,10.75-1,21.54-4.19,30.09-10.78s14.63-16.85,14.59-27.66C1856.8,448.73,1822,442.15,1802.18,451.47ZM1109.32,1654.56c-5.14-40.27-24.09-81.86-50.15-110s-58.7-42.42-86.39-37.65c-21.63,3.73-41.42,22.31-40.67,53.08.83,33.72,25.42,69.42,24.57,102.55-.49,18.87-9.38,34.27-6,54,3.51,20.69,19.18,37.54,34.06,47.29,33.48,21.93,70.59,21.41,95.17-1.34s35.88-67,29-113.49Zm-391-645.38c-20.72-28.67-63.45-35.38-98.71-26.18C567,996.72,513,1068.47,555.34,1115.2c15.85,17.51,41.48,25.68,66.07,24.88,61-2,129.78-56.24,103.85-118.42A62.07,62.07,0,0,0,718.3,1009.18Z"/>
<path d="M1637.39,433.81c-116.87,140.61-86.85,375.36-229.73,489.44-80.06,63.91-190.24,68.56-289.69,93.1s-207.28,92.32-207.75,194.77c-.48,102.29,98.88,160.16,167.25,218.74,93.83,80.4,121.16,137.54,117.83,262.74-2.5,93.78,4.83,171,77.62,227.4h473.39c52.68-18.66,103.72-40.36,149.09-63.68q12.42-6.39,24.6-13.14v-1511C1813.11,321.22,1705.78,351.52,1637.39,433.81Zm204.91,69c-8.55,6.59-19.34,9.8-30.09,10.78-8.56.78-17.83,0-24.61-5.26-9.13-7.11-11-20.7-7.5-31.72a42.41,42.41,0,0,1,22.08-25.12c19.84-9.32,54.62-2.74,54.71,23.66C1856.93,485.94,1850.86,496.21,1842.3,502.79Zm-836.78,250.3a93.48,93.48,0,0,1,5.16-16.24c11.85-28.26,39.67-48.77,63.63-66.24,23.59-17.19,48.58-34.23,65.58-57.56a115.11,115.11,0,0,0,7.42-11.54c13-23.29,16.9-50.8,29.92-74.07,24.24-43.34,79.41-64.82,128-54.66s88.88,48.48,107.15,94.65,16,98.91-.16,145.85c-19.56,56.69-59.75,106.17-110.82,137.48-66.27,40.61-158.59,54.82-229.44,17.38C1028.73,845.29,995,801.69,1005.52,753.09Zm-294.9,273.56c20.81,55.88-37.14,103.41-87.92,104.38-20.48.39-41.72-7.25-54.7-23.1-34.63-42.3,11.2-105.66,55.13-117.21,29.47-7.75,65-1.18,81.84,24.7A56.48,56.48,0,0,1,710.62,1026.65Zm188,639.83c2,8.4.93,17.35-6.19,22.41-6.37,4.53-15.15,3.69-22.51,1-6.7-2.4-13.21-6.42-16.53-12.71-3.15-5.94-3-13.34-.31-19.51a26.44,26.44,0,0,1,12.11-12.64c5-2.59,9.11-3.42,14.63-1.6a25.79,25.79,0,0,1,12,8.49A38.29,38.29,0,0,1,898.57,1666.48Zm197.22-19.54c6.5,40.17-2.7,78.53-23.59,98.4s-52.81,20.61-81.88,1.9c-12.91-8.32-26.6-22.77-29.86-40.64-3.11-17,4.36-30.42,4.56-46.75.34-28.67-21.24-59.35-22.35-88.52-1-26.61,15.8-42.83,34.38-46.23,23.76-4.34,52,7.71,74.78,31.89s39.55,60,44.44,94.81Z"/>',
),
'rotated' => array(
'landscape' => '<path fill-opacity=".2" d="M508.31,132.4c-7.11,9.13-20.7,11-31.72,7.5a42.41,42.41,0,0,1-25.12-22.08C442.15,98,448.73,63.2,475.13,63.11c10.81,0,21.08,6,27.66,14.59s9.8,19.34,10.78,30.09C514.35,116.35,513.59,125.62,508.31,132.4ZM0,0H332.19c-11,106.89,19.33,214.22,101.62,282.61,140.61,116.87,375.36,86.85,489.44,229.73,63.91,80.06,68.56,190.24,93.1,289.69s92.32,207.28,194.77,207.75c102.29.48,160.16-98.88,218.74-167.25,80.4-93.83,137.54-121.16,262.74-117.83,93.78,2.5,171-4.83,227.4-77.62V1440H0ZM753.09,914.48c48.6,10.55,92.2-23.21,115-66.45,37.44-70.85,23.23-163.17-17.38-229.44C819.45,567.52,770,527.33,713.28,507.77c-46.94-16.2-99.69-18.44-145.85-.16s-84.5,58.55-94.65,107.15,11.32,103.77,54.66,128c23.27,13,50.78,16.91,74.07,29.92a115.11,115.11,0,0,1,11.54,7.42c23.33,17,40.37,42,57.56,65.58,17.47,24,38,51.78,66.24,63.63A93.48,93.48,0,0,0,753.09,914.48Zm273.56,294.9a56.48,56.48,0,0,0-11.23,5.65c-25.88,16.88-32.45,52.37-24.7,81.84,11.55,43.93,74.91,89.76,117.21,55.13,15.85-13,23.49-34.22,23.1-54.7C1130.06,1246.52,1082.53,1188.57,1026.65,1209.38Zm639.83-188a38.29,38.29,0,0,0-14.51,6.85,25.79,25.79,0,0,0-8.49,12c-1.82,5.52-1,9.63,1.6,14.63a26.44,26.44,0,0,0,12.64,12.11c6.17,2.68,13.57,2.84,19.51-.31,6.29-3.32,10.31-9.83,12.71-16.53,2.64-7.36,3.48-16.14-1-22.51C1683.83,1020.5,1674.88,1019.45,1666.48,1021.43Zm-19.54-197.22,4.86-.48c-34.8,4.89-70.63,21.69-94.81,44.44s-36.23,51-31.89,74.78c3.4,18.58,19.62,35.39,46.23,34.38,29.17-1.11,59.85-22.69,88.52-22.35,16.33.2,29.71,7.67,46.75,4.56,17.87-3.26,32.32-16.95,40.64-29.86,18.71-29.07,18-61-1.9-81.88S1687.11,817.71,1646.94,824.21ZM1920,173.69V0h-76.82q6.75,12.18,13.14,24.6C1879.64,70,1901.34,121,1920,173.69Z"/>
<path fill-opacity=".5" d="M475.13,63.11c10.81,0,21.08,6,27.66,14.59s9.8,19.34,10.78,30.09c.78,8.56,0,17.83-5.26,24.61-7.11,9.13-20.7,11-31.72,7.5a42.41,42.41,0,0,1-25.12-22.08C442.15,98,448.73,63.2,475.13,63.11ZM0,0H263.76c-1,13.93-1.3,27.81-1,41.56,2.25,94.5,35.36,183,106.08,242.41C518.58,409.68,775,369.6,895.07,525c67.28,87,69.18,209.24,93,319s94.55,227.47,206.06,225.05c111.34-2.4,177.19-114.39,242.92-192,90.22-106.49,153.22-138.48,289.41-138.37,74.32,0,139.2-5.43,193.51-40.28V1440H0ZM1559.94,987.89c33.72-.83,69.42-25.42,102.55-24.57,18.87.49,34.27,9.38,54,6,20.69-3.51,37.54-19.18,47.29-34.06,21.93-33.48,21.41-70.59-1.34-95.17s-67-35.88-113.49-29l5.62-.48c-40.27,5.14-81.86,24.09-110,50.15s-42.42,58.7-37.65,86.39C1510.59,968.85,1529.17,988.64,1559.94,987.89Zm-538.28,206.85a62.07,62.07,0,0,0-12.48,7c-28.67,20.72-35.38,63.45-26.18,98.71,13.72,52.57,85.47,106.55,132.2,64.25,17.51-15.85,25.68-41.48,24.88-66.07C1138.08,1237.62,1083.84,1168.81,1021.66,1194.74Zm655.57-128.08c6.29-3.32,10.31-9.83,12.71-16.53,2.64-7.36,3.48-16.14-1-22.51-5.06-7.12-14-8.17-22.41-6.19a38.29,38.29,0,0,0-14.51,6.85,25.79,25.79,0,0,0-8.49,12c-1.82,5.52-1,9.63,1.6,14.63a26.44,26.44,0,0,0,12.64,12.11C1663.89,1069.65,1671.29,1069.81,1677.23,1066.66Zm-1111.4-567c-49.88,19.23-91.52,61-102.89,111.13s11.24,106.68,57.68,131.23c25,13.18,54.53,16.94,79.48,30.11a121.81,121.81,0,0,1,12.95,7.94c23.33,17,40.37,42,57.56,65.58,17.47,24,38,51.78,66.24,63.63a93.48,93.48,0,0,0,16.24,5.16c55.73,16.59,107-20,133.41-67.22,41-73.25,26.51-168.12-16.62-235.94-33.23-52.27-86.15-93.17-147-112.78C672.48,482.3,615.71,480.47,565.83,499.7Z"/>
<path d="M475.13,63.11c10.81,0,21.08,6,27.66,14.59s9.8,19.34,10.78,30.09c.78,8.56,0,17.83-5.26,24.61-7.11,9.13-20.7,11-31.72,7.5a42.41,42.41,0,0,1-25.12-22.08C442.15,98,448.73,63.2,475.13,63.11ZM1726.49,759.57c74.32,0,139.2-5.43,193.51-40.28V1440H0V0H263.76c-1,13.93-1.3,27.81-1,41.56C260.37,143.83,293,241.16,368.87,304.92c149.71,125.71,406.13,85.63,526.2,241,67.28,87.05,69.18,209.24,93,319s94.55,227.47,206.06,225.05c111.34-2.4,177.19-114.39,242.92-192C1527.3,791.45,1590.3,759.46,1726.49,759.57Zm-840,87.69c41-73.25,26.51-168.12-16.62-235.94-33.23-52.27-86.15-93.17-147-112.78-50.39-16.24-107.16-18.07-157,1.16s-91.52,61-102.89,111.13,11.24,106.68,57.68,131.23c25,13.18,54.53,16.94,79.48,30.11a121.81,121.81,0,0,1,12.95,7.94c23.33,17,40.37,42,57.56,65.58,17.47,24,38,51.78,66.24,63.63a93.48,93.48,0,0,0,16.24,5.16C808.82,931.07,860.08,894.5,886.5,847.26Zm147.36,325.07a81.7,81.7,0,0,0-16.88,4.34c-39.89,15.07-57.94,59.55-54.77,100,4.72,60.35,80.22,137.07,147.2,103.28,25.09-12.66,41-38.29,45.67-65.08C1166.65,1248.47,1116,1160.19,1033.86,1172.33Zm632.62-150.9a38.29,38.29,0,0,0-14.51,6.85,25.79,25.79,0,0,0-8.49,12c-1.82,5.52-1,9.63,1.6,14.63a26.44,26.44,0,0,0,12.64,12.11c6.17,2.68,13.57,2.84,19.51-.31,6.29-3.32,10.31-9.83,12.71-16.53,2.64-7.36,3.48-16.14-1-22.51C1683.83,1020.5,1674.88,1019.45,1666.48,1021.43ZM1644.4,806.71l6-.39c-43.19,4.69-87.38,25.19-116.94,54.23s-43.9,66.05-37.94,97.93c4.65,24.92,25.23,48.16,58.32,48.2,36.26.05,73.94-27.08,109.61-25.12,20.32,1.12,37.15,11.76,58.28,8.51,22.16-3.41,39.83-20.88,49.87-37.64,22.61-37.74,20.95-80.3-4.26-109.16S1694.23,800.15,1644.4,806.71Z"/>',
'portrait' => '<path fill-opacity=".2" d="M508.31,132.4c-7.11,9.13-20.7,11-31.72,7.5a42.41,42.41,0,0,1-25.12-22.08C442.15,98,448.73,63.2,475.13,63.11c10.81,0,21.08,6,27.66,14.59s9.8,19.34,10.78,30.09C514.35,116.35,513.59,125.62,508.31,132.4ZM0,0H332.19c-11,106.89,19.33,214.22,101.62,282.61,140.61,116.87,375.36,86.85,489.44,229.73,63.91,80.06,68.56,190.24,93.1,289.69s92.32,207.28,194.77,207.75c102.29.48,160.16-98.88,218.74-167.25,80.4-93.83,137.54-121.16,262.74-117.83,93.78,2.5,171-4.83,227.4-77.62V2560H0ZM753.09,914.48c48.6,10.55,92.2-23.21,115-66.45,37.44-70.85,23.23-163.17-17.38-229.44C819.45,567.52,770,527.33,713.28,507.77c-46.94-16.2-99.69-18.44-145.85-.16s-84.5,58.55-94.65,107.15,11.32,103.77,54.66,128c23.27,13,50.78,16.91,74.07,29.92a115.11,115.11,0,0,1,11.54,7.42c23.33,17,40.37,42,57.56,65.58,17.47,24,38,51.78,66.24,63.63A93.48,93.48,0,0,0,753.09,914.48Zm273.56,294.9a56.48,56.48,0,0,0-11.23,5.65c-25.88,16.88-32.45,52.37-24.7,81.84,11.55,43.93,74.91,89.76,117.21,55.13,15.85-13,23.49-34.22,23.1-54.7C1130.06,1246.52,1082.53,1188.57,1026.65,1209.38Zm639.83-188a38.29,38.29,0,0,0-14.51,6.85,25.79,25.79,0,0,0-8.49,12c-1.82,5.52-1,9.63,1.6,14.63a26.44,26.44,0,0,0,12.64,12.11c6.17,2.68,13.57,2.84,19.51-.31,6.29-3.32,10.31-9.83,12.71-16.53,2.64-7.36,3.48-16.14-1-22.51C1683.83,1020.5,1674.88,1019.45,1666.48,1021.43Zm-19.54-197.22,4.86-.48c-34.8,4.89-70.63,21.69-94.81,44.44s-36.23,51-31.89,74.78c3.4,18.58,19.62,35.39,46.23,34.38,29.17-1.11,59.85-22.69,88.52-22.35,16.33.2,29.71,7.67,46.75,4.56,17.87-3.26,32.32-16.95,40.64-29.86,18.71-29.07,18-61-1.9-81.88S1687.11,817.71,1646.94,824.21ZM1920,173.69V0h-76.82q6.75,12.18,13.14,24.6C1879.64,70,1901.34,121,1920,173.69Z"/>
<path fill-opacity=".5" d="M475.13,63.11c10.81,0,21.08,6,27.66,14.59s9.8,19.34,10.78,30.09c.78,8.56,0,17.83-5.26,24.61-7.11,9.13-20.7,11-31.72,7.5a42.41,42.41,0,0,1-25.12-22.08C442.15,98,448.73,63.2,475.13,63.11ZM0,0H263.76c-1,13.93-1.3,27.81-1,41.56,2.25,94.5,35.36,183,106.08,242.41C518.58,409.68,775,369.6,895.07,525c67.28,87,69.18,209.24,93,319s94.55,227.47,206.06,225.05c111.34-2.4,177.19-114.39,242.92-192,90.22-106.49,153.22-138.48,289.41-138.37,74.32,0,139.2-5.43,193.51-40.28V2560H0ZM1559.94,987.89c33.72-.83,69.42-25.42,102.55-24.57,18.87.49,34.27,9.38,54,6,20.69-3.51,37.54-19.18,47.29-34.06,21.93-33.48,21.41-70.59-1.34-95.17s-67-35.88-113.49-29l5.62-.48c-40.27,5.14-81.86,24.09-110,50.15s-42.42,58.7-37.65,86.39C1510.59,968.85,1529.17,988.64,1559.94,987.89Zm-538.28,206.85a62.07,62.07,0,0,0-12.48,7c-28.67,20.72-35.38,63.45-26.18,98.71,13.72,52.57,85.47,106.55,132.2,64.25,17.51-15.85,25.68-41.48,24.88-66.07C1138.08,1237.62,1083.84,1168.81,1021.66,1194.74Zm655.57-128.08c6.29-3.32,10.31-9.83,12.71-16.53,2.64-7.36,3.48-16.14-1-22.51-5.06-7.12-14-8.17-22.41-6.19a38.29,38.29,0,0,0-14.51,6.85,25.79,25.79,0,0,0-8.49,12c-1.82,5.52-1,9.63,1.6,14.63a26.44,26.44,0,0,0,12.64,12.11C1663.89,1069.65,1671.29,1069.81,1677.23,1066.66Zm-1111.4-567c-49.88,19.23-91.52,61-102.89,111.13s11.24,106.68,57.68,131.23c25,13.18,54.53,16.94,79.48,30.11a121.81,121.81,0,0,1,12.95,7.94c23.33,17,40.37,42,57.56,65.58,17.47,24,38,51.78,66.24,63.63a93.48,93.48,0,0,0,16.24,5.16c55.73,16.59,107-20,133.41-67.22,41-73.25,26.51-168.12-16.62-235.94-33.23-52.27-86.15-93.17-147-112.78C672.48,482.3,615.71,480.47,565.83,499.7Z"/>
<path d="M475.13,63.11c10.81,0,21.08,6,27.66,14.59s9.8,19.34,10.78,30.09c.78,8.56,0,17.83-5.26,24.61-7.11,9.13-20.7,11-31.72,7.5a42.41,42.41,0,0,1-25.12-22.08C442.15,98,448.73,63.2,475.13,63.11ZM1726.49,759.57c74.32,0,139.2-5.43,193.51-40.28V2560H0V0H263.76c-1,13.93-1.3,27.81-1,41.56C260.37,143.83,293,241.16,368.87,304.92c149.71,125.71,406.13,85.63,526.2,241,67.28,87.05,69.18,209.24,93,319s94.55,227.47,206.06,225.05c111.34-2.4,177.19-114.39,242.92-192C1527.3,791.45,1590.3,759.46,1726.49,759.57Zm-840,87.69c41-73.25,26.51-168.12-16.62-235.94-33.23-52.27-86.15-93.17-147-112.78-50.39-16.24-107.16-18.07-157,1.16s-91.52,61-102.89,111.13,11.24,106.68,57.68,131.23c25,13.18,54.53,16.94,79.48,30.11a121.81,121.81,0,0,1,12.95,7.94c23.33,17,40.37,42,57.56,65.58,17.47,24,38,51.78,66.24,63.63a93.48,93.48,0,0,0,16.24,5.16C808.82,931.07,860.08,894.5,886.5,847.26Zm147.36,325.07a81.7,81.7,0,0,0-16.88,4.34c-39.89,15.07-57.94,59.55-54.77,100,4.72,60.35,80.22,137.07,147.2,103.28,25.09-12.66,41-38.29,45.67-65.08C1166.65,1248.47,1116,1160.19,1033.86,1172.33Zm632.62-150.9a38.29,38.29,0,0,0-14.51,6.85,25.79,25.79,0,0,0-8.49,12c-1.82,5.52-1,9.63,1.6,14.63a26.44,26.44,0,0,0,12.64,12.11c6.17,2.68,13.57,2.84,19.51-.31,6.29-3.32,10.31-9.83,12.71-16.53,2.64-7.36,3.48-16.14-1-22.51C1683.83,1020.5,1674.88,1019.45,1666.48,1021.43ZM1644.4,806.71l6-.39c-43.19,4.69-87.38,25.19-116.94,54.23s-43.9,66.05-37.94,97.93c4.65,24.92,25.23,48.16,58.32,48.2,36.26.05,73.94-27.08,109.61-25.12,20.32,1.12,37.15,11.76,58.28,8.51,22.16-3.41,39.83-20.88,49.87-37.64,22.61-37.74,20.95-80.3-4.26-109.16S1694.23,800.15,1644.4,806.71Z"/>',
'square' => '<path fill-opacity=".2" d="M508.31,132.4c-7.11,9.13-20.7,11-31.72,7.5a42.41,42.41,0,0,1-25.12-22.08C442.15,98,448.73,63.2,475.13,63.11c10.81,0,21.08,6,27.66,14.59s9.8,19.34,10.78,30.09C514.35,116.35,513.59,125.62,508.31,132.4ZM0,0H332.19c-11,106.89,19.33,214.22,101.62,282.61,140.61,116.87,375.36,86.85,489.44,229.73,63.91,80.06,68.56,190.24,93.1,289.69s92.32,207.28,194.77,207.75c102.29.48,160.16-98.88,218.74-167.25,80.4-93.83,137.54-121.16,262.74-117.83,93.78,2.5,171-4.83,227.4-77.62V1920H0ZM753.09,914.48c48.6,10.55,92.2-23.21,115-66.45,37.44-70.85,23.23-163.17-17.38-229.44C819.45,567.52,770,527.33,713.28,507.77c-46.94-16.2-99.69-18.44-145.85-.16s-84.5,58.55-94.65,107.15,11.32,103.77,54.66,128c23.27,13,50.78,16.91,74.07,29.92a115.11,115.11,0,0,1,11.54,7.42c23.33,17,40.37,42,57.56,65.58,17.47,24,38,51.78,66.24,63.63A93.48,93.48,0,0,0,753.09,914.48Zm273.56,294.9a56.48,56.48,0,0,0-11.23,5.65c-25.88,16.88-32.45,52.37-24.7,81.84,11.55,43.93,74.91,89.76,117.21,55.13,15.85-13,23.49-34.22,23.1-54.7C1130.06,1246.52,1082.53,1188.57,1026.65,1209.38Zm639.83-188a38.29,38.29,0,0,0-14.51,6.85,25.79,25.79,0,0,0-8.49,12c-1.82,5.52-1,9.63,1.6,14.63a26.44,26.44,0,0,0,12.64,12.11c6.17,2.68,13.57,2.84,19.51-.31,6.29-3.32,10.31-9.83,12.71-16.53,2.64-7.36,3.48-16.14-1-22.51C1683.83,1020.5,1674.88,1019.45,1666.48,1021.43Zm-19.54-197.22,4.86-.48c-34.8,4.89-70.63,21.69-94.81,44.44s-36.23,51-31.89,74.78c3.4,18.58,19.62,35.39,46.23,34.38,29.17-1.11,59.85-22.69,88.52-22.35,16.33.2,29.71,7.67,46.75,4.56,17.87-3.26,32.32-16.95,40.64-29.86,18.71-29.07,18-61-1.9-81.88S1687.11,817.71,1646.94,824.21ZM1920,173.69V0h-76.82q6.75,12.18,13.14,24.6C1879.64,70,1901.34,121,1920,173.69Z"/>
<path fill-opacity=".5" d="M475.13,63.11c10.81,0,21.08,6,27.66,14.59s9.8,19.34,10.78,30.09c.78,8.56,0,17.83-5.26,24.61-7.11,9.13-20.7,11-31.72,7.5a42.41,42.41,0,0,1-25.12-22.08C442.15,98,448.73,63.2,475.13,63.11ZM0,0H263.76c-1,13.93-1.3,27.81-1,41.56,2.25,94.5,35.36,183,106.08,242.41C518.58,409.68,775,369.6,895.07,525c67.28,87,69.18,209.24,93,319s94.55,227.47,206.06,225.05c111.34-2.4,177.19-114.39,242.92-192,90.22-106.49,153.22-138.48,289.41-138.37,74.32,0,139.2-5.43,193.51-40.28V1920H0ZM1559.94,987.89c33.72-.83,69.42-25.42,102.55-24.57,18.87.49,34.27,9.38,54,6,20.69-3.51,37.54-19.18,47.29-34.06,21.93-33.48,21.41-70.59-1.34-95.17s-67-35.88-113.49-29l5.62-.48c-40.27,5.14-81.86,24.09-110,50.15s-42.42,58.7-37.65,86.39C1510.59,968.85,1529.17,988.64,1559.94,987.89Zm-538.28,206.85a62.07,62.07,0,0,0-12.48,7c-28.67,20.72-35.38,63.45-26.18,98.71,13.72,52.57,85.47,106.55,132.2,64.25,17.51-15.85,25.68-41.48,24.88-66.07C1138.08,1237.62,1083.84,1168.81,1021.66,1194.74Zm655.57-128.08c6.29-3.32,10.31-9.83,12.71-16.53,2.64-7.36,3.48-16.14-1-22.51-5.06-7.12-14-8.17-22.41-6.19a38.29,38.29,0,0,0-14.51,6.85,25.79,25.79,0,0,0-8.49,12c-1.82,5.52-1,9.63,1.6,14.63a26.44,26.44,0,0,0,12.64,12.11C1663.89,1069.65,1671.29,1069.81,1677.23,1066.66Zm-1111.4-567c-49.88,19.23-91.52,61-102.89,111.13s11.24,106.68,57.68,131.23c25,13.18,54.53,16.94,79.48,30.11a121.81,121.81,0,0,1,12.95,7.94c23.33,17,40.37,42,57.56,65.58,17.47,24,38,51.78,66.24,63.63a93.48,93.48,0,0,0,16.24,5.16c55.73,16.59,107-20,133.41-67.22,41-73.25,26.51-168.12-16.62-235.94-33.23-52.27-86.15-93.17-147-112.78C672.48,482.3,615.71,480.47,565.83,499.7Z"/>
<path d="M475.13,63.11c10.81,0,21.08,6,27.66,14.59s9.8,19.34,10.78,30.09c.78,8.56,0,17.83-5.26,24.61-7.11,9.13-20.7,11-31.72,7.5a42.41,42.41,0,0,1-25.12-22.08C442.15,98,448.73,63.2,475.13,63.11ZM1726.49,759.57c74.32,0,139.2-5.43,193.51-40.28V1920H0V0H263.76c-1,13.93-1.3,27.81-1,41.56C260.37,143.83,293,241.16,368.87,304.92c149.71,125.71,406.13,85.63,526.2,241,67.28,87.05,69.18,209.24,93,319s94.55,227.47,206.06,225.05c111.34-2.4,177.19-114.39,242.92-192C1527.3,791.45,1590.3,759.46,1726.49,759.57Zm-840,87.69c41-73.25,26.51-168.12-16.62-235.94-33.23-52.27-86.15-93.17-147-112.78-50.39-16.24-107.16-18.07-157,1.16s-91.52,61-102.89,111.13,11.24,106.68,57.68,131.23c25,13.18,54.53,16.94,79.48,30.11a121.81,121.81,0,0,1,12.95,7.94c23.33,17,40.37,42,57.56,65.58,17.47,24,38,51.78,66.24,63.63a93.48,93.48,0,0,0,16.24,5.16C808.82,931.07,860.08,894.5,886.5,847.26Zm147.36,325.07a81.7,81.7,0,0,0-16.88,4.34c-39.89,15.07-57.94,59.55-54.77,100,4.72,60.35,80.22,137.07,147.2,103.28,25.09-12.66,41-38.29,45.67-65.08C1166.65,1248.47,1116,1160.19,1033.86,1172.33Zm632.62-150.9a38.29,38.29,0,0,0-14.51,6.85,25.79,25.79,0,0,0-8.49,12c-1.82,5.52-1,9.63,1.6,14.63a26.44,26.44,0,0,0,12.64,12.11c6.17,2.68,13.57,2.84,19.51-.31,6.29-3.32,10.31-9.83,12.71-16.53,2.64-7.36,3.48-16.14-1-22.51C1683.83,1020.5,1674.88,1019.45,1666.48,1021.43ZM1644.4,806.71l6-.39c-43.19,4.69-87.38,25.19-116.94,54.23s-43.9,66.05-37.94,97.93c4.65,24.92,25.23,48.16,58.32,48.2,36.26.05,73.94-27.08,109.61-25.12,20.32,1.12,37.15,11.76,58.28,8.51,22.16-3.41,39.83-20.88,49.87-37.64,22.61-37.74,20.95-80.3-4.26-109.16S1694.23,800.15,1644.4,806.71Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path fill-opacity=".2" d="M1672.48,1021.43c8.4-2,17.35-.93,22.41,6.19,4.53,6.37,3.69,15.15,1,22.51-2.4,6.7-6.42,13.21-12.71,16.53-5.94,3.15-13.34,3-19.51.31a26.44,26.44,0,0,1-12.64-12.11c-2.59-5-3.42-9.11-1.6-14.63a25.79,25.79,0,0,1,8.49-12A38.29,38.29,0,0,1,1672.48,1021.43ZM269.76,0H1926V719.29c-54.31,34.85-119.19,40.33-193.51,40.28-136.19-.11-199.19,31.88-289.41,138.37-65.73,77.58-131.58,189.57-242.92,192C1088.65,1092.33,1018,974.57,994.1,864.86s-25.75-231.91-93-319C781,390.55,524.58,430.63,374.87,304.92,299,241.16,266.37,143.83,268.79,41.56,268.46,27.81,268.8,13.93,269.76,0ZM481.13,63.11c-26.4.09-33,34.87-23.66,54.71a42.41,42.41,0,0,0,25.12,22.08c11,3.54,24.61,1.63,31.72-7.5,5.28-6.78,6-16.05,5.26-24.61-1-10.75-4.19-21.54-10.78-30.09S491.94,63.07,481.13,63.11ZM1023,1176.67c-39.89,15.07-57.94,59.55-54.77,100,4.72,60.35,80.22,137.07,147.2,103.28,25.09-12.66,41-38.29,45.67-65.08,11.57-66.44-39.07-154.72-121.22-142.58A81.7,81.7,0,0,0,1023,1176.67ZM892.5,847.26c41-73.25,26.51-168.12-16.62-235.94-33.23-52.27-86.15-93.17-147-112.78-50.39-16.24-107.16-18.07-157,1.16s-91.52,61-102.89,111.13,11.24,106.68,57.68,131.23c25,13.18,54.53,16.94,79.48,30.11a121.81,121.81,0,0,1,12.95,7.94c23.33,17,40.37,42,57.56,65.58,17.47,24,38,51.78,66.24,63.63a93.48,93.48,0,0,0,16.24,5.16C814.82,931.07,866.08,894.5,892.5,847.26Zm763.94-40.94c-43.19,4.69-87.38,25.19-116.94,54.23s-43.9,66.05-37.94,97.93c4.65,24.92,25.23,48.16,58.32,48.2,36.26.05,73.94-27.08,109.61-25.12,20.32,1.12,37.16,11.76,58.28,8.51,22.16-3.41,39.83-20.88,49.87-37.64,22.61-37.74,20.95-80.3-4.26-109.16s-73.15-43.12-123-36.56Z"/>
<path fill-opacity=".5" d="M759.09,914.48a93.48,93.48,0,0,1-16.24-5.16c-28.26-11.85-48.77-39.67-66.24-63.63-17.19-23.59-34.23-48.58-57.56-65.58a115.11,115.11,0,0,0-11.54-7.42c-23.29-13-50.8-16.9-74.07-29.92-43.34-24.24-64.82-79.41-54.66-128s48.48-88.88,94.65-107.15,98.91-16,145.85.16C776,527.33,825.45,567.52,856.76,618.59c40.61,66.27,54.82,158.59,17.38,229.44C851.29,891.27,807.69,925,759.09,914.48ZM1658,1028.28a25.79,25.79,0,0,0-8.49,12c-1.82,5.52-1,9.63,1.6,14.63a26.44,26.44,0,0,0,12.64,12.11c6.17,2.68,13.57,2.84,19.51-.31,6.29-3.32,10.31-9.83,12.71-16.53,2.64-7.36,3.48-16.14-1-22.51-5.06-7.12-14-8.17-22.41-6.19A38.29,38.29,0,0,0,1658,1028.28ZM269.76,0H1926V698.34c-54.31,34.85-119.19,40.33-193.51,40.28C1596.3,738.51,1533.3,770.5,1443.08,877c-65.73,77.58-131.58,189.57-242.92,192C1088.65,1071.38,1018,953.62,994.1,843.91s-25.75-231.91-93-319C781,369.6,524.58,409.68,374.87,284,304.15,224.58,271,136.06,268.79,41.56,268.46,27.81,268.8,13.93,269.76,0ZM457.47,117.82a42.41,42.41,0,0,0,25.12,22.08c11,3.54,24.61,1.63,31.72-7.5,5.28-6.78,6-16.05,5.26-24.61-1-10.75-4.19-21.54-10.78-30.09s-16.85-14.63-27.66-14.59C454.73,63.2,448.15,98,457.47,117.82ZM1660.56,810.68c-40.27,5.14-81.86,24.09-110,50.15s-42.42,58.7-37.65,86.39c3.73,21.63,22.31,41.42,53.08,40.67,33.72-.83,69.42-25.42,102.55-24.57,18.87.49,34.27,9.38,54,6,20.69-3.51,37.54-19.18,47.29-34.06,21.93-33.48,21.41-70.59-1.34-95.17s-67-35.88-113.49-29Zm-645.38,391c-28.67,20.72-35.38,63.45-26.18,98.71,13.72,52.57,85.47,106.55,132.2,64.25,17.51-15.85,25.68-41.48,24.88-66.07-2-61-56.24-129.78-118.42-103.85A62.07,62.07,0,0,0,1015.18,1201.7Z"/>
<path d="M439.81,282.61c140.61,116.87,375.36,86.85,489.44,229.73,63.91,80.06,68.56,190.24,93.1,289.69s92.32,207.28,194.77,207.75c102.29.48,160.16-98.88,218.74-167.25,80.4-93.83,137.54-121.16,262.74-117.83,93.78,2.5,171-4.83,227.4-77.62V173.69C1907.34,121,1885.64,70,1862.32,24.6q-6.39-12.42-13.14-24.6h-1511C327.22,106.89,357.52,214.22,439.81,282.61Zm69-204.91c6.59,8.55,9.8,19.34,10.78,30.09.78,8.56,0,17.83-5.26,24.61-7.11,9.13-20.7,11-31.72,7.5a42.41,42.41,0,0,1-25.12-22.08C448.15,98,454.73,63.2,481.13,63.11,491.94,63.07,502.21,69.14,508.79,77.7Zm250.3,836.78a93.48,93.48,0,0,1-16.24-5.16c-28.26-11.85-48.77-39.67-66.24-63.63-17.19-23.59-34.23-48.58-57.56-65.58a115.11,115.11,0,0,0-11.54-7.42c-23.29-13-50.8-16.9-74.07-29.92-43.34-24.24-64.82-79.41-54.66-128s48.48-88.88,94.65-107.15,98.91-16,145.85.16C776,527.33,825.45,567.52,856.76,618.59c40.61,66.27,54.82,158.59,17.38,229.44C851.29,891.27,807.69,925,759.09,914.48Zm273.56,294.9c55.88-20.81,103.41,37.14,104.38,87.92.39,20.48-7.25,41.72-23.1,54.7-42.3,34.63-105.66-11.2-117.21-55.13-7.75-29.47-1.18-65,24.7-81.84A56.48,56.48,0,0,1,1032.65,1209.38Zm639.83-188c8.4-2,17.35-.93,22.41,6.19,4.53,6.37,3.69,15.15,1,22.51-2.4,6.7-6.42,13.21-12.71,16.53-5.94,3.15-13.34,3-19.51.31a26.44,26.44,0,0,1-12.64-12.11c-2.59-5-3.42-9.11-1.6-14.63a25.79,25.79,0,0,1,8.49-12A38.29,38.29,0,0,1,1672.48,1021.43Zm-19.54-197.22c40.17-6.5,78.53,2.7,98.4,23.59s20.61,52.81,1.9,81.88c-8.32,12.91-22.77,26.6-40.64,29.86-17,3.11-30.42-4.36-46.75-4.56-28.67-.34-59.35,21.24-88.52,22.35-26.61,1-42.83-15.8-46.23-34.38-4.34-23.76,7.71-52,31.89-74.78s60-39.55,94.81-44.44Z"/>',
'portrait' => '<path fill-opacity=".2" d="M1672.48,1021.43c8.4-2,17.35-.93,22.41,6.19,4.53,6.37,3.69,15.15,1,22.51-2.4,6.7-6.42,13.21-12.71,16.53-5.94,3.15-13.34,3-19.51.31a26.44,26.44,0,0,1-12.64-12.11c-2.59-5-3.42-9.11-1.6-14.63a25.79,25.79,0,0,1,8.49-12A38.29,38.29,0,0,1,1672.48,1021.43ZM269.76,0H1926V719.29c-54.31,34.85-119.19,40.33-193.51,40.28-136.19-.11-199.19,31.88-289.41,138.37-65.73,77.58-131.58,189.57-242.92,192C1088.65,1092.33,1018,974.57,994.1,864.86s-25.75-231.91-93-319C781,390.55,524.58,430.63,374.87,304.92,299,241.16,266.37,143.83,268.79,41.56,268.46,27.81,268.8,13.93,269.76,0ZM481.13,63.11c-26.4.09-33,34.87-23.66,54.71a42.41,42.41,0,0,0,25.12,22.08c11,3.54,24.61,1.63,31.72-7.5,5.28-6.78,6-16.05,5.26-24.61-1-10.75-4.19-21.54-10.78-30.09S491.94,63.07,481.13,63.11ZM1023,1176.67c-39.89,15.07-57.94,59.55-54.77,100,4.72,60.35,80.22,137.07,147.2,103.28,25.09-12.66,41-38.29,45.67-65.08,11.57-66.44-39.07-154.72-121.22-142.58A81.7,81.7,0,0,0,1023,1176.67ZM892.5,847.26c41-73.25,26.51-168.12-16.62-235.94-33.23-52.27-86.15-93.17-147-112.78-50.39-16.24-107.16-18.07-157,1.16s-91.52,61-102.89,111.13,11.24,106.68,57.68,131.23c25,13.18,54.53,16.94,79.48,30.11a121.81,121.81,0,0,1,12.95,7.94c23.33,17,40.37,42,57.56,65.58,17.47,24,38,51.78,66.24,63.63a93.48,93.48,0,0,0,16.24,5.16C814.82,931.07,866.08,894.5,892.5,847.26Zm763.94-40.94c-43.19,4.69-87.38,25.19-116.94,54.23s-43.9,66.05-37.94,97.93c4.65,24.92,25.23,48.16,58.32,48.2,36.26.05,73.94-27.08,109.61-25.12,20.32,1.12,37.16,11.76,58.28,8.51,22.16-3.41,39.83-20.88,49.87-37.64,22.61-37.74,20.95-80.3-4.26-109.16s-73.15-43.12-123-36.56Z"/>
<path fill-opacity=".5" d="M759.09,914.48a93.48,93.48,0,0,1-16.24-5.16c-28.26-11.85-48.77-39.67-66.24-63.63-17.19-23.59-34.23-48.58-57.56-65.58a115.11,115.11,0,0,0-11.54-7.42c-23.29-13-50.8-16.9-74.07-29.92-43.34-24.24-64.82-79.41-54.66-128s48.48-88.88,94.65-107.15,98.91-16,145.85.16C776,527.33,825.45,567.52,856.76,618.59c40.61,66.27,54.82,158.59,17.38,229.44C851.29,891.27,807.69,925,759.09,914.48ZM1658,1028.28a25.79,25.79,0,0,0-8.49,12c-1.82,5.52-1,9.63,1.6,14.63a26.44,26.44,0,0,0,12.64,12.11c6.17,2.68,13.57,2.84,19.51-.31,6.29-3.32,10.31-9.83,12.71-16.53,2.64-7.36,3.48-16.14-1-22.51-5.06-7.12-14-8.17-22.41-6.19A38.29,38.29,0,0,0,1658,1028.28ZM269.76,0H1926V698.34c-54.31,34.85-119.19,40.33-193.51,40.28C1596.3,738.51,1533.3,770.5,1443.08,877c-65.73,77.58-131.58,189.57-242.92,192C1088.65,1071.38,1018,953.62,994.1,843.91s-25.75-231.91-93-319C781,369.6,524.58,409.68,374.87,284,304.15,224.58,271,136.06,268.79,41.56,268.46,27.81,268.8,13.93,269.76,0ZM457.47,117.82a42.41,42.41,0,0,0,25.12,22.08c11,3.54,24.61,1.63,31.72-7.5,5.28-6.78,6-16.05,5.26-24.61-1-10.75-4.19-21.54-10.78-30.09s-16.85-14.63-27.66-14.59C454.73,63.2,448.15,98,457.47,117.82ZM1660.56,810.68c-40.27,5.14-81.86,24.09-110,50.15s-42.42,58.7-37.65,86.39c3.73,21.63,22.31,41.42,53.08,40.67,33.72-.83,69.42-25.42,102.55-24.57,18.87.49,34.27,9.38,54,6,20.69-3.51,37.54-19.18,47.29-34.06,21.93-33.48,21.41-70.59-1.34-95.17s-67-35.88-113.49-29Zm-645.38,391c-28.67,20.72-35.38,63.45-26.18,98.71,13.72,52.57,85.47,106.55,132.2,64.25,17.51-15.85,25.68-41.48,24.88-66.07-2-61-56.24-129.78-118.42-103.85A62.07,62.07,0,0,0,1015.18,1201.7Z"/>
<path d="M439.81,282.61c140.61,116.87,375.36,86.85,489.44,229.73,63.91,80.06,68.56,190.24,93.1,289.69s92.32,207.28,194.77,207.75c102.29.48,160.16-98.88,218.74-167.25,80.4-93.83,137.54-121.16,262.74-117.83,93.78,2.5,171-4.83,227.4-77.62V173.69C1907.34,121,1885.64,70,1862.32,24.6q-6.39-12.42-13.14-24.6h-1511C327.22,106.89,357.52,214.22,439.81,282.61Zm69-204.91c6.59,8.55,9.8,19.34,10.78,30.09.78,8.56,0,17.83-5.26,24.61-7.11,9.13-20.7,11-31.72,7.5a42.41,42.41,0,0,1-25.12-22.08C448.15,98,454.73,63.2,481.13,63.11,491.94,63.07,502.21,69.14,508.79,77.7Zm250.3,836.78a93.48,93.48,0,0,1-16.24-5.16c-28.26-11.85-48.77-39.67-66.24-63.63-17.19-23.59-34.23-48.58-57.56-65.58a115.11,115.11,0,0,0-11.54-7.42c-23.29-13-50.8-16.9-74.07-29.92-43.34-24.24-64.82-79.41-54.66-128s48.48-88.88,94.65-107.15,98.91-16,145.85.16C776,527.33,825.45,567.52,856.76,618.59c40.61,66.27,54.82,158.59,17.38,229.44C851.29,891.27,807.69,925,759.09,914.48Zm273.56,294.9c55.88-20.81,103.41,37.14,104.38,87.92.39,20.48-7.25,41.72-23.1,54.7-42.3,34.63-105.66-11.2-117.21-55.13-7.75-29.47-1.18-65,24.7-81.84A56.48,56.48,0,0,1,1032.65,1209.38Zm639.83-188c8.4-2,17.35-.93,22.41,6.19,4.53,6.37,3.69,15.15,1,22.51-2.4,6.7-6.42,13.21-12.71,16.53-5.94,3.15-13.34,3-19.51.31a26.44,26.44,0,0,1-12.64-12.11c-2.59-5-3.42-9.11-1.6-14.63a25.79,25.79,0,0,1,8.49-12A38.29,38.29,0,0,1,1672.48,1021.43Zm-19.54-197.22c40.17-6.5,78.53,2.7,98.4,23.59s20.61,52.81,1.9,81.88c-8.32,12.91-22.77,26.6-40.64,29.86-17,3.11-30.42-4.36-46.75-4.56-28.67-.34-59.35,21.24-88.52,22.35-26.61,1-42.83-15.8-46.23-34.38-4.34-23.76,7.71-52,31.89-74.78s60-39.55,94.81-44.44Z"/>',
'square' => '<path fill-opacity=".2" d="M1672.48,1021.43c8.4-2,17.35-.93,22.41,6.19,4.53,6.37,3.69,15.15,1,22.51-2.4,6.7-6.42,13.21-12.71,16.53-5.94,3.15-13.34,3-19.51.31a26.44,26.44,0,0,1-12.64-12.11c-2.59-5-3.42-9.11-1.6-14.63a25.79,25.79,0,0,1,8.49-12A38.29,38.29,0,0,1,1672.48,1021.43ZM269.76,0H1926V719.29c-54.31,34.85-119.19,40.33-193.51,40.28-136.19-.11-199.19,31.88-289.41,138.37-65.73,77.58-131.58,189.57-242.92,192C1088.65,1092.33,1018,974.57,994.1,864.86s-25.75-231.91-93-319C781,390.55,524.58,430.63,374.87,304.92,299,241.16,266.37,143.83,268.79,41.56,268.46,27.81,268.8,13.93,269.76,0ZM481.13,63.11c-26.4.09-33,34.87-23.66,54.71a42.41,42.41,0,0,0,25.12,22.08c11,3.54,24.61,1.63,31.72-7.5,5.28-6.78,6-16.05,5.26-24.61-1-10.75-4.19-21.54-10.78-30.09S491.94,63.07,481.13,63.11ZM1023,1176.67c-39.89,15.07-57.94,59.55-54.77,100,4.72,60.35,80.22,137.07,147.2,103.28,25.09-12.66,41-38.29,45.67-65.08,11.57-66.44-39.07-154.72-121.22-142.58A81.7,81.7,0,0,0,1023,1176.67ZM892.5,847.26c41-73.25,26.51-168.12-16.62-235.94-33.23-52.27-86.15-93.17-147-112.78-50.39-16.24-107.16-18.07-157,1.16s-91.52,61-102.89,111.13,11.24,106.68,57.68,131.23c25,13.18,54.53,16.94,79.48,30.11a121.81,121.81,0,0,1,12.95,7.94c23.33,17,40.37,42,57.56,65.58,17.47,24,38,51.78,66.24,63.63a93.48,93.48,0,0,0,16.24,5.16C814.82,931.07,866.08,894.5,892.5,847.26Zm763.94-40.94c-43.19,4.69-87.38,25.19-116.94,54.23s-43.9,66.05-37.94,97.93c4.65,24.92,25.23,48.16,58.32,48.2,36.26.05,73.94-27.08,109.61-25.12,20.32,1.12,37.16,11.76,58.28,8.51,22.16-3.41,39.83-20.88,49.87-37.64,22.61-37.74,20.95-80.3-4.26-109.16s-73.15-43.12-123-36.56Z"/>
<path fill-opacity=".5" d="M759.09,914.48a93.48,93.48,0,0,1-16.24-5.16c-28.26-11.85-48.77-39.67-66.24-63.63-17.19-23.59-34.23-48.58-57.56-65.58a115.11,115.11,0,0,0-11.54-7.42c-23.29-13-50.8-16.9-74.07-29.92-43.34-24.24-64.82-79.41-54.66-128s48.48-88.88,94.65-107.15,98.91-16,145.85.16C776,527.33,825.45,567.52,856.76,618.59c40.61,66.27,54.82,158.59,17.38,229.44C851.29,891.27,807.69,925,759.09,914.48ZM1658,1028.28a25.79,25.79,0,0,0-8.49,12c-1.82,5.52-1,9.63,1.6,14.63a26.44,26.44,0,0,0,12.64,12.11c6.17,2.68,13.57,2.84,19.51-.31,6.29-3.32,10.31-9.83,12.71-16.53,2.64-7.36,3.48-16.14-1-22.51-5.06-7.12-14-8.17-22.41-6.19A38.29,38.29,0,0,0,1658,1028.28ZM269.76,0H1926V698.34c-54.31,34.85-119.19,40.33-193.51,40.28C1596.3,738.51,1533.3,770.5,1443.08,877c-65.73,77.58-131.58,189.57-242.92,192C1088.65,1071.38,1018,953.62,994.1,843.91s-25.75-231.91-93-319C781,369.6,524.58,409.68,374.87,284,304.15,224.58,271,136.06,268.79,41.56,268.46,27.81,268.8,13.93,269.76,0ZM457.47,117.82a42.41,42.41,0,0,0,25.12,22.08c11,3.54,24.61,1.63,31.72-7.5,5.28-6.78,6-16.05,5.26-24.61-1-10.75-4.19-21.54-10.78-30.09s-16.85-14.63-27.66-14.59C454.73,63.2,448.15,98,457.47,117.82ZM1660.56,810.68c-40.27,5.14-81.86,24.09-110,50.15s-42.42,58.7-37.65,86.39c3.73,21.63,22.31,41.42,53.08,40.67,33.72-.83,69.42-25.42,102.55-24.57,18.87.49,34.27,9.38,54,6,20.69-3.51,37.54-19.18,47.29-34.06,21.93-33.48,21.41-70.59-1.34-95.17s-67-35.88-113.49-29Zm-645.38,391c-28.67,20.72-35.38,63.45-26.18,98.71,13.72,52.57,85.47,106.55,132.2,64.25,17.51-15.85,25.68-41.48,24.88-66.07-2-61-56.24-129.78-118.42-103.85A62.07,62.07,0,0,0,1015.18,1201.7Z"/>
<path d="M439.81,282.61c140.61,116.87,375.36,86.85,489.44,229.73,63.91,80.06,68.56,190.24,93.1,289.69s92.32,207.28,194.77,207.75c102.29.48,160.16-98.88,218.74-167.25,80.4-93.83,137.54-121.16,262.74-117.83,93.78,2.5,171-4.83,227.4-77.62V173.69C1907.34,121,1885.64,70,1862.32,24.6q-6.39-12.42-13.14-24.6h-1511C327.22,106.89,357.52,214.22,439.81,282.61Zm69-204.91c6.59,8.55,9.8,19.34,10.78,30.09.78,8.56,0,17.83-5.26,24.61-7.11,9.13-20.7,11-31.72,7.5a42.41,42.41,0,0,1-25.12-22.08C448.15,98,454.73,63.2,481.13,63.11,491.94,63.07,502.21,69.14,508.79,77.7Zm250.3,836.78a93.48,93.48,0,0,1-16.24-5.16c-28.26-11.85-48.77-39.67-66.24-63.63-17.19-23.59-34.23-48.58-57.56-65.58a115.11,115.11,0,0,0-11.54-7.42c-23.29-13-50.8-16.9-74.07-29.92-43.34-24.24-64.82-79.41-54.66-128s48.48-88.88,94.65-107.15,98.91-16,145.85.16C776,527.33,825.45,567.52,856.76,618.59c40.61,66.27,54.82,158.59,17.38,229.44C851.29,891.27,807.69,925,759.09,914.48Zm273.56,294.9c55.88-20.81,103.41,37.14,104.38,87.92.39,20.48-7.25,41.72-23.1,54.7-42.3,34.63-105.66-11.2-117.21-55.13-7.75-29.47-1.18-65,24.7-81.84A56.48,56.48,0,0,1,1032.65,1209.38Zm639.83-188c8.4-2,17.35-.93,22.41,6.19,4.53,6.37,3.69,15.15,1,22.51-2.4,6.7-6.42,13.21-12.71,16.53-5.94,3.15-13.34,3-19.51.31a26.44,26.44,0,0,1-12.64-12.11c-2.59-5-3.42-9.11-1.6-14.63a25.79,25.79,0,0,1,8.49-12A38.29,38.29,0,0,1,1672.48,1021.43Zm-19.54-197.22c40.17-6.5,78.53,2.7,98.4,23.59s20.61,52.81,1.9,81.88c-8.32,12.91-22.77,26.6-40.64,29.86-17,3.11-30.42-4.36-46.75-4.56-28.67-.34-59.35,21.24-88.52,22.35-26.61,1-42.83-15.8-46.23-34.38-4.34-23.76,7.71-52,31.89-74.78s60-39.55,94.81-44.44Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Layer_Blob();

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Rock Stack.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Rock_Stack
*
* @since 4.15.0
*/
class ET_Builder_Mask_Rock_Stack extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Rock Stack', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M0,1440H1920V0H0ZM1180.15,189.62c17.81-72.88,132.41-107.49,256-77.3S1645.41,226.07,1627.6,299s-132.41,107.49-256,77.3S1162.34,262.5,1180.15,189.62Zm94.73,269.2c158.35-70.73,320.55-52.34,362.27,41.07S1584.31,726.35,1426,797.08,1105.39,849.42,1063.68,756,1116.52,529.55,1274.88,458.82ZM1379.33,858.5c231.74,0,419.61,110.81,419.61,247.5s-187.87,247.5-419.61,247.5-419.6-110.81-419.6-247.5S1147.59,858.5,1379.33,858.5Z"/>',
'portrait' => '<path d="M0,0V2560H1920V0ZM978.86,523c30.69-125.6,228.19-185.25,441.14-133.22s360.69,196,330,321.64-228.2,185.24-441.14,133.21S948.17,648.62,978.86,523ZM1162.11,987c272.91-121.89,552.44-90.2,624.33,70.78s-91.06,390.29-364,512.18-552.44,90.2-624.33-70.78S889.19,1108.84,1162.11,987Zm84.72,1380.65c-326.39,0-591-156.07-591-348.59s264.59-348.59,591-348.59,591,156.07,591,348.59S1573.22,2367.6,1246.83,2367.6Z"/>',
'square' => '<path d="M0,1920H1920V0H0ZM1044.44,304.23c21.69-88.76,161.25-130.91,311.72-94.14S1611,348.61,1589.35,437.37s-161.25,130.9-311.72,94.13S1022.75,393,1044.44,304.23Zm115.35,327.83c192.86-86.13,390.38-63.74,441.18,50s-64.35,275.79-257.2,361.92-390.37,63.74-441.18-50S966.94,718.19,1159.79,632.06ZM1287,1118.79c282.22,0,511,135,511,301.41s-228.78,301.41-511,301.41S776,1586.66,776,1420.2,1004.79,1118.79,1287,1118.79Z"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M959.73,1106c0-136.69,187.86-247.5,419.6-247.5s419.61,110.81,419.61,247.5-187.87,247.5-419.61,247.5S959.73,1242.69,959.73,1106ZM1426,797.08c158.36-70.73,252.91-203.79,211.2-297.19s-203.92-111.8-362.27-41.07S1022,662.6,1063.68,756,1267.59,867.8,1426,797.08Zm-54.32-420.83c123.56,30.19,238.17-4.42,256-77.3s-67.92-156.44-191.48-186.63-238.16,4.42-256,77.3S1248.07,346.06,1371.63,376.25Z"/>',
'portrait' => '<path d="M1837.81,2019c0,192.52-264.59,348.59-591,348.59s-591-156.07-591-348.59,264.59-348.59,591-348.59S1837.81,1826.49,1837.81,2019Zm-415.35-449.1c272.92-121.89,435.88-351.2,364-512.18S1435,865.06,1162.11,987s-435.88,351.2-364,512.18S1149.55,1691.8,1422.46,1569.91Zm-113.6-725.26c212.94,52,410.45-7.61,441.14-133.21S1632.94,441.83,1420,389.8,1009.55,397.42,978.86,523,1095.92,792.62,1308.86,844.65Z"/>',
'square' => '<path d="M776,1420.2c0-166.46,228.78-301.41,511-301.41s511,135,511,301.41-228.78,301.41-511,301.41S776,1586.66,776,1420.2ZM1343.77,1044c192.85-86.13,308-248.17,257.2-361.92s-248.32-136.14-441.18-50S851.79,880.23,902.59,994,1150.92,1130.12,1343.77,1044ZM1277.63,531.5c150.47,36.77,290-5.38,311.72-94.13s-82.72-190.51-233.19-227.28-290,5.38-311.72,94.14S1127.16,494.74,1277.63,531.5Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M1920,1440V0H0V1440ZM304.23,875.56c-88.76-21.69-130.91-161.25-94.14-311.72S348.61,309,437.37,330.65,568.27,491.9,531.5,642.37,393,897.25,304.23,875.56ZM632.06,760.21c-86.13-192.86-63.74-390.38,50-441.18S957.86,383.38,1044,576.23s63.74,390.37-50,441.18S718.19,953.06,632.06,760.21ZM1118.79,633c0-282.22,135-511,301.41-511s301.41,228.78,301.41,511-134.95,511-301.41,511S1118.79,915.21,1118.79,633Z"/>',
'portrait' => '<path d="M1920,2560V0H0V2560ZM304.23,875.56c-88.76-21.69-130.91-161.25-94.14-311.72S348.61,309,437.37,330.65,568.27,491.9,531.5,642.37,393,897.25,304.23,875.56ZM632.06,760.21c-86.13-192.86-63.74-390.38,50-441.18S957.86,383.38,1044,576.23s63.74,390.37-50,441.18S718.19,953.06,632.06,760.21ZM1118.79,633c0-282.22,135-511,301.41-511s301.41,228.78,301.41,511-134.95,511-301.41,511S1118.79,915.21,1118.79,633Z"/>',
'square' => '<path d="M1920,1920V0H0V1920ZM304.23,875.56c-88.76-21.69-130.91-161.25-94.14-311.72S348.61,309,437.37,330.65,568.27,491.9,531.5,642.37,393,897.25,304.23,875.56ZM632.06,760.21c-86.13-192.86-63.74-390.38,50-441.18S957.86,383.38,1044,576.23s63.74,390.37-50,441.18S718.19,953.06,632.06,760.21ZM1118.79,633c0-282.22,135-511,301.41-511s301.41,228.78,301.41,511-134.95,511-301.41,511S1118.79,915.21,1118.79,633Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M304.23,875.56c-88.76-21.69-130.91-161.25-94.14-311.72S348.61,309,437.37,330.65,568.27,491.9,531.5,642.37,393,897.25,304.23,875.56ZM632.06,760.21c-86.13-192.86-63.74-390.38,50-441.18S957.86,383.38,1044,576.23s63.74,390.37-50,441.18S718.19,953.06,632.06,760.21ZM1118.79,633c0-282.22,135-511,301.41-511s301.41,228.78,301.41,511-134.95,511-301.41,511S1118.79,915.21,1118.79,633Z"/>',
'portrait' => '<path d="M304.23,875.56c-88.76-21.69-130.91-161.25-94.14-311.72S348.61,309,437.37,330.65,568.27,491.9,531.5,642.37,393,897.25,304.23,875.56ZM632.06,760.21c-86.13-192.86-63.74-390.38,50-441.18S957.86,383.38,1044,576.23s63.74,390.37-50,441.18S718.19,953.06,632.06,760.21ZM1118.79,633c0-282.22,135-511,301.41-511s301.41,228.78,301.41,511-134.95,511-301.41,511S1118.79,915.21,1118.79,633Z"/>',
'square' => '<path d="M304.23,875.56c-88.76-21.69-130.91-161.25-94.14-311.72S348.61,309,437.37,330.65,568.27,491.9,531.5,642.37,393,897.25,304.23,875.56ZM632.06,760.21c-86.13-192.86-63.74-390.38,50-441.18S957.86,383.38,1044,576.23s63.74,390.37-50,441.18S718.19,953.06,632.06,760.21ZM1118.79,633c0-282.22,135-511,301.41-511s301.41,228.78,301.41,511-134.95,511-301.41,511S1118.79,915.21,1118.79,633Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Rock_Stack();

View File

@ -0,0 +1,84 @@
<?php
/**
* Background Mask Style - Square Stripes.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Square_Stripes
*
* @since 4.15.0
*/
class ET_Builder_Mask_Square_Stripes extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Square Stripes', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<g>
<polygon points="1479.38 478.41 1252.46 0 1097.51 0 1412.89 664.9 1920 424.36 1920 269.41 1479.38 478.41"/>
<polygon points="1436.38 61.07 1545.87 291.92 1776.72 182.42 1690.19 0 1565.13 0 1436.38 61.07"/>
<polygon points="1920 0 1845.14 0 1920 157.81 1920 0"/>
<polygon points="1346.39 851.39 942.56 0 787.61 0 1279.9 1037.88 1920 734.26 1920 579.31 1346.39 851.39"/>
<polygon points="1213.4 1224.37 632.66 0 0 0 0 1440 1920 1440 1920 889.22 1213.4 1224.37"/>
</g>',
'portrait' => '<g>
<rect x="1478.8" y="690" width="255.5" height="255.5" transform="translate(-195.44 767.4) rotate(-25.38)"/>
<polygon points="1479.38 1174.41 1249.89 690.58 1733.72 461.08 1920 853.82 1920 527.14 1800.21 274.6 1063.4 624.08 1412.89 1360.9 1920 1120.36 1920 965.41 1479.38 1174.41"/>
<polygon points="1213.4 1920.37 503.93 424.6 1399.1 0 0 0 0 2560 1920 2560 1920 1585.22 1213.4 1920.37"/>
<polygon points="1346.39 1547.39 876.91 557.59 1866.71 88.1 1920 200.46 1920 0 1725.78 0 690.42 491.1 1279.9 1733.88 1920 1430.27 1920 1275.31 1346.39 1547.39"/>
</g>',
'square' => '<g>
<rect x="1478.8" y="210" width="255.5" height="255.5" transform="translate(10.26 721.09) rotate(-25.38)"/>
<polygon points="1920 373.81 1920 47.14 1897.64 0 1742.69 0 1920 373.81"/>
<polygon points="1479.38 694.41 1249.89 210.58 1693.84 0 1367.16 0 1063.4 144.08 1412.89 880.9 1920 640.36 1920 485.41 1479.38 694.41"/>
<polygon points="1346.39 1067.39 876.91 77.59 1040.49 0 713.81 0 690.42 11.1 1279.9 1253.88 1920 950.26 1920 795.31 1346.39 1067.39"/>
<polygon points="1213.4 1440.37 530.2 0 0 0 0 1920 1920 1920 1920 1105.22 1213.4 1440.37"/>
</g>',
),
'default-inverted' => array(
'landscape' => '<g>
<polygon points="1920 889.22 1920 734.26 1279.9 1037.88 787.61 0 632.66 0 1213.4 1224.37 1920 889.22"/>
<polygon points="1920 579.31 1920 424.36 1412.89 664.9 1097.51 0 942.56 0 1346.39 851.39 1920 579.31"/>
<polygon points="1920 269.41 1920 157.81 1845.14 0 1690.19 0 1776.72 182.42 1545.87 291.92 1436.38 61.07 1565.13 0 1252.46 0 1479.38 478.41 1920 269.41"/>
</g>',
'portrait' => '<g>
<polygon points="1213.4 1920.37 1920 1585.22 1920 1430.27 1279.9 1733.88 690.42 491.1 1725.78 0 1399.1 0 503.93 424.6 1213.4 1920.37"/>
<polygon points="876.91 557.59 1346.39 1547.39 1920 1275.31 1920 1120.36 1412.89 1360.9 1063.4 624.08 1800.21 274.6 1920 527.14 1920 200.46 1866.71 88.1 876.91 557.59"/>
<path d="M1249.89,690.58l229.49,483.83,440.62-209V853.81L1733.72,461.08Zm296,297.34L1436.38,757.07l230.85-109.49,109.49,230.84Z"/>
</g>',
'square' => '<g>
<polygon points="1920 1105.22 1920 950.26 1279.9 1253.88 690.42 11.1 713.81 0 530.2 0 1213.4 1440.37 1920 1105.22"/>
<polygon points="1346.39 1067.39 1920 795.31 1920 640.36 1412.89 880.9 1063.4 144.08 1367.16 0 1040.49 0 876.91 77.59 1346.39 1067.39"/>
<polygon points="1920 0 1897.64 0 1920 47.14 1920 0"/>
<path d="M1693.84,0,1249.89,210.58l229.49,483.83,440.62-209V373.81L1742.69,0Zm-148,507.92L1436.38,277.07l230.85-109.49,109.49,230.84Z"/>
</g>',
),
'rotated' => array(
'landscape' => '<path d="M167.58,252.77,398.42,143.28l109.5,230.85L277.07,483.62ZM373.81,0H47.14L0,22.36v155Zm320.6,440.62L210.58,670.11,0,226.16V552.84L144.08,856.6,880.9,507.11,640.36,0H485.41Zm373,133L77.59,1043.09,0,879.51v326.68l11.1,23.39L1253.88,640.1,950.27,0h-155Zm373,133L0,1389.8V1440H1920V0H1105.22Z"/>',
'portrait' => '<path d="M167.58,252.77,398.42,143.28l109.5,230.85L277.07,483.62ZM373.81,0H47.14L0,22.36v155Zm320.6,440.62L210.58,670.11,0,226.16V552.84L144.08,856.6,880.9,507.11,640.36,0H485.41Zm373,133L77.59,1043.09,0,879.51v326.68l11.1,23.39L1253.88,640.1,950.27,0h-155Zm373,133L0,1389.8V2560H1920V0H1105.22Z"/>',
'square' => '<path d="M167.58,252.77,398.42,143.28l109.5,230.85L277.07,483.62ZM373.81,0H47.14L0,22.36v155Zm320.6,440.62L210.58,670.11,0,226.16V552.84L144.08,856.6,880.9,507.11,640.36,0H485.41Zm373,133L77.59,1043.09,0,879.51v326.68l11.1,23.39L1253.88,640.1,950.27,0h-155Zm373,133L0,1389.8V1920H1920V0H1105.22Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M77.59,1043.09,0,879.51V552.84L144.08,856.6,880.9,507.11,640.36,0H795.31l272.08,573.61Zm133-373L0,226.16V177.31L373.81,0h111.6l209,440.62Zm-43-417.34L277.07,483.62,507.92,374.13,398.42,143.28ZM1105.22,0h-155l303.61,640.1L11.1,1229.58,0,1206.19V1389.8L1440.37,706.6ZM0,0V22.36L47.14,0Z"/>',
'portrait' => '<path d="M694.41,440.62,485.41,0H373.81L0,177.31v48.85l210.58,444Zm-296-297.34,109.5,230.85L277.07,483.62,167.58,252.77ZM77.59,1043.09,0,879.51V552.84L144.08,856.6,880.9,507.11,640.36,0H795.31l272.08,573.61ZM1440.37,706.6,0,1389.8V1206.19l11.1,23.39L1253.88,640.1,950.27,0h155ZM47.14,0,0,22.36V0Z"/>',
'square' => '<path d="M77.59,1043.09,0,879.51V552.84L144.08,856.6,880.9,507.11,640.36,0H795.31l272.08,573.61Zm133-373L0,226.16V177.31L373.81,0h111.6l209,440.62Zm-43-417.34L277.07,483.62,507.92,374.13,398.42,143.28ZM0,0V22.36L47.14,0ZM1105.22,0h-155l303.61,640.1L11.1,1229.58,0,1206.19V1389.8L1440.37,706.6Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Square_Stripes();

View File

@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Triangles.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Triangles
*
* @since 4.15.0
*/
class ET_Builder_Mask_Triangles extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Triangles', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<polygon points="1920 98.49 1568 776.05 1164.83 0 0 0 0 1440 1331.44 1440 1920 307.07 1920 98.49"/>',
'portrait' => '<polygon points="1920 540.23 1586.65 1181.89 972.65 0 0 0 0 2560 997.76 2560 1920 784.79 1920 540.23"/>',
'square' => '<polygon points="1920 230.67 1484.67 1068.63 929.51 0 0 0 0 1920 1150.9 1920 1920 439.56 1920 230.67"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M1568,776.06,1164.83,0H1920V98.49Zm352-469L1331.44,1440H1920Z"/>',
'portrait' => '<path d="M1586.65,1181.9,972.65,0H1920V540.23ZM1920,784.79,997.77,2560H1920Z"/>',
'square' => '<path d="M1484.67,1068.63,929.51,0H1920V230.67ZM1920,439.56,1150.9,1920H1920Z"/>',
),
'rotated' => array(
'landscape' => '<polygon points="230.67 0 1068.63 435.33 0 990.49 0 1440 1920 1440 1920 769.1 439.56 0 230.67 0"/>',
'portrait' => '<polygon points="230.67 0 1068.63 435.33 0 990.49 0 2560 1920 2560 1920 769.1 439.56 0 230.67 0"/>',
'square' => '<polygon points="230.67 0 1068.63 435.33 0 990.49 0 1920 1920 1920 1920 769.1 439.56 0 230.67 0"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M1068.63,435.33,0,990.49V0H230.67ZM439.56,0,1920,769.1V0Z"/>',
'portrait' => '<path d="M1068.63,435.33,0,990.49V0H230.67ZM439.56,0,1920,769.1V0Z"/>',
'square' => '<path d="M1068.63,435.33,0,990.49V0H230.67ZM439.56,0,1920,769.1V0Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Triangles();

View File

@ -0,0 +1,54 @@
<?php
/**
* Background Mask Style - Wave.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Mask_Wave
*
* @since 4.15.0
*/
class ET_Builder_Mask_Wave extends ET_Builder_Background_Mask_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'Wave', 'et-builder' ),
'svgContent' => array(
'default' => array(
'landscape' => '<path d="M0,1440H1920V0H0ZM1734.14,50H1830a40,40,0,0,1,40,40V1350a40,40,0,0,1-40,40H405.31C1070.07,1390,1069.38,50,1734.14,50Z"/>',
'portrait' => '<path d="M0,0V2560H1920V0ZM1870,2470a40,40,0,0,1-40,40H434.48C1086,2510,1085.32,50,1736.85,50H1830a40,40,0,0,1,40,40Z"/>',
'square' => '<path d="M0,1920H1920V0H0ZM1737.77,50H1830a40,40,0,0,1,40,40V1830a40,40,0,0,1-40,40H444.47C1091.46,1870,1090.78,50,1737.77,50Z"/>',
),
'default-inverted' => array(
'landscape' => '<path d="M405.31,1390c664.76,0,664.07-1340,1328.83-1340H1830a40,40,0,0,1,40,40V1350a40,40,0,0,1-40,40Z"/>',
'portrait' => '<path d="M434.48,2510C1086,2510,1085.32,50,1736.85,50H1830a40,40,0,0,1,40,40V2470a40,40,0,0,1-40,40Z"/>',
'square' => '<path d="M444.47,1870c647,0,646.31-1820,1293.3-1820H1830a40,40,0,0,1,40,40V1830a40,40,0,0,1-40,40Z"/>',
),
'rotated' => array(
'landscape' => '<path d="M1920,1440V0H0V1440ZM50,182.23V90A40,40,0,0,1,90,50H1830a40,40,0,0,1,40,40V1187C1870,540,50,829.22,50,182.23Z"/>',
'portrait' => '<path d="M1920,2560V0H0V2560ZM50,182.23V90A40,40,0,0,1,90,50H1830a40,40,0,0,1,40,40V1475.53C1870,828.54,50,829.22,50,182.23Z"/>',
'square' => '<path d="M1920,1920V0H0V1920ZM50,182.23V90A40,40,0,0,1,90,50H1830a40,40,0,0,1,40,40V1475.53C1870,828.54,50,829.22,50,182.23Z"/>',
),
'rotated-inverted' => array(
'landscape' => '<path d="M50,182.23V90A40,40,0,0,1,90,50H1830a40,40,0,0,1,40,40V1187C1870,540,50,829.22,50,182.23Z"/>',
'portrait' => '<path d="M50,182.23V90A40,40,0,0,1,90,50H1830a40,40,0,0,1,40,40V1475.53C1870,828.54,50,829.22,50,182.23Z"/>',
'square' => '<path d="M50,182.23V90A40,40,0,0,1,90,50H1830a40,40,0,0,1,40,40V1475.53C1870,828.54,50,829.22,50,182.23Z"/>',
),
),
);
}
}
return new ET_Builder_Mask_Wave();

View File

@ -0,0 +1,41 @@
<?php
/**
* Background Pattern Style - 3D Diamonds.
*
* @package Divi
* @sub-package Builder
* @since 4.15.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Pattern_3D_Diamonds
*
* @since 4.15.0
*/
class ET_Builder_Pattern_3D_Diamonds extends ET_Builder_Background_Pattern_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( '3D Diamonds', 'et-builder' ),
'svgContent' => array(
'default' => '<path d="M20,48H48L0,96V68Zm0,0L0,28V48ZM48,20.15,28,0H0L48,48,96,0H68Zm48,48L76,48H48L96,96ZM96,48V28L76,48ZM28,96H68L48,76Z"/>',
'default-inverted' => '<path d="M76,48H48L96,0V28Zm0,0L96,68V48ZM48,75.85,68,96H96L48,48,0,96H28Zm-48-48L20,48H48L0,0ZM0,48V68L20,48ZM68,0H28L48,20Z"/>',
'rotated' => '<path d="M48,76V48L96,96H68Zm0,0L28,96H48ZM20.15,48,0,68V96L48,48,0,0V28Zm48-48L48,20V48L96,0ZM48,0H28L48,20ZM96,68V28L76,48Z"/>',
'rotated-inverted' => '<path d="M48,20V48L0,0H28Zm0,0L68,0H48ZM75.85,48,96,28V0L48,48,96,96V68Zm-48,48L48,76V48L0,96ZM48,96H68L48,76ZM0,28V68L20,48Z"/>',
'thumbnail' => '<path d="M13.33,15,0,30V21.25L5.56,15ZM0,15H5.56L0,8.75ZM26.67,0H18.89L13.33,6.3,7.78,0H0L13.33,15ZM13.33,23.75,7.78,30H18.89ZM32.22,15l-5.55,6.25v.05L21.11,15H13.33L26.67,30,40,15Zm0,0L26.67,8.75,21.11,15H32.22ZM53.33,0H45.56L40,6.3,34.44,0H26.67L40,15ZM40,23.75,34.44,30H45.56ZM58.89,15l-5.56,6.25v.05L47.78,15H40L53.33,30,66.67,15Zm0,0L53.33,8.75,47.78,15H58.89ZM80,0H72.22L66.67,6.3,61.11,0H53.33L66.67,15Zm0,30V21.3L74.44,15H66.67Zm0-15V8.75L74.44,15ZM66.67,23.75,61.11,30H72.22ZM5.56,45,0,51.25V60L13.33,45ZM0,45H5.56L0,38.75Zm13.33-8.7L7.78,30H0L13.33,45,26.67,30H18.89ZM7.78,60H18.89l-5.56-6.25ZM32.22,45l-5.55,6.25v0L21.11,45H13.33L26.67,60,40,45Zm0,0-5.55-6.25L21.11,45H32.22ZM53.33,30H45.56L40,36.3,34.44,30H26.67L40,45ZM34.44,60H45.56L40,53.75ZM58.89,45l-5.56,6.25v0L47.78,45H40L53.33,60,66.67,45Zm0,0-5.56-6.25L47.78,45H58.89Zm7.78-8.7L61.11,30H53.33L66.67,45,80,30H72.22ZM80,60V51.3L74.44,45H66.67Zm0-15V38.75L74.44,45ZM61.11,60H72.22l-5.55-6.25Z"/>',
),
'width' => '96px',
'height' => '96px',
);
}
}
return new ET_Builder_Pattern_3D_Diamonds();

View File

@ -0,0 +1,75 @@
# Adding New Pattern Style
To add new Pattern style in the Divi Builder follow the Actions Items.
## Action Items
- [ ] Copy Pattern Template (see bellow).
- [ ] Replace `NAME`, all the `ET_Builder_Pattern_NAME` in the template (3 places).
- [ ] Replace `TITLE` in the template (2 places).
- [ ] Replace `PRIORITY` in the template, lower number will make it show-up early in Pattern Style Dropdown list in the VB.
- [ ] Save in a new file, e.g: `some-name.php`, in this folder, add/commit to the repository.
**Tip**:
- For `NAME`, if it's multiple words like `Diagonal Lines`, use `_` to join, e.g `Diagonal_Lines`.
- For `filename`, if it's multiple words like `Diagonal Lines`, use `-` to join and make it lower case, e.g `diagonal-lines.php`.
- Once new `filename.php` placed in this folder, the new pattern would automatically appear in the VB (just refresh).
- default', 'default-inverted', 'thumbnail' should only contain all tags inside the `<svg></svg>` file, e.g:
```
'thumbnail' => '<path d="M28,28H56V56H28ZM0,0H28V28H0Z"/>',
```
<hr>
### Pattern Template:
```
<?php
/**
* Background Pattern Style - TITLE.
*
* @package Divi
* @sub-package Builder
* @since ??
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Direct access forbidden.' );
}
/**
* Class ET_Builder_Pattern_NAME
*
* @since ??
*/
class ET_Builder_Pattern_NAME extends ET_Builder_Background_Pattern_Style_Base {
/**
* Configuration.
*
* @return array
*/
public function settings() {
return array(
'label' => esc_html__( 'TITLE', 'et-builder' ),
'svgContent' => array(
'default' => '',
'default-inverted' => '',
'rotated' => '',
'rotated-inverted' => '',
'thumbnail' => '',
),
'width' => '11px',
'height' => '11px',
// Replace following PRIORITY with number (1-9) and uncomment to make it on top 9 list.
// phpcs:ignore Squiz.PHP.CommentedOutCode.Found -- temporary comment.
// 'priority' => PRIORITY,
);
}
}
return new ET_Builder_Pattern_NAME();
```
<hr>
**Last Updated**: Mar 10, 2022.

Some files were not shown because too many files have changed in this diff Show More