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/core/componen...
File: SupportCenter.php
),
[1000] Fix | Delete
array(
[1001] Fix | Delete
'title' => esc_attr__( 'An Overview Of All Divi Modules', 'et-core' ),
[1002] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/divi/modules/',
[1003] Fix | Delete
),
[1004] Fix | Delete
array(
[1005] Fix | Delete
'title' => esc_attr__( 'Getting Started With Layout Packs', 'et-core' ),
[1006] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/divi/premade-layouts/',
[1007] Fix | Delete
),
[1008] Fix | Delete
array(
[1009] Fix | Delete
'title' => esc_attr__( 'Customizing Your Header And Navigation', 'et-core' ),
[1010] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/extra/theme-customizer/',
[1011] Fix | Delete
),
[1012] Fix | Delete
);
[1013] Fix | Delete
break;
[1014] Fix | Delete
case 'divi_theme':
[1015] Fix | Delete
$articles = array(
[1016] Fix | Delete
array(
[1017] Fix | Delete
'title' => esc_attr__( 'Getting Started With The Divi Builder', 'et-core' ),
[1018] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/divi/visual-builder/',
[1019] Fix | Delete
),
[1020] Fix | Delete
array(
[1021] Fix | Delete
'title' => esc_attr__( 'How To Update The Divi Theme', 'et-core' ),
[1022] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/divi/update-divi/',
[1023] Fix | Delete
),
[1024] Fix | Delete
array(
[1025] Fix | Delete
'title' => esc_attr__( 'An Overview Of All Divi Modules', 'et-core' ),
[1026] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/divi/modules/',
[1027] Fix | Delete
),
[1028] Fix | Delete
array(
[1029] Fix | Delete
'title' => esc_attr__( 'Using The Divi Library', 'et-core' ),
[1030] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/divi/divi-library/',
[1031] Fix | Delete
),
[1032] Fix | Delete
array(
[1033] Fix | Delete
'title' => esc_attr__( 'Setting Up The Divi Theme Options', 'et-core' ),
[1034] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/divi/theme-options/',
[1035] Fix | Delete
),
[1036] Fix | Delete
array(
[1037] Fix | Delete
'title' => esc_attr__( 'Getting Started With Layout Packs', 'et-core' ),
[1038] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/divi/premade-layouts/',
[1039] Fix | Delete
),
[1040] Fix | Delete
array(
[1041] Fix | Delete
'title' => esc_attr__( 'Customizing Your Header And Navigation', 'et-core' ),
[1042] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/divi/customizer-header/',
[1043] Fix | Delete
),
[1044] Fix | Delete
array(
[1045] Fix | Delete
'title' => esc_attr__( 'Divi For Developers', 'et-core' ),
[1046] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/developers/',
[1047] Fix | Delete
),
[1048] Fix | Delete
);
[1049] Fix | Delete
break;
[1050] Fix | Delete
case 'divi_builder_plugin':
[1051] Fix | Delete
$articles = array(
[1052] Fix | Delete
array(
[1053] Fix | Delete
'title' => esc_attr__( 'Getting Started With The Divi Builder', 'et-core' ),
[1054] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/divi/visual-builder/',
[1055] Fix | Delete
),
[1056] Fix | Delete
array(
[1057] Fix | Delete
'title' => esc_attr__( 'How To Update The Divi Builder', 'et-core' ),
[1058] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/divi-builder/update-divi-builder/',
[1059] Fix | Delete
),
[1060] Fix | Delete
array(
[1061] Fix | Delete
'title' => esc_attr__( 'An Overview Of All Divi Modules', 'et-core' ),
[1062] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/divi/modules/',
[1063] Fix | Delete
),
[1064] Fix | Delete
array(
[1065] Fix | Delete
'title' => esc_attr__( 'Using The Divi Library', 'et-core' ),
[1066] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/divi/divi-library/',
[1067] Fix | Delete
),
[1068] Fix | Delete
array(
[1069] Fix | Delete
'title' => esc_attr__( 'Selling Products With Divi And WooCommerce', 'et-core' ),
[1070] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/divi/ecommerce-divi/',
[1071] Fix | Delete
),
[1072] Fix | Delete
array(
[1073] Fix | Delete
'title' => esc_attr__( 'Getting Started With Layout Packs', 'et-core' ),
[1074] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/divi/premade-layouts/',
[1075] Fix | Delete
),
[1076] Fix | Delete
array(
[1077] Fix | Delete
'title' => esc_attr__( 'Importing And Exporting Divi Layouts', 'et-core' ),
[1078] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/divi/library-import/',
[1079] Fix | Delete
),
[1080] Fix | Delete
array(
[1081] Fix | Delete
'title' => esc_attr__( 'Divi For Developers', 'et-core' ),
[1082] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/developers/',
[1083] Fix | Delete
),
[1084] Fix | Delete
);
[1085] Fix | Delete
break;
[1086] Fix | Delete
case 'bloom_plugin':
[1087] Fix | Delete
$articles = array(
[1088] Fix | Delete
array(
[1089] Fix | Delete
'title' => esc_attr__( 'A Basic Overview Of The Bloom Plugin', 'et-core' ),
[1090] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/bloom/overview/',
[1091] Fix | Delete
),
[1092] Fix | Delete
array(
[1093] Fix | Delete
'title' => esc_attr__( 'How To Update Your Bloom Plugin', 'et-core' ),
[1094] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/bloom/update/',
[1095] Fix | Delete
),
[1096] Fix | Delete
array(
[1097] Fix | Delete
'title' => esc_attr__( 'Adding Email Accounts In Bloom', 'et-core' ),
[1098] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/bloom/accounts/',
[1099] Fix | Delete
),
[1100] Fix | Delete
array(
[1101] Fix | Delete
'title' => esc_attr__( 'Customizing Your Opt-in Designs', 'et-core' ),
[1102] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/bloom/design/',
[1103] Fix | Delete
),
[1104] Fix | Delete
array(
[1105] Fix | Delete
'title' => esc_attr__( 'The Different Bloom Opt-in Types', 'et-core' ),
[1106] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/bloom/optin-types/',
[1107] Fix | Delete
),
[1108] Fix | Delete
array(
[1109] Fix | Delete
'title' => esc_attr__( 'Using The Bloom Display Settings', 'et-core' ),
[1110] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/bloom/display/',
[1111] Fix | Delete
),
[1112] Fix | Delete
array(
[1113] Fix | Delete
'title' => esc_attr__( 'How To Use Triggers In Bloom', 'et-core' ),
[1114] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/bloom/triggers/',
[1115] Fix | Delete
),
[1116] Fix | Delete
array(
[1117] Fix | Delete
'title' => esc_attr__( 'Adding Custom Fields To Bloom Opt-in Forms', 'et-core' ),
[1118] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/bloom/optin/adding-custom-fields-to-bloom-optin-forms/',
[1119] Fix | Delete
),
[1120] Fix | Delete
);
[1121] Fix | Delete
break;
[1122] Fix | Delete
case 'monarch_plugin':
[1123] Fix | Delete
$articles = array(
[1124] Fix | Delete
array(
[1125] Fix | Delete
'title' => esc_attr__( 'A Complete Overview Of The Monarch Plugin', 'et-core' ),
[1126] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/monarch/overview-monarch/',
[1127] Fix | Delete
),
[1128] Fix | Delete
array(
[1129] Fix | Delete
'title' => esc_attr__( 'How To Update Your Monarch WordPress Plugin', 'et-core' ),
[1130] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/monarch/update-monarch/',
[1131] Fix | Delete
),
[1132] Fix | Delete
array(
[1133] Fix | Delete
'title' => esc_attr__( 'Adding and Managing Social Networks', 'et-core' ),
[1134] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/monarch/networks/',
[1135] Fix | Delete
),
[1136] Fix | Delete
array(
[1137] Fix | Delete
'title' => esc_attr__( 'Configuring Social Network APIs', 'et-core' ),
[1138] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/monarch/api/',
[1139] Fix | Delete
),
[1140] Fix | Delete
array(
[1141] Fix | Delete
'title' => esc_attr__( 'Customizing The Monarch Design', 'et-core' ),
[1142] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/monarch/design-monarch/',
[1143] Fix | Delete
),
[1144] Fix | Delete
array(
[1145] Fix | Delete
'title' => esc_attr__( 'Viewing Your Social Stats', 'et-core' ),
[1146] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/monarch/stats/',
[1147] Fix | Delete
),
[1148] Fix | Delete
array(
[1149] Fix | Delete
'title' => esc_attr__( 'Using The Floating Sidebar', 'et-core' ),
[1150] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/monarch/sidebar/',
[1151] Fix | Delete
),
[1152] Fix | Delete
array(
[1153] Fix | Delete
'title' => esc_attr__( 'Using Popup & Flyin Triggers', 'et-core' ),
[1154] Fix | Delete
'url' => 'https://www.elegantthemes.com/documentation/monarch/triggers-monarch/',
[1155] Fix | Delete
),
[1156] Fix | Delete
);
[1157] Fix | Delete
break;
[1158] Fix | Delete
default:
[1159] Fix | Delete
$articles = array();
[1160] Fix | Delete
}
[1161] Fix | Delete
[1162] Fix | Delete
// If we just want the array (not a formatted HTML block), return that now
[1163] Fix | Delete
if ( false === $formatted ) {
[1164] Fix | Delete
return $articles;
[1165] Fix | Delete
}
[1166] Fix | Delete
[1167] Fix | Delete
foreach ( $articles as $key => $article ) {
[1168] Fix | Delete
$articles_list_html .= sprintf(
[1169] Fix | Delete
'<li class="et-support-center-article"><a href="%1$s" target="_blank">%2$s</a></li>',
[1170] Fix | Delete
esc_url( $article['url'] ),
[1171] Fix | Delete
et_core_intentionally_unescaped( $article['title'], 'fixed_string' )
[1172] Fix | Delete
);
[1173] Fix | Delete
}
[1174] Fix | Delete
[1175] Fix | Delete
$html = sprintf(
[1176] Fix | Delete
'<div class="et_docs_articles"><ul class="et_documentation_articles_list">%1$s</ul></div>',
[1177] Fix | Delete
$articles_list_html
[1178] Fix | Delete
);
[1179] Fix | Delete
[1180] Fix | Delete
return $html;
[1181] Fix | Delete
}
[1182] Fix | Delete
[1183] Fix | Delete
/**
[1184] Fix | Delete
* Look for Elegant Themes Support Account
[1185] Fix | Delete
*
[1186] Fix | Delete
* @since 3.20
[1187] Fix | Delete
*
[1188] Fix | Delete
* @return WP_User|false WP_User object on success, false on failure.
[1189] Fix | Delete
*/
[1190] Fix | Delete
public function get_et_support_user() {
[1191] Fix | Delete
return get_user_by( 'slug', $this->support_user_account_name );
[1192] Fix | Delete
}
[1193] Fix | Delete
[1194] Fix | Delete
/**
[1195] Fix | Delete
* Look for saved Elegant Themes Username & API Key
[1196] Fix | Delete
*
[1197] Fix | Delete
* @since 3.20
[1198] Fix | Delete
*
[1199] Fix | Delete
* @return array|false license credentials on success, false on failure.
[1200] Fix | Delete
*/
[1201] Fix | Delete
public function get_et_license() {
[1202] Fix | Delete
[1203] Fix | Delete
/** @var array License credentials [username|api_key] */
[1204] Fix | Delete
if ( ! $et_license = get_site_option( 'et_automatic_updates_options' ) ) {
[1205] Fix | Delete
$et_license = get_option( 'et_automatic_updates_options', array() );
[1206] Fix | Delete
}
[1207] Fix | Delete
[1208] Fix | Delete
if ( ! et_()->array_get( $et_license, 'username' ) ) {
[1209] Fix | Delete
return false;
[1210] Fix | Delete
}
[1211] Fix | Delete
[1212] Fix | Delete
if ( ! et_()->array_get( $et_license, 'api_key' ) ) {
[1213] Fix | Delete
return false;
[1214] Fix | Delete
}
[1215] Fix | Delete
[1216] Fix | Delete
return $et_license;
[1217] Fix | Delete
}
[1218] Fix | Delete
[1219] Fix | Delete
/**
[1220] Fix | Delete
* Try to load the WP debug log. If found, return the last [$lines_to_return] lines of the file and the filesize.
[1221] Fix | Delete
*
[1222] Fix | Delete
* @since 3.20
[1223] Fix | Delete
*
[1224] Fix | Delete
* @param int $lines_to_return Number of lines to read and return from the end of the wp_debug.log file.
[1225] Fix | Delete
*
[1226] Fix | Delete
* @return array
[1227] Fix | Delete
*/
[1228] Fix | Delete
protected function get_wp_debug_log( $lines_to_return = 10 ) {
[1229] Fix | Delete
$log = array(
[1230] Fix | Delete
'entries' => '',
[1231] Fix | Delete
'size' => 0,
[1232] Fix | Delete
);
[1233] Fix | Delete
[1234] Fix | Delete
// Early exit: internal PHP function `file_get_contents()` appears to be on lockdown
[1235] Fix | Delete
if ( ! function_exists( 'file_get_contents' ) ) {
[1236] Fix | Delete
$log['error'] = esc_attr__( 'Divi Support Center :: WordPress debug log cannot be read.', 'et-core' );
[1237] Fix | Delete
[1238] Fix | Delete
if ( defined( 'ET_DEBUG' ) ) {
[1239] Fix | Delete
et_error( $log['error'] );
[1240] Fix | Delete
}
[1241] Fix | Delete
[1242] Fix | Delete
return $log;
[1243] Fix | Delete
}
[1244] Fix | Delete
[1245] Fix | Delete
// Early exit: WP_DEBUG_LOG isn't defined in wp-config.php (or it's defined, but it's empty)
[1246] Fix | Delete
if ( ! defined( 'WP_DEBUG_LOG' ) || ! WP_DEBUG_LOG ) {
[1247] Fix | Delete
$log['error'] = esc_attr__( 'Divi Support Center :: WordPress debug.log is not configured.', 'et-core' );
[1248] Fix | Delete
[1249] Fix | Delete
if ( defined( 'ET_DEBUG' ) ) {
[1250] Fix | Delete
et_error( $log['error'] );
[1251] Fix | Delete
}
[1252] Fix | Delete
[1253] Fix | Delete
return $log;
[1254] Fix | Delete
}
[1255] Fix | Delete
[1256] Fix | Delete
/**
[1257] Fix | Delete
* WordPress 5.1 introduces the option to define a custom path for the WP_DEBUG_LOG file.
[1258] Fix | Delete
*
[1259] Fix | Delete
* @see wp_debug_mode()
[1260] Fix | Delete
*
[1261] Fix | Delete
* @since 3.20
[1262] Fix | Delete
*/
[1263] Fix | Delete
if ( in_array( strtolower( (string) WP_DEBUG_LOG ), array( 'true', '1' ), true ) ) {
[1264] Fix | Delete
$wp_debug_log_path = realpath( WP_CONTENT_DIR . '/debug.log' );
[1265] Fix | Delete
} else if ( is_string( WP_DEBUG_LOG ) ) {
[1266] Fix | Delete
$wp_debug_log_path = realpath( WP_DEBUG_LOG );
[1267] Fix | Delete
}
[1268] Fix | Delete
[1269] Fix | Delete
// Early exit: `debug.log` doesn't exist or otherwise can't be read
[1270] Fix | Delete
if ( ! isset( $wp_debug_log_path ) || ! file_exists( $wp_debug_log_path ) || ! is_readable( $wp_debug_log_path ) ) {
[1271] Fix | Delete
$log['error'] = esc_attr__( 'Divi Support Center :: WordPress debug log cannot be found.', 'et-core' );
[1272] Fix | Delete
[1273] Fix | Delete
if ( defined( 'ET_DEBUG' ) ) {
[1274] Fix | Delete
et_error( $log['error'] );
[1275] Fix | Delete
}
[1276] Fix | Delete
[1277] Fix | Delete
return $log;
[1278] Fix | Delete
}
[1279] Fix | Delete
[1280] Fix | Delete
/**
[1281] Fix | Delete
* At this point, we know:
[1282] Fix | Delete
* (1) `$wp_debug_log_path` is set,
[1283] Fix | Delete
* (2) it points to a valid location, and
[1284] Fix | Delete
* (3) what it points to is readable.
[1285] Fix | Delete
*
[1286] Fix | Delete
* Before we continue, we'll ensure `$wp_debug_log_path` does not point to a directory.
[1287] Fix | Delete
*/
[1288] Fix | Delete
[1289] Fix | Delete
// Early exit: debug log definition points to a directory, not a file.
[1290] Fix | Delete
if ( is_dir( $wp_debug_log_path ) ) {
[1291] Fix | Delete
$log['error'] = esc_attr__(
[1292] Fix | Delete
'Divi Support Center :: WordPress debug log setting points to a directory, but should point to a file.',
[1293] Fix | Delete
'et-core'
[1294] Fix | Delete
);
[1295] Fix | Delete
[1296] Fix | Delete
if ( defined( 'ET_DEBUG' ) ) {
[1297] Fix | Delete
et_error( $log['error'] );
[1298] Fix | Delete
}
[1299] Fix | Delete
[1300] Fix | Delete
return $log;
[1301] Fix | Delete
}
[1302] Fix | Delete
[1303] Fix | Delete
// Load the debug.log file
[1304] Fix | Delete
$file = new SplFileObject( $wp_debug_log_path );
[1305] Fix | Delete
[1306] Fix | Delete
// Get the filesize of debug.log
[1307] Fix | Delete
$log['size'] = $this->get_size_in_shorthand( 0 + $file->getSize() );
[1308] Fix | Delete
[1309] Fix | Delete
// If $lines_to_return is a positive integer, fetch the last [$lines_to_return] lines of the log file
[1310] Fix | Delete
$lines_to_return = (int) $lines_to_return;
[1311] Fix | Delete
if ( $lines_to_return > 0 ) {
[1312] Fix | Delete
$file->seek( PHP_INT_MAX );
[1313] Fix | Delete
$total_lines = $file->key();
[1314] Fix | Delete
// If the file is smaller than the number of lines requested, return the entire file.
[1315] Fix | Delete
$reader = new LimitIterator( $file, max( 0, $total_lines - $lines_to_return ) );
[1316] Fix | Delete
$log['entries'] = '';
[1317] Fix | Delete
foreach ( $reader as $line ) {
[1318] Fix | Delete
$log['entries'] .= $line;
[1319] Fix | Delete
}
[1320] Fix | Delete
}
[1321] Fix | Delete
// Unload the SplFileObject
[1322] Fix | Delete
$file = null;
[1323] Fix | Delete
[1324] Fix | Delete
return $log;
[1325] Fix | Delete
}
[1326] Fix | Delete
[1327] Fix | Delete
/**
[1328] Fix | Delete
* When a predefined system setting is passed to this function, it will return the observed value.
[1329] Fix | Delete
*
[1330] Fix | Delete
* @since 3.20
[1331] Fix | Delete
*
[1332] Fix | Delete
* @param bool $formatted Whether to return a formatted report or just the data array
[1333] Fix | Delete
* @param string $format Return the report as either a `div` or `plain` text (if $formatted = true)
[1334] Fix | Delete
*
[1335] Fix | Delete
* @return array|string
[1336] Fix | Delete
*/
[1337] Fix | Delete
protected function system_diagnostics_generate_report( $formatted = true, $format = 'plain' ) {
[1338] Fix | Delete
/** @var array Collection of system settings to run diagnostic checks on. */
[1339] Fix | Delete
$system_diagnostics_settings = array(
[1340] Fix | Delete
array(
[1341] Fix | Delete
'name' => esc_attr__( 'Writable wp-content Directory', 'et-core' ),
[1342] Fix | Delete
'environment' => 'server',
[1343] Fix | Delete
'type' => 'truthy_falsy',
[1344] Fix | Delete
'pass_minus_one' => null,
[1345] Fix | Delete
'pass_zero' => null,
[1346] Fix | Delete
'minimum' => null,
[1347] Fix | Delete
'recommended' => true,
[1348] Fix | Delete
'actual' => wp_is_writable( WP_CONTENT_DIR ),
[1349] Fix | Delete
'help_text' => et_core_intentionally_unescaped( __( 'We recommend that the wp-content directory on your server be writable by WordPress in order to ensure the full functionality of Divi Builder themes and plugins.', 'et-core' ), 'html' ),
[1350] Fix | Delete
'learn_more' => 'https://wordpress.org/support/article/changing-file-permissions/',
[1351] Fix | Delete
),
[1352] Fix | Delete
array(
[1353] Fix | Delete
'name' => esc_attr__( 'PHP Version', 'et-core' ),
[1354] Fix | Delete
'environment' => 'server',
[1355] Fix | Delete
'type' => 'version',
[1356] Fix | Delete
'pass_minus_one' => false,
[1357] Fix | Delete
'pass_zero' => false,
[1358] Fix | Delete
'minimum' => null,
[1359] Fix | Delete
'recommended' => '7.2 or higher',
[1360] Fix | Delete
'actual' => (float) phpversion(),
[1361] Fix | Delete
'help_text' => et_core_intentionally_unescaped( __( 'We recommend using the latest stable version of PHP. This will not only ensure compatibility with Divi, but it will also greatly speed up your website leading to less memory and CPU related issues.', 'et-core' ), 'html' ),
[1362] Fix | Delete
'learn_more' => 'http://php.net/releases/',
[1363] Fix | Delete
),
[1364] Fix | Delete
array(
[1365] Fix | Delete
'name' => esc_attr__( 'memory_limit', 'et-core' ),
[1366] Fix | Delete
'environment' => 'server',
[1367] Fix | Delete
'type' => 'size',
[1368] Fix | Delete
'pass_minus_one' => true,
[1369] Fix | Delete
'pass_zero' => false,
[1370] Fix | Delete
'minimum' => null,
[1371] Fix | Delete
'recommended' => '128M',
[1372] Fix | Delete
'actual' => ini_get( 'memory_limit' ),
[1373] Fix | Delete
'help_text' => et_get_safe_localization( sprintf( __( 'By default, memory limits set by your host or by WordPress may be too low. This will lead to applications crashing as PHP reaches the artificial limit. You can adjust your memory limit within your <a href="%1$s" target="_blank">php.ini file</a>, or by contacting your host for assistance. You may also need to define a memory limited in <a href="%2$s" target=_blank">wp-config.php</a>.', 'et-core' ), 'http://php.net/manual/en/ini.core.php#ini.memory-limit', 'https://codex.wordpress.org/Editing_wp-config.php' ) ),
[1374] Fix | Delete
'learn_more' => 'http://php.net/manual/en/ini.core.php#ini.memory-limit',
[1375] Fix | Delete
),
[1376] Fix | Delete
array(
[1377] Fix | Delete
'name' => esc_attr__( 'post_max_size', 'et-core' ),
[1378] Fix | Delete
'environment' => 'server',
[1379] Fix | Delete
'type' => 'size',
[1380] Fix | Delete
'pass_minus_one' => false,
[1381] Fix | Delete
'pass_zero' => true,
[1382] Fix | Delete
'minimum' => null,
[1383] Fix | Delete
'recommended' => '64M',
[1384] Fix | Delete
'actual' => ini_get( 'post_max_size' ),
[1385] Fix | Delete
'help_text' => et_get_safe_localization( sprintf( __( 'Post Max Size limits how large a page or file can be on your website. If your page is larger than the limit set in PHP, it will fail to load. Post sizes can become quite large when using the Divi Builder, so it is important to increase this limit. It also affects file size upload/download, which can prevent large layouts from being imported into the builder. You can adjust your max post size within your <a href="%1$s" target="_blank">php.ini file</a>, or by contacting your host for assistance.', 'et_core' ), 'http://php.net/manual/en/ini.core.php#ini.post-max-size' ) ),
[1386] Fix | Delete
'learn_more' => 'http://php.net/manual/en/ini.core.php#ini.post-max-size',
[1387] Fix | Delete
),
[1388] Fix | Delete
array(
[1389] Fix | Delete
'name' => esc_attr__( 'max_execution_time', 'et-core' ),
[1390] Fix | Delete
'environment' => 'server',
[1391] Fix | Delete
'type' => 'seconds',
[1392] Fix | Delete
'pass_minus_one' => false,
[1393] Fix | Delete
'pass_zero' => true,
[1394] Fix | Delete
'minimum' => null,
[1395] Fix | Delete
'recommended' => '120',
[1396] Fix | Delete
'actual' => ini_get( 'max_execution_time' ),
[1397] Fix | Delete
'help_text' => et_get_safe_localization( sprintf( __( 'Max Execution Time affects how long a page is allowed to load before it times out. If the limit is too low, you may not be able to import large layouts and files into the builder. You can adjust your max execution time within your <a href="%1$s">php.ini file</a>, or by contacting your host for assistance.', 'et-core' ), 'http://php.net/manual/en/info.configuration.php#ini.max-execution-time' ) ),
[1398] Fix | Delete
'learn_more' => 'http://php.net/manual/en/info.configuration.php#ini.max-execution-time',
[1399] Fix | Delete
),
[1400] Fix | Delete
array(
[1401] Fix | Delete
'name' => esc_attr__( 'upload_max_filesize', 'et-core' ),
[1402] Fix | Delete
'environment' => 'server',
[1403] Fix | Delete
'type' => 'size',
[1404] Fix | Delete
'pass_minus_one' => false,
[1405] Fix | Delete
'pass_zero' => true,
[1406] Fix | Delete
'minimum' => null,
[1407] Fix | Delete
'recommended' => '64M',
[1408] Fix | Delete
'actual' => ini_get( 'upload_max_filesize' ),
[1409] Fix | Delete
'help_text' => et_get_safe_localization( sprintf( __( 'Upload Max File Size determines that maximum file size that you are allowed to upload to your server. If the limit is too low, you may not be able to import large collections of layouts into the Divi Library. You can adjust your max file size within your <a href="%1$s" target="_blank">php.ini file</a>, or by contacting your host for assistance.', 'et-core' ), 'http://php.net/manual/en/ini.core.php#ini.upload-max-filesize' ) ),
[1410] Fix | Delete
'learn_more' => 'http://php.net/manual/en/ini.core.php#ini.upload-max-filesize',
[1411] Fix | Delete
),
[1412] Fix | Delete
array(
[1413] Fix | Delete
'name' => esc_attr__( 'max_input_time', 'et-core' ),
[1414] Fix | Delete
'environment' => 'server',
[1415] Fix | Delete
'type' => 'seconds',
[1416] Fix | Delete
'pass_minus_one' => true,
[1417] Fix | Delete
'pass_zero' => true,
[1418] Fix | Delete
'minimum' => null,
[1419] Fix | Delete
'recommended' => '60',
[1420] Fix | Delete
'actual' => ini_get( 'max_input_time' ),
[1421] Fix | Delete
'help_text' => et_get_safe_localization( sprintf( __( 'This sets the maximum time in seconds a script is allowed to parse input data. If the limit is too low, the Divi Builder may time out before it is allowed to load. You can adjust your max input time within your <a href="%1$s" target="_blank">php.ini file</a>, or by contacting your host for assistance.', 'et-core' ), 'http://php.net/manual/en/info.configuration.php#ini.max-input-time' ) ),
[1422] Fix | Delete
'learn_more' => 'http://php.net/manual/en/info.configuration.php#ini.max-input-time',
[1423] Fix | Delete
),
[1424] Fix | Delete
array(
[1425] Fix | Delete
'name' => esc_attr__( 'max_input_vars', 'et-core' ),
[1426] Fix | Delete
'environment' => 'server',
[1427] Fix | Delete
'type' => 'size',
[1428] Fix | Delete
'pass_minus_one' => false,
[1429] Fix | Delete
'pass_zero' => false,
[1430] Fix | Delete
'minimum' => null,
[1431] Fix | Delete
'recommended' => '1000',
[1432] Fix | Delete
'actual' => ini_get( 'max_input_vars' ),
[1433] Fix | Delete
'help_text' => et_get_safe_localization( sprintf( __( 'This setting affects how many input variables may be accepted. If the limit is too low, it may prevent the Divi Builder from loading. You can adjust your max input variables within your <a href="%1$s" target="_blank">php.ini file</a>, or by contacting your host for assistance.', 'et-core' ), 'http://php.net/manual/en/info.configuration.php#ini.max-input-vars' ) ),
[1434] Fix | Delete
'learn_more' => 'http://php.net/manual/en/info.configuration.php#ini.max-input-vars',
[1435] Fix | Delete
),
[1436] Fix | Delete
array(
[1437] Fix | Delete
'name' => esc_attr__( 'display_errors', 'et-core' ),
[1438] Fix | Delete
'environment' => 'server',
[1439] Fix | Delete
'type' => 'truthy_falsy',
[1440] Fix | Delete
'pass_minus_one' => null,
[1441] Fix | Delete
'pass_zero' => null,
[1442] Fix | Delete
'pass_exact' => null,
[1443] Fix | Delete
'minimum' => null,
[1444] Fix | Delete
'recommended' => '0',
[1445] Fix | Delete
'actual' => ! ini_get( 'display_errors' ) ? '0' : ini_get( 'display_errors' ),
[1446] Fix | Delete
'help_text' => et_get_safe_localization( sprintf( __( 'This setting determines whether or not errors should be printed as part of the page output. This is a feature to support your site\'s development and should never be used on production sites. You can edit this setting within your <a href="%1$s" target="_blank">php.ini file</a>, or by contacting your host for assistance.', 'et-core' ), 'http://php.net/manual/en/errorfunc.configuration.php#ini.display-errors' ) ),
[1447] Fix | Delete
'learn_more' => 'http://php.net/manual/en/errorfunc.configuration.php#ini.display-errors',
[1448] Fix | Delete
),
[1449] Fix | Delete
);
[1450] Fix | Delete
[1451] Fix | Delete
/** @var string Formatted report. */
[1452] Fix | Delete
$report = '';
[1453] Fix | Delete
[1454] Fix | Delete
// pass/fail Should be one of pass|minimal|fail|unknown. Defaults to 'unknown'.
[1455] Fix | Delete
foreach ( $system_diagnostics_settings as $i => $scan ) {
[1456] Fix | Delete
/**
[1457] Fix | Delete
* 'pass_fail': four-step process to set its value:
[1458] Fix | Delete
* - begin with `unknown` state;
[1459] Fix | Delete
* - if recommended value exists, change to `fail`;
[1460] Fix | Delete
* - if minimum value exists, compare against it & change to `minimal` if it passes;
[1461] Fix | Delete
* - compare against recommended value & change to `pass` if it passes.
[1462] Fix | Delete
*/
[1463] Fix | Delete
$system_diagnostics_settings[ $i ]['pass_fail'] = 'unknown';
[1464] Fix | Delete
if ( ! is_null( $scan['recommended'] ) ) {
[1465] Fix | Delete
$system_diagnostics_settings[ $i ]['pass_fail'] = 'fail';
[1466] Fix | Delete
}
[1467] Fix | Delete
[1468] Fix | Delete
if ( ! is_null( $scan['minimum'] ) && $this->value_is_at_least( $scan['minimum'], $scan['actual'], $scan['type'] ) ) {
[1469] Fix | Delete
$system_diagnostics_settings[ $i ]['pass_fail'] = 'minimal';
[1470] Fix | Delete
}
[1471] Fix | Delete
[1472] Fix | Delete
if ( empty( $scan['pass_exact'] ) && ! is_null( $scan['recommended'] ) && $this->value_is_at_least( $scan['recommended'], $scan['actual'], $scan['type'] ) ) {
[1473] Fix | Delete
$system_diagnostics_settings[ $i ]['pass_fail'] = 'pass';
[1474] Fix | Delete
}
[1475] Fix | Delete
[1476] Fix | Delete
if ( $scan['pass_minus_one'] && -1 === (int) $scan['actual'] ) {
[1477] Fix | Delete
$system_diagnostics_settings[ $i ]['pass_fail'] = 'pass';
[1478] Fix | Delete
}
[1479] Fix | Delete
[1480] Fix | Delete
if ( $scan['pass_zero'] && 0 === (int) $scan['actual'] ) {
[1481] Fix | Delete
$system_diagnostics_settings[ $i ]['pass_fail'] = 'pass';
[1482] Fix | Delete
}
[1483] Fix | Delete
[1484] Fix | Delete
if ( ! empty( $scan['pass_exact'] ) && $scan['recommended'] === $scan['actual'] ) {
[1485] Fix | Delete
$system_diagnostics_settings[ $i ]['pass_fail'] = 'pass';
[1486] Fix | Delete
}
[1487] Fix | Delete
[1488] Fix | Delete
/**
[1489] Fix | Delete
* Build messaging for minimum required values
[1490] Fix | Delete
*/
[1491] Fix | Delete
$message_minimum = '';
[1492] Fix | Delete
if ( ! is_null( $scan['minimum'] ) && 'fail' === $system_diagnostics_settings[ $i ]['pass_fail'] ) {
[1493] Fix | Delete
$message_minimum = sprintf(
[1494] Fix | Delete
esc_html__( 'This fails to meet our minimum required value of %1$s. ', 'et-core' ),
[1495] Fix | Delete
esc_html( is_bool( $scan['minimum'] ) ? $this->boolean_label[ $scan['minimum'] ] : $scan['minimum'] )
[1496] Fix | Delete
);
[1497] Fix | Delete
}
[1498] Fix | Delete
if ( ! is_null( $scan['minimum'] ) && 'minimal' === $system_diagnostics_settings[ $i ]['pass_fail'] ) {
[1499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function