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/wp-conte.../themes/Divi/includes/builder
File: core.php
}
[3000] Fix | Delete
[3001] Fix | Delete
if ( ! wp_doing_ajax() ) {
[3002] Fix | Delete
return false;
[3003] Fix | Delete
}
[3004] Fix | Delete
[3005] Fix | Delete
if ( ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
[3006] Fix | Delete
return false;
[3007] Fix | Delete
}
[3008] Fix | Delete
[3009] Fix | Delete
if ( ! isset( $_POST['action'] ) || 'et_pb_get_backbone_templates' !== $_POST['action'] ) {
[3010] Fix | Delete
return false;
[3011] Fix | Delete
}
[3012] Fix | Delete
[3013] Fix | Delete
if ( ! current_user_can( 'edit_posts' ) ) {
[3014] Fix | Delete
return false;
[3015] Fix | Delete
}
[3016] Fix | Delete
[3017] Fix | Delete
return true;
[3018] Fix | Delete
}
[3019] Fix | Delete
[3020] Fix | Delete
if ( ! function_exists( 'et_pb_attempt_memory_limit_increase' ) ) :
[3021] Fix | Delete
function et_pb_attempt_memory_limit_increase() {
[3022] Fix | Delete
if ( ! isset( $_POST['et_admin_load_nonce'] ) || ! wp_verify_nonce( $_POST['et_admin_load_nonce'], 'et_admin_load_nonce' ) ) {
[3023] Fix | Delete
die( -1 );
[3024] Fix | Delete
}
[3025] Fix | Delete
[3026] Fix | Delete
if ( ! current_user_can( 'manage_options' ) ) {
[3027] Fix | Delete
die( -1 );
[3028] Fix | Delete
}
[3029] Fix | Delete
[3030] Fix | Delete
if ( et_increase_memory_limit() ) {
[3031] Fix | Delete
et_update_option( 'set_memory_limit', '1' );
[3032] Fix | Delete
[3033] Fix | Delete
die( wp_json_encode( array(
[3034] Fix | Delete
'success' => true,
[3035] Fix | Delete
) ) );
[3036] Fix | Delete
} else {
[3037] Fix | Delete
die( wp_json_encode( array(
[3038] Fix | Delete
'error' => true,
[3039] Fix | Delete
) ) );
[3040] Fix | Delete
}
[3041] Fix | Delete
[3042] Fix | Delete
die();
[3043] Fix | Delete
}
[3044] Fix | Delete
endif;
[3045] Fix | Delete
[3046] Fix | Delete
add_action( 'wp_ajax_et_pb_increase_memory_limit', 'et_pb_attempt_memory_limit_increase' );
[3047] Fix | Delete
[3048] Fix | Delete
if ( ! function_exists( 'et_reset_memory_limit_increase' ) ) :
[3049] Fix | Delete
function et_reset_memory_limit_increase() {
[3050] Fix | Delete
if ( ! isset( $_POST['et_builder_reset_memory_limit_nonce'] ) || ! wp_verify_nonce( $_POST['et_builder_reset_memory_limit_nonce'], 'et_builder_reset_memory_limit_nonce' ) ) {
[3051] Fix | Delete
die( -1 );
[3052] Fix | Delete
}
[3053] Fix | Delete
[3054] Fix | Delete
if ( ! current_user_can( 'manage_options' ) ) {
[3055] Fix | Delete
die( -1 );
[3056] Fix | Delete
}
[3057] Fix | Delete
[3058] Fix | Delete
if ( et_get_option( 'set_memory_limit' ) ) {
[3059] Fix | Delete
et_delete_option( 'set_memory_limit' );
[3060] Fix | Delete
}
[3061] Fix | Delete
[3062] Fix | Delete
die( 'success' );
[3063] Fix | Delete
}
[3064] Fix | Delete
endif;
[3065] Fix | Delete
[3066] Fix | Delete
add_action( 'wp_ajax_et_reset_memory_limit_increase', 'et_reset_memory_limit_increase' );
[3067] Fix | Delete
[3068] Fix | Delete
if ( ! function_exists( 'et_builder_get_core_modal_template' ) ) :
[3069] Fix | Delete
function et_builder_get_core_modal_template() {
[3070] Fix | Delete
return
[3071] Fix | Delete
'<div class="et-core-modal-overlay et-core-active">
[3072] Fix | Delete
<div class="et-core-modal">
[3073] Fix | Delete
<div class="et-core-modal-header">
[3074] Fix | Delete
<h3 class="et-core-modal-title">%1$s</h3>
[3075] Fix | Delete
<a href="#" class="et-core-modal-close" data-et-core-modal="close"></a>
[3076] Fix | Delete
</div>
[3077] Fix | Delete
<div class="et-core-modal-content">
[3078] Fix | Delete
<p>%2$s</p>
[3079] Fix | Delete
</div>
[3080] Fix | Delete
%3$s
[3081] Fix | Delete
</div>
[3082] Fix | Delete
</div>';
[3083] Fix | Delete
}
[3084] Fix | Delete
endif;
[3085] Fix | Delete
[3086] Fix | Delete
if ( ! function_exists( 'et_builder_get_core_modal_buttons_template' ) ) :
[3087] Fix | Delete
function et_builder_get_core_modal_buttons_template() {
[3088] Fix | Delete
return
[3089] Fix | Delete
'<div class="et_pb_prompt_buttons">
[3090] Fix | Delete
<br>
[3091] Fix | Delete
<span class="spinner"></span>
[3092] Fix | Delete
%1$s
[3093] Fix | Delete
</div>
[3094] Fix | Delete
</div>';
[3095] Fix | Delete
}
[3096] Fix | Delete
endif;
[3097] Fix | Delete
[3098] Fix | Delete
if ( ! function_exists( 'et_builder_get_cache_notification_modal' ) ) :
[3099] Fix | Delete
function et_builder_get_cache_notification_modal() {
[3100] Fix | Delete
$cache_plugin_message = '';
[3101] Fix | Delete
[3102] Fix | Delete
if ( false !== ( $cache_plugin = et_pb_detect_cache_plugins() ) ) {
[3103] Fix | Delete
$cache_plugin_message = sprintf(
[3104] Fix | Delete
esc_html__( 'You are using the %1$s plugin. We recommend clearing the plugin cache after updating your theme.', 'et_builder' ),
[3105] Fix | Delete
esc_html( $cache_plugin['name'] )
[3106] Fix | Delete
);
[3107] Fix | Delete
[3108] Fix | Delete
$cache_plugin_message = '<p>' . $cache_plugin_message . '</p>';
[3109] Fix | Delete
[3110] Fix | Delete
$cache_plugin_message .= sprintf(
[3111] Fix | Delete
'<a href="%1$s" class="et_builder_modal_action_button" target="_blank">%2$s</a>',
[3112] Fix | Delete
esc_url( admin_url( $cache_plugin['page'] ) ),
[3113] Fix | Delete
esc_html__( 'Clear Plugin Cache', 'et_builder' )
[3114] Fix | Delete
);
[3115] Fix | Delete
}
[3116] Fix | Delete
[3117] Fix | Delete
$browser_cache_message = '<p>' . esc_html__( 'Builder files may also be cached in your browser. Please clear your browser cache.', 'et_builder' ) . '</p>';
[3118] Fix | Delete
[3119] Fix | Delete
$browser_cache_message .= sprintf(
[3120] Fix | Delete
'<a href="http://www.refreshyourcache.com/en/home/" class="et_builder_modal_action_button" target="_blank">%1$s</a>',
[3121] Fix | Delete
esc_html__( 'Clear Browser Cache', 'et_builder' )
[3122] Fix | Delete
);
[3123] Fix | Delete
[3124] Fix | Delete
$output = sprintf(
[3125] Fix | Delete
'<div class="et_pb_modal_overlay et_modal_on_top et_pb_failure_notification_modal et_pb_new_template_modal">
[3126] Fix | Delete
<div class="et_pb_prompt_modal">
[3127] Fix | Delete
<h2>%1$s</h2>
[3128] Fix | Delete
[3129] Fix | Delete
<div class="et_pb_prompt_modal_inside">
[3130] Fix | Delete
<p>%2$s</p>
[3131] Fix | Delete
%4$s
[3132] Fix | Delete
%5$s
[3133] Fix | Delete
<p>%6$s</p>
[3134] Fix | Delete
</div>
[3135] Fix | Delete
[3136] Fix | Delete
<a href="#"" class="et_pb_prompt_dont_proceed et-pb-modal-close"></a>
[3137] Fix | Delete
[3138] Fix | Delete
<div class="et_pb_prompt_buttons">
[3139] Fix | Delete
<br>
[3140] Fix | Delete
<span class="spinner"></span>
[3141] Fix | Delete
<a href="#" class="et_pb_reload_builder button-primary et_pb_prompt_proceed">%3$s</a>
[3142] Fix | Delete
</div>
[3143] Fix | Delete
</div>
[3144] Fix | Delete
</div>',
[3145] Fix | Delete
esc_html__( 'Builder Cache Warning', 'et_builder' ),
[3146] Fix | Delete
esc_html__( 'The Divi Builder has been updated, however your browser is loading an old cached version of the builder. Loading old files can cause the builder to malfunction.', 'et_builder' ),
[3147] Fix | Delete
esc_html__( 'Reload The Builder', 'et_builder' ),
[3148] Fix | Delete
et_core_esc_previously( $cache_plugin_message ),
[3149] Fix | Delete
et_core_esc_previously( $browser_cache_message ),
[3150] Fix | Delete
esc_html__( 'If you have cleared your plugin cache and browser cache, but still get this warning, then your files may be cached at the DNS or Server level. Contact your host or CDN for assistance.', 'et_builder' )
[3151] Fix | Delete
);
[3152] Fix | Delete
[3153] Fix | Delete
return $output;
[3154] Fix | Delete
}
[3155] Fix | Delete
endif;
[3156] Fix | Delete
[3157] Fix | Delete
if ( ! function_exists( 'et_builder_get_failure_notification_modal' ) ) :
[3158] Fix | Delete
function et_builder_get_failure_notification_modal() {
[3159] Fix | Delete
$warnings = et_builder_get_warnings();
[3160] Fix | Delete
[3161] Fix | Delete
if ( false === $warnings ) {
[3162] Fix | Delete
return '';
[3163] Fix | Delete
}
[3164] Fix | Delete
[3165] Fix | Delete
$messages = '';
[3166] Fix | Delete
$i = 1;
[3167] Fix | Delete
[3168] Fix | Delete
foreach( $warnings as $warning ) {
[3169] Fix | Delete
$messages .= sprintf(
[3170] Fix | Delete
'<p><strong>%1$s. </strong>%2$s</p>',
[3171] Fix | Delete
esc_html( $i ),
[3172] Fix | Delete
et_core_esc_previously( $warning )
[3173] Fix | Delete
);
[3174] Fix | Delete
[3175] Fix | Delete
$i++;
[3176] Fix | Delete
}
[3177] Fix | Delete
[3178] Fix | Delete
$output = sprintf(
[3179] Fix | Delete
'<div class="et-core-modal-overlay et-builder-timeout et-core-active">
[3180] Fix | Delete
<div class="et-core-modal">
[3181] Fix | Delete
<div class="et-core-modal-header">
[3182] Fix | Delete
<h3 class="et-core-modal-title">%1$s</h3>
[3183] Fix | Delete
<a href="#" class="et-core-modal-close" data-et-core-modal="close"></a>
[3184] Fix | Delete
</div>
[3185] Fix | Delete
[3186] Fix | Delete
<div class="et-core-modal-content">
[3187] Fix | Delete
<p><strong>%4$s</strong></p>
[3188] Fix | Delete
[3189] Fix | Delete
%2$s
[3190] Fix | Delete
</div>
[3191] Fix | Delete
[3192] Fix | Delete
<div class="et_pb_prompt_buttons">
[3193] Fix | Delete
<br>
[3194] Fix | Delete
<span class="spinner"></span>
[3195] Fix | Delete
<a href="#" class="et-core-modal-action">%3$s</a>
[3196] Fix | Delete
</div>
[3197] Fix | Delete
</div>
[3198] Fix | Delete
</div>',
[3199] Fix | Delete
esc_html__( 'Divi Builder Timeout', 'et_builder' ),
[3200] Fix | Delete
et_core_esc_previously( $messages ),
[3201] Fix | Delete
esc_html__( 'Reload The Builder', 'et_builder' ),
[3202] Fix | Delete
esc_html__( 'Oops, it looks like the Divi Builder failed to load. Performing the following actions may help solve the problem.', 'et_builder' )
[3203] Fix | Delete
);
[3204] Fix | Delete
[3205] Fix | Delete
return $output;
[3206] Fix | Delete
}
[3207] Fix | Delete
endif;
[3208] Fix | Delete
[3209] Fix | Delete
if ( ! function_exists( 'et_builder_get_no_builder_notification_modal' ) ) :
[3210] Fix | Delete
function et_builder_get_no_builder_notification_modal() {
[3211] Fix | Delete
$output = sprintf(
[3212] Fix | Delete
'<div class="et-core-modal-overlay et-builder-timeout et-core-active">
[3213] Fix | Delete
<div class="et-core-modal">
[3214] Fix | Delete
<div class="et-core-modal-header">
[3215] Fix | Delete
<h3 class="et-core-modal-title">%1$s</h3>
[3216] Fix | Delete
<a href="#" class="et-core-modal-close" data-et-core-modal="close"></a>
[3217] Fix | Delete
</div>
[3218] Fix | Delete
[3219] Fix | Delete
<div class="et-core-modal-content">
[3220] Fix | Delete
<p><strong>%2$s</strong></p>
[3221] Fix | Delete
</div>
[3222] Fix | Delete
</div>
[3223] Fix | Delete
</div>',
[3224] Fix | Delete
esc_html__( 'Incompatible Post Type', 'et_builder' ),
[3225] Fix | Delete
esc_html__( 'This post does not show the standard WordPress content area. Unfortunately, that means the Divi Builder cannot be used on this post.', 'et_builder' )
[3226] Fix | Delete
);
[3227] Fix | Delete
[3228] Fix | Delete
return $output;
[3229] Fix | Delete
}
[3230] Fix | Delete
endif;
[3231] Fix | Delete
[3232] Fix | Delete
if ( ! function_exists( 'et_builder_get_no_browser_notification_modal' ) ) :
[3233] Fix | Delete
function et_builder_get_no_browser_notification_modal() {
[3234] Fix | Delete
$output = sprintf(
[3235] Fix | Delete
'<div class="et-core-modal-overlay et-builder-timeout et-core-active">
[3236] Fix | Delete
<div class="et-core-modal">
[3237] Fix | Delete
<div class="et-core-modal-header">
[3238] Fix | Delete
<h3 class="et-core-modal-title">%1$s</h3>
[3239] Fix | Delete
<a href="#" class="et-core-modal-close" data-et-core-modal="close"></a>
[3240] Fix | Delete
</div>
[3241] Fix | Delete
[3242] Fix | Delete
<div class="et-core-modal-content">
[3243] Fix | Delete
<p><strong>%2$s</strong></p>
[3244] Fix | Delete
</div>
[3245] Fix | Delete
</div>
[3246] Fix | Delete
</div>',
[3247] Fix | Delete
esc_html__( 'Your Browser Is Not Supported', 'et_builder' ),
[3248] Fix | Delete
esc_html__( 'The Divi Builder does not support the browser you are using. Your browser is no longer being developed, so it is time to switch to something new! The Divi Builder works best in the most recent versions of Chrome, Firefox, Safari, Opera and Edge.', 'et_builder' )
[3249] Fix | Delete
);
[3250] Fix | Delete
[3251] Fix | Delete
return $output;
[3252] Fix | Delete
}
[3253] Fix | Delete
endif;
[3254] Fix | Delete
[3255] Fix | Delete
if ( ! function_exists( 'et_builder_get_exit_notification_modal' ) ) :
[3256] Fix | Delete
function et_builder_get_exit_notification_modal() {
[3257] Fix | Delete
$output = sprintf(
[3258] Fix | Delete
'<div class="et-core-modal-overlay et-core-modal-two-buttons et-builder-exit-modal et-core-active">
[3259] Fix | Delete
<div class="et-core-modal">
[3260] Fix | Delete
<div class="et-core-modal-header">
[3261] Fix | Delete
<h3 class="et-core-modal-title">%1$s</h3>
[3262] Fix | Delete
<a href="#" class="et-core-modal-close" data-et-core-modal="close"></a>
[3263] Fix | Delete
</div>
[3264] Fix | Delete
[3265] Fix | Delete
<div class="et-core-modal-content">
[3266] Fix | Delete
<p>%2$s</p>
[3267] Fix | Delete
</div>
[3268] Fix | Delete
[3269] Fix | Delete
<div class="et_pb_prompt_buttons">
[3270] Fix | Delete
<br>
[3271] Fix | Delete
<span class="spinner"></span>
[3272] Fix | Delete
<a href="#" class="et-core-modal-action et-core-modal-action-secondary">%3$s</a>
[3273] Fix | Delete
<a href="#" class="et-core-modal-action">%4$s</a>
[3274] Fix | Delete
</div>
[3275] Fix | Delete
</div>
[3276] Fix | Delete
</div>',
[3277] Fix | Delete
esc_html__( 'You Have Unsaved Changes', 'et_builder' ),
[3278] Fix | Delete
et_get_safe_localization( __( 'Your page contains changes that have not been saved. If you close the builder without saving, these changes will be lost. If you would like to leave the builder and save all changes, please select <strong>Save & Exit</strong>. If you would like to discard all recent changes, choose <strong>Discard & Exit</strong>.', 'et_builder' ) ),
[3279] Fix | Delete
esc_html__( 'Discard & Exit', 'et_builder' ),
[3280] Fix | Delete
esc_html__( 'Save & Exit', 'et_builder' )
[3281] Fix | Delete
);
[3282] Fix | Delete
[3283] Fix | Delete
return $output;
[3284] Fix | Delete
}
[3285] Fix | Delete
endif;
[3286] Fix | Delete
[3287] Fix | Delete
if ( ! function_exists( 'et_builder_get_browser_autosave_notification_modal' ) ) :
[3288] Fix | Delete
function et_builder_get_browser_autosave_notification_modal() {
[3289] Fix | Delete
$output = sprintf(
[3290] Fix | Delete
'<div class="et-core-modal-overlay et-core-modal-two-buttons et-builder-autosave-modal et-core-active">
[3291] Fix | Delete
<div class="et-core-modal">
[3292] Fix | Delete
<div class="et-core-modal-header">
[3293] Fix | Delete
<h3 class="et-core-modal-title">%1$s</h3>
[3294] Fix | Delete
<a href="#" class="et-core-modal-close" data-et-core-modal="close"></a>
[3295] Fix | Delete
</div>
[3296] Fix | Delete
<div class="et-core-modal-content">
[3297] Fix | Delete
<p>%2$s</p>
[3298] Fix | Delete
</div>
[3299] Fix | Delete
<div class="et_pb_prompt_buttons">
[3300] Fix | Delete
<br>
[3301] Fix | Delete
<span class="spinner"></span>
[3302] Fix | Delete
<a href="#" class="et-core-modal-action et-core-modal-action-dont-restore et-core-modal-action-secondary">%3$s</a>
[3303] Fix | Delete
<a href="#" class="et-core-modal-action et-core-modal-action-restore">%4$s</a>
[3304] Fix | Delete
</div>
[3305] Fix | Delete
</div>
[3306] Fix | Delete
</div>',
[3307] Fix | Delete
esc_html__( 'A Browser Backup Exists', 'et_builder' ),
[3308] Fix | Delete
et_get_safe_localization( __( 'A browser backup exists for this post that is newer than the version you are currently viewing. This backup was captured during your previous editing session, but you never saved it. Would you like to restore this backup and continue editing where you left off?', 'et_builder' ) ),
[3309] Fix | Delete
esc_html__( "Don't Restore", 'et_builder' ), // left button
[3310] Fix | Delete
esc_html__( 'Restore', 'et_builder' ) // right button
[3311] Fix | Delete
);
[3312] Fix | Delete
return $output;
[3313] Fix | Delete
}
[3314] Fix | Delete
endif;
[3315] Fix | Delete
[3316] Fix | Delete
if ( ! function_exists( 'et_builder_get_server_autosave_notification_modal' ) ) :
[3317] Fix | Delete
function et_builder_get_server_autosave_notification_modal() {
[3318] Fix | Delete
$output = sprintf(
[3319] Fix | Delete
'<div class="et-core-modal-overlay et-core-modal-two-buttons et-builder-autosave-modal et-core-active">
[3320] Fix | Delete
<div class="et-core-modal">
[3321] Fix | Delete
<div class="et-core-modal-header">
[3322] Fix | Delete
<h3 class="et-core-modal-title">%1$s</h3>
[3323] Fix | Delete
<a href="#" class="et-core-modal-close" data-et-core-modal="close"></a>
[3324] Fix | Delete
</div>
[3325] Fix | Delete
<div class="et-core-modal-content">
[3326] Fix | Delete
<p>%2$s</p>
[3327] Fix | Delete
</div>
[3328] Fix | Delete
<div class="et_pb_prompt_buttons">
[3329] Fix | Delete
<br>
[3330] Fix | Delete
<span class="spinner"></span>
[3331] Fix | Delete
<a href="#" class="et-core-modal-action et-core-modal-action-dont-restore et-core-modal-action-secondary">%3$s</a>
[3332] Fix | Delete
<a href="#" class="et-core-modal-action et-core-modal-action-restore">%4$s</a>
[3333] Fix | Delete
</div>
[3334] Fix | Delete
</div>
[3335] Fix | Delete
</div>',
[3336] Fix | Delete
esc_html__( 'An Autosave Exists', 'et_builder' ),
[3337] Fix | Delete
et_get_safe_localization( __( 'A recent autosave exists for this post that is newer than the version you are currently viewing. This autosave was captured during your previous editing session, but you never saved it. Would you like to restore this autosave and continue editing where you left off?', 'et_builder' ) ),
[3338] Fix | Delete
esc_html__( "Don't Restore", 'et_builder' ), // left button
[3339] Fix | Delete
esc_html__( 'Restore', 'et_builder' ) // right button
[3340] Fix | Delete
);
[3341] Fix | Delete
return $output;
[3342] Fix | Delete
}
[3343] Fix | Delete
endif;
[3344] Fix | Delete
[3345] Fix | Delete
if ( ! function_exists( 'et_builder_get_unsaved_notification_texts' ) ) :
[3346] Fix | Delete
function et_builder_get_unsaved_notification_texts() {
[3347] Fix | Delete
$text = sprintf(
[3348] Fix | Delete
'<p>%1$s</p><p>%2$s</p><p>%3$s</p>',
[3349] Fix | Delete
et_get_safe_localization( __( 'An error has occurred while saving your page. Various problems can cause a save to fail, such as a lack of server resources, firewall blockages, plugin conflicts or server misconfiguration. You can try saving again by clicking Try Again, or you can download a backup of your unsaved page by clicking Download Backup. Backups can be restored using the portability system while next editing your page.', 'et_builder' ) ),
[3350] Fix | Delete
et_get_safe_localization( __( 'Contacting your host and asking them to increase the following PHP variables may help: memory_limit, max_execution_time, upload_max_filesize, post_max_size, max_input_time, max_input_vars. In addition, auditing your firewall error log (such as ModSecurity) may reveal false positives that are preventing saves from completing.', 'et_builder' ) ),
[3351] Fix | Delete
et_get_safe_localization( __( 'Lastly, it is recommended that you temporarily disable all WordPress plugins and browser extensions and try to save again to determine if something is causing a conflict.', 'et_builder' ) )
[3352] Fix | Delete
);
[3353] Fix | Delete
[3354] Fix | Delete
return array(
[3355] Fix | Delete
'header' => esc_html__( 'Your Save Has Failed', 'et_builder' ),
[3356] Fix | Delete
'text' => $text,
[3357] Fix | Delete
'buttons' => array(
[3358] Fix | Delete
'secondary' => sprintf( '<a href="#" class="et-core-modal-action et-core-modal-action-secondary">%1$s</a>', esc_html__( 'Try Again', 'et_builder' ) ),
[3359] Fix | Delete
'primary' => sprintf( '<a href="#" class="et-core-modal-action et-core-modal-action-primary">%1$s</a>', esc_html__( 'Download Backup', 'et_builder' ) ),
[3360] Fix | Delete
),
[3361] Fix | Delete
'classes' => 'et-builder-unsaved-modal',
[3362] Fix | Delete
);
[3363] Fix | Delete
}
[3364] Fix | Delete
endif;
[3365] Fix | Delete
[3366] Fix | Delete
if ( ! function_exists( 'et_builder_get_global_presets_save_failure_texts' ) ) :
[3367] Fix | Delete
function et_builder_get_global_presets_save_failure_texts() {
[3368] Fix | Delete
$text = sprintf(
[3369] Fix | Delete
'<p>%1$s</p>
[3370] Fix | Delete
<a class="et-builder-global-presets-save-failure-download" style="display: none"></a>',
[3371] Fix | Delete
et_get_safe_localization( __( 'An error has occurred while saving the Global Presets settings. Various problems can cause a save to fail, such as a lack of server resources, firewall blockages or plugin conflicts or server misconfiguration. You can try saving again by clicking Try Again, or you can download a backup of your unsaved defaults by clicking Download Backup. A backup can be helpful when contacting our Support Team.', 'et_builder' ) )
[3372] Fix | Delete
);
[3373] Fix | Delete
[3374] Fix | Delete
return array(
[3375] Fix | Delete
'header' => esc_html__( 'Save of Global Presets Has Failed', 'et_builder' ),
[3376] Fix | Delete
'text' => $text,
[3377] Fix | Delete
'buttons' => array(
[3378] Fix | Delete
'secondary' => sprintf('<a href="#" class="et-core-modal-action et-core-modal-action-secondary">%1$s</a>', esc_html__( 'Try Again', 'et_builder' ) ),
[3379] Fix | Delete
'primary' => sprintf('<a href="#" class="et-core-modal-action et-core-modal-action-primary">%1$s</a>', esc_html__( 'Download Backup', 'et_builder' ) ),
[3380] Fix | Delete
),
[3381] Fix | Delete
'classes' => 'et-builder-global-presets-save-failure-modal',
[3382] Fix | Delete
);
[3383] Fix | Delete
}
[3384] Fix | Delete
endif;
[3385] Fix | Delete
[3386] Fix | Delete
if ( ! function_exists( 'et_builder_get_global_presets_save_forbidden_texts' ) ) :
[3387] Fix | Delete
function et_builder_get_global_presets_save_forbidden_texts() {
[3388] Fix | Delete
$text = sprintf(
[3389] Fix | Delete
'<p>%1$s</p>',
[3390] Fix | Delete
et_get_safe_localization( __( 'You do not have sufficient permissions to edit Divi Presets.', 'et_builder' ) )
[3391] Fix | Delete
);
[3392] Fix | Delete
[3393] Fix | Delete
return array(
[3394] Fix | Delete
'header' => esc_html__( 'Save of Global Presets Has Failed', 'et_builder' ),
[3395] Fix | Delete
'text' => $text,
[3396] Fix | Delete
'buttons' => array(
[3397] Fix | Delete
'primary' => sprintf('<a href="#" class="et-core-modal-action et-core-modal-action-primary">%1$s</a>', esc_html__( 'Ok', 'et_builder' ) ),
[3398] Fix | Delete
),
[3399] Fix | Delete
'classes' => 'et-builder-global-presets-save-forbidden-modal',
[3400] Fix | Delete
);
[3401] Fix | Delete
}
[3402] Fix | Delete
endif;
[3403] Fix | Delete
[3404] Fix | Delete
if ( ! function_exists( 'et_builder_get_global_presets_load_failure_texts' ) ) :
[3405] Fix | Delete
function et_builder_get_global_presets_load_failure_texts() {
[3406] Fix | Delete
$text = sprintf(
[3407] Fix | Delete
'<p>%1$s</p>',
[3408] Fix | Delete
et_get_safe_localization( __( 'An error has occurred while loading the Global History States. Various problems can cause a save to fail, such as a lack of server resources, firewall blockages or plugin conflicts or server misconfiguration. You can try loading again by clicking Try Again.', 'et_builder' ) )
[3409] Fix | Delete
);
[3410] Fix | Delete
[3411] Fix | Delete
return array(
[3412] Fix | Delete
'header' => esc_html__( 'Load of Global Presets Has Failed', 'et_builder' ),
[3413] Fix | Delete
'text' => $text,
[3414] Fix | Delete
'buttons' => array(
[3415] Fix | Delete
'primary' => sprintf( '<a href="#" class="et-core-modal-action et-core-modal-action-primary">%1$s</a>', esc_html__( 'Try Again', 'et_builder' ) )
[3416] Fix | Delete
),
[3417] Fix | Delete
'classes' => 'et-builder-global-presets-load-failure-modal',
[3418] Fix | Delete
);
[3419] Fix | Delete
}
[3420] Fix | Delete
endif;
[3421] Fix | Delete
[3422] Fix | Delete
if ( ! function_exists( 'et_builder_page_creation_modal' ) ) :
[3423] Fix | Delete
function et_builder_page_creation_modal() {
[3424] Fix | Delete
return '<div class="et-pb-page-creation-card <%= option.className %>" data-action="<%= id %>">
[3425] Fix | Delete
<div class="et-pb-page-creation-content">
[3426] Fix | Delete
<img src="<%= option.images_uri %>/<%= option.imgSrc %>" data-src="<%= option.images_uri %>/<%= option.imgSrc %>" data-hover="<%= option.images_uri %>/<%= option.imgHover %>" alt="<%= option.titleText %>" />
[3427] Fix | Delete
<div class="et-pb-page-creation-text">
[3428] Fix | Delete
<h3><%= option.titleText %></h3>
[3429] Fix | Delete
<p><%= option.descriptionText %></p>
[3430] Fix | Delete
</div>
[3431] Fix | Delete
</div>
[3432] Fix | Delete
<a href="#" class="et-pb-page-creation-link"><%= option.buttonText %></a>
[3433] Fix | Delete
</div>';
[3434] Fix | Delete
}
[3435] Fix | Delete
endif;
[3436] Fix | Delete
[3437] Fix | Delete
[3438] Fix | Delete
if ( ! function_exists( 'et_builder_get_disabled_link_modal' ) ) :
[3439] Fix | Delete
function et_builder_disabled_link_modal() {
[3440] Fix | Delete
$output = sprintf(
[3441] Fix | Delete
'<div class="et_pb_modal_overlay link-disabled">
[3442] Fix | Delete
<div class="et_pb_prompt_modal">
[3443] Fix | Delete
<h3>%1$s</h3>
[3444] Fix | Delete
<p>%2$s</p>
[3445] Fix | Delete
<div class="et_pb_prompt_buttons">
[3446] Fix | Delete
<a href="#" class="et_pb_prompt_proceed">%3$s</a>
[3447] Fix | Delete
</div>
[3448] Fix | Delete
</div><!-- .et_pb_prompt_modal -->
[3449] Fix | Delete
</div><!-- .et_pb_modal_overlay -->',
[3450] Fix | Delete
esc_html__( 'Link Disabled', 'et_builder' ),
[3451] Fix | Delete
esc_html__( 'During preview, link to different page is disabled', 'et_builder' ),
[3452] Fix | Delete
esc_html__( 'Close', 'et_builder' )
[3453] Fix | Delete
);
[3454] Fix | Delete
[3455] Fix | Delete
return $output;
[3456] Fix | Delete
}
[3457] Fix | Delete
endif;
[3458] Fix | Delete
[3459] Fix | Delete
if ( ! function_exists( 'et_builder_get_warnings' ) ) :
[3460] Fix | Delete
function et_builder_get_warnings() {
[3461] Fix | Delete
if ( ! current_user_can( 'manage_options' ) ) {
[3462] Fix | Delete
return false;
[3463] Fix | Delete
}
[3464] Fix | Delete
[3465] Fix | Delete
$warnings = array();
[3466] Fix | Delete
[3467] Fix | Delete
[3468] Fix | Delete
// WP_DEBUG check
[3469] Fix | Delete
if ( defined( 'WP_DEBUG' ) && true === WP_DEBUG ) {
[3470] Fix | Delete
$warnings[] = sprintf(
[3471] Fix | Delete
'%1$s. <a href="https://codex.wordpress.org/Debugging_in_WordPress" class="et_builder_modal_action_button" target="_blank">%2$s</a>',
[3472] Fix | Delete
esc_html__( 'You have WP_DEBUG enabled. Please disable this setting in wp-config.php', 'et_builder' ),
[3473] Fix | Delete
esc_html__( 'Disable Debug Mode', 'et_builder' )
[3474] Fix | Delete
);
[3475] Fix | Delete
}
[3476] Fix | Delete
[3477] Fix | Delete
[3478] Fix | Delete
// Plugins check
[3479] Fix | Delete
$third_party_plugins_active = false;
[3480] Fix | Delete
[3481] Fix | Delete
$excluded_plugins = array(
[3482] Fix | Delete
'wordpress-importer/wordpress-importer.php',
[3483] Fix | Delete
'divi-builder/divi-builder.php',
[3484] Fix | Delete
'elegant-themes-updater/elegant-themes-updater.php',
[3485] Fix | Delete
'et-security-patcher/et-security-patcher.php',
[3486] Fix | Delete
);
[3487] Fix | Delete
[3488] Fix | Delete
$active_plugins = get_option( 'active_plugins' );
[3489] Fix | Delete
[3490] Fix | Delete
if ( is_array( $active_plugins ) && ! empty( $active_plugins ) ) {
[3491] Fix | Delete
foreach ( $active_plugins as $plugin ) {
[3492] Fix | Delete
if ( in_array( $plugin, $excluded_plugins ) ) {
[3493] Fix | Delete
continue;
[3494] Fix | Delete
}
[3495] Fix | Delete
[3496] Fix | Delete
$third_party_plugins_active = true;
[3497] Fix | Delete
[3498] Fix | Delete
break;
[3499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function