: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
'enable_dummy_content' => array(
'on' => et_builder_i18n( 'On' ),
'off' => et_builder_i18n( 'Off' ),
'page_creation_flow_select' => et_builder_page_creation_settings( true ),
'active' => esc_html__( 'Video Overlay is Currently Active.', 'et_builder' ),
'offline' => esc_html__( 'Unable to Establish Internet Connection.', 'et_builder' ),
* Filters the builder's video tutorials.
* Can be used for add video tutorials for custom 3rd-party modules.
* @param string[] $help_videos {
* Videos to module relations array
* @type string[] $module_slug {
* @type string[] $sort_order {
* @type string $id Youtube video ID
* @type string $name Localized video title
'videos' => apply_filters( 'et_fb_help_videos', $help_videos ),
'has_no_ab_permission' => esc_html__( 'You do not have permission to edit the module, row or section in this split test.', 'et_builder' ),
'cannot_move_goal_into_subject' => esc_html__( 'A split testing goal cannot be moved inside of a split testing subject. To perform this action you must first end your split test.', 'et_builder' ),
'cannot_move_subject_into_goal' => esc_html__( 'A split testing subject cannot be moved inside of a split testing goal. To perform this action you must first end your split test.', 'et_builder' ),
'cannot_move_row_goal_out_from_subject' => esc_html__( 'Once set, a goal that has been placed inside a split testing subject cannot be moved outside the split testing subject. You can end your split test and start a new one if you would like to make this change.', 'et_builder' ),
'section_only_row_dragged_away' => esc_html__( 'The section should have at least one row.', 'et_builder' ),
'global_module_alert' => esc_html__( 'You cannot add global modules into global sections or rows', 'et_builder' ),
'cannot_move_module_goal_out_from_subject' => esc_html__( 'Once set, a goal that has been placed inside a split testing subject cannot be moved outside the split testing subject. You can end your split test and start a new one if you would like to make this change.', 'et_builder' ),
'stop_dropping_3_col_row' => esc_html__( 'This number of columns cannot be used on this row.', 'et_builder' ),
'onlyColumnDraggedAway' => esc_html__( 'The row must have at least one column.', 'et_builder' ),
'pageSettingsBar' => array(
'wireframe' => esc_html__( 'Wireframe View', 'et_builder' ),
'zoom' => esc_html__( 'Zoom Out', 'et_builder' ),
'desktop' => esc_html__( 'Desktop View', 'et_builder' ),
'tablet' => esc_html__( 'Tablet View', 'et_builder' ),
'phone' => esc_html__( 'Phone View', 'et_builder' ),
'click' => esc_html__( 'Click Mode', 'et_builder' ),
'hover' => esc_html__( 'Hover Mode', 'et_builder' ),
'grid' => esc_html__( 'Grid Mode', 'et_builder' ),
'loadLibrary' => esc_html__( 'Load From Library', 'et_builder' ),
'saveToLibrary' => esc_html__( 'Save To Library', 'et_builder' ),
'clearLayout' => esc_html__( 'Clear Layout', 'et_builder' ),
'pageSettingsModal' => esc_html__( 'Page Settings', 'et_builder' ),
'history' => esc_html__( 'Editing History', 'et_builder' ),
'portability' => esc_html__( 'Portability', 'et_builder' ),
'open' => esc_html__( 'Expand Settings', 'et_builder' ),
'close' => esc_html__( 'Collapse Settings', 'et_builder' ),
'saveDraft' => esc_html__( 'Save as Draft', 'et_builder' ),
'save' => esc_html__( 'Save', 'et_builder' ),
'publish' => esc_html__( 'Publish', 'et_builder' ),
'expandModal' => esc_html__( 'Expand Modal', 'et_builder' ),
'contractModal' => esc_html__( 'Contract Modal', 'et_builder' ),
'resize' => esc_html__( 'Resize Modal', 'et_builder' ),
'snapModal' => esc_html__( 'Snap to Left', 'et_builder' ),
'snapModalRight' => esc_html__( 'Snap to Right', 'et_builder' ),
'separateModal' => esc_html__( 'Separate Modal', 'et_builder' ),
'redo' => esc_html__( 'Redo', 'et_builder' ),
'undo' => esc_html__( 'Undo', 'et_builder' ),
'cancel' => esc_html__( 'Discard All Changes', 'et_builder' ),
'save' => esc_html__( 'Save Changes', 'et_builder' ),
'close' => esc_html__( 'Close', 'et_builder' ),
'rightMenu' => esc_html__( 'Other Settings', 'et_builder' ),
'globalPresets' => array(
'edit' => esc_html__( 'Manage %s Presets', 'et_builder' ),
'exit' => esc_html__( 'Back To Module Settings', 'et_builder' ),
'selectPreset' => esc_html__( 'Select A Preset', 'et_builder' ),
'activatePreset' => esc_html__( 'Activate Preset', 'et_builder' ),
'disablePreset' => esc_html__( 'Disable Preset', 'et_builder' ),
'presetSettings' => esc_html__( 'Preset Settings', 'et_builder' ),
'duplicatePreset' => esc_html__( 'Duplicate Preset', 'et_builder' ),
'deletePreset' => esc_html__( 'Delete Preset', 'et_builder' ),
'assignAsDefault' => esc_html__( 'Assign Preset as Default', 'et_builder' ),
'editPresetStyles' => esc_html__( 'Edit Preset Styles', 'et_builder' ),
'updateWithCurrentStyles' => esc_html__( 'Update Preset With Current Styles', 'et_builder' ),
'back' => esc_html__( 'Go Back', 'et_builder' ),
'increaseFontSize' => esc_html__( 'Decrease Font Size', 'et_builder' ),
'decreaseFontSize' => esc_html__( 'Increase Font Size', 'et_builder' ),
'bold' => esc_html__( 'Bold Text', 'et_builder' ),
'italic' => esc_html__( 'Italic Text', 'et_builder' ),
'underline' => esc_html__( 'Underline Text', 'et_builder' ),
'link' => esc_html__( 'Insert Link', 'et_builder' ),
'quote' => esc_html__( 'Insert Quote', 'et_builder' ),
'alignment' => esc_html__( 'Text Alignment', 'et_builder' ),
'centerText' => esc_html__( 'Center Text', 'et_builder' ),
'rightText' => esc_html__( 'Right Text', 'et_builder' ),
'leftText' => esc_html__( 'Left Text', 'et_builder' ),
'justifyText' => esc_html__( 'Justify Text', 'et_builder' ),
'list' => esc_html__( 'List Settings', 'et_builder' ),
'indent' => esc_html__( 'Indent List', 'et_builder' ),
'undent' => esc_html__( 'Undent List', 'et_builder' ),
'orderedList' => esc_html__( 'Insert Ordered List', 'et_builder' ),
'unOrderedList' => esc_html__( 'Insert Unordered List', 'et_builder' ),
'text' => esc_html__( 'Text Settings', 'et_builder' ),
'textColor' => esc_html__( 'Text Color', 'et_builder' ),
'one' => esc_html__( 'Insert Heading One', 'et_builder' ),
'two' => esc_html__( 'Insert Heading Two', 'et_builder' ),
'three' => esc_html__( 'Insert Heading Three', 'et_builder' ),
'four' => esc_html__( 'Insert Heading Four', 'et_builder' ),
'move' => esc_html__( 'Move Section', 'et_builder' ),
'settings' => esc_html__( 'Section Settings', 'et_builder' ),
'duplicate' => esc_html__( 'Duplicate Section', 'et_builder' ),
'addToLibrary' => esc_html__( 'Save Section To Library', 'et_builder' ),
'delete' => esc_html__( 'Delete Section', 'et_builder' ),
'exit' => esc_html__( 'Exit Section', 'et_builder' ),
'rightMenu' => esc_html__( 'Other Section Settings', 'et_builder' ),
'addButton' => esc_html__( 'Add New Section', 'et_builder' ),
'move' => esc_html__( 'Move Row', 'et_builder' ),
'settings' => esc_html__( 'Row Settings', 'et_builder' ),
'duplicate' => esc_html__( 'Duplicate Row', 'et_builder' ),
'addToLibrary' => esc_html__( 'Save Row To Library', 'et_builder' ),
'delete' => esc_html__( 'Delete Row', 'et_builder' ),
'exit' => esc_html__( 'Exit Row', 'et_builder' ),
'update' => esc_html__( 'Change Column Structure', 'et_builder' ),
'rightMenu' => esc_html__( 'Other Row Settings', 'et_builder' ),
'addButton' => esc_html__( 'Add New Row', 'et_builder' ),
'addColumnButton' => esc_html__( 'Add New Column', 'et_builder' ),
'chooseColumn' => esc_html__( 'Choose Column Structure', 'et_builder' ),
'move' => esc_html__( 'Move Module', 'et_builder' ),
'settings' => esc_html__( 'Module Settings', 'et_builder' ),
'duplicate' => esc_html__( 'Duplicate Module', 'et_builder' ),
'addToLibrary' => esc_html__( 'Save Module To Library', 'et_builder' ),
'delete' => esc_html__( 'Delete Module', 'et_builder' ),
'exit' => esc_html__( 'Exit Module', 'et_builder' ),
'rightMenu' => esc_html__( 'Other Module Settings', 'et_builder' ),
'addButton' => esc_html__( 'Add New Module', 'et_builder' ),
'unsavedConfirmation' => esc_html__( 'Unsaved changes will be lost if you leave the Divi Builder at this time.', 'et_builder' ),
'libraryLoadError' => esc_html__( 'Error loading Library items from server. Please refresh the page and try again.', 'et_builder' ),
'productTourText' => array(),
'yes' => et_builder_i18n( 'Yes' ),
'title' => esc_html__( 'Disable Builder', 'et_builder' ),
'mainText' => esc_html__( 'All content created in the Divi Builder will be lost. Previous content will be restored. Do you wish to proceed?', 'et_builder' ),
'errorBoundaries' => array(
'title' => esc_html__( 'Oops! An Error Has Occurred', 'et_builder' ),
'message' => esc_html__( 'This content could not be displayed. Please report this error to our team so that we can fix it and then save and reload the builder.', 'et_builder' ),
'messageNonAdmin' => esc_html__( 'This content could not be displayed. Click the button below to save and reload the builder', 'et_builder' ),
'buttonReport' => esc_html__( 'Report This Error', 'et_builder' ),
'buttonSaveReload' => esc_html__( 'Save and Reload', 'et_builder' ),
'title' => esc_html__( 'Report An Error', 'et_builder' ),
'noAccountMessage' => esc_html__( 'Elegant Themes username and API key have not been configured on this site. Error reporting requires username and API key to work.', 'et_builder' ),
'noAccountGuide' => esc_html__( 'Click the button below, then go to Updates tab.', 'et_builder' ),
'noAccountButtonLabel' => esc_html__( 'Configure username and API key', 'et_builder' ),
'consentTitle' => esc_html__( 'Data Transfer Agreement', 'et_builder' ),
'consentDescription' => esc_html__( 'The following information will be sent to our team when you submit an error report. This includes the complete content of this page, a detailed error report, and basic information about your website such as which plugins you have installed, which software versions you are using and more. The full list of data transfered in this report will include the following:', 'et_builder' ),
'consentNotes' => esc_html__( 'Error Descripion', 'et_builder' ),
'consentNotesDescription' => esc_html__( 'Describe what exactly you did before this error message appears on the builder. This is optional but really helpful for us to fix this issue. So the more accurate your description is, the easier for us to fix it.', 'et_builder' ),
'consentLabel' => esc_html__( 'I agree to transfer this data to Elegant Themes.', 'et_builder' ),
'buttonLabel' => esc_html__( 'Send Error Report', 'et_builder' ),
'successMessage' => esc_html__( 'Thank you for reporting this issue. Your report has been successfully sent.', 'et_builder' ),
'successAutoclose' => esc_html__( 'This message will be automatically closed in 3 seconds.', 'et_builder' ),
'debugInfo' => ET_Builder_Error_Report::get_debug_info(),
'errorMessage' => esc_html__( 'An error occurred, please try again.', 'et_builder' ),
* @todo update vbSupport['modalSupportNotices']['off'] and vbSupport['modalSupportNotices']['partial'] once the documentation page is ready
'modalSupportNotices' => array(
esc_html__( 'This third party module is not fully compatible with the latest version of the Divi Builder. You can still edit the module, but a preview will not be rendered in the builder. You can contact the developer of the module to encourage them to update it. <a href="%1$s" target="_blank">Click here</a> for more info.', 'et_builder' ),
'https://www.elegantthemes.com/documentation/developers/divi-module/compatibility-levels/'
esc_html__( 'This third party module is not fully compatible with the latest version of the Divi Builder. You can still edit the module, but it will take longer to update on the page. You can contact the developer of the module to encourage them to update it. <a href="%1$s" target="_blank">Click here</a> for more info.', 'et_builder' ),
'https://www.elegantthemes.com/documentation/developers/divi-module/compatibility-levels/'
'unsupportedFieldType' => esc_html__( 'The above custom field is not fully supported and has been rendered as a standard input.' ),
'dynamicContent' => array(
'invalidField' => esc_html__( 'Invalid field or insufficient permissions.', 'et_builder' ),
'manualCustomField' => esc_html__( 'Manual Custom Field Name', 'et_builder' ),
'enable' => esc_html__( 'Use Dynamic Content', 'et_builder' ),
'disable' => esc_html__( 'Remove Dynamic Content', 'et_builder' ),
'settings' => esc_html__( 'Edit Dynamic Content', 'et_builder' ),
'reset' => esc_html__( 'Reset Dynamic Content', 'et_builder' ),
$helpers['i18n'] = array_merge(
require ET_BUILDER_DIR . 'frontend-builder/i18n.php'
// Used to update the content of the cached helper js file.
function et_fb_get_asset_helpers( $content, $post_type ) {
$helpers = et_fb_get_static_backend_helpers( $post_type );
'window.ETBuilderBackend=jQuery.extend(true,%s,window.ETBuilderBackendDynamic)',
et_fb_remove_site_url_protocol( wp_json_encode( $helpers, ET_BUILDER_JSON_ENCODE_OPTIONS ) )
add_filter( 'et_fb_get_asset_helpers', 'et_fb_get_asset_helpers', 10, 2 );
function et_fb_backend_helpers() {
$post_type = isset( $post->post_type ) ? $post->post_type : 'post';
if ( wp_script_is( 'et-dynamic-asset-helpers', 'enqueued' ) ) {
$custom_post_id = isset( $_GET['custom_page_id'] ) ? $_GET['custom_page_id'] : false;
$current_post_id = isset( $post->ID ) ? $post->ID : false;
$post_id = $custom_post_id ? $custom_post_id : $current_post_id;
if ( 'et_pb_layout' === $post_type ) {
$layout_type = et_fb_get_layout_type( $post_id );
// Include in the page the dynamic helpers and the shortcode_object
et_fb_get_dynamic_backend_helpers(),
et_fb_get_builder_shortcode_object( $post_type, $post_id, $layout_type )
$helpers['cachedAssets'] = true;
* Filters backend data passed to the Visual Builder.
$helpers = apply_filters( 'et_fb_backend_helpers', $helpers );
// Pass dynamic helpers via localization.
wp_localize_script( 'et-dynamic-asset-helpers', 'ETBuilderBackendDynamic', $helpers );
// Include in the page all helpers
$helpers = array_merge_recursive(
et_fb_get_static_backend_helpers( $post_type ),
et_fb_get_dynamic_backend_helpers()
$helpers['cachedAssets'] = false;
// Pass all helpers via localization.
wp_localize_script( 'et-frontend-builder', 'ETBuilderBackend', $helpers );
if ( ! function_exists( 'et_fb_fix_plugin_conflicts' ) ) :
function et_fb_fix_plugin_conflicts() {
// Disable Autoptimize plugin
remove_action( 'init', 'autoptimize_start_buffering', -1 );
remove_action( 'template_redirect', 'autoptimize_start_buffering', 2 );
// Disable WP Super Cache when loading Divi Builder
if ( ! defined( 'DONOTCACHEPAGE' ) ) {
define( 'DONOTCACHEPAGE', true );
* Retrieves all WP taxonomies for Visual Builder
if ( ! function_exists( 'et_fb_get_taxonomy_terms' ) ) :
function et_fb_get_taxonomy_terms() {
$taxonomies = get_taxonomies();
foreach ( $taxonomies as $taxonomy => $name ) {
$terms = get_terms( $name, array( 'hide_empty' => false ) );
for ( $i = 0; $i < count( $terms ); $i++ ) {
// `count` gets updated frequently and it causes static cached helpers update.
// Since we don't use it anywhere, we can exclude the value to avoid the issue.
unset( $terms[$i]->count );
$result[ $name ] = $terms;
* Retrieves all WP taxonomies labels for Visual Builder
if ( ! function_exists( 'et_fb_get_taxonomy_labels' ) ) :
function et_fb_get_taxonomy_labels() {
foreach ( get_taxonomies() as $tax => $name ) {
$taxonomy = get_taxonomy( $name );
$result[ $name ] = get_taxonomy_labels( $taxonomy );
* Retrieves media buttons html for rich text usage.
if ( ! function_exists( 'et_builder_get_media_buttons' ) ) :
function et_builder_get_media_buttons() {
remove_action( 'media_buttons', 'media_buttons' );
echo '<span class="et-fb-tinymce-media-buttons__spacer et-fb-tinymce-media-buttons__spacer--leading">' . esc_html__( 'Add Media', 'et_builder' ) . '</span>';
do_action( 'media_buttons' );
$legacy_filter = apply_filters( 'media_buttons_context', '' );
// #WP22559. Close <a> if a plugin started by closing <a> to open their own <a> tag.
if ( 0 === stripos( trim( $legacy_filter ), '</a>' ) ) {
$legacy_filter .= '</a>';
echo '<span class="et-fb-tinymce-media-buttons__spacer et-fb-tinymce-media-buttons__spacer--trailing"><span>' . esc_html__( 'Visual', 'et_builder' ) . '</span><span>' . et_builder_i18n( 'Text' ) . '</span></span>';
add_action( 'media_buttons', 'media_buttons' );