upgraded to 4.14

This commit is contained in:
2021-12-20 18:06:11 +00:00
parent 80f1e87db9
commit 3166bdf932
153 changed files with 5204 additions and 1003 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
!function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=1436)}({1436:function(e,t,n){"use strict";(function(e){!function(t){t("body").on("click","a",(function(e){var n=t(this).attr("href"),i=void 0!==n?n.substr(0,1):"";"#"!==i&&""!==i&&(e.preventDefault(),t(".link-disabled").addClass("active"))})),t("body").on("click",".et_pb_prompt_proceed",(function(){t(".link-disabled").removeClass("active")}));window.addEventListener("message",(function(e){var n=t('<form id="preview-data-submission" method="POST" style="display: none;"></form>'),i=e.data,r=document.documentMode;if(e.origin===et_preview_params.preview_origin){if(void 0!==r&&r<10&&(i=JSON.parse(i)),i&&i.et_pb_preview_nonce){for(var o in i){t("<textarea />",{name:o,style:"display: none; "}).val(i[o]).appendTo(n)}n.append('<input type="submit" value="submit" style="display: none;" />'),n.appendTo(".container"),t("#preview-data-submission").trigger("submit")}}else t(".et-pb-preview-loading").replaceWith(t("<h4 />",{style:"text-align: center;"}).html(et_preview_params.alert_origin_not_matched))}),!1),1!==t("#content > .content .et-pb-preview-loading").length&&"undefined"!=typeof parent&&setTimeout((function(){var n={html:t("#content > .content").html(),stylesheets:[]};e.each(window.location.search.substr(1).split("&"),(function(e,t){var i=t.split("=");void 0!==i[0]&&void 0!==i[1]&&"iframe_id"===i[0]&&(n.iframe_id=i[1])})),t('link[rel="stylesheet"]').each((function(e,i){n.stylesheets.push(t(i).attr("href"))})),parent.postMessage(n,window.location.origin)}),2e3)}(e)}).call(this,n(9))},9:function(e,t){e.exports=window.jQuery}}));
!function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=1447)}({1447:function(e,t,n){"use strict";(function(e){!function(t){t("body").on("click","a",(function(e){var n=t(this).attr("href"),i=void 0!==n?n.substr(0,1):"";"#"!==i&&""!==i&&(e.preventDefault(),t(".link-disabled").addClass("active"))})),t("body").on("click",".et_pb_prompt_proceed",(function(){t(".link-disabled").removeClass("active")}));window.addEventListener("message",(function(e){var n=t('<form id="preview-data-submission" method="POST" style="display: none;"></form>'),i=e.data,r=document.documentMode;if(e.origin===et_preview_params.preview_origin){if(void 0!==r&&r<10&&(i=JSON.parse(i)),i&&i.et_pb_preview_nonce){for(var o in i){t("<textarea />",{name:o,style:"display: none; "}).val(i[o]).appendTo(n)}n.append('<input type="submit" value="submit" style="display: none;" />'),n.appendTo(".container"),t("#preview-data-submission").trigger("submit")}}else t(".et-pb-preview-loading").replaceWith(t("<h4 />",{style:"text-align: center;"}).html(et_preview_params.alert_origin_not_matched))}),!1),1!==t("#content > .content .et-pb-preview-loading").length&&"undefined"!=typeof parent&&setTimeout((function(){var n={html:t("#content > .content").html(),stylesheets:[]};e.each(window.location.search.substr(1).split("&"),(function(e,t){var i=t.split("=");void 0!==i[0]&&void 0!==i[1]&&"iframe_id"===i[0]&&(n.iframe_id=i[1])})),t('link[rel="stylesheet"]').each((function(e,i){n.stylesheets.push(t(i).attr("href"))})),parent.postMessage(n,window.location.origin)}),2e3)}(e)}).call(this,n(9))},9:function(e,t){e.exports=window.jQuery}}));

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -432,6 +432,13 @@ function et_fb_get_dynamic_backend_helpers() {
'registeredPostTypeOptions' => et_get_registered_post_type_options(),
);
// `class_exists` check avoids https://github.com/elegantthemes/Divi/issues/23662 error.
if ( class_exists( 'ET_Builder_Module_Helper_Woocommerce_Modules' ) ) {
$helpers['wooCommerce'] = array(
'themeBuilderCheckoutTemplatePageId' => ET_Builder_Module_Helper_Woocommerce_Modules::get_tb_template_id_by_current_page_id( $post_id ),
);
}
$helpers['css'] = array(
'wrapperPrefix' => ET_BUILDER_CSS_WRAPPER_PREFIX,
'containerPrefix' => ET_BUILDER_CSS_CONTAINER_PREFIX,
@ -509,10 +516,6 @@ function et_fb_get_static_backend_helpers( $post_type ) {
'video' => 'https://www.youtube.com/watch?v=FkQuawiGWUw',
);
$woocommerce_modules_defaults = array(
'price' => '',
);
/**
* App preferences
*/
@ -523,6 +526,8 @@ function et_fb_get_static_backend_helpers( $post_type ) {
*
* @var array $helpers
*/
// phpcs:disable WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned -- Invalid warning.
// phpcs:disable WordPress.Arrays.MultipleStatementAlignment.LongIndexSpaceBeforeDoubleArrow -- Invalid warning.
$helpers = array(
'blog_id' => get_current_blog_id(),
'diviLibraryUrl' => ET_BUILDER_DIVI_LIBRARY_URL,
@ -611,7 +616,13 @@ function et_fb_get_static_backend_helpers( $post_type ) {
'modules' => $fb_modules_array,
'modulesCount' => count( $fb_modules_array ),
'modulesWithChildren' => ET_Builder_Element::get_slugs_with_children( $post_type ),
'modulesShowOnCancelDropClassname' => apply_filters( 'et_fb_modules_show_on_cancel_drop_classname', array( 'et_pb_gallery', 'et_pb_filterable_portfolio' ) ),
'modulesShowOnCancelDropClassname' => apply_filters(
'et_fb_modules_show_on_cancel_drop_classname',
array(
'et_pb_gallery',
'et_pb_filterable_portfolio',
)
),
'modulesFeaturedImageBackground' => ET_Builder_Element::get_featured_image_background_modules( $post_type ),
'modulesRowOverlappingAddNew' => $modules_row_overlapping_add_new,
'structureModules' => array(
@ -677,8 +688,8 @@ function et_fb_get_static_backend_helpers( $post_type ) {
'classNames' => array(
'hide_on_mobile_class' => 'et-hide-mobile',
),
'columnLayouts' => et_builder_get_columns(),
'searchFilterItems' => array(
'columnLayouts' => et_builder_get_columns(),
'searchFilterItems' => array(
'show_only' => array(
'styles_modified' => esc_html__( 'Modified Styles', 'et_builder' ),
'styles_responsive' => esc_html__( 'Responsive Styles/Content', 'et_builder' ),
@ -701,7 +712,7 @@ function et_fb_get_static_backend_helpers( $post_type ) {
'image',
'video',
),
'defaults' => array(
'defaults' => array(
'et_pb_accordion_item' => array(
'title' => $modules_defaults['title'],
'content' => $modules_defaults['body'],
@ -832,11 +843,11 @@ function et_fb_get_static_backend_helpers( $post_type ) {
'mix_blend_mode' => ET_Global_Settings::get_value( 'all_mix_blend_mode' ),
),
),
'saveModuleLibraryCategories' => et_fb_prepare_library_cats(),
'emailNameFieldOnlyProviders' => array_keys( ET_Builder_Module_Signup::providers()->names_by_slug( 'all', 'name_field_only' ) ),
'emailPredefinedCustomFields' => ET_Core_API_Email_Providers::instance()->custom_fields_data(),
'emailCustomFieldProviders' => array_keys( ET_Builder_Module_Signup::providers()->names_by_slug( 'all', 'custom_fields' ) ),
'columnSettingFields' => array(
'saveModuleLibraryCategories' => et_fb_prepare_library_cats(),
'emailNameFieldOnlyProviders' => array_keys( ET_Builder_Module_Signup::providers()->names_by_slug( 'all', 'name_field_only' ) ),
'emailPredefinedCustomFields' => ET_Core_API_Email_Providers::instance()->custom_fields_data(),
'emailCustomFieldProviders' => array_keys( ET_Builder_Module_Signup::providers()->names_by_slug( 'all', 'custom_fields' ) ),
'columnSettingFields' => array(
'general' => array(
'bg_img_%s' => ET_Builder_Element::background_field_template(
'image',
@ -1305,7 +1316,20 @@ function et_fb_get_static_backend_helpers( $post_type ) {
'sub_toggle' => 'column_%s',
'hover' => 'tabs',
'sticky' => true,
'allowed_units' => array( '%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw' ),
'allowed_units' => array(
'%',
'em',
'rem',
'px',
'cm',
'mm',
'in',
'pt',
'pc',
'ex',
'vh',
'vw',
),
),
),
'css' => array(
@ -1361,15 +1385,49 @@ function et_fb_get_static_backend_helpers( $post_type ) {
),
),
'knownShortcodeWrappers' => et_fb_known_shortcode_wrappers(),
'acceptableCSSStringValues' => et_builder_get_acceptable_css_string_values( 'all' ),
'customModuleCredits' => ET_Builder_Element::get_custom_modules_credits( $post_type ),
'ignoreAdminBarClickIds' => apply_filters( 'et_fb_ignore_adminbar_click_ids', array() ),
'stickyElements' => array(
'knownShortcodeWrappers' => et_fb_known_shortcode_wrappers(),
'acceptableCSSStringValues' => et_builder_get_acceptable_css_string_values( 'all' ),
'customModuleCredits' => ET_Builder_Element::get_custom_modules_credits( $post_type ),
'ignoreAdminBarClickIds' => apply_filters( 'et_fb_ignore_adminbar_click_ids', array() ),
'stickyElements' => array(
'incompatibleFields' => $sticky->get_incompatible_fields(),
'validStickyPositions' => $sticky->get_valid_sticky_positions(),
),
);
// phpcs:enable WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned
// phpcs:enable WordPress.Arrays.MultipleStatementAlignment.LongIndexSpaceBeforeDoubleArrow
if ( function_exists( 'WC' ) ) {
$helpers['wooCommerce'] = array();
if ( function_exists( 'et_builder_wc_get_checkout_notice' ) ) {
$checkout_modules_notice = array(
'requiredCheckoutModulesNotice' => array(
'isBillingOnly' => 'billing_only' === get_option( 'woocommerce_ship_to_destination' ),
'isBillingOnlyNotice' => et_builder_wc_get_checkout_notice( 'billing_only' ),
'notice' => et_builder_wc_get_checkout_notice( 'shipping' ),
),
);
$helpers['wooCommerce'] = array_merge( $helpers['wooCommerce'], $checkout_modules_notice );
}
if ( function_exists( 'et_builder_wc_get_non_checkout_page_notice' ) ) {
$checkout_page_notice = array(
'nonCheckoutPageNotice' => et_builder_wc_get_non_checkout_page_notice(),
);
$helpers['wooCommerce'] = array_merge( $helpers['wooCommerce'], $checkout_page_notice );
}
$checkout_page_id = array(
'checkoutPageId' => function_exists( 'wc_get_page_id' )
? wc_get_page_id( 'checkout' )
: 0,
);
$helpers['wooCommerce'] = array_merge( $helpers['wooCommerce'], $checkout_page_id );
}
$modules_i10n = ET_Builder_Element::get_modules_i10n( $post_type );
$additional_i10n = array(

View File

@ -100,11 +100,6 @@ return array(
'Editor' => esc_html__( 'Editor', 'et_builder' ),
'Subscriber' => esc_html__( 'Subscriber', 'et_builder' ),
'Pages' => esc_html__( 'Pages', 'et_builder' ),
'Display Only If Page' => esc_html__( 'Display Only If Page', 'et_builder' ),
'Posts' => esc_html__( 'Posts', 'et_builder' ),
'Post Type' => esc_html__( 'Post Type', 'et_builder' ),
'Display Only If Post Type' => esc_html__( 'Display Only If Post Type', 'et_builder' ),
@ -148,4 +143,114 @@ return array(
'Days' => esc_html__( 'Days', 'et_builder' ),
'Minutes' => esc_html__( 'Minutes', 'et_builder' ),
'Hours' => esc_html__( 'Hours', 'et_builder' ),
'Custom Field' => esc_html__( 'Custom Field', 'et_builder' ),
'Manual Custom Field Name' => esc_html__( 'Manual Custom Field Name', 'et_builder' ),
'Manual Custom Field Value' => esc_html__( 'Manual Custom Field Value', 'et_builder' ),
'Custom Field Name' => esc_html__( 'Custom Field Name', 'et_builder' ),
'Contains' => esc_html__( 'Contains', 'et_builder' ),
'Does Not Contain' => esc_html__( 'Does Not Contain', 'et_builder' ),
'Is Any Value' => esc_html__( 'Is Any Value', 'et_builder' ),
'Has No Value' => esc_html__( 'Has No Value', 'et_builder' ),
'Is Greater Than (numeric values only)' => esc_html__( 'Is Greater Than (numeric values only)', 'et_builder' ),
'Is Less Than (numeric values only)' => esc_html__( 'Is Less Than (numeric values only)', 'et_builder' ),
'Custom Field Value' => esc_html__( 'Custom Field Value', 'et_builder' ),
'A Specific URL Parameter' => esc_html__( 'A Specific URL Parameter', 'et_builder' ),
'Any URL Parameter' => esc_html__( 'Any URL Parameter', 'et_builder' ),
'Exist' => esc_html__( 'Exist', 'et_builder' ),
'Does not Exist' => esc_html__( 'Does not Exist', 'et_builder' ),
'Equals' => esc_html__( 'Equals', 'et_builder' ),
'Does not Equal' => esc_html__( 'Does not Equal', 'et_builder' ),
'Contains' => esc_html__( 'Contains', 'et_builder' ),
'Does not Contain' => esc_html__( 'Does not Contain', 'et_builder' ),
'URL Parameter Name' => esc_html__( 'URL Parameter Name', 'et_builder' ),
'URL Parameter Value' => esc_html__( 'URL Parameter Value', 'et_builder' ),
'URL Parameter' => esc_html__( 'URL Parameter', 'et_builder' ),
'Any' => esc_html__( 'Any', 'et_builder' ),
'Product Stock' => esc_html__( 'Product Stock', 'et_builder' ),
'Display Only If a Specific Product' => esc_html__( 'Display Only If a Specific Product', 'et_builder' ),
'Is in stock' => esc_html__( 'Is in stock', 'et_builder' ),
'Is out of stock' => esc_html__( 'Is out of stock', 'et_builder' ),
'Only display if' => esc_html__( 'Only display if', 'et_builder' ),
'products are in stock' => esc_html__( 'products are in stock', 'et_builder' ),
'products are out of stock' => esc_html__( 'products are out of stock', 'et_builder' ),
'product is in stock' => esc_html__( 'product is in stock', 'et_builder' ),
'product is out of stock' => esc_html__( 'product is out of stock', 'et_builder' ),
// Logged In Status Tooltip.
'Only display to logged in visitors' => esc_html__( 'Only display to logged in visitors', 'et_builder' ),
'Only display to logged out visitors' => esc_html__( 'Only display to logged out visitors', 'et_builder' ),
// Post Type and Other Common Tooltips.
'Only display on' => esc_html__( 'Only display on', 'et_builder' ),
"Don't display on" => esc_html__( "Don't display on", 'et_builder' ),
// Author Tooltip.
'Only display on posts authored by' => esc_html__( 'Only display on posts authored by', 'et_builder' ),
"Don't display on posts authored by" => esc_html__( "Don't display on posts authored by", 'et_builder' ),
// User Role and Other Common Tooltips.
'Only display to' => esc_html__( 'Only display to', 'et_builder' ),
"Don't display to" => esc_html__( "Don't display to", 'et_builder' ),
// Date & Time Tooltip.
'Only display after' => esc_html__( 'Only display after', 'et_builder' ),
'Only display before' => esc_html__( 'Only display before', 'et_builder' ),
'Only display on first day of month' => esc_html__( 'Only display on first day of the month', 'et_builder' ),
'Only display on last day of month' => esc_html__( 'Only display on last day of the month', 'et_builder' ),
// Category Page, Tag Page, Page Visit Tooltip.
'Pages' => esc_html__( 'Pages', 'et_builder' ),
// Cart Content Tooltip.
'Cart Contents Has Products' => esc_html__( 'Only display to users with Products in their cart', 'et_builder' ),
'Cart Contents Is Empty' => esc_html__( 'Only display to users with an empty cart', 'et_builder' ),
'Only display to users with' => esc_html__( 'Only display to users with', 'et_builder' ),
'in their cart' => esc_html__( 'in their cart', 'et_builder' ),
'Only display to users without' => esc_html__( 'Only display to users without', 'et_builder' ),
// Cookie Tooltip.
'cookie' => esc_html__( 'cookie', 'et_builder' ),
'cookie with' => esc_html__( 'cookie with', 'et_builder' ),
'value' => esc_html__( 'value', 'et_builder' ),
'Only display to users who have' => esc_html__( 'Only display to users who have', 'et_builder' ),
"Don't display to users who have" => esc_html__( "Don't display to users who have", 'et_builder' ),
// Date Archive Tooltip.
'Only display on date archives after' => esc_html__( 'Only display on date archives after', 'et_builder' ),
'Only display on date archives before' => esc_html__( 'Only display on date archives before', 'et_builder' ),
// Number of Views Tooltip.
'Only display' => esc_html__( 'Only display', 'et_builder' ),
', Reset after' => esc_html__( ', Reset after', 'et_builder' ),
'times' => esc_html__( 'times', 'et_builder' ),
// Page Visit, Post Visit Tooltip.
'Only display to users visited' => esc_html__( 'Only display to users who have visited', 'et_builder' ),
"Don't display to users visited" => esc_html__( "Don't display to users who have visited", 'et_builder' ),
'Posts' => esc_html__( 'Posts', 'et_builder' ),
// Product Purchase Tooltip.
'Only display to users bought product' => esc_html__( 'Only display to users who have bought a product', 'et_builder' ),
"Don't display to users bought product" => esc_html__( "Don't display to users who have bought a product", 'et_builder' ),
'Only Display to users who bought' => esc_html__( 'Only Display to users who have bought', 'et_builder' ),
"Don't display to users who bought" => esc_html__( "Don't display to users who have bought", 'et_builder' ),
// Search Results Tooltip.
'Only display on search results for' => esc_html__( 'Only display on search results for', 'et_builder' ),
"Don't display on search results for" => esc_html__( "Don't display on search results for", 'et_builder' ),
// Custom Field Tooltip.
'Only display on posts where' => esc_html__( 'Only display on posts where', 'et_builder' ),
'custom field' => esc_html__( 'custom field', 'et_builder' ),
'is equal to' => esc_html__( 'is equal to', 'et_builder' ),
'is not equal to' => esc_html__( 'is not equal to', 'et_builder' ),
'contains' => esc_html__( 'custom field', 'et_builder' ),
'does not contain' => esc_html__( 'does not contain', 'et_builder' ),
'is any value' => esc_html__( 'is any value', 'et_builder' ),
'has no value' => esc_html__( 'has no value', 'et_builder' ),
'is greater than' => esc_html__( 'is greater than', 'et_builder' ),
'is less than' => esc_html__( 'is less than', 'et_builder' ),
);

View File

@ -135,7 +135,7 @@ function et_theme_builder_frontend_enqueue_styles( $layouts ) {
return;
}
if ( ! is_singular() || et_core_is_fb_enabled() ) {
if ( ! is_singular() && ! et_core_is_fb_enabled() ) {
// Create styles managers so they can enqueue styles early enough.
// What styles are created and how they are enqueued:
// - In FE, singular post view:

View File

@ -131,7 +131,9 @@ function et_theme_builder_wc_set_global_objects( $conditional_tags = array() ) {
// Set current post ID as product's ID. `ET_Theme_Builder_Woocommerce_Product_Variable_Placeholder`
// handles all placeholder related value but product ID need to be manually set to match current
// post's ID. This is especially needed when add-ons is used and accessing get_id() method.
$product->set_id( $post->ID );
if ( isset( $post->ID ) ) {
$product->set_id( $post->ID );
}
// Save modified global for later use
$tb_wc_post = $post;