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/frontend...
File: helpers.php
'enable_dummy_content' => array(
[2000] Fix | Delete
'on' => et_builder_i18n( 'On' ),
[2001] Fix | Delete
'off' => et_builder_i18n( 'Off' ),
[2002] Fix | Delete
),
[2003] Fix | Delete
'page_creation_flow_select' => et_builder_page_creation_settings( true ),
[2004] Fix | Delete
),
[2005] Fix | Delete
),
[2006] Fix | Delete
'video' => array(
[2007] Fix | Delete
'active' => esc_html__( 'Video Overlay is Currently Active.', 'et_builder' ),
[2008] Fix | Delete
'offline' => esc_html__( 'Unable to Establish Internet Connection.', 'et_builder' ),
[2009] Fix | Delete
),
[2010] Fix | Delete
[2011] Fix | Delete
/**
[2012] Fix | Delete
* Filters the builder's video tutorials.
[2013] Fix | Delete
* Can be used for add video tutorials for custom 3rd-party modules.
[2014] Fix | Delete
*
[2015] Fix | Delete
* @param string[] $help_videos {
[2016] Fix | Delete
* Videos to module relations array
[2017] Fix | Delete
*
[2018] Fix | Delete
* @type string[] $module_slug {
[2019] Fix | Delete
* Module slugs array
[2020] Fix | Delete
*
[2021] Fix | Delete
* @type string[] $sort_order {
[2022] Fix | Delete
* Video sort order
[2023] Fix | Delete
*
[2024] Fix | Delete
* @type string $id Youtube video ID
[2025] Fix | Delete
* @type string $name Localized video title
[2026] Fix | Delete
* }
[2027] Fix | Delete
* }
[2028] Fix | Delete
* }
[2029] Fix | Delete
*/
[2030] Fix | Delete
'videos' => apply_filters( 'et_fb_help_videos', $help_videos ),
[2031] Fix | Delete
[2032] Fix | Delete
'sortable' => array(
[2033] Fix | Delete
'has_no_ab_permission' => esc_html__( 'You do not have permission to edit the module, row or section in this split test.', 'et_builder' ),
[2034] Fix | Delete
'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' ),
[2035] Fix | Delete
'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' ),
[2036] Fix | Delete
'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' ),
[2037] Fix | Delete
'section_only_row_dragged_away' => esc_html__( 'The section should have at least one row.', 'et_builder' ),
[2038] Fix | Delete
'global_module_alert' => esc_html__( 'You cannot add global modules into global sections or rows', 'et_builder' ),
[2039] Fix | Delete
'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' ),
[2040] Fix | Delete
'stop_dropping_3_col_row' => esc_html__( 'This number of columns cannot be used on this row.', 'et_builder' ),
[2041] Fix | Delete
'onlyColumnDraggedAway' => esc_html__( 'The row must have at least one column.', 'et_builder' ),
[2042] Fix | Delete
),
[2043] Fix | Delete
'tooltip' => array(
[2044] Fix | Delete
'pageSettingsBar' => array(
[2045] Fix | Delete
'responsive' => array(
[2046] Fix | Delete
'wireframe' => esc_html__( 'Wireframe View', 'et_builder' ),
[2047] Fix | Delete
'zoom' => esc_html__( 'Zoom Out', 'et_builder' ),
[2048] Fix | Delete
'desktop' => esc_html__( 'Desktop View', 'et_builder' ),
[2049] Fix | Delete
'tablet' => esc_html__( 'Tablet View', 'et_builder' ),
[2050] Fix | Delete
'phone' => esc_html__( 'Phone View', 'et_builder' ),
[2051] Fix | Delete
),
[2052] Fix | Delete
'eventMode' => array(
[2053] Fix | Delete
'click' => esc_html__( 'Click Mode', 'et_builder' ),
[2054] Fix | Delete
'hover' => esc_html__( 'Hover Mode', 'et_builder' ),
[2055] Fix | Delete
'grid' => esc_html__( 'Grid Mode', 'et_builder' ),
[2056] Fix | Delete
),
[2057] Fix | Delete
'main' => array(
[2058] Fix | Delete
'loadLibrary' => esc_html__( 'Load From Library', 'et_builder' ),
[2059] Fix | Delete
'saveToLibrary' => esc_html__( 'Save To Library', 'et_builder' ),
[2060] Fix | Delete
'clearLayout' => esc_html__( 'Clear Layout', 'et_builder' ),
[2061] Fix | Delete
'pageSettingsModal' => esc_html__( 'Page Settings', 'et_builder' ),
[2062] Fix | Delete
'history' => esc_html__( 'Editing History', 'et_builder' ),
[2063] Fix | Delete
'portability' => esc_html__( 'Portability', 'et_builder' ),
[2064] Fix | Delete
'open' => esc_html__( 'Expand Settings', 'et_builder' ),
[2065] Fix | Delete
'close' => esc_html__( 'Collapse Settings', 'et_builder' ),
[2066] Fix | Delete
),
[2067] Fix | Delete
'save' => array(
[2068] Fix | Delete
'saveDraft' => esc_html__( 'Save as Draft', 'et_builder' ),
[2069] Fix | Delete
'save' => esc_html__( 'Save', 'et_builder' ),
[2070] Fix | Delete
'publish' => esc_html__( 'Publish', 'et_builder' ),
[2071] Fix | Delete
)
[2072] Fix | Delete
),
[2073] Fix | Delete
'modal' => array(
[2074] Fix | Delete
'expandModal' => esc_html__( 'Expand Modal', 'et_builder' ),
[2075] Fix | Delete
'contractModal' => esc_html__( 'Contract Modal', 'et_builder' ),
[2076] Fix | Delete
'resize' => esc_html__( 'Resize Modal', 'et_builder' ),
[2077] Fix | Delete
'snapModal' => esc_html__( 'Snap to Left', 'et_builder' ),
[2078] Fix | Delete
'snapModalRight' => esc_html__( 'Snap to Right', 'et_builder' ),
[2079] Fix | Delete
'separateModal' => esc_html__( 'Separate Modal', 'et_builder' ),
[2080] Fix | Delete
'redo' => esc_html__( 'Redo', 'et_builder' ),
[2081] Fix | Delete
'undo' => esc_html__( 'Undo', 'et_builder' ),
[2082] Fix | Delete
'cancel' => esc_html__( 'Discard All Changes', 'et_builder' ),
[2083] Fix | Delete
'save' => esc_html__( 'Save Changes', 'et_builder' ),
[2084] Fix | Delete
'close' => esc_html__( 'Close', 'et_builder' ),
[2085] Fix | Delete
'rightMenu' => esc_html__( 'Other Settings', 'et_builder' ),
[2086] Fix | Delete
'globalPresets' => array(
[2087] Fix | Delete
'edit' => esc_html__( 'Manage %s Presets', 'et_builder' ),
[2088] Fix | Delete
'exit' => esc_html__( 'Back To Module Settings', 'et_builder' ),
[2089] Fix | Delete
'selectPreset' => esc_html__( 'Select A Preset', 'et_builder' ),
[2090] Fix | Delete
'activatePreset' => esc_html__( 'Activate Preset', 'et_builder' ),
[2091] Fix | Delete
'disablePreset' => esc_html__( 'Disable Preset', 'et_builder' ),
[2092] Fix | Delete
'presetSettings' => esc_html__( 'Preset Settings', 'et_builder' ),
[2093] Fix | Delete
'duplicatePreset' => esc_html__( 'Duplicate Preset', 'et_builder' ),
[2094] Fix | Delete
'deletePreset' => esc_html__( 'Delete Preset', 'et_builder' ),
[2095] Fix | Delete
'assignAsDefault' => esc_html__( 'Assign Preset as Default', 'et_builder' ),
[2096] Fix | Delete
'editPresetStyles' => esc_html__( 'Edit Preset Styles', 'et_builder' ),
[2097] Fix | Delete
'updateWithCurrentStyles' => esc_html__( 'Update Preset With Current Styles', 'et_builder' ),
[2098] Fix | Delete
),
[2099] Fix | Delete
),
[2100] Fix | Delete
'inlineEditor' => array(
[2101] Fix | Delete
'back' => esc_html__( 'Go Back', 'et_builder' ),
[2102] Fix | Delete
'increaseFontSize' => esc_html__( 'Decrease Font Size', 'et_builder' ),
[2103] Fix | Delete
'decreaseFontSize' => esc_html__( 'Increase Font Size', 'et_builder' ),
[2104] Fix | Delete
'bold' => esc_html__( 'Bold Text', 'et_builder' ),
[2105] Fix | Delete
'italic' => esc_html__( 'Italic Text', 'et_builder' ),
[2106] Fix | Delete
'underline' => esc_html__( 'Underline Text', 'et_builder' ),
[2107] Fix | Delete
'link' => esc_html__( 'Insert Link', 'et_builder' ),
[2108] Fix | Delete
'quote' => esc_html__( 'Insert Quote', 'et_builder' ),
[2109] Fix | Delete
'alignment' => esc_html__( 'Text Alignment', 'et_builder' ),
[2110] Fix | Delete
'centerText' => esc_html__( 'Center Text', 'et_builder' ),
[2111] Fix | Delete
'rightText' => esc_html__( 'Right Text', 'et_builder' ),
[2112] Fix | Delete
'leftText' => esc_html__( 'Left Text', 'et_builder' ),
[2113] Fix | Delete
'justifyText' => esc_html__( 'Justify Text', 'et_builder' ),
[2114] Fix | Delete
'list' => esc_html__( 'List Settings', 'et_builder' ),
[2115] Fix | Delete
'indent' => esc_html__( 'Indent List', 'et_builder' ),
[2116] Fix | Delete
'undent' => esc_html__( 'Undent List', 'et_builder' ),
[2117] Fix | Delete
'orderedList' => esc_html__( 'Insert Ordered List', 'et_builder' ),
[2118] Fix | Delete
'unOrderedList' => esc_html__( 'Insert Unordered List', 'et_builder' ),
[2119] Fix | Delete
'text' => esc_html__( 'Text Settings', 'et_builder' ),
[2120] Fix | Delete
'textColor' => esc_html__( 'Text Color', 'et_builder' ),
[2121] Fix | Delete
'heading' => array(
[2122] Fix | Delete
'one' => esc_html__( 'Insert Heading One', 'et_builder' ),
[2123] Fix | Delete
'two' => esc_html__( 'Insert Heading Two', 'et_builder' ),
[2124] Fix | Delete
'three' => esc_html__( 'Insert Heading Three', 'et_builder' ),
[2125] Fix | Delete
'four' => esc_html__( 'Insert Heading Four', 'et_builder' ),
[2126] Fix | Delete
),
[2127] Fix | Delete
),
[2128] Fix | Delete
'section' => array(
[2129] Fix | Delete
'tab' => array(
[2130] Fix | Delete
'move' => esc_html__( 'Move Section', 'et_builder' ),
[2131] Fix | Delete
'settings' => esc_html__( 'Section Settings', 'et_builder' ),
[2132] Fix | Delete
'duplicate' => esc_html__( 'Duplicate Section', 'et_builder' ),
[2133] Fix | Delete
'addToLibrary' => esc_html__( 'Save Section To Library', 'et_builder' ),
[2134] Fix | Delete
'delete' => esc_html__( 'Delete Section', 'et_builder' ),
[2135] Fix | Delete
'exit' => esc_html__( 'Exit Section', 'et_builder' ),
[2136] Fix | Delete
'rightMenu' => esc_html__( 'Other Section Settings', 'et_builder' ),
[2137] Fix | Delete
),
[2138] Fix | Delete
'addButton' => esc_html__( 'Add New Section', 'et_builder' ),
[2139] Fix | Delete
),
[2140] Fix | Delete
'row' => array(
[2141] Fix | Delete
'tab' => array(
[2142] Fix | Delete
'move' => esc_html__( 'Move Row', 'et_builder' ),
[2143] Fix | Delete
'settings' => esc_html__( 'Row Settings', 'et_builder' ),
[2144] Fix | Delete
'duplicate' => esc_html__( 'Duplicate Row', 'et_builder' ),
[2145] Fix | Delete
'addToLibrary' => esc_html__( 'Save Row To Library', 'et_builder' ),
[2146] Fix | Delete
'delete' => esc_html__( 'Delete Row', 'et_builder' ),
[2147] Fix | Delete
'exit' => esc_html__( 'Exit Row', 'et_builder' ),
[2148] Fix | Delete
'update' => esc_html__( 'Change Column Structure', 'et_builder' ),
[2149] Fix | Delete
'rightMenu' => esc_html__( 'Other Row Settings', 'et_builder' ),
[2150] Fix | Delete
),
[2151] Fix | Delete
'addButton' => esc_html__( 'Add New Row', 'et_builder' ),
[2152] Fix | Delete
'addColumnButton' => esc_html__( 'Add New Column', 'et_builder' ),
[2153] Fix | Delete
'chooseColumn' => esc_html__( 'Choose Column Structure', 'et_builder' ),
[2154] Fix | Delete
),
[2155] Fix | Delete
'module' => array(
[2156] Fix | Delete
'tab' => array(
[2157] Fix | Delete
'move' => esc_html__( 'Move Module', 'et_builder' ),
[2158] Fix | Delete
'settings' => esc_html__( 'Module Settings', 'et_builder' ),
[2159] Fix | Delete
'duplicate' => esc_html__( 'Duplicate Module', 'et_builder' ),
[2160] Fix | Delete
'addToLibrary' => esc_html__( 'Save Module To Library', 'et_builder' ),
[2161] Fix | Delete
'delete' => esc_html__( 'Delete Module', 'et_builder' ),
[2162] Fix | Delete
'exit' => esc_html__( 'Exit Module', 'et_builder' ),
[2163] Fix | Delete
'rightMenu' => esc_html__( 'Other Module Settings', 'et_builder' ),
[2164] Fix | Delete
),
[2165] Fix | Delete
'addButton' => esc_html__( 'Add New Module', 'et_builder' ),
[2166] Fix | Delete
),
[2167] Fix | Delete
),
[2168] Fix | Delete
'unsavedConfirmation' => esc_html__( 'Unsaved changes will be lost if you leave the Divi Builder at this time.', 'et_builder' ),
[2169] Fix | Delete
'libraryLoadError' => esc_html__( 'Error loading Library items from server. Please refresh the page and try again.', 'et_builder' ),
[2170] Fix | Delete
'productTourText' => array(),
[2171] Fix | Delete
'BFBText' => array(
[2172] Fix | Delete
'disableBFB' => array(
[2173] Fix | Delete
'yes' => et_builder_i18n( 'Yes' ),
[2174] Fix | Delete
'title' => esc_html__( 'Disable Builder', 'et_builder' ),
[2175] Fix | Delete
'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' ),
[2176] Fix | Delete
),
[2177] Fix | Delete
),
[2178] Fix | Delete
'errorBoundaries' => array(
[2179] Fix | Delete
'title' => esc_html__( 'Oops! An Error Has Occurred', 'et_builder' ),
[2180] Fix | Delete
'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' ),
[2181] Fix | Delete
'messageNonAdmin' => esc_html__( 'This content could not be displayed. Click the button below to save and reload the builder', 'et_builder' ),
[2182] Fix | Delete
'buttonReport' => esc_html__( 'Report This Error', 'et_builder' ),
[2183] Fix | Delete
'buttonSaveReload' => esc_html__( 'Save and Reload', 'et_builder' ),
[2184] Fix | Delete
'modal' => array(
[2185] Fix | Delete
'title' => esc_html__( 'Report An Error', 'et_builder' ),
[2186] Fix | Delete
'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' ),
[2187] Fix | Delete
'noAccountGuide' => esc_html__( 'Click the button below, then go to Updates tab.', 'et_builder' ),
[2188] Fix | Delete
'noAccountButtonLabel' => esc_html__( 'Configure username and API key', 'et_builder' ),
[2189] Fix | Delete
'consentTitle' => esc_html__( 'Data Transfer Agreement', 'et_builder' ),
[2190] Fix | Delete
'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' ),
[2191] Fix | Delete
'consentNotes' => esc_html__( 'Error Descripion', 'et_builder' ),
[2192] Fix | Delete
'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' ),
[2193] Fix | Delete
'consentLabel' => esc_html__( 'I agree to transfer this data to Elegant Themes.', 'et_builder' ),
[2194] Fix | Delete
'buttonLabel' => esc_html__( 'Send Error Report', 'et_builder' ),
[2195] Fix | Delete
'successMessage' => esc_html__( 'Thank you for reporting this issue. Your report has been successfully sent.', 'et_builder' ),
[2196] Fix | Delete
'successAutoclose' => esc_html__( 'This message will be automatically closed in 3 seconds.', 'et_builder' ),
[2197] Fix | Delete
'debugInfo' => ET_Builder_Error_Report::get_debug_info(),
[2198] Fix | Delete
'errorMessage' => esc_html__( 'An error occurred, please try again.', 'et_builder' ),
[2199] Fix | Delete
),
[2200] Fix | Delete
),
[2201] Fix | Delete
/**
[2202] Fix | Delete
* @todo update vbSupport['modalSupportNotices']['off'] and vbSupport['modalSupportNotices']['partial'] once the documentation page is ready
[2203] Fix | Delete
*/
[2204] Fix | Delete
'vbSupport' => array(
[2205] Fix | Delete
'modalSupportNotices' => array(
[2206] Fix | Delete
'off' => sprintf(
[2207] Fix | Delete
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' ),
[2208] Fix | Delete
'https://www.elegantthemes.com/documentation/developers/divi-module/compatibility-levels/'
[2209] Fix | Delete
),
[2210] Fix | Delete
'partial' => sprintf(
[2211] Fix | Delete
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' ),
[2212] Fix | Delete
'https://www.elegantthemes.com/documentation/developers/divi-module/compatibility-levels/'
[2213] Fix | Delete
),
[2214] Fix | Delete
),
[2215] Fix | Delete
'unsupportedFieldType' => esc_html__( 'The above custom field is not fully supported and has been rendered as a standard input.' ),
[2216] Fix | Delete
),
[2217] Fix | Delete
[2218] Fix | Delete
'dynamicContent' => array(
[2219] Fix | Delete
'invalidField' => esc_html__( 'Invalid field or insufficient permissions.', 'et_builder' ),
[2220] Fix | Delete
'manualCustomField' => esc_html__( 'Manual Custom Field Name', 'et_builder' ),
[2221] Fix | Delete
'tooltips' => array(
[2222] Fix | Delete
'enable' => esc_html__( 'Use Dynamic Content', 'et_builder' ),
[2223] Fix | Delete
'disable' => esc_html__( 'Remove Dynamic Content', 'et_builder' ),
[2224] Fix | Delete
'settings' => esc_html__( 'Edit Dynamic Content', 'et_builder' ),
[2225] Fix | Delete
'reset' => esc_html__( 'Reset Dynamic Content', 'et_builder' ),
[2226] Fix | Delete
),
[2227] Fix | Delete
),
[2228] Fix | Delete
);
[2229] Fix | Delete
[2230] Fix | Delete
$helpers['i18n'] = array_merge(
[2231] Fix | Delete
$helpers['i18n'],
[2232] Fix | Delete
require ET_BUILDER_DIR . 'frontend-builder/i18n.php'
[2233] Fix | Delete
);
[2234] Fix | Delete
[2235] Fix | Delete
return $helpers;
[2236] Fix | Delete
}
[2237] Fix | Delete
[2238] Fix | Delete
// Used to update the content of the cached helper js file.
[2239] Fix | Delete
function et_fb_get_asset_helpers( $content, $post_type ) {
[2240] Fix | Delete
$helpers = et_fb_get_static_backend_helpers( $post_type );
[2241] Fix | Delete
return sprintf(
[2242] Fix | Delete
'window.ETBuilderBackend=jQuery.extend(true,%s,window.ETBuilderBackendDynamic)',
[2243] Fix | Delete
et_fb_remove_site_url_protocol( wp_json_encode( $helpers, ET_BUILDER_JSON_ENCODE_OPTIONS ) )
[2244] Fix | Delete
);
[2245] Fix | Delete
}
[2246] Fix | Delete
add_filter( 'et_fb_get_asset_helpers', 'et_fb_get_asset_helpers', 10, 2 );
[2247] Fix | Delete
[2248] Fix | Delete
function et_fb_backend_helpers() {
[2249] Fix | Delete
global $post;
[2250] Fix | Delete
$post_type = isset( $post->post_type ) ? $post->post_type : 'post';
[2251] Fix | Delete
[2252] Fix | Delete
if ( wp_script_is( 'et-dynamic-asset-helpers', 'enqueued' ) ) {
[2253] Fix | Delete
// New loading method
[2254] Fix | Delete
$custom_post_id = isset( $_GET['custom_page_id'] ) ? $_GET['custom_page_id'] : false;
[2255] Fix | Delete
$current_post_id = isset( $post->ID ) ? $post->ID : false;
[2256] Fix | Delete
$post_id = $custom_post_id ? $custom_post_id : $current_post_id;
[2257] Fix | Delete
$layout_type = '';
[2258] Fix | Delete
[2259] Fix | Delete
if ( 'et_pb_layout' === $post_type ) {
[2260] Fix | Delete
$layout_type = et_fb_get_layout_type( $post_id );
[2261] Fix | Delete
}
[2262] Fix | Delete
[2263] Fix | Delete
// Include in the page the dynamic helpers and the shortcode_object
[2264] Fix | Delete
$helpers = array_merge(
[2265] Fix | Delete
et_fb_get_dynamic_backend_helpers(),
[2266] Fix | Delete
et_fb_get_builder_shortcode_object( $post_type, $post_id, $layout_type )
[2267] Fix | Delete
);
[2268] Fix | Delete
[2269] Fix | Delete
$helpers['cachedAssets'] = true;
[2270] Fix | Delete
[2271] Fix | Delete
/**
[2272] Fix | Delete
* Filters backend data passed to the Visual Builder.
[2273] Fix | Delete
*
[2274] Fix | Delete
* @since 3.28
[2275] Fix | Delete
*
[2276] Fix | Delete
* @param array $helpers
[2277] Fix | Delete
*/
[2278] Fix | Delete
$helpers = apply_filters( 'et_fb_backend_helpers', $helpers );
[2279] Fix | Delete
// Pass dynamic helpers via localization.
[2280] Fix | Delete
wp_localize_script( 'et-dynamic-asset-helpers', 'ETBuilderBackendDynamic', $helpers );
[2281] Fix | Delete
} else {
[2282] Fix | Delete
// Old loading method
[2283] Fix | Delete
// Include in the page all helpers
[2284] Fix | Delete
$helpers = array_merge_recursive(
[2285] Fix | Delete
et_fb_get_static_backend_helpers( $post_type ),
[2286] Fix | Delete
et_fb_get_dynamic_backend_helpers()
[2287] Fix | Delete
);
[2288] Fix | Delete
[2289] Fix | Delete
$helpers['cachedAssets'] = false;
[2290] Fix | Delete
// Pass all helpers via localization.
[2291] Fix | Delete
wp_localize_script( 'et-frontend-builder', 'ETBuilderBackend', $helpers );
[2292] Fix | Delete
}
[2293] Fix | Delete
}
[2294] Fix | Delete
[2295] Fix | Delete
if ( ! function_exists( 'et_fb_fix_plugin_conflicts' ) ) :
[2296] Fix | Delete
function et_fb_fix_plugin_conflicts() {
[2297] Fix | Delete
// Disable Autoptimize plugin
[2298] Fix | Delete
remove_action( 'init', 'autoptimize_start_buffering', -1 );
[2299] Fix | Delete
remove_action( 'template_redirect', 'autoptimize_start_buffering', 2 );
[2300] Fix | Delete
[2301] Fix | Delete
// Disable WP Super Cache when loading Divi Builder
[2302] Fix | Delete
if ( ! defined( 'DONOTCACHEPAGE' ) ) {
[2303] Fix | Delete
define( 'DONOTCACHEPAGE', true );
[2304] Fix | Delete
}
[2305] Fix | Delete
}
[2306] Fix | Delete
endif;
[2307] Fix | Delete
[2308] Fix | Delete
/**
[2309] Fix | Delete
* Retrieves all WP taxonomies for Visual Builder
[2310] Fix | Delete
*
[2311] Fix | Delete
* @return array
[2312] Fix | Delete
*/
[2313] Fix | Delete
if ( ! function_exists( 'et_fb_get_taxonomy_terms' ) ) :
[2314] Fix | Delete
function et_fb_get_taxonomy_terms() {
[2315] Fix | Delete
$result = array();
[2316] Fix | Delete
[2317] Fix | Delete
$taxonomies = get_taxonomies();
[2318] Fix | Delete
foreach ( $taxonomies as $taxonomy => $name ) {
[2319] Fix | Delete
$terms = get_terms( $name, array( 'hide_empty' => false ) );
[2320] Fix | Delete
if ( $terms ) {
[2321] Fix | Delete
for ( $i = 0; $i < count( $terms ); $i++ ) {
[2322] Fix | Delete
// `count` gets updated frequently and it causes static cached helpers update.
[2323] Fix | Delete
// Since we don't use it anywhere, we can exclude the value to avoid the issue.
[2324] Fix | Delete
unset( $terms[$i]->count );
[2325] Fix | Delete
}
[2326] Fix | Delete
$result[ $name ] = $terms;
[2327] Fix | Delete
}
[2328] Fix | Delete
}
[2329] Fix | Delete
[2330] Fix | Delete
return $result;
[2331] Fix | Delete
}
[2332] Fix | Delete
endif;
[2333] Fix | Delete
[2334] Fix | Delete
/**
[2335] Fix | Delete
* Retrieves all WP taxonomies labels for Visual Builder
[2336] Fix | Delete
*
[2337] Fix | Delete
* @return array
[2338] Fix | Delete
*/
[2339] Fix | Delete
if ( ! function_exists( 'et_fb_get_taxonomy_labels' ) ) :
[2340] Fix | Delete
function et_fb_get_taxonomy_labels() {
[2341] Fix | Delete
$result = array();
[2342] Fix | Delete
[2343] Fix | Delete
foreach ( get_taxonomies() as $tax => $name ) {
[2344] Fix | Delete
$taxonomy = get_taxonomy( $name );
[2345] Fix | Delete
if ( $taxonomy ) {
[2346] Fix | Delete
$result[ $name ] = get_taxonomy_labels( $taxonomy );
[2347] Fix | Delete
}
[2348] Fix | Delete
}
[2349] Fix | Delete
[2350] Fix | Delete
return $result;
[2351] Fix | Delete
}
[2352] Fix | Delete
endif;
[2353] Fix | Delete
[2354] Fix | Delete
/**
[2355] Fix | Delete
* Retrieves media buttons html for rich text usage.
[2356] Fix | Delete
*
[2357] Fix | Delete
* @since 3.18
[2358] Fix | Delete
*
[2359] Fix | Delete
* @return string
[2360] Fix | Delete
*/
[2361] Fix | Delete
if ( ! function_exists( 'et_builder_get_media_buttons' ) ) :
[2362] Fix | Delete
function et_builder_get_media_buttons() {
[2363] Fix | Delete
ob_start();
[2364] Fix | Delete
remove_action( 'media_buttons', 'media_buttons' );
[2365] Fix | Delete
echo '<span class="et-fb-tinymce-media-buttons__spacer et-fb-tinymce-media-buttons__spacer--leading">' . esc_html__( 'Add Media', 'et_builder' ) . '</span>';
[2366] Fix | Delete
do_action( 'media_buttons' );
[2367] Fix | Delete
$legacy_filter = apply_filters( 'media_buttons_context', '' );
[2368] Fix | Delete
if ( $legacy_filter ) {
[2369] Fix | Delete
// #WP22559. Close <a> if a plugin started by closing <a> to open their own <a> tag.
[2370] Fix | Delete
if ( 0 === stripos( trim( $legacy_filter ), '</a>' ) ) {
[2371] Fix | Delete
$legacy_filter .= '</a>';
[2372] Fix | Delete
}
[2373] Fix | Delete
echo $legacy_filter;
[2374] Fix | Delete
}
[2375] Fix | Delete
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>';
[2376] Fix | Delete
add_action( 'media_buttons', 'media_buttons' );
[2377] Fix | Delete
return ob_get_clean();
[2378] Fix | Delete
}
[2379] Fix | Delete
endif;
[2380] Fix | Delete
[2381] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function