upgraded to 4.14

main
naomi 9 months ago
parent 80f1e87db9
commit 3166bdf932
  1. 264
      changelog.txt
  2. 2
      core/_et_core_version.php
  3. BIN
      core/admin/fonts/builder.eot
  4. BIN
      core/admin/fonts/builder.ttf
  5. BIN
      core/admin/fonts/builder.woff
  6. 19
      core/components/Portability.php
  7. 18
      core/components/api/spam/ReCaptcha.php
  8. 2
      core/components/cache/Directory.php
  9. 40
      core/components/data/Utils.php
  10. 32
      core/functions.php
  11. 2
      css/dynamic-assets/footer.css
  12. 2
      css/dynamic-assets/woocommerce.css
  13. 18
      includes/builder/autoload.php
  14. 560
      includes/builder/class-et-builder-element.php
  15. 62
      includes/builder/class-et-builder-module-shortcode-manager.php
  16. 8
      includes/builder/core.php
  17. 11
      includes/builder/feature/AjaxCache.php
  18. 74
      includes/builder/feature/ajax-data/AjaxData.php
  19. 175
      includes/builder/feature/display-conditions/DisplayConditions.php
  20. 2
      includes/builder/feature/dynamic-assets/assets/css/blurb.css
  21. 2
      includes/builder/feature/dynamic-assets/assets/css/blurb_cpt.css
  22. 2
      includes/builder/feature/dynamic-assets/assets/css/comments.css
  23. 2
      includes/builder/feature/dynamic-assets/assets/css/comments_cpt.css
  24. 2
      includes/builder/feature/dynamic-assets/assets/css/grid_items.css
  25. 2
      includes/builder/feature/dynamic-assets/assets/css/grid_items_cpt.css
  26. 2
      includes/builder/feature/dynamic-assets/assets/css/shop.css
  27. 2
      includes/builder/feature/dynamic-assets/assets/css/shop_cpt.css
  28. 2
      includes/builder/feature/dynamic-assets/assets/css/team_member.css
  29. 2
      includes/builder/feature/dynamic-assets/assets/css/team_member_cpt.css
  30. 2
      includes/builder/feature/dynamic-assets/assets/css/woo_add_to_cart.css
  31. 2
      includes/builder/feature/dynamic-assets/assets/css/woo_add_to_cart_cpt.css
  32. 2
      includes/builder/feature/dynamic-assets/assets/css/woo_additional_info.css
  33. 2
      includes/builder/feature/dynamic-assets/assets/css/woo_additional_info_cpt.css
  34. 2
      includes/builder/feature/dynamic-assets/assets/css/woo_cart_notice.css
  35. 2
      includes/builder/feature/dynamic-assets/assets/css/woo_cart_notice_cpt.css
  36. 2
      includes/builder/feature/dynamic-assets/assets/css/woo_cart_products.css
  37. 2
      includes/builder/feature/dynamic-assets/assets/css/woo_cart_products_cpt.css
  38. 2
      includes/builder/feature/dynamic-assets/assets/css/woo_cart_totals.css
  39. 2
      includes/builder/feature/dynamic-assets/assets/css/woo_cart_totals_cpt.css
  40. 2
      includes/builder/feature/dynamic-assets/assets/css/woo_checkout_billing.css
  41. 2
      includes/builder/feature/dynamic-assets/assets/css/woo_checkout_billing_cpt.css
  42. 2
      includes/builder/feature/dynamic-assets/assets/css/woo_checkout_details.css
  43. 2
      includes/builder/feature/dynamic-assets/assets/css/woo_checkout_details_cpt.css
  44. 2
      includes/builder/feature/dynamic-assets/assets/css/woo_checkout_info.css
  45. 2
      includes/builder/feature/dynamic-assets/assets/css/woo_checkout_info_cpt.css
  46. 2
      includes/builder/feature/dynamic-assets/assets/css/woo_checkout_payment.css
  47. 2
      includes/builder/feature/dynamic-assets/assets/css/woo_checkout_payment_cpt.css
  48. 2
      includes/builder/feature/dynamic-assets/assets/css/woo_checkout_shipping.css
  49. 2
      includes/builder/feature/dynamic-assets/assets/css/woo_checkout_shipping_cpt.css
  50. 2
      includes/builder/feature/dynamic-assets/assets/css/woo_images.css
  51. 2
      includes/builder/feature/dynamic-assets/assets/css/woo_images_cpt.css
  52. 2
      includes/builder/feature/dynamic-assets/assets/css/woo_related_products_upsells.css
  53. 2
      includes/builder/feature/dynamic-assets/assets/css/woo_related_products_upsells_cpt.css
  54. 2
      includes/builder/feature/dynamic-assets/assets/css/woo_reviews.css
  55. 2
      includes/builder/feature/dynamic-assets/assets/css/woo_reviews_cpt.css
  56. 2
      includes/builder/feature/dynamic-assets/assets/css/woocommerce.css
  57. 2
      includes/builder/feature/dynamic-assets/assets/css/woocommerce_cpt.css
  58. 2
      includes/builder/feature/dynamic-assets/assets/js/motion-effects.js
  59. 2
      includes/builder/feature/dynamic-assets/assets/js/sticky-elements.js
  60. 381
      includes/builder/feature/dynamic-assets/class-dynamic-assets.php
  61. 8
      includes/builder/feature/dynamic-assets/dynamic-assets.php
  62. 51
      includes/builder/feature/dynamic-content.php
  63. 14
      includes/builder/feature/global-presets/History.php
  64. 25
      includes/builder/feature/global-presets/Settings.php
  65. 44
      includes/builder/feature/gutenberg/EditorTypography.php
  66. 58
      includes/builder/feature/icon-manager/ExtendedFontIcons.php
  67. 659
      includes/builder/feature/woocommerce-modules.php
  68. 8
      includes/builder/framework.php
  69. 2
      includes/builder/frontend-builder/assets/css/responsive-preview.css
  70. 2
      includes/builder/frontend-builder/build/boot.js
  71. 2
      includes/builder/frontend-builder/build/bundle.js
  72. 2
      includes/builder/frontend-builder/build/frame-helpers.js
  73. 2
      includes/builder/frontend-builder/build/frontend-builder-preview.js
  74. 2
      includes/builder/frontend-builder/build/gutenberg.css
  75. 2
      includes/builder/frontend-builder/build/gutenberg.js
  76. 2
      includes/builder/frontend-builder/build/preboot.js
  77. 2
      includes/builder/frontend-builder/build/theme-builder.js
  78. 96
      includes/builder/frontend-builder/helpers.php
  79. 115
      includes/builder/frontend-builder/i18n/display-conditions.php
  80. 2
      includes/builder/frontend-builder/theme-builder/frontend.php
  81. 4
      includes/builder/frontend-builder/theme-builder/woocommerce.php
  82. 113
      includes/builder/functions.php
  83. 4
      includes/builder/module/Blog.php
  84. 4
      includes/builder/module/Blurb.php
  85. 37
      includes/builder/module/Comments.php
  86. 41
      includes/builder/module/ContactForm.php
  87. 10
      includes/builder/module/Icon.php
  88. 23
      includes/builder/module/Image.php
  89. 13
      includes/builder/module/Portfolio.php
  90. 46
      includes/builder/module/field/Border.php
  91. 34
      includes/builder/module/field/DisplayConditions.php
  92. 3
      includes/builder/module/field/MarginPadding.php
  93. 3
      includes/builder/module/field/display-conditions/Author.php
  94. 8
      includes/builder/module/field/display-conditions/Browser.php
  95. 11
      includes/builder/module/field/display-conditions/CartContents.php
  96. 5
      includes/builder/module/field/display-conditions/Categories.php
  97. 5
      includes/builder/module/field/display-conditions/CategoryPage.php
  98. 4
      includes/builder/module/field/display-conditions/Cookie.php
  99. 10
      includes/builder/module/field/display-conditions/DateArchive.php
  100. 9
      includes/builder/module/field/display-conditions/DateTime.php
  101. Some files were not shown because too many files have changed in this diff Show More

@ -1,3 +1,267 @@
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.

@ -1,4 +1,4 @@
<?php
// Note, this will be updated automatically during grunt release task
$ET_CORE_VERSION = '4.13.0';
$ET_CORE_VERSION = '4.14.4';

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -1639,6 +1639,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 +1667,19 @@ class ET_Core_Portability {
}
foreach ( $data as $value ) {
if ( is_array( $value ) || is_object( $value ) ) {
$images = array_merge( $images, $this->get_data_images( (array) $value ) );
// If the $value is an object, but not a Post object then it's unlikely to contain any image data.
if ( is_object( $value ) && ! $value instanceof WP_Post ) {
continue;
}
if ( is_array( $value ) ) {
$images = array_merge( $images, $this->get_data_images( $value ) );
$value = implode( '|', $value );
} elseif ( $value instanceof WP_Post ) {
// If the $value is a Post object, we need only the post content.
$value = (array) $value->post_content;
$images = array_merge( $images, $this->get_data_images( $value ) );
$value = implode( '|', $value );
}
// Extract images from HTML or shortcodes.

@ -67,8 +67,24 @@ 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();
$enabled = et_builder_is_frontend() && 'on' === $et_dynamic_module_framework;
if ( $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;
}
/**

@ -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 );

@ -1041,6 +1041,46 @@ 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 );
}
}

@ -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 );
}
}
}

@ -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

@ -57,9 +57,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 +75,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 +121,8 @@ 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 ( '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 ) {

@ -722,6 +722,17 @@ class ET_Builder_Element {
*/
public static $all_module_slugs = array();
/**
* Whether current module uses unique ID or not.
*
* The unique ID will be added once the module is added via Divi Builder.
*
* @since 4.13.1
*
* @var boolean
*/
protected $_use_unique_id = false;
/**
* ET_Builder_Element constructor.
*/
@ -975,6 +986,15 @@ class ET_Builder_Element {
// phpcs:enable
}
if ( ! isset( $i18n['help'] ) ) {
// phpcs:disable WordPress.WP.I18n.MissingTranslatorsComment -- Tests won't need translator comment.
$i18n['help'] = array(
'design_advanced_module_settings' => esc_html__( 'Design Settings and Advanced Module Settings', 'et_builder' ),
'save_load_from_library' => esc_html__( 'Saving and loading from the library', 'et_builder' ),
);
// phpcs:enable
}
$this->_add_settings_modal_toggles(
'custom_css',
array(
@ -1075,7 +1095,7 @@ class ET_Builder_Element {
// Adding next tabs (design & tab) helps.
$next_tabs_help = array(
'id' => '1iqjhnHVA9Y',
'name' => esc_html__( 'Design Settings and Advanced Module Settings', 'et_builder' ),
'name' => $i18n['help']['design_advanced_module_settings'],
);
// Adjust row name.
@ -1093,7 +1113,7 @@ class ET_Builder_Element {
// Adding Divi Library helps.
$this->help_videos[] = array(
'id' => 'boNZZ0MYU0E',
'name' => esc_html__( 'Saving and loading from the library', 'et_builder' ),
'name' => $i18n['help']['save_load_from_library'],
);
}
@ -1747,6 +1767,11 @@ class ET_Builder_Element {
// Add support for the style presets.
$fields_unprocessed['_module_preset'] = array( 'type' => 'skip' );
// Add support for unique ID. Initially added for Contact Form module.
if ( $this->_use_unique_id ) {
$fields_unprocessed['_unique_id'] = array( 'type' => 'skip' );
}
if ( function_exists( 'et_builder_definition_sort' ) ) {
et_builder_definition_sort( $fields_unprocessed );
}
@ -2736,6 +2761,30 @@ class ET_Builder_Element {
*/
$this->props = apply_filters( 'et_pb_module_shortcode_attributes', $this->props, $attrs, $render_slug, $_address, $content );
// Converting icon values for custom\3rd-party modules with 'select_icon' fields.
if ( false === $this->_is_official_module ) {
foreach ( $this->get_fields() as $_field_name => $_field_data ) {
if ( ! empty( $_field_data['type'] ) && 'select_icon' === $_field_data['type'] && ! empty( $this->props[ $_field_name ] ) ) {
$all_responsive_modes_values = et_pb_responsive_options()->get_property_values( $attrs, $_field_name );
$all_modes_values = array(
et_pb_responsive_options()->get_field_name( $_field_name ) => et_()->array_get( $all_responsive_modes_values, 'desktop', '' ),
et_pb_responsive_options()->get_field_name( $_field_name, 'tablet' ) => et_()->array_get( $all_responsive_modes_values, 'tablet', '' ),
et_pb_responsive_options()->get_field_name( $_field_name, 'phone' ) => et_()->array_get( $all_responsive_modes_values, 'phone', '' ),
et_pb_hover_options()->get_hover_field( $_field_name ) => et_builder_is_hover_enabled( $_field_name, $attrs ) ? et_pb_hover_options()->get_value( $_field_name, $attrs, '' ) : null,
et_pb_sticky_options()->get_sticky_field( $_field_name ) => et_pb_sticky_options()->is_sticky_module( $_field_name ) && et_pb_sticky_options()->is_enabled( $_field_name, $attrs ) ? et_pb_sticky_options()->get_value( $_field_name, $attrs ) : null,
);
foreach ( $all_modes_values as $font_icon_name => $font_icon_value ) {
if ( ! empty( $font_icon_value ) && et_pb_maybe_old_divi_font_icon( $font_icon_value ) ) {
$this->props[ $font_icon_name ] = et_pb_build_extended_font_icon_value( $font_icon_value, false, false, true );
}
}
}
}
}
$global_content = false;
$ab_testing_enabled = et_is_ab_testing_active( $post_id );
@ -3219,50 +3268,19 @@ class ET_Builder_Element {
$this->is_rendering = true;
$render_method = $et_fb_processing_shortcode_object ? 'render_as_builder_data' : 'render';
/**
* Process Display Conditions and decide whether to display a module or not.
*/
// Setup variables.
$is_displayable = true;
$is_display_conditions_set = isset( $this->props['display_conditions'] ) && ! empty( $this->props['display_conditions'] );
$is_display_conditions_as_base64_empty = 'W10=' === $this->props['display_conditions'];
$has_display_conditions = $is_display_conditions_set && ! $is_display_conditions_as_base64_empty;
// Check if display_conditions attribute is defined, Decode the data and check if it is displayable.
if ( $has_display_conditions ) {
$display_conditions_json = base64_decode( $this->props['display_conditions'] ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode -- The returned data is an array and necessary validation checks are performed.
}
if ( $has_display_conditions && false !== $display_conditions_json ) {
$display_conditions = json_decode( $display_conditions_json, true );
$is_displayable = ET_Builder_Module_Fields_Factory::get( 'DisplayConditions' )->is_displayable( $display_conditions );
}
// Render the module as we normally would.
$output = $this->{$render_method}( $attrs, $content, $render_slug, $parent_address, $global_parent, $global_parent_type, $parent_type, $theme_builder_area );
/**
* Check if we're rendering on frontend, Then decide whether to keep the output or erase it.
* Filters every rendered module output for processing "Display Conditions" option group.
*
* @since 4.13.1
*
* We do need to render the module first and then decide to keep it or not, This is because
* we want the styles of the module (shortcode) and any nested modules inside it to get
* registered so "Dynamic Assets" would include the styles of all modules used on the page.
* Ref: https://github.com/elegantthemes/Divi/issues/24965
* @param string $output HTML output of the rendered module.
* @param string $render_method The render method used to render the module.
* @param ET_Builder_Element $this The current instance of ET_Builder_Element.
*/
if ( 'render' === $render_method ) {
if ( wp_doing_ajax() && et_pb_is_pagebuilder_used( get_the_ID() ) ) {
// "Blog Module" in VB will be rendered like a normal frontend request not as builder data, Here we set the output
// so it will always be visible in VB ignoring Display Conditions Ref: https://github.com/elegantthemes/Divi/issues/23309.
$is_vb_ajax_nonce_valid = isset( $_POST['et_pb_process_computed_property_nonce'] ) && wp_verify_nonce( sanitize_text_field( $_POST['et_pb_process_computed_property_nonce'] ), 'et_pb_process_computed_property_nonce' );
$output = $is_vb_ajax_nonce_valid ? $output : '';
} elseif ( 'et_pb_post_content' === $this->slug && ! $is_displayable && et_core_is_fb_enabled() ) {
// When VB is loaded and "Post Content" Module is used in TB and it's not displayable, set the correct
// output so it'd be displayed in VB and TB respectively Ref: https://github.com/elegantthemes/Divi/issues/23479.
$output = $output;
} else {
// All other scenarios will fall here, Normal frontend request, AJAX frontend request, etc.
$output = ( $is_displayable ) ? $output : '';
}
}
$output = apply_filters( 'et_module_process_display_conditions', $output, $render_method, $this );
$this->is_rendering = false;
@ -3801,7 +3819,7 @@ class ET_Builder_Element {
if ( $is_include_attr ) {
// Process Icon fields with a special `icons converting\decoding`.
if ( ! empty( $fields[ $shortcode_attr_key ] ) && 'select_icon' === $fields[ $shortcode_attr_key ]['type'] && is_string( $value ) ) {
if ( ! empty( $fields[ $shortcode_attr_key ] ) && 'select_icon' === $fields[ $shortcode_attr_key ]['type'] && et_pb_maybe_extended_icon( $value ) && is_string( $value ) ) {
$attrs[ $shortcode_attr_key ] = et_pb_check_and_convert_icon_raw_value( $value );
} else {
$attrs[ $shortcode_attr_key ] = is_string( $value ) ? html_entity_decode( $value ) : $value;
@ -5516,6 +5534,20 @@ class ET_Builder_Element {
* Add display conditions option fields.
*/
protected function _add_display_conditions_fields() {
/**
* Filters "Display Conditions" option visibility to determine whether to add its field to the Visual Builder or not.
*
* Useful for displaying/hiding the option on the Visual Builder.
*
* @since 4.13.1
*
* @param boolean True to make the option visible on VB, False to make it hidden.
*/
$is_display_conditions_enabled = apply_filters( 'et_is_display_conditions_option_visible', true );
if ( ! $is_display_conditions_enabled ) {
return;
}
if ( is_array( et_()->array_get( $this->advanced_fields, 'display_conditions', array() ) ) ) {
$this->_additional_fields_options = array_merge(
$this->_additional_fields_options,
@ -5892,21 +5924,23 @@ class ET_Builder_Element {
);
}
$additional_options = array();
$hover = et_pb_hover_options();
$additional_options = array();
$hover = et_pb_hover_options();
$default_toggle_priority = 70;
foreach ( $this->advanced_fields['button'] as $option_name => $option_settings ) {
$tab_slug = isset( $option_settings['tab_slug'] ) ? $option_settings['tab_slug'] : 'advanced';
$tab_slug = self::$_->array_get( $option_settings, 'tab_slug', 'advanced' );
$toggle_disabled = isset( $option_settings['disable_toggle'] ) && $option_settings['disable_toggle'];
$toggle_slug = '';
if ( ! $toggle_disabled ) {
$toggle_slug = isset( $option_settings['toggle_slug'] ) ? $option_settings['toggle_slug'] : $option_name;
$toggle_slug = self::$_->array_get( $option_settings, 'toggle_slug', $option_name );
$toggle_priority = self::$_->array_get( $option_settings, 'toggle_priority', $default_toggle_priority );
$button_toggle = array(
$option_name => array(
'title' => esc_html( $option_settings['label'] ),
'priority' => 70,
'priority' => $toggle_priority,
),
);
@ -7607,6 +7641,18 @@ class ET_Builder_Element {
}
}
if ( isset( $child_filter['depends_show_if_not'] ) ) {
foreach ( $additional_child_options as $option => $value ) {
$additional_child_options[ $option ]['depends_show_if_not'] = $child_filter['depends_show_if_not'];
}
}
if ( isset( $child_filter['depends_on'] ) ) {
foreach ( $additional_child_options as $option => $value ) {
$additional_child_options[ $option ]['depends_on'] = $child_filter['depends_on'];
}
}
$this->_additional_fields_options = array_merge( $this->_additional_fields_options, $additional_child_options );
}
@ -7821,47 +7867,95 @@ class ET_Builder_Element {
);
}
// Alternating Background Color.
$alternating_bg_color_options = isset( $option_settings['alternating_background_color'] )
? $option_settings['alternating_background_color']
: false;
if ( $alternating_bg_color_options ) {
$alternating_bg_color_args = is_array( $alternating_bg_color_options ) ? $alternating_bg_color_options : array();
// phpcs:ignore WordPress.Arrays.ArrayKeySpacingRestrictions.NoSpacesAroundArrayKeys -- The key is not a variable.
$additional_options["{$option_name}_alternating_background_color"] = array_merge(
array(
'label' => sprintf( esc_html__( '%1$s Alternating Background Color', 'et_builder' ), $option_settings['label'] ),
'description' => sprintf( esc_html__( 'Pick a color to be used for the alternating %1$s', 'et_builder' ), $option_settings['label'] ),
'type' => 'color-alpha',
'option_category' => 'field',
'custom_color' => true,
'tab_slug' => $tab_slug,
'toggle_slug' => $toggle_slug,
'hover' => 'tabs',
'mobile_options' => true,
'sticky' => true,
),
$alternating_bg_color_args
);
}
// Text Color.
$additional_options[ "{$option_name}_text_color" ] = array(
'label' => sprintf( $i18n['font']['color']['label'], $option_settings['label'] ),
'description' => esc_html__( 'Pick a color to be used for the text written inside input fields.', 'et_builder' ),
'type' => 'color-alpha',
'option_category' => 'field',
'custom_color' => true,
'tab_slug' => $tab_slug,
'toggle_slug' => $toggle_slug,
'hover' => 'tabs',
'mobile_options' => true,
'sticky' => true,
);
$text_color_options = isset( $option_settings['text_color'] ) ?
$option_settings['text_color'] : true;
if ( $text_color_options ) {
$text_color_args = is_array( $text_color_options )
? $text_color_options
: array();
// phpcs:ignore WordPress.Arrays.ArrayKeySpacingRestrictions.NoSpacesAroundArrayKeys -- The key is not a variable.
$additional_options["{$option_name}_text_color"] = array_merge(
array(
'label' => sprintf( $i18n['font']['color']['label'], $option_settings['label'] ),
'description' => esc_html__( 'Pick a color to be used for the text written inside input fields.', 'et_builder' ),
'type' => 'color-alpha',
'option_category' => 'field',
'custom_color' => true,
'tab_slug' => $tab_slug,
'toggle_slug' => $toggle_slug,
'hover' => 'tabs',
'mobile_options' => true,
'sticky' => true,
),
$text_color_args
);
}
// Focus Background Color.
$additional_options[ "{$option_name}_focus_background_color" ] = array(
'label' => sprintf( esc_html__( '%1$s Focus Background Color', 'et_builder' ), $option_settings['label'] ),
'description' => esc_html__( 'When a visitor clicks into an input field, it becomes focused. You can pick a color to be used for the input field background while focused.', 'et_builder' ),
'type' => 'color-alpha',
'option_category' => 'field',
'custom_color' => true,
'tab_slug' => $tab_slug,
'toggle_slug' => $toggle_slug,
'hover' => 'tabs',
'mobile_options' => true,
'sticky' => true,
);
$focus_background_color_options = isset( $option_settings['focus_background_color'] )
? $option_settings['focus_background_color']
: true;
if ( $focus_background_color_options ) {
// phpcs:ignore WordPress.Arrays.ArrayKeySpacingRestrictions.NoSpacesAroundArrayKeys -- The key is not a variable.
$additional_options["{$option_name}_focus_background_color"] = array(
'label' => sprintf( esc_html__( '%1$s Focus Background Color', 'et_builder' ), $option_settings['label'] ),
'description' => esc_html__( 'When a visitor clicks into an input field, it becomes focused. You can pick a color to be used for the input field background while focused.', 'et_builder' ),
'type' => 'color-alpha',
'option_category' => 'field',
'custom_color' => true,
'tab_slug' => $tab_slug,
'toggle_slug' => $toggle_slug,
'hover' => 'tabs',
'mobile_options' => true,
'sticky' => true,
);
}
// Focus Text Color.
$additional_options[ "{$option_name}_focus_text_color" ] = array(
'label' => sprintf( esc_html__( '%1$s Focus Text Color', 'et_builder' ), $option_settings['label'] ),
'description' => esc_html__( 'When a visitor clicks into an input field, it becomes focused. You can pick a color to be used for the input text while focused.', 'et_builder' ),
'type' => 'color-alpha',
'option_category' => 'field',
'custom_color' => true,
'tab_slug' => $tab_slug,
'toggle_slug' => $toggle_slug,
'hover' => 'tabs',
'mobile_options' => true,
'sticky' => true,
);
$focus_text_color_options = isset( $option_settings['focus_text_color'] )
? $option_settings['focus_text_color']
: true;
if ( $focus_text_color_options ) {
// phpcs:ignore WordPress.Arrays.ArrayKeySpacingRestrictions.NoSpacesAroundArrayKeys -- The key is not a variable.
$additional_options["{$option_name}_focus_text_color"] = array(
'label' => sprintf( esc_html__( '%1$s Focus Text Color', 'et_builder' ), $option_settings['label'] ),
'description' => esc_html__( 'When a visitor clicks into an input field, it becomes focused. You can pick a color to be used for the input text while focused.', 'et_builder' ),
'type' => 'color-alpha',
'option_category' => 'field',
'custom_color' => true,
'tab_slug' => $tab_slug,
'toggle_slug' => $toggle_slug,
'hover' => 'tabs',
'mobile_options' => true,
'sticky' => true,
);
}
// Font - Add current font settings into advanced fields. The font_field is basically
// combination of fonts (options group) + fields (type), but plural suffix is removed
@ -7907,43 +8001,52 @@ class ET_Builder_Element {
}
// Border Styles - Add current borders settings into advanced fields.
$border_style_options = self::$_->array_get( $option_settings, "border_styles.{$option_name}", array() );
$border_style_name = ! empty( $border_style_options['name'] ) ? $border_style_options['name'] : $option_name;
$border_style_settings = array_merge(
array(
'option_category' => 'field',
'tab_slug' => $tab_slug,
'toggle_slug' => $toggle_slug,
'defaults' => array(
'border_radii' => 'on|3px|3px|3px|3px',
'border_styles' => array(
'width' => '0px',
'color' => '#333333',
'style' => 'solid',
),
),
'fields_after' => array(
'use_focus_border_color' => array(
'label' => esc_html__( 'Use Focus Borders', 'et_builder' ),
'description' => esc_html__( 'Enabling this option will add borders to input fields when focused.', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'color_option',
'options' => array(
'off' => et_builder_i18n( 'No' ),
'on' => et_builder_i18n( 'Yes' ),
),
'affects' => array(
"border_radii_{$toggle_slug}_focus",
"border_styles_{$toggle_slug}_focus",
),
'tab_slug' => $tab_slug,
'toggle_slug' => $toggle_slug,
'default_on_front' => 'off',
),
$border_style_options = self::$_->array_get( $option_settings, "border_styles.{$option_name}", array() );
$border_style_name = ! empty( $border_style_options['name'] ) ? $border_style_options['name'] : $option_name;
$use_focus_borders = self::$_->array_get( $borders_options, "{$border_style_name}.use_focus_borders", true );
$settings = array(
'option_category' => 'field',
'tab_slug' => $tab_slug,
'toggle_slug' => $toggle_slug,
'defaults' => array(
'border_radii' => 'on|3px|3px|3px|3px',
'border_styles' => array(
'width' => '0px',
'color' => '#333333',
'style' => 'solid',
),
),
$border_style_options
);
if ( $use_focus_borders ) {
$settings = array_merge(
$settings,
array(
'fields_after' => array(
'use_focus_border_color' => array(
'label' => esc_html__( 'Use Focus Borders', 'et_builder' ),
'description' => esc_html__( 'Enabling this option will add borders to input fields when focused.', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'color_option',
'options' => array(
'off' => et_builder_i18n( 'No' ),
'on' => et_builder_i18n( 'Yes' ),
),
'affects' => array(
"border_radii_{$toggle_slug}_focus",
"border_styles_{$toggle_slug}_focus",
),
'tab_slug' => $tab_slug,
'toggle_slug' => $toggle_slug,
'default_on_front' => 'off',
),
),
)
);
}
$border_style_settings = array_merge( $settings, $border_style_options );
self::$_->array_set( $this->advanced_fields, "borders.{$border_style_name}", $border_style_settings );
// Border Styles Focus - Add current borders focus settings into advanced fields.
@ -8989,6 +9092,7 @@ class ET_Builder_Element {
// Get tab and toggle slugs value.
$tab_slug = isset( $field['tab_slug'] ) ? $field['tab_slug'] : '';
$toggle_slug = isset( $field['toggle_slug'] ) ? $field['toggle_slug'] : '';
$priority = isset( $field['priority'] ) ? $field['priority'] : false;
foreach ( $responsive_suffixes as $responsive_suffix ) {
$responsive_field_name = "{$field_name}_{$responsive_suffix}";
@ -8998,6 +9102,10 @@ class ET_Builder_Element {
'tab_slug' => $tab_slug,
'toggle_slug' => $toggle_slug,
);
if ( false !== $priority ) {
$fields[ $responsive_field_name ]['priority'] = $priority;
}
}
}
}
@ -10222,8 +10330,8 @@ class ET_Builder_Element {
'mobile_options' => true,
'sticky' => true,
'hover' => 'tabs',
'show_if' => array(
"${baseless_prefix}parallax" => 'off',
'show_if_not' => array(
"${baseless_prefix}parallax" => 'on',
),
)
);
@ -10254,8 +10362,8 @@ class ET_Builder_Element {
'mobile_options' => true,
'sticky' => true,
'hover' => 'tabs',
'show_if' => array(
"${baseless_prefix}parallax" => 'off',
'show_if_not' => array(
"${baseless_prefix}parallax" => 'on',
),
)
);
@ -10283,8 +10391,8 @@ class ET_Builder_Element {
'mobile_options' => true,
'sticky' => true,
'hover' => 'tabs',
'show_if' => array(
"${baseless_prefix}parallax" => 'off',
'show_if_not' => array(
"${baseless_prefix}parallax" => 'on',
),
)
);
@ -10322,8 +10430,8 @@ class ET_Builder_Element {
'mobile_options' => true,
'sticky' => true,
'hover' => 'tabs',
'show_if' => array(
"${baseless_prefix}parallax" => 'off',
'show_if_not' => array(
"${baseless_prefix}parallax" => 'on',
),
)
);
@ -16675,7 +16783,7 @@ class ET_Builder_Element {
$button_icon_tablet = isset( $button_icon_values['tablet'] ) ? $button_icon_values['tablet'] : '';
$button_icon_phone = isset( $button_icon_values['phone'] ) ? $button_icon_values['phone'] : '';
$important = et_()->array_get( $option_settings, 'css.important', false ) ?
' !important' : '';
' !important' : '';
// Button Icon Placement.
$button_icon_placement_values = et_pb_responsive_options()->get_property_values( $this->props, "{$option_name}_icon_placement" );
@ -16828,7 +16936,7 @@ class ET_Builder_Element {
} elseif ( ! $is_dbp ) {
// Explicitly add '.et_pb_section' to the selector so selector splitting during prefixing
// does not incorrectly add third party classes before #et-boc.
$css_element_processed = "body #page-container .et_pb_section {$css_element}";
$css_element_processed = et_()->append_prepend_comma_separated_selectors( $css_element, 'body #page-container .et_pb_section', 'prefix' );
}
if ( et_builder_has_limitation( 'force_use_global_important' ) ) {
@ -17010,7 +17118,9 @@ class ET_Builder_Element {
if ( 'off' === $button_use_icon ) {
$main_element_styles_after = 'display:none !important;';
$selector = sprintf( '%1$s:before, %1$s:after', $css_element_processed );
$before_selector = et_()->append_prepend_comma_separated_selectors( $css_element_processed, ':before', 'suffix', false );
$after_selector = et_()->append_prepend_comma_separated_selectors( $css_element_processed, ':after', 'suffix', false );
$selector = sprintf( '%1$s, %2$s', $before_selector, $after_selector );
$no_icon_styles = '';
// Check button custom padding. Prepend option name to get the correct padding.
@ -17035,8 +17145,9 @@ class ET_Builder_Element {
// No need to print custom padding if custom padding setting is disabled.
if ( ! empty( $no_icon_styles ) && ! $hide_custom_padding_setting ) {
$el_style = array(
'selector' => $css_element_processed . ',' . $css_element_processed . ':hover',
$hover_selector = et_()->append_prepend_comma_separated_selectors( $css_element_processed, ':hover', 'suffix', false );
$el_style = array(
'selector' => sprintf( '%1$s, %2$s', $css_element_processed, $hover_selector ),
'declaration' => rtrim( $no_icon_styles ),
);
self::set_style( $function_name, $el_style );
@ -17086,15 +17197,18 @@ class ET_Builder_Element {
$button_icon_left_content = '' !== $button_icon_code ? 'content: attr(data-icon);' : '';
$el_style = array(
'selector' => $css_element_processed . ':after',
$after_selector = et_()->append_prepend_comma_separated_selectors( $css_element_processed, ':after', 'suffix', false );
$el_style = array(
'selector' => $after_selector,
'declaration' => 'display: none;',
);
self::set_style( $function_name, $el_style );
if ( et_builder_has_limitation( 'use_additional_limiting_styles' ) ) {
$el_style = array(
'selector' => '.et_pb_row ' . $css_element_processed . ':hover',
$prefixed_selector = et_()->append_prepend_comma_separated_selectors( $css_element_processed, '.et_pb_row', 'prefix', true );
$prefixed_hover_selector = et_()->append_prepend_comma_separated_selectors( $prefixed_selector, ':hover', 'suffix', false );
$el_style = array(
'selector' => $prefixed_hover_selector,
'declaration' => 'padding-right: 1em; padding-left: 2em;',
);
self::set_style( $function_name, $el_style );
@ -17102,8 +17216,9 @@ class ET_Builder_Element {
$button_icon_left_content .= ' font-family: ' . et_pb_get_icon_font_family( $button_icon ) . ' !important;';
$button_icon_left_content .= ' font-weight: ' . et_pb_get_icon_font_weight( $button_icon ) . ' !important;';
$el_style = array(
'selector' => $css_element_processed . ':before',
$before_selector = et_()->append_prepend_comma_separated_selectors( $css_element_processed, ':before', 'suffix', false );
$el_style = array(
'selector' => $before_selector,
'declaration' => $button_icon_left_content,
);
self::set_style( $function_name, $el_style );
@ -17129,8 +17244,10 @@ class ET_Builder_Element {
'off' !== $button_on_hover ? 'opacity: 1;' : ''
);
$el_style = array(
'selector' => $css_element_processed . ':hover' . $button_icon_pseudo_selector,
$hover_selector = et_()->append_prepend_comma_separated_selectors( $css_element_processed, ':hover', 'suffix', false );
$hover_btn_icon_pseudo_selector = et_()->append_prepend_comma_separated_selectors( $hover_selector, $button_icon_pseudo_selector, 'suffix', false );
$el_style = array(
'selector' => $hover_btn_icon_pseudo_selector,
'declaration' => rtrim( $hover_after_styles ),
);
self::set_style( $function_name, $el_style );
@ -17140,8 +17257,9 @@ class ET_Builder_Element {
$default_icons_size = '1.6em';
$custom_icon_size = $button_text_size_processed;
$btn_icon_pseudo_selector = et_()->append_prepend_comma_separated_selectors( $css_element_processed, $button_icon_pseudo_selector, 'suffix', false );
$el_style = array(
'selector' => $css_element_processed . $button_icon_pseudo_selector,
'selector' => $btn_icon_pseudo_selector,
'declaration' => sprintf( 'font-size:%1$s;', $default_icons_size ),
);
self::set_style( $function_name, $el_style );
@ -17157,8 +17275,10 @@ class ET_Builder_Element {
$default_icons_size = '1.6em';
$custom_icon_size = $button_text_size_hover_processed;
$el_style = array(
'selector' => $css_element_processed . ':hover' . $button_icon_pseudo_selector,
$hover_selector = et_()->append_prepend_comma_separated_selectors( $css_element_processed, ':hover', 'suffix', false );
$hover_btn_icon_pseudo_selector = et_()->append_prepend_comma_separated_selectors( $hover_selector, $button_icon_pseudo_selector, 'suffix', false );
$el_style = array(
'selector' => $hover_btn_icon_pseudo_selector,
'declaration' => sprintf( 'font-size:%1$s;', $default_icons_size ),
);
self::set_style( $function_name, $el_style );
@ -17170,7 +17290,7 @@ class ET_Builder_Element {
self::set_style( $function_name, $el_style );
}
$selector = $css_element_processed . $button_icon_pseudo_selector;
$selector = et_()->append_prepend_comma_separated_selectors( $css_element_processed, $button_icon_pseudo_selector, 'suffix', false );
}
if ( $button_icon ) {
$main_element_styles_after .= ' font-family: ' . et_pb_get_icon_font_family( $button_icon ) . ' !important;';
@ -17304,19 +17424,19 @@ class ET_Builder_Element {
'' !== $current_border_radius ? sprintf( 'border-radius:%1$s;', $current_border_radius ) : '',
'' !== $current_font ? et_builder_set_element_font( $current_font, true ) : '',
'' !== $responsive_padding_right ?
sprintf(
'padding-right: %1$s%2$s;',
$responsive_padding_right,
$main_element_styles_padding_important ? ' !important' : ''
)
: '',
sprintf(
'padding-right: %1$s%2$s;',
$responsive_padding_right,
$main_element_styles_padding_important ? ' !important' : ''
)
: '',
'' !== $responsive_padding_left ?
sprintf(
'padding-left: %1$s%2$s;',
$responsive_padding_left,
$main_element_styles_padding_important ? ' !important' : ''
)
: ''
sprintf(
'padding-left: %1$s%2$s;',
$responsive_padding_left,
$main_element_styles_padding_important ? ' !important' : ''
)
: ''
)
);
@ -17335,26 +17455,27 @@ class ET_Builder_Element {
'%1$s
%2$s',
'' !== $responsive_hover_padding_right ?
sprintf(
'padding-right: %1$s%2$s;',
$responsive_hover_padding_right,
$main_element_styles_padding_important ? ' !important' : ''
)
: '',
sprintf(
'padding-right: %1$s%2$s;',
$responsive_hover_padding_right,
$main_element_styles_padding_important ? ' !important' : ''
)
: '',
'' !== $responsive_hover_padding_left ?
sprintf(
'padding-left: %1$s%2$s;',
$responsive_hover_padding_left,
$main_element_styles_padding_important ? ' !important' : ''
)
: ''
sprintf(
'padding-left: %1$s%2$s;',
$responsive_hover_padding_left,
$main_element_styles_padding_important ? ' !important' : ''
)
: ''
)
);
// Responsive button hover styles.
if ( ! empty( $responsive_button_hover_declaration ) ) {
$el_style = array(
'selector' => $css_element_processed . ':hover',
$hover_selector = et_()->append_prepend_comma_separated_selectors( $css_element_processed, ':hover', 'suffix', false );
$el_style = array(
'selector' => $hover_selector,
'declaration' => $responsive_button_hover_declaration,
'media_query' => self::get_media_query( $current_media_query ),
);
@ -17379,27 +17500,28 @@ class ET_Builder_Element {
'' !== $current_icon_code ? 'line-height: inherit;' : '',
'' !== $current_icon_code ? 'font-size: inherit !important;' : '',
'off' !== $current_on_hover && '' !== $current_icon_code ?
sprintf(
'margin-left: %1$s; %2$s: auto;',
'left' === $current_icon_placement ? '-1.3em' : '-1em',
'left' === $current_icon_placement ? 'right' : 'left'
)
: '',
sprintf(
'margin-left: %1$s; %2$s: auto;',
'left' === $current_icon_placement ? '-1.3em' : '-1em',
'left' === $current_icon_placement ? 'right' : 'left'
)
: '',
'off' === $current_on_hover ?
sprintf(
'margin-left: %1$s; %2$s: auto;',
'left' === $current_icon_placement ? '-1.3em' : '.3em',
'left' === $current_icon_placement ? 'right' : 'left'
)
: '', // #5
sprintf(
'margin-left: %1$s; %2$s: auto;',
'left' === $current_icon_placement ? '-1.3em' : '.3em',
'left' === $current_icon_placement ? 'right' : 'left'
)
: '', // #5
'' !== $current_icon_placement && in_array( $button_use_icon, array( 'default', 'on' ), true ) ? 'display: inline-block;' : '',
'off' !== $current_on_hover ? 'opacity: 0;' : 'opacity: 1;'
)
);
if ( ! empty( $responsive_button_after_declaration ) ) {
$el_style = array(
'selector' => $css_element_processed . $button_icon_pseudo_selector,
$btn_icon_pseudo_selector = et_()->append_prepend_comma_separated_selectors( $css_element_processed, $button_icon_pseudo_selector, 'suffix', false );
$el_style = array(
'selector' => $btn_icon_pseudo_selector,
'declaration' => $responsive_button_after_declaration,
'media_query' => self::get_media_query( $current_media_query ),
);
@ -17429,18 +17551,20 @@ class ET_Builder_Element {
$button_side_display = ':before';
}
$el_style = array(
'selector' => $css_element_processed . $button_side_hide,
$btn_side_hide_selector = et_()->append_prepend_comma_separated_selectors( $css_element_processed, $button_side_hide, 'suffix', false );
$el_style = array(
'selector' => $btn_side_hide_selector,
'declaration' => 'display: none;',
'media_query' => self::get_media_query( $current_media_query ),
);
self::set_style( $function_name, $el_style );
$btn_side_display_selector = et_()->append_prepend_comma_separated_selectors( $css_element_processed, $button_side_display, 'suffix', false );
$button_icon_content .= ' font-family: ' . et_pb_get_icon_font_family( $current_icon ) . ' !important;';
$button_icon_content .= ' font-weight: ' . et_pb_get_icon_font_weight( $current_icon ) . ' !important;';
$el_style = array(
'selector' => $css_element_processed . $button_side_display,
'selector' => $btn_side_display_selector,
'declaration' => $button_icon_content,
'media_query' => self::get_media_query( $current_media_query ),
);
@ -17467,8 +17591,10 @@ class ET_Builder_Element {
'off' !== $current_on_hover ? 'opacity: 1;' : ''
);
$el_style = array(
'selector' => $css_element_processed . ':hover' . $button_icon_pseudo_selector,
$hover_selector = et_()->append_prepend_comma_separated_selectors( $css_element_processed, ':hover', 'suffix', false );
$hover_btn_icon_pseudo_selector = et_()->append_prepend_comma_separated_selectors( $hover_selector, $button_icon_pseudo_selector, 'suffix', false );
$el_style = array(
'selector' => $hover_btn_icon_pseudo_selector,
'declaration' => rtrim( $hover_after_styles ),
'media_query' => self::get_media_query( $current_media_query ),
);
@ -17480,8 +17606,9 @@ class ET_Builder_Element {
$default_icons_size = '1.6em';
$custom_icon_size = $current_text_size;
$el_style = array(
'selector' => $css_element_processed . $button_icon_pseudo_selector,
$btn_icon_pseudo_selector = et_()->append_prepend_comma_separated_selectors( $css_element_processed, $button_icon_pseudo_selector, 'suffix', false );
$el_style = array(
'selector' => $btn_icon_pseudo_selector,
'declaration' => sprintf( 'font-size:%1$s;', $default_icons_size ),
'media_query' => self::get_media_query( $current_media_query ),
);
@ -17500,8 +17627,10 @@ class ET_Builder_Element {
$default_icons_size = '1.6em';
$custom_icon_size = $button_text_size_hover_processed;
$el_style = array(
'selector' => $css_element_processed . ':hover' . $button_icon_pseudo_selector,
$hover_selector = et_()->append_prepend_comma_separated_selectors( $css_element_processed, ':hover', 'suffix', false );
$hover_btn_icon_pseudo_selector = et_()->append_prepend_comma_separated_selectors( $hover_selector, $button_icon_pseudo_selector, 'suffix', false );
$el_style = array(
'selector' => $hover_btn_icon_pseudo_selector,
'declaration' => sprintf( 'font-size:%1$s;', $default_icons_size ),
'media_query' => self::get_media_query( $current_media_query ),
);
@ -17592,10 +17721,13 @@ class ET_Builder_Element {
$element_focus_sticky_selector = $sticky->add_sticky_to_order_class( $element_focus_selector, $this->is_sticky_module );
// 1.c. Build custom form field selector.
$bg_color_selector = ! empty( $option_settings['css']['background_color'] ) ? $option_settings['css']['background_color'] : $element_selector;</