Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-conte.../themes/Divi/includes/builder
File: functions.php
</div>
[4000] Fix | Delete
</div>
[4001] Fix | Delete
</div>',
[4002] Fix | Delete
esc_html__( 'Add New Layout', 'et_builder' ),
[4003] Fix | Delete
esc_html__( 'Layout Name', 'et_builder' ),
[4004] Fix | Delete
$template_type_option_output,
[4005] Fix | Delete
$template_global_option_output,
[4006] Fix | Delete
$layout_cat_option_output, //#5
[4007] Fix | Delete
apply_filters( 'et_pb_new_layout_before_options', '' ),
[4008] Fix | Delete
apply_filters( 'et_pb_new_layout_after_options', '' )
[4009] Fix | Delete
);
[4010] Fix | Delete
[4011] Fix | Delete
return apply_filters( 'et_pb_new_layout_modal_output', $output );
[4012] Fix | Delete
}
[4013] Fix | Delete
}
[4014] Fix | Delete
[4015] Fix | Delete
/**
[4016] Fix | Delete
* Get layout type of given post ID
[4017] Fix | Delete
* @return string|bool
[4018] Fix | Delete
*/
[4019] Fix | Delete
if ( ! function_exists( 'et_pb_get_layout_type' ) ) :
[4020] Fix | Delete
function et_pb_get_layout_type( $post_id ) {
[4021] Fix | Delete
// Get taxonomies
[4022] Fix | Delete
$layout_type_data = wp_get_post_terms( $post_id, 'layout_type' );
[4023] Fix | Delete
[4024] Fix | Delete
if ( empty( $layout_type_data ) ) {
[4025] Fix | Delete
return false;
[4026] Fix | Delete
}
[4027] Fix | Delete
[4028] Fix | Delete
// Pluck name out of taxonomies
[4029] Fix | Delete
$layout_type_array = wp_list_pluck( $layout_type_data, 'name' );
[4030] Fix | Delete
[4031] Fix | Delete
// Logically, a layout only have one layout type.
[4032] Fix | Delete
$layout_type = implode( "|", $layout_type_array );
[4033] Fix | Delete
[4034] Fix | Delete
return $layout_type;
[4035] Fix | Delete
}
[4036] Fix | Delete
endif;
[4037] Fix | Delete
[4038] Fix | Delete
if ( ! function_exists( 'et_pb_is_wp_old_version' ) ) :
[4039] Fix | Delete
function et_pb_is_wp_old_version() {
[4040] Fix | Delete
global $wp_version;
[4041] Fix | Delete
[4042] Fix | Delete
$wp_major_version = substr( $wp_version, 0, 3 );
[4043] Fix | Delete
[4044] Fix | Delete
if ( version_compare( $wp_major_version, '4.5', '<' ) ) {
[4045] Fix | Delete
return true;
[4046] Fix | Delete
}
[4047] Fix | Delete
[4048] Fix | Delete
return false;
[4049] Fix | Delete
}
[4050] Fix | Delete
endif;
[4051] Fix | Delete
[4052] Fix | Delete
if ( ! function_exists( 'et_pb_is_wp_old_version' ) ) :
[4053] Fix | Delete
function et_pb_is_wp_old_version(){
[4054] Fix | Delete
global $typenow, $post, $wp_version;
[4055] Fix | Delete
[4056] Fix | Delete
$wp_major_version = substr( $wp_version, 0, 3 );
[4057] Fix | Delete
[4058] Fix | Delete
if ( version_compare( $wp_major_version, '4.5', '<' ) ) {
[4059] Fix | Delete
return true;
[4060] Fix | Delete
}
[4061] Fix | Delete
[4062] Fix | Delete
return false;
[4063] Fix | Delete
}
[4064] Fix | Delete
endif;
[4065] Fix | Delete
[4066] Fix | Delete
if ( ! function_exists( 'et_builder_theme_or_plugin_updated_cb' ) ):
[4067] Fix | Delete
function et_builder_theme_or_plugin_updated_cb() {
[4068] Fix | Delete
// Delete cached definitions / helpers
[4069] Fix | Delete
et_fb_delete_builder_assets();
[4070] Fix | Delete
et_update_option( 'et_pb_clear_templates_cache', true );
[4071] Fix | Delete
}
[4072] Fix | Delete
add_action( 'after_switch_theme', 'et_builder_theme_or_plugin_updated_cb' );
[4073] Fix | Delete
add_action( 'activated_plugin', 'et_builder_theme_or_plugin_updated_cb', 10, 0 );
[4074] Fix | Delete
add_action( 'deactivated_plugin', 'et_builder_theme_or_plugin_updated_cb', 10, 0 );
[4075] Fix | Delete
add_action( 'upgrader_process_complete', 'et_builder_theme_or_plugin_updated_cb', 10, 0 );
[4076] Fix | Delete
add_action( 'et_support_center_toggle_safe_mode', 'et_builder_theme_or_plugin_updated_cb', 10, 0 );
[4077] Fix | Delete
endif;
[4078] Fix | Delete
[4079] Fix | Delete
/**
[4080] Fix | Delete
* Enqueue scripts that are required by BFB and Layout Block. These scripts are abstracted into
[4081] Fix | Delete
* separated file so Layout Block can enqueue the same sets of scripts without re-register and
[4082] Fix | Delete
* re-enqueue them
[4083] Fix | Delete
*
[4084] Fix | Delete
* @since 4.1.0
[4085] Fix | Delete
*/
[4086] Fix | Delete
function et_bfb_enqueue_scripts_dependencies() {
[4087] Fix | Delete
global $wp_version, $post;
[4088] Fix | Delete
[4089] Fix | Delete
$wp_major_version = substr( $wp_version, 0, 3 );
[4090] Fix | Delete
[4091] Fix | Delete
if ( et_pb_is_pagebuilder_used( get_the_ID() ) ) {
[4092] Fix | Delete
wp_enqueue_editor();
[4093] Fix | Delete
}
[4094] Fix | Delete
[4095] Fix | Delete
if ( version_compare( $wp_major_version, '4.5', '<' ) ) {
[4096] Fix | Delete
$jQuery_ui = 'et_pb_admin_date_js';
[4097] Fix | Delete
wp_register_script( $jQuery_ui, ET_BUILDER_URI . '/scripts/ext/jquery-ui-1.10.4.custom.min.js', array( 'jquery' ), ET_BUILDER_PRODUCT_VERSION, true );
[4098] Fix | Delete
} else {
[4099] Fix | Delete
$jQuery_ui = 'jquery-ui-datepicker';
[4100] Fix | Delete
}
[4101] Fix | Delete
[4102] Fix | Delete
// Load timepicker script on admin page in case of BFB to make it work with modals loaded on WP admin DOM
[4103] Fix | Delete
wp_enqueue_script( 'et_bfb_admin_date_addon_js', ET_BUILDER_URI . '/scripts/ext/jquery-ui-timepicker-addon.js', array( $jQuery_ui ), ET_BUILDER_PRODUCT_VERSION, true );
[4104] Fix | Delete
[4105] Fix | Delete
// Load google maps script on admin page in case of BFB to make it work with modals loaded on WP admin DOM
[4106] Fix | Delete
if ( et_pb_enqueue_google_maps_script() ) {
[4107] Fix | Delete
wp_enqueue_script( 'et_bfb_google_maps_api', esc_url( add_query_arg( array( 'key' => et_pb_get_google_api_key(), 'callback' => 'initMap' ), is_ssl() ? 'https://maps.googleapis.com/maps/api/js' : 'http://maps.googleapis.com/maps/api/js' ) ), array(), '3', true );
[4108] Fix | Delete
}
[4109] Fix | Delete
[4110] Fix | Delete
wp_enqueue_script( 'et_pb_media_library', ET_BUILDER_URI . '/scripts/ext/media-library.js', array( 'media-editor' ), ET_BUILDER_PRODUCT_VERSION, true );
[4111] Fix | Delete
[4112] Fix | Delete
if ( ! wp_script_is( 'wp-hooks', 'registered' ) ) {
[4113] Fix | Delete
// Use bundled wp-hooks script when WP < 5.0
[4114] Fix | Delete
wp_enqueue_script( 'wp-hooks', ET_BUILDER_URI. '/frontend-builder/assets/backports/hooks.js' );
[4115] Fix | Delete
}
[4116] Fix | Delete
}
[4117] Fix | Delete
[4118] Fix | Delete
// Register BFB scripts
[4119] Fix | Delete
if ( ! function_exists( 'et_bfb_enqueue_scripts' ) ):
[4120] Fix | Delete
function et_bfb_enqueue_scripts() {
[4121] Fix | Delete
global $post;
[4122] Fix | Delete
[4123] Fix | Delete
// Enqueue scripts required by BFB
[4124] Fix | Delete
et_bfb_enqueue_scripts_dependencies();
[4125] Fix | Delete
[4126] Fix | Delete
wp_enqueue_script( 'et_bfb_admin_js', ET_BUILDER_URI . '/scripts/bfb_admin_script.js', array( 'jquery', 'et_pb_media_library' ), ET_BUILDER_PRODUCT_VERSION, true );
[4127] Fix | Delete
wp_localize_script( 'et_bfb_admin_js', 'et_bfb_options', apply_filters( 'et_bfb_options', array(
[4128] Fix | Delete
'ajaxurl' => admin_url( 'admin-ajax.php' ),
[4129] Fix | Delete
'et_enable_bfb_nonce' => wp_create_nonce( 'et_enable_bfb_nonce' ),
[4130] Fix | Delete
'default_initial_column_type' => apply_filters( 'et_builder_default_initial_column_type', '4_4' ),
[4131] Fix | Delete
'default_initial_text_module' => apply_filters( 'et_builder_default_initial_text_module', 'et_pb_text' ),
[4132] Fix | Delete
'skip_default_content_adding' => apply_filters( 'et_builder_skip_content_activation', false, $post ) ? 'skip' : '',
[4133] Fix | Delete
) ) );
[4134] Fix | Delete
[4135] Fix | Delete
// Add filter to register tinyMCE buttons that is missing from BFB
[4136] Fix | Delete
add_filter( 'mce_external_plugins', 'et_bfb_filter_mce_plugin' );
[4137] Fix | Delete
}
[4138] Fix | Delete
endif;
[4139] Fix | Delete
[4140] Fix | Delete
/**
[4141] Fix | Delete
* BFB use built-in WordPress tinyMCE initialization while visual builder uses standalone tinyMCE
[4142] Fix | Delete
* initialization which leads to several buttons in VB not available in BFB. This function register
[4143] Fix | Delete
* them as plugins
[4144] Fix | Delete
*
[4145] Fix | Delete
* @since 4.0.9
[4146] Fix | Delete
*
[4147] Fix | Delete
* @param array tinyMCE plugin list
[4148] Fix | Delete
*
[4149] Fix | Delete
* @return array
[4150] Fix | Delete
*/
[4151] Fix | Delete
function et_bfb_filter_mce_plugin( $plugins ) {
[4152] Fix | Delete
// NOTE: `ET_FB_ASSETS_URI` constant isn't available yet at this point, so use `ET_BUILDER_URI`
[4153] Fix | Delete
$plugins['table'] = ET_BUILDER_URI . '/frontend-builder/assets/vendors/plugins/table/plugin.min.js';
[4154] Fix | Delete
[4155] Fix | Delete
return $plugins;
[4156] Fix | Delete
}
[4157] Fix | Delete
[4158] Fix | Delete
function et_pb_wp_editor_settings( $settings, $editor_id ) {
[4159] Fix | Delete
if ( 'content' === $editor_id ) {
[4160] Fix | Delete
$settings['default_editor'] = 'html';
[4161] Fix | Delete
}
[4162] Fix | Delete
[4163] Fix | Delete
return $settings;
[4164] Fix | Delete
}
[4165] Fix | Delete
[4166] Fix | Delete
if ( ! function_exists( 'et_pb_add_builder_page_js_css' ) ) :
[4167] Fix | Delete
function et_pb_add_builder_page_js_css(){
[4168] Fix | Delete
global $typenow, $post, $wp_version;
[4169] Fix | Delete
[4170] Fix | Delete
// Get WP major version
[4171] Fix | Delete
$wp_major_version = substr( $wp_version, 0, 3 );
[4172] Fix | Delete
[4173] Fix | Delete
// Avoid serving any data from object cache
[4174] Fix | Delete
if ( ! defined( 'DONOTCACHEPAGE' ) ) {
[4175] Fix | Delete
define( 'DONOTCACHEPAGE', true );
[4176] Fix | Delete
}
[4177] Fix | Delete
[4178] Fix | Delete
[4179] Fix | Delete
// fix tinymce to load in html mode for BB
[4180] Fix | Delete
if ( et_pb_is_pagebuilder_used() ) {
[4181] Fix | Delete
add_filter( 'wp_editor_settings', 'et_pb_wp_editor_settings', 10, 2 );
[4182] Fix | Delete
}
[4183] Fix | Delete
[4184] Fix | Delete
// BEGIN Process shortcodes (for module settings migrations and Yoast SEO compatibility)
[4185] Fix | Delete
// Get list of shortcodes that causes issue if being triggered in admin
[4186] Fix | Delete
$conflicting_shortcodes = et_pb_admin_excluded_shortcodes();
[4187] Fix | Delete
[4188] Fix | Delete
if ( ! empty( $conflicting_shortcodes ) ) {
[4189] Fix | Delete
foreach ( $conflicting_shortcodes as $shortcode ) {
[4190] Fix | Delete
remove_shortcode( $shortcode );
[4191] Fix | Delete
}
[4192] Fix | Delete
}
[4193] Fix | Delete
[4194] Fix | Delete
// save the original content of $post variable
[4195] Fix | Delete
$post_original = $post;
[4196] Fix | Delete
// get the content for yoast
[4197] Fix | Delete
$post_content_processed = do_shortcode( $post->post_content );
[4198] Fix | Delete
// set the $post to the original content to make sure it wasn't changed by do_shortcode()
[4199] Fix | Delete
$post = $post_original; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited -- were restoring it to what it was beforea few lines above.
[4200] Fix | Delete
// END Process shortcodes
[4201] Fix | Delete
[4202] Fix | Delete
$is_global_template = '';
[4203] Fix | Delete
$post_id = '';
[4204] Fix | Delete
$post_type = $typenow;
[4205] Fix | Delete
$selective_sync_status = '';
[4206] Fix | Delete
$global_module_type = '';
[4207] Fix | Delete
$excluded_global_options = array();
[4208] Fix | Delete
[4209] Fix | Delete
$utils = ET_Core_Data_Utils::instance();
[4210] Fix | Delete
$updates_options = get_site_option( 'et_automatic_updates_options', array() );
[4211] Fix | Delete
$et_account = array(
[4212] Fix | Delete
'et_username' => $utils->array_get( $updates_options, 'username', '' ),
[4213] Fix | Delete
'et_api_key' => $utils->array_get( $updates_options, 'api_key', '' ),
[4214] Fix | Delete
'status' => get_site_option( 'et_account_status', 'not_active' ),
[4215] Fix | Delete
);
[4216] Fix | Delete
[4217] Fix | Delete
// we need some post data when editing saved templates.
[4218] Fix | Delete
if ( 'et_pb_layout' === $typenow ) {
[4219] Fix | Delete
$template_scope = wp_get_object_terms( get_the_ID(), 'scope' );
[4220] Fix | Delete
$template_type = wp_get_object_terms( get_the_ID(), 'layout_type' );
[4221] Fix | Delete
$is_global_template = ! empty( $template_scope[0] ) ? $template_scope[0]->slug : 'regular';
[4222] Fix | Delete
$global_module_type = ! empty( $template_type[0] ) ? $template_type[0]->slug : '';
[4223] Fix | Delete
$post_id = get_the_ID();
[4224] Fix | Delete
[4225] Fix | Delete
// Check whether it's a Global item's page and display wp error if Global items disabled for current user
[4226] Fix | Delete
if ( ! et_pb_is_allowed( 'edit_global_library' ) && 'global' === $is_global_template ) {
[4227] Fix | Delete
wp_die( esc_html__( "you don't have sufficient permissions to access this page", 'et_builder' ) );
[4228] Fix | Delete
}
[4229] Fix | Delete
[4230] Fix | Delete
if ( 'global' === $is_global_template ) {
[4231] Fix | Delete
$excluded_global_options = get_post_meta( $post_id, '_et_pb_excluded_global_options' );
[4232] Fix | Delete
$selective_sync_status = empty( $excluded_global_options ) ? '' : 'updated';
[4233] Fix | Delete
}
[4234] Fix | Delete
[4235] Fix | Delete
$built_for_post_type = get_post_meta( get_the_ID(), '_et_pb_built_for_post_type', true );
[4236] Fix | Delete
$built_for_post_type = '' !== $built_for_post_type ? $built_for_post_type : 'page';
[4237] Fix | Delete
$post_type = apply_filters( 'et_pb_built_for_post_type', $built_for_post_type, get_the_ID() );
[4238] Fix | Delete
}
[4239] Fix | Delete
[4240] Fix | Delete
// we need this data to create the filter when adding saved modules
[4241] Fix | Delete
$layout_categories = get_terms( 'layout_category' );
[4242] Fix | Delete
$layout_cat_data = array();
[4243] Fix | Delete
$layout_cat_data_json = '';
[4244] Fix | Delete
[4245] Fix | Delete
if ( is_array( $layout_categories ) && ! empty( $layout_categories ) ) {
[4246] Fix | Delete
foreach( $layout_categories as $category ) {
[4247] Fix | Delete
$layout_cat_data[] = array(
[4248] Fix | Delete
'slug' => $category->slug,
[4249] Fix | Delete
'name' => $category->name,
[4250] Fix | Delete
);
[4251] Fix | Delete
}
[4252] Fix | Delete
}
[4253] Fix | Delete
if ( ! empty( $layout_cat_data ) ) {
[4254] Fix | Delete
$layout_cat_data_json = json_encode( $layout_cat_data );
[4255] Fix | Delete
}
[4256] Fix | Delete
[4257] Fix | Delete
// Set fixed protocol for preview URL to prevent cross origin issue
[4258] Fix | Delete
$preview_scheme = is_ssl() ? 'https' : 'http';
[4259] Fix | Delete
[4260] Fix | Delete
$preview_url = esc_url( home_url( '/' ) );
[4261] Fix | Delete
[4262] Fix | Delete
if ( 'https' === $preview_scheme && ! strpos( $preview_url, 'https://' ) ) {
[4263] Fix | Delete
$preview_url = str_replace( 'http://', 'https://', $preview_url );
[4264] Fix | Delete
}
[4265] Fix | Delete
[4266] Fix | Delete
// force update cache if et_pb_clear_templates_cache option is set to on
[4267] Fix | Delete
$force_cache_value = et_get_option( 'et_pb_clear_templates_cache', '', '', true );
[4268] Fix | Delete
$force_cache_update = '' !== $force_cache_value ? $force_cache_value : ET_BUILDER_FORCE_CACHE_PURGE;
[4269] Fix | Delete
[4270] Fix | Delete
/**
[4271] Fix | Delete
* Whether or not the backend builder should clear its Backbone template cache.
[4272] Fix | Delete
*
[4273] Fix | Delete
* @param bool $force_cache_update
[4274] Fix | Delete
*/
[4275] Fix | Delete
$force_cache_update = apply_filters( 'et_pb_clear_template_cache', $force_cache_update );
[4276] Fix | Delete
[4277] Fix | Delete
// delete et_pb_clear_templates_cache option it's not needed anymore
[4278] Fix | Delete
et_delete_option( 'et_pb_clear_templates_cache' );
[4279] Fix | Delete
[4280] Fix | Delete
wp_enqueue_script( 'jquery-ui-core' );
[4281] Fix | Delete
wp_enqueue_script( 'underscore' );
[4282] Fix | Delete
wp_enqueue_script( 'backbone' );
[4283] Fix | Delete
[4284] Fix | Delete
if ( et_pb_enqueue_google_maps_script() ) {
[4285] Fix | Delete
wp_enqueue_script( 'google-maps-api', esc_url_raw( add_query_arg( array( 'v' => 3, 'key' => et_pb_get_google_api_key() ), is_ssl() ? 'https://maps.googleapis.com/maps/api/js' : 'http://maps.googleapis.com/maps/api/js' ) ), array(), '3', true );
[4286] Fix | Delete
}
[4287] Fix | Delete
[4288] Fix | Delete
wp_enqueue_script( 'wp-color-picker' );
[4289] Fix | Delete
wp_enqueue_style( 'wp-color-picker' );
[4290] Fix | Delete
[4291] Fix | Delete
if ( version_compare( $wp_major_version, '4.9', '>=' ) ) {
[4292] Fix | Delete
wp_enqueue_script( 'wp-color-picker-alpha', ET_BUILDER_URI . '/scripts/ext/wp-color-picker-alpha.min.js', array( 'jquery', 'wp-color-picker' ), ET_BUILDER_VERSION, true );
[4293] Fix | Delete
wp_localize_script( 'wp-color-picker-alpha', 'et_pb_color_picker_strings', apply_filters( 'et_pb_color_picker_strings_builder', array(
[4294] Fix | Delete
'legacy_pick' => esc_html__( 'Select', 'et_builder' ),
[4295] Fix | Delete
'legacy_current' => esc_html__( 'Current Color', 'et_builder' ),
[4296] Fix | Delete
) ) );
[4297] Fix | Delete
} else {
[4298] Fix | Delete
wp_enqueue_script( 'wp-color-picker-alpha', ET_BUILDER_URI . '/scripts/ext/wp-color-picker-alpha-48.min.js', array( 'jquery', 'wp-color-picker' ), ET_BUILDER_VERSION, true );
[4299] Fix | Delete
}
[4300] Fix | Delete
[4301] Fix | Delete
wp_register_script( 'chart', ET_BUILDER_URI . '/scripts/ext/chart.min.js', array(), ET_BUILDER_VERSION, true );
[4302] Fix | Delete
wp_register_script( 'jquery-tablesorter', ET_BUILDER_URI . '/scripts/ext/jquery.tablesorter.min.js', array( 'jquery' ), ET_BUILDER_VERSION, true );
[4303] Fix | Delete
[4304] Fix | Delete
// load 1.10.4 versions of jQuery-ui scripts if WP version is less than 4.5, load 1.11.4 version otherwise
[4305] Fix | Delete
if ( et_pb_is_wp_old_version() ) {
[4306] Fix | Delete
$jQuery_ui = 'et_pb_admin_date_js';
[4307] Fix | Delete
wp_enqueue_script( $jQuery_ui, ET_BUILDER_URI . '/scripts/ext/jquery-ui-1.10.4.custom.min.js', array( 'jquery' ), ET_BUILDER_VERSION, true );
[4308] Fix | Delete
} else {
[4309] Fix | Delete
$jQuery_ui = 'jquery-ui-datepicker';
[4310] Fix | Delete
}
[4311] Fix | Delete
[4312] Fix | Delete
wp_enqueue_script( 'et_pb_admin_date_addon_js', ET_BUILDER_URI . '/scripts/ext/jquery-ui-timepicker-addon.js', array( $jQuery_ui ), ET_BUILDER_VERSION, true );
[4313] Fix | Delete
[4314] Fix | Delete
wp_enqueue_script( 'validation', ET_BUILDER_URI . '/scripts/ext/jquery.validate.js', array( 'jquery' ), ET_BUILDER_VERSION, true );
[4315] Fix | Delete
wp_enqueue_script( 'minicolors', ET_BUILDER_URI . '/scripts/ext/jquery.minicolors.js', array( 'jquery' ), ET_BUILDER_VERSION, true );
[4316] Fix | Delete
[4317] Fix | Delete
wp_enqueue_script( 'et_pb_cache_notice_js', ET_BUILDER_URI .'/scripts/cache_notice.js', array( 'jquery', 'et_pb_admin_js' ), ET_BUILDER_VERSION, true );
[4318] Fix | Delete
[4319] Fix | Delete
wp_localize_script( 'et_pb_cache_notice_js', 'et_pb_notice_options', apply_filters( 'et_pb_notice_options_builder', array(
[4320] Fix | Delete
'product_version' => ET_BUILDER_PRODUCT_VERSION,
[4321] Fix | Delete
) ) );
[4322] Fix | Delete
[4323] Fix | Delete
wp_enqueue_script( 'lz_string', ET_BUILDER_URI .'/scripts/ext/lz-string.min.js', array(), ET_BUILDER_VERSION, true );
[4324] Fix | Delete
[4325] Fix | Delete
wp_enqueue_script( 'es6-promise', '//cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.min.js', array(), null, true );
[4326] Fix | Delete
wp_enqueue_script( 'postmate', '//cdn.jsdelivr.net/npm/postmate@1.1.9/build/postmate.min.js', array( 'es6-promise' ), null, true );
[4327] Fix | Delete
[4328] Fix | Delete
wp_enqueue_script( 'et_pb_media_library', ET_BUILDER_URI . '/scripts/ext/media-library.js', array( 'media-editor' ), ET_BUILDER_PRODUCT_VERSION, true );
[4329] Fix | Delete
wp_enqueue_script( 'et_pb_admin_js', ET_BUILDER_URI .'/scripts/builder.js', array( 'jquery', 'jquery-ui-core', 'underscore', 'backbone', 'chart', 'jquery-tablesorter', 'et_pb_media_library', 'lz_string', 'es6-promise' ), ET_BUILDER_VERSION, true );
[4330] Fix | Delete
[4331] Fix | Delete
wp_localize_script( 'et_pb_admin_js', 'et_pb_options', apply_filters( 'et_pb_options_builder', array_merge( array(
[4332] Fix | Delete
'debug' => defined( 'ET_DEBUG' ) && ET_DEBUG,
[4333] Fix | Delete
'wp_default_editor' => wp_default_editor(),
[4334] Fix | Delete
'et_account' => $et_account,
[4335] Fix | Delete
'ajaxurl' => admin_url( 'admin-ajax.php' ),
[4336] Fix | Delete
'home_url' => home_url(),
[4337] Fix | Delete
'divi_library_url' => ET_BUILDER_DIVI_LIBRARY_URL,
[4338] Fix | Delete
'cookie_path' => SITECOOKIEPATH,
[4339] Fix | Delete
'preview_url' => add_query_arg( 'et_pb_preview', 'true', $preview_url ),
[4340] Fix | Delete
'et_admin_load_nonce' => wp_create_nonce( 'et_admin_load_nonce' ),
[4341] Fix | Delete
'images_uri' => ET_BUILDER_URI .'/images',
[4342] Fix | Delete
'postId' => $post->ID,
[4343] Fix | Delete
'post_type' => $post_type,
[4344] Fix | Delete
'is_third_party_post_type' => et_builder_is_post_type_custom($post_type) ? 'yes' : 'no',
[4345] Fix | Delete
'et_builder_module_parent_shortcodes' => ET_Builder_Element::get_parent_slugs_regex( $post_type ),
[4346] Fix | Delete
'et_builder_module_child_shortcodes' => ET_Builder_Element::get_child_slugs_regex( $post_type ),
[4347] Fix | Delete
'et_builder_module_raw_content_shortcodes' => ET_Builder_Element::get_raw_content_slugs( $post_type ),
[4348] Fix | Delete
'et_builder_modules' => ET_Builder_Element::get_modules_js_array( $post_type ),
[4349] Fix | Delete
'et_builder_modules_count' => ET_Builder_Element::get_modules_count( $post_type ),
[4350] Fix | Delete
'et_builder_modules_with_children' => ET_Builder_Element::get_slugs_with_children( $post_type ),
[4351] Fix | Delete
'et_builder_modules_featured_image_background' => ET_Builder_Element::get_featured_image_background_modules( $post_type ),
[4352] Fix | Delete
'et_builder_templates_amount' => ET_BUILDER_AJAX_TEMPLATES_AMOUNT,
[4353] Fix | Delete
'et_builder_edit_global_library' => et_pb_is_allowed( 'edit_global_library' ),
[4354] Fix | Delete
'default_initial_column_type' => apply_filters( 'et_builder_default_initial_column_type', '4_4' ),
[4355] Fix | Delete
'default_initial_text_module' => apply_filters( 'et_builder_default_initial_text_module', 'et_pb_text' ),
[4356] Fix | Delete
'section_only_row_dragged_away' => esc_html__( 'The section should have at least one row.', 'et_builder' ),
[4357] Fix | Delete
'fullwidth_module_dragged_away' => esc_html__( 'Fullwidth module can\'t be used outside of the Fullwidth Section.', 'et_builder' ),
[4358] Fix | Delete
'stop_dropping_3_col_row' => esc_html__( "This number of columns can't be used on this row.", 'et_builder' ),
[4359] Fix | Delete
'preview_image' => esc_html__( 'Preview', 'et_builder' ),
[4360] Fix | Delete
'empty_admin_label' => esc_html__( 'Module', 'et_builder' ),
[4361] Fix | Delete
'video_module_image_error' => esc_html__( 'Still images cannot be generated from this video service and/or this video format', 'et_builder' ),
[4362] Fix | Delete
'geocode_error' => esc_html__( 'Geocode was not successful for the following reason', 'et_builder' ),
[4363] Fix | Delete
'geocode_error_2' => esc_html__( 'Geocoder failed due to', 'et_builder' ),
[4364] Fix | Delete
'no_results' => esc_html__( 'No results found', 'et_builder' ),
[4365] Fix | Delete
'all_tab_options_hidden' => esc_html__( 'No available options for this configuration.', 'et_builder' ),
[4366] Fix | Delete
'update_global_module' => esc_html__( 'You\'re about to update global module. This change will be applied to all pages where you use this module. Press OK if you want to update this module', 'et_builder' ),
[4367] Fix | Delete
'global_row_alert' => esc_html__( 'You cannot add global rows into global sections', 'et_builder' ),
[4368] Fix | Delete
'global_module_alert' => esc_html__( 'You cannot add global modules into global sections or rows', 'et_builder' ),
[4369] Fix | Delete
'all_cat_text' => esc_html__( 'All Categories', 'et_builder' ),
[4370] Fix | Delete
'font_name_error' => esc_html__( 'Name Cannot be Empty', 'et_builder' ),
[4371] Fix | Delete
'font_file_error' => esc_html__( 'Please Select Font File', 'et_builder' ),
[4372] Fix | Delete
'font_weight_error' => esc_html__( 'Please Select Font Weight', 'et_builder' ),
[4373] Fix | Delete
'is_global_template' => $is_global_template,
[4374] Fix | Delete
'selective_sync_status' => $selective_sync_status,
[4375] Fix | Delete
'global_module_type' => $global_module_type,
[4376] Fix | Delete
'excluded_global_options' => isset( $excluded_global_options[0] ) ? json_decode( $excluded_global_options[0] ) : array(),
[4377] Fix | Delete
'template_post_id' => $post_id,
[4378] Fix | Delete
'layout_categories' => $layout_cat_data_json,
[4379] Fix | Delete
'map_pin_address_error' => esc_html__( 'Map Pin Address cannot be empty', 'et_builder' ),
[4380] Fix | Delete
'map_pin_address_invalid' => esc_html__( 'Invalid Pin and address data. Please try again.', 'et_builder' ),
[4381] Fix | Delete
'locked_section_permission_alert' => esc_html__( 'You do not have permission to unlock this section.', 'et_builder' ),
[4382] Fix | Delete
'locked_row_permission_alert' => esc_html__( 'You do not have permission to unlock this row.', 'et_builder' ),
[4383] Fix | Delete
'locked_module_permission_alert' => esc_html__( 'You do not have permission to unlock this module.', 'et_builder' ),
[4384] Fix | Delete
'locked_item_permission_alert' => esc_html__( 'You do not have permission to perform this task.', 'et_builder' ),
[4385] Fix | Delete
'localstorage_unavailability_alert' => esc_html__( 'Unable to perform copy/paste process due to inavailability of localStorage feature in your browser. Please use latest modern browser (Chrome, Firefox, or Safari) to perform copy/paste process', 'et_builder' ),
[4386] Fix | Delete
'invalid_color' => esc_html__( 'Invalid Color', 'et_builder' ),
[4387] Fix | Delete
'et_pb_preview_nonce' => wp_create_nonce( 'et_pb_preview_nonce' ),
[4388] Fix | Delete
'is_divi_library' => 'et_pb_layout' === $typenow ? 1 : 0,
[4389] Fix | Delete
'layout_type' => 'et_pb_layout' === $typenow ? et_pb_get_layout_type( get_the_ID() ) : 0,
[4390] Fix | Delete
'is_plugin_used' => et_is_builder_plugin_active(),
[4391] Fix | Delete
'yoast_content' => et_is_yoast_seo_plugin_active() ? $post_content_processed : '',
[4392] Fix | Delete
'ab_db_status' => true === et_pb_db_status_up_to_date() ? 'exists' : 'not_exists',
[4393] Fix | Delete
'ab_testing_builder_nonce' => wp_create_nonce( 'ab_testing_builder_nonce' ),
[4394] Fix | Delete
'page_color_palette' => get_post_meta( get_the_ID(), '_et_pb_color_palette', true ),
[4395] Fix | Delete
'default_color_palette' => implode( '|', et_pb_get_default_color_palette() ),
[4396] Fix | Delete
'page_section_bg_color' => get_post_meta( get_the_ID(), '_et_pb_section_background_color', true ),
[4397] Fix | Delete
'page_gutter_width' => '' !== ( $saved_gutter_width = get_post_meta( get_the_ID(), '_et_pb_gutter_width', true ) ) ? $saved_gutter_width : et_get_option( 'gutter_width', '3' ),
[4398] Fix | Delete
'product_version' => ET_BUILDER_PRODUCT_VERSION,
[4399] Fix | Delete
'active_plugins' => et_builder_get_active_plugins(),
[4400] Fix | Delete
'force_cache_purge' => $force_cache_update ? 'true' : 'false',
[4401] Fix | Delete
'memory_limit_increased' => esc_html__( 'Your memory limit has been increased', 'et_builder' ),
[4402] Fix | Delete
'memory_limit_not_increased' => esc_html__( "Your memory limit can't be changed automatically", 'et_builder' ),
[4403] Fix | Delete
'google_api_key' => et_pb_get_google_api_key(),
[4404] Fix | Delete
'options_page_url' => et_pb_get_options_page_link(),
[4405] Fix | Delete
'et_pb_google_maps_script_notice' => et_pb_enqueue_google_maps_script(),
[4406] Fix | Delete
'select_text' => esc_html__( 'Select', 'et_builder' ),
[4407] Fix | Delete
'et_fb_autosave_nonce' => wp_create_nonce( 'et_fb_autosave_nonce' ),
[4408] Fix | Delete
'et_builder_email_fetch_lists_nonce' => wp_create_nonce( 'et_builder_email_fetch_lists_nonce' ),
[4409] Fix | Delete
'et_builder_email_add_account_nonce' => wp_create_nonce( 'et_builder_email_add_account_nonce' ),
[4410] Fix | Delete
'et_builder_email_remove_account_nonce' => wp_create_nonce( 'et_builder_email_remove_account_nonce' ),
[4411] Fix | Delete
'et_pb_module_settings_migrations' => ET_Builder_Module_Settings_Migration::$migrated,
[4412] Fix | Delete
'acceptable_css_string_values' => et_builder_get_acceptable_css_string_values( 'all' ),
[4413] Fix | Delete
'upload_font_nonce' => wp_create_nonce( 'et_fb_upload_font_nonce' ),
[4414] Fix | Delete
'user_fonts' => et_builder_get_custom_fonts(),
[4415] Fix | Delete
'google_fonts' => et_builder_get_google_fonts(),
[4416] Fix | Delete
'supported_font_weights' => et_builder_get_font_weight_list(),
[4417] Fix | Delete
'supported_font_formats' => et_pb_get_supported_font_formats(),
[4418] Fix | Delete
'all_svg_icons' => et_pb_get_svg_icons_list(),
[4419] Fix | Delete
'library_get_layouts_data_nonce' => wp_create_nonce( 'et_builder_library_get_layouts_data' ),
[4420] Fix | Delete
'library_get_layout_nonce' => wp_create_nonce( 'et_builder_library_get_layout' ),
[4421] Fix | Delete
'library_update_account_nonce' => wp_create_nonce( 'et_builder_library_update_account' ),
[4422] Fix | Delete
'library_custom_tabs' => ET_Builder_Library::builder_library_modal_custom_tabs( $post_type ),
[4423] Fix | Delete
), et_pb_history_localization() ) ) );
[4424] Fix | Delete
[4425] Fix | Delete
$ab_settings = et_builder_ab_labels();
[4426] Fix | Delete
[4427] Fix | Delete
wp_localize_script( 'et_pb_admin_js', 'et_pb_ab_js_options', apply_filters( 'et_pb_ab_js_options', array(
[4428] Fix | Delete
'test_id' => $post->ID,
[4429] Fix | Delete
'has_report' => et_pb_ab_has_report( $post->ID ),
[4430] Fix | Delete
'has_permission' => et_pb_is_allowed( 'ab_testing' ),
[4431] Fix | Delete
'refresh_interval_duration' => et_pb_ab_get_refresh_interval_duration( $post->ID ),
[4432] Fix | Delete
'refresh_interval_durations' => et_pb_ab_refresh_interval_durations(),
[4433] Fix | Delete
'analysis_formula' => et_pb_ab_get_analysis_formulas(),
[4434] Fix | Delete
'have_conversions' => et_pb_ab_get_modules_have_conversions(),
[4435] Fix | Delete
'sales_title' => esc_html__( 'Sales', 'et_builder' ),
[4436] Fix | Delete
'force_cache_purge' => $force_cache_update,
[4437] Fix | Delete
'total_title' => esc_html__( 'Total', 'et_builder' ),
[4438] Fix | Delete
[4439] Fix | Delete
// Saved data
[4440] Fix | Delete
'subjects_rank' => ( 'on' === get_post_meta( $post->ID, '_et_pb_use_builder', true ) ) ? et_pb_ab_get_saved_subjects_ranks( $post->ID ) : false,
[4441] Fix | Delete
[4442] Fix | Delete
// Rank color
[4443] Fix | Delete
'subjects_rank_color' => et_pb_ab_get_subject_rank_colors(),
[4444] Fix | Delete
[4445] Fix | Delete
// Configuration
[4446] Fix | Delete
'has_no_permission' => array(
[4447] Fix | Delete
'title' => esc_html__( 'Unauthorized Action', 'et_builder' ),
[4448] Fix | Delete
'desc' => esc_html__( 'You do not have permission to edit the module, row or section in this split test.', 'et_builder' ),
[4449] Fix | Delete
),
[4450] Fix | Delete
[4451] Fix | Delete
// AB Testing
[4452] Fix | Delete
'select_ab_testing_subject' => $ab_settings['select_subject'],
[4453] Fix | Delete
'select_ab_testing_goal' => $ab_settings['select_goal'],
[4454] Fix | Delete
'configure_ab_testing_alternative' => $ab_settings['configure_alternative'],
[4455] Fix | Delete
'select_ab_testing_winner_first' => $ab_settings['select_winner_first'],
[4456] Fix | Delete
'select_ab_testing_subject_first' => $ab_settings['select_subject_first'],
[4457] Fix | Delete
'select_ab_testing_goal_first' => $ab_settings['select_goal_first'],
[4458] Fix | Delete
'cannot_select_subject_parent_as_goal' => $ab_settings['cannot_select_subject_parent_as_goal'],
[4459] Fix | Delete
'cannot_select_global_children_as_subject' => $ab_settings['cannot_select_global_children_as_subject'],
[4460] Fix | Delete
'cannot_select_global_children_as_goal' => $ab_settings['cannot_select_global_children_as_goal'],
[4461] Fix | Delete
[4462] Fix | Delete
// Save to Library
[4463] Fix | Delete
'cannot_save_app_layout_has_ab_testing' => $ab_settings['cannot_save_app_layout_has_ab_testing'],
[4464] Fix | Delete
'cannot_save_section_layout_has_ab_testing' => $ab_settings['cannot_save_section_layout_has_ab_testing'],
[4465] Fix | Delete
'cannot_save_row_layout_has_ab_testing' => $ab_settings['cannot_save_row_layout_has_ab_testing'],
[4466] Fix | Delete
'cannot_save_row_inner_layout_has_ab_testing' => $ab_settings['cannot_save_row_inner_layout_has_ab_testing'],
[4467] Fix | Delete
'cannot_save_module_layout_has_ab_testing' => $ab_settings['cannot_save_module_layout_has_ab_testing'],
[4468] Fix | Delete
[4469] Fix | Delete
// Load / Clear Layout
[4470] Fix | Delete
'cannot_load_layout_has_ab_testing' => $ab_settings['cannot_load_layout_has_ab_testing'],
[4471] Fix | Delete
'cannot_clear_layout_has_ab_testing' => $ab_settings['cannot_clear_layout_has_ab_testing'],
[4472] Fix | Delete
[4473] Fix | Delete
// Cannot Import / Export Layout (Portability)
[4474] Fix | Delete
'cannot_import_export_layout_has_ab_testing' => $ab_settings['cannot_import_export_layout_has_ab_testing'],
[4475] Fix | Delete
[4476] Fix | Delete
// Moving Goal / Subject
[4477] Fix | Delete
'cannot_move_module_goal_out_from_subject' => $ab_settings['cannot_move_module_goal_out_from_subject'],
[4478] Fix | Delete
'cannot_move_row_goal_out_from_subject' => $ab_settings['cannot_move_row_goal_out_from_subject'],
[4479] Fix | Delete
'cannot_move_goal_into_subject' => $ab_settings['cannot_move_goal_into_subject'],
[4480] Fix | Delete
'cannot_move_subject_into_goal' => $ab_settings['cannot_move_subject_into_goal'],
[4481] Fix | Delete
[4482] Fix | Delete
// Cloning + Has Goal
[4483] Fix | Delete
'cannot_clone_section_has_goal' => $ab_settings['cannot_clone_section_has_goal'],
[4484] Fix | Delete
'cannot_clone_row_has_goal' => $ab_settings['cannot_clone_row_has_goal'],
[4485] Fix | Delete
[4486] Fix | Delete
// Removing + Has Goal
[4487] Fix | Delete
'cannot_remove_section_has_goal' => $ab_settings['cannot_remove_section_has_goal'],
[4488] Fix | Delete
'cannot_remove_row_has_goal' => $ab_settings['cannot_remove_row_has_goal'],
[4489] Fix | Delete
[4490] Fix | Delete
// Removing + Has Unremovable Subjects
[4491] Fix | Delete
'cannot_remove_section_has_unremovable_subject' => $ab_settings['cannot_remove_section_has_unremovable_subject'],
[4492] Fix | Delete
'cannot_remove_row_has_unremovable_subject' => $ab_settings['cannot_remove_row_has_unremovable_subject'],
[4493] Fix | Delete
[4494] Fix | Delete
// View stats summary table heading
[4495] Fix | Delete
'view_stats_thead_titles' => $ab_settings['view_stats_thead_titles'],
[4496] Fix | Delete
) ) );
[4497] Fix | Delete
[4498] Fix | Delete
wp_localize_script( 'et_pb_admin_js', 'et_pb_help_options', apply_filters( 'et_pb_help_options', array(
[4499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function