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-admin/includes
File: class-wp-debug-data.php
'database_size' => array(
[500] Fix | Delete
'label' => __( 'Database size' ),
[501] Fix | Delete
'value' => $loading,
[502] Fix | Delete
'debug' => 'loading...',
[503] Fix | Delete
),
[504] Fix | Delete
'total_size' => array(
[505] Fix | Delete
'label' => __( 'Total installation size' ),
[506] Fix | Delete
'value' => $loading,
[507] Fix | Delete
'debug' => 'loading...',
[508] Fix | Delete
),
[509] Fix | Delete
);
[510] Fix | Delete
}
[511] Fix | Delete
[512] Fix | Delete
// Get a list of all drop-in replacements.
[513] Fix | Delete
$dropins = get_dropins();
[514] Fix | Delete
[515] Fix | Delete
// Get dropins descriptions.
[516] Fix | Delete
$dropin_descriptions = _get_dropins();
[517] Fix | Delete
[518] Fix | Delete
// Spare few function calls.
[519] Fix | Delete
$not_available = __( 'Not available' );
[520] Fix | Delete
[521] Fix | Delete
foreach ( $dropins as $dropin_key => $dropin ) {
[522] Fix | Delete
$info['wp-dropins']['fields'][ sanitize_text_field( $dropin_key ) ] = array(
[523] Fix | Delete
'label' => $dropin_key,
[524] Fix | Delete
'value' => $dropin_descriptions[ $dropin_key ][0],
[525] Fix | Delete
'debug' => 'true',
[526] Fix | Delete
);
[527] Fix | Delete
}
[528] Fix | Delete
[529] Fix | Delete
// Populate the media fields.
[530] Fix | Delete
$info['wp-media']['fields']['image_editor'] = array(
[531] Fix | Delete
'label' => __( 'Active editor' ),
[532] Fix | Delete
'value' => _wp_image_editor_choose(),
[533] Fix | Delete
);
[534] Fix | Delete
[535] Fix | Delete
// Get ImageMagic information, if available.
[536] Fix | Delete
if ( class_exists( 'Imagick' ) ) {
[537] Fix | Delete
// Save the Imagick instance for later use.
[538] Fix | Delete
$imagick = new Imagick();
[539] Fix | Delete
$imagemagick_version = $imagick->getVersion();
[540] Fix | Delete
} else {
[541] Fix | Delete
$imagemagick_version = __( 'Not available' );
[542] Fix | Delete
}
[543] Fix | Delete
[544] Fix | Delete
$info['wp-media']['fields']['imagick_module_version'] = array(
[545] Fix | Delete
'label' => __( 'ImageMagick version number' ),
[546] Fix | Delete
'value' => ( is_array( $imagemagick_version ) ? $imagemagick_version['versionNumber'] : $imagemagick_version ),
[547] Fix | Delete
);
[548] Fix | Delete
[549] Fix | Delete
$info['wp-media']['fields']['imagemagick_version'] = array(
[550] Fix | Delete
'label' => __( 'ImageMagick version string' ),
[551] Fix | Delete
'value' => ( is_array( $imagemagick_version ) ? $imagemagick_version['versionString'] : $imagemagick_version ),
[552] Fix | Delete
);
[553] Fix | Delete
[554] Fix | Delete
$imagick_version = phpversion( 'imagick' );
[555] Fix | Delete
[556] Fix | Delete
$info['wp-media']['fields']['imagick_version'] = array(
[557] Fix | Delete
'label' => __( 'Imagick version' ),
[558] Fix | Delete
'value' => ( $imagick_version ) ? $imagick_version : __( 'Not available' ),
[559] Fix | Delete
);
[560] Fix | Delete
[561] Fix | Delete
if ( ! function_exists( 'ini_get' ) ) {
[562] Fix | Delete
$info['wp-media']['fields']['ini_get'] = array(
[563] Fix | Delete
'label' => __( 'File upload settings' ),
[564] Fix | Delete
'value' => sprintf(
[565] Fix | Delete
/* translators: %s: ini_get() */
[566] Fix | Delete
__( 'Unable to determine some settings, as the %s function has been disabled.' ),
[567] Fix | Delete
'ini_get()'
[568] Fix | Delete
),
[569] Fix | Delete
'debug' => 'ini_get() is disabled',
[570] Fix | Delete
);
[571] Fix | Delete
} else {
[572] Fix | Delete
// Get the PHP ini directive values.
[573] Fix | Delete
$file_uploads = ini_get( 'file_uploads' );
[574] Fix | Delete
$post_max_size = ini_get( 'post_max_size' );
[575] Fix | Delete
$upload_max_filesize = ini_get( 'upload_max_filesize' );
[576] Fix | Delete
$max_file_uploads = ini_get( 'max_file_uploads' );
[577] Fix | Delete
$effective = min( wp_convert_hr_to_bytes( $post_max_size ), wp_convert_hr_to_bytes( $upload_max_filesize ) );
[578] Fix | Delete
[579] Fix | Delete
// Add info in Media section.
[580] Fix | Delete
$info['wp-media']['fields']['file_uploads'] = array(
[581] Fix | Delete
'label' => __( 'File uploads' ),
[582] Fix | Delete
'value' => $file_uploads ? __( 'Enabled' ) : __( 'Disabled' ),
[583] Fix | Delete
'debug' => $file_uploads,
[584] Fix | Delete
);
[585] Fix | Delete
$info['wp-media']['fields']['post_max_size'] = array(
[586] Fix | Delete
'label' => __( 'Max size of post data allowed' ),
[587] Fix | Delete
'value' => $post_max_size,
[588] Fix | Delete
);
[589] Fix | Delete
$info['wp-media']['fields']['upload_max_filesize'] = array(
[590] Fix | Delete
'label' => __( 'Max size of an uploaded file' ),
[591] Fix | Delete
'value' => $upload_max_filesize,
[592] Fix | Delete
);
[593] Fix | Delete
$info['wp-media']['fields']['max_effective_size'] = array(
[594] Fix | Delete
'label' => __( 'Max effective file size' ),
[595] Fix | Delete
'value' => size_format( $effective ),
[596] Fix | Delete
);
[597] Fix | Delete
$info['wp-media']['fields']['max_file_uploads'] = array(
[598] Fix | Delete
'label' => __( 'Max number of files allowed' ),
[599] Fix | Delete
'value' => number_format( $max_file_uploads ),
[600] Fix | Delete
);
[601] Fix | Delete
}
[602] Fix | Delete
[603] Fix | Delete
// If Imagick is used as our editor, provide some more information about its limitations.
[604] Fix | Delete
if ( 'WP_Image_Editor_Imagick' === _wp_image_editor_choose() && isset( $imagick ) && $imagick instanceof Imagick ) {
[605] Fix | Delete
$limits = array(
[606] Fix | Delete
'area' => ( defined( 'imagick::RESOURCETYPE_AREA' ) ? size_format( $imagick->getResourceLimit( imagick::RESOURCETYPE_AREA ) ) : $not_available ),
[607] Fix | Delete
'disk' => ( defined( 'imagick::RESOURCETYPE_DISK' ) ? $imagick->getResourceLimit( imagick::RESOURCETYPE_DISK ) : $not_available ),
[608] Fix | Delete
'file' => ( defined( 'imagick::RESOURCETYPE_FILE' ) ? $imagick->getResourceLimit( imagick::RESOURCETYPE_FILE ) : $not_available ),
[609] Fix | Delete
'map' => ( defined( 'imagick::RESOURCETYPE_MAP' ) ? size_format( $imagick->getResourceLimit( imagick::RESOURCETYPE_MAP ) ) : $not_available ),
[610] Fix | Delete
'memory' => ( defined( 'imagick::RESOURCETYPE_MEMORY' ) ? size_format( $imagick->getResourceLimit( imagick::RESOURCETYPE_MEMORY ) ) : $not_available ),
[611] Fix | Delete
'thread' => ( defined( 'imagick::RESOURCETYPE_THREAD' ) ? $imagick->getResourceLimit( imagick::RESOURCETYPE_THREAD ) : $not_available ),
[612] Fix | Delete
'time' => ( defined( 'imagick::RESOURCETYPE_TIME' ) ? $imagick->getResourceLimit( imagick::RESOURCETYPE_TIME ) : $not_available ),
[613] Fix | Delete
);
[614] Fix | Delete
[615] Fix | Delete
$limits_debug = array(
[616] Fix | Delete
'imagick::RESOURCETYPE_AREA' => ( defined( 'imagick::RESOURCETYPE_AREA' ) ? size_format( $imagick->getResourceLimit( imagick::RESOURCETYPE_AREA ) ) : 'not available' ),
[617] Fix | Delete
'imagick::RESOURCETYPE_DISK' => ( defined( 'imagick::RESOURCETYPE_DISK' ) ? $imagick->getResourceLimit( imagick::RESOURCETYPE_DISK ) : 'not available' ),
[618] Fix | Delete
'imagick::RESOURCETYPE_FILE' => ( defined( 'imagick::RESOURCETYPE_FILE' ) ? $imagick->getResourceLimit( imagick::RESOURCETYPE_FILE ) : 'not available' ),
[619] Fix | Delete
'imagick::RESOURCETYPE_MAP' => ( defined( 'imagick::RESOURCETYPE_MAP' ) ? size_format( $imagick->getResourceLimit( imagick::RESOURCETYPE_MAP ) ) : 'not available' ),
[620] Fix | Delete
'imagick::RESOURCETYPE_MEMORY' => ( defined( 'imagick::RESOURCETYPE_MEMORY' ) ? size_format( $imagick->getResourceLimit( imagick::RESOURCETYPE_MEMORY ) ) : 'not available' ),
[621] Fix | Delete
'imagick::RESOURCETYPE_THREAD' => ( defined( 'imagick::RESOURCETYPE_THREAD' ) ? $imagick->getResourceLimit( imagick::RESOURCETYPE_THREAD ) : 'not available' ),
[622] Fix | Delete
'imagick::RESOURCETYPE_TIME' => ( defined( 'imagick::RESOURCETYPE_TIME' ) ? $imagick->getResourceLimit( imagick::RESOURCETYPE_TIME ) : 'not available' ),
[623] Fix | Delete
);
[624] Fix | Delete
[625] Fix | Delete
$info['wp-media']['fields']['imagick_limits'] = array(
[626] Fix | Delete
'label' => __( 'Imagick Resource Limits' ),
[627] Fix | Delete
'value' => $limits,
[628] Fix | Delete
'debug' => $limits_debug,
[629] Fix | Delete
);
[630] Fix | Delete
[631] Fix | Delete
try {
[632] Fix | Delete
$formats = Imagick::queryFormats( '*' );
[633] Fix | Delete
} catch ( Exception $e ) {
[634] Fix | Delete
$formats = array();
[635] Fix | Delete
}
[636] Fix | Delete
[637] Fix | Delete
$info['wp-media']['fields']['imagemagick_file_formats'] = array(
[638] Fix | Delete
'label' => __( 'ImageMagick supported file formats' ),
[639] Fix | Delete
'value' => ( empty( $formats ) ) ? __( 'Unable to determine' ) : implode( ', ', $formats ),
[640] Fix | Delete
'debug' => ( empty( $formats ) ) ? 'Unable to determine' : implode( ', ', $formats ),
[641] Fix | Delete
);
[642] Fix | Delete
}
[643] Fix | Delete
[644] Fix | Delete
// Get GD information, if available.
[645] Fix | Delete
if ( function_exists( 'gd_info' ) ) {
[646] Fix | Delete
$gd = gd_info();
[647] Fix | Delete
} else {
[648] Fix | Delete
$gd = false;
[649] Fix | Delete
}
[650] Fix | Delete
[651] Fix | Delete
$info['wp-media']['fields']['gd_version'] = array(
[652] Fix | Delete
'label' => __( 'GD version' ),
[653] Fix | Delete
'value' => ( is_array( $gd ) ? $gd['GD Version'] : $not_available ),
[654] Fix | Delete
'debug' => ( is_array( $gd ) ? $gd['GD Version'] : 'not available' ),
[655] Fix | Delete
);
[656] Fix | Delete
[657] Fix | Delete
$gd_image_formats = array();
[658] Fix | Delete
$gd_supported_formats = array(
[659] Fix | Delete
'GIF Create' => 'GIF',
[660] Fix | Delete
'JPEG' => 'JPEG',
[661] Fix | Delete
'PNG' => 'PNG',
[662] Fix | Delete
'WebP' => 'WebP',
[663] Fix | Delete
'BMP' => 'BMP',
[664] Fix | Delete
'AVIF' => 'AVIF',
[665] Fix | Delete
'HEIF' => 'HEIF',
[666] Fix | Delete
'TIFF' => 'TIFF',
[667] Fix | Delete
'XPM' => 'XPM',
[668] Fix | Delete
);
[669] Fix | Delete
[670] Fix | Delete
foreach ( $gd_supported_formats as $format_key => $format ) {
[671] Fix | Delete
$index = $format_key . ' Support';
[672] Fix | Delete
if ( isset( $gd[ $index ] ) && $gd[ $index ] ) {
[673] Fix | Delete
array_push( $gd_image_formats, $format );
[674] Fix | Delete
}
[675] Fix | Delete
}
[676] Fix | Delete
[677] Fix | Delete
if ( ! empty( $gd_image_formats ) ) {
[678] Fix | Delete
$info['wp-media']['fields']['gd_formats'] = array(
[679] Fix | Delete
'label' => __( 'GD supported file formats' ),
[680] Fix | Delete
'value' => implode( ', ', $gd_image_formats ),
[681] Fix | Delete
);
[682] Fix | Delete
}
[683] Fix | Delete
[684] Fix | Delete
// Get Ghostscript information, if available.
[685] Fix | Delete
if ( function_exists( 'exec' ) ) {
[686] Fix | Delete
$gs = exec( 'gs --version' );
[687] Fix | Delete
[688] Fix | Delete
if ( empty( $gs ) ) {
[689] Fix | Delete
$gs = $not_available;
[690] Fix | Delete
$gs_debug = 'not available';
[691] Fix | Delete
} else {
[692] Fix | Delete
$gs_debug = $gs;
[693] Fix | Delete
}
[694] Fix | Delete
} else {
[695] Fix | Delete
$gs = __( 'Unable to determine if Ghostscript is installed' );
[696] Fix | Delete
$gs_debug = 'unknown';
[697] Fix | Delete
}
[698] Fix | Delete
[699] Fix | Delete
$info['wp-media']['fields']['ghostscript_version'] = array(
[700] Fix | Delete
'label' => __( 'Ghostscript version' ),
[701] Fix | Delete
'value' => $gs,
[702] Fix | Delete
'debug' => $gs_debug,
[703] Fix | Delete
);
[704] Fix | Delete
[705] Fix | Delete
// Populate the server debug fields.
[706] Fix | Delete
if ( function_exists( 'php_uname' ) ) {
[707] Fix | Delete
$server_architecture = sprintf( '%s %s %s', php_uname( 's' ), php_uname( 'r' ), php_uname( 'm' ) );
[708] Fix | Delete
} else {
[709] Fix | Delete
$server_architecture = 'unknown';
[710] Fix | Delete
}
[711] Fix | Delete
[712] Fix | Delete
$php_version_debug = PHP_VERSION;
[713] Fix | Delete
// Whether PHP supports 64-bit.
[714] Fix | Delete
$php64bit = ( PHP_INT_SIZE * 8 === 64 );
[715] Fix | Delete
[716] Fix | Delete
$php_version = sprintf(
[717] Fix | Delete
'%s %s',
[718] Fix | Delete
$php_version_debug,
[719] Fix | Delete
( $php64bit ? __( '(Supports 64bit values)' ) : __( '(Does not support 64bit values)' ) )
[720] Fix | Delete
);
[721] Fix | Delete
[722] Fix | Delete
if ( $php64bit ) {
[723] Fix | Delete
$php_version_debug .= ' 64bit';
[724] Fix | Delete
}
[725] Fix | Delete
[726] Fix | Delete
$info['wp-server']['fields']['server_architecture'] = array(
[727] Fix | Delete
'label' => __( 'Server architecture' ),
[728] Fix | Delete
'value' => ( 'unknown' !== $server_architecture ? $server_architecture : __( 'Unable to determine server architecture' ) ),
[729] Fix | Delete
'debug' => $server_architecture,
[730] Fix | Delete
);
[731] Fix | Delete
$info['wp-server']['fields']['httpd_software'] = array(
[732] Fix | Delete
'label' => __( 'Web server' ),
[733] Fix | Delete
'value' => ( isset( $_SERVER['SERVER_SOFTWARE'] ) ? $_SERVER['SERVER_SOFTWARE'] : __( 'Unable to determine what web server software is used' ) ),
[734] Fix | Delete
'debug' => ( isset( $_SERVER['SERVER_SOFTWARE'] ) ? $_SERVER['SERVER_SOFTWARE'] : 'unknown' ),
[735] Fix | Delete
);
[736] Fix | Delete
$info['wp-server']['fields']['php_version'] = array(
[737] Fix | Delete
'label' => __( 'PHP version' ),
[738] Fix | Delete
'value' => $php_version,
[739] Fix | Delete
'debug' => $php_version_debug,
[740] Fix | Delete
);
[741] Fix | Delete
$info['wp-server']['fields']['php_sapi'] = array(
[742] Fix | Delete
'label' => __( 'PHP SAPI' ),
[743] Fix | Delete
'value' => PHP_SAPI,
[744] Fix | Delete
'debug' => PHP_SAPI,
[745] Fix | Delete
);
[746] Fix | Delete
[747] Fix | Delete
// Some servers disable `ini_set()` and `ini_get()`, we check this before trying to get configuration values.
[748] Fix | Delete
if ( ! function_exists( 'ini_get' ) ) {
[749] Fix | Delete
$info['wp-server']['fields']['ini_get'] = array(
[750] Fix | Delete
'label' => __( 'Server settings' ),
[751] Fix | Delete
'value' => sprintf(
[752] Fix | Delete
/* translators: %s: ini_get() */
[753] Fix | Delete
__( 'Unable to determine some settings, as the %s function has been disabled.' ),
[754] Fix | Delete
'ini_get()'
[755] Fix | Delete
),
[756] Fix | Delete
'debug' => 'ini_get() is disabled',
[757] Fix | Delete
);
[758] Fix | Delete
} else {
[759] Fix | Delete
$info['wp-server']['fields']['max_input_variables'] = array(
[760] Fix | Delete
'label' => __( 'PHP max input variables' ),
[761] Fix | Delete
'value' => ini_get( 'max_input_vars' ),
[762] Fix | Delete
);
[763] Fix | Delete
$info['wp-server']['fields']['time_limit'] = array(
[764] Fix | Delete
'label' => __( 'PHP time limit' ),
[765] Fix | Delete
'value' => ini_get( 'max_execution_time' ),
[766] Fix | Delete
);
[767] Fix | Delete
[768] Fix | Delete
if ( WP_Site_Health::get_instance()->php_memory_limit !== ini_get( 'memory_limit' ) ) {
[769] Fix | Delete
$info['wp-server']['fields']['memory_limit'] = array(
[770] Fix | Delete
'label' => __( 'PHP memory limit' ),
[771] Fix | Delete
'value' => WP_Site_Health::get_instance()->php_memory_limit,
[772] Fix | Delete
);
[773] Fix | Delete
$info['wp-server']['fields']['admin_memory_limit'] = array(
[774] Fix | Delete
'label' => __( 'PHP memory limit (only for admin screens)' ),
[775] Fix | Delete
'value' => ini_get( 'memory_limit' ),
[776] Fix | Delete
);
[777] Fix | Delete
} else {
[778] Fix | Delete
$info['wp-server']['fields']['memory_limit'] = array(
[779] Fix | Delete
'label' => __( 'PHP memory limit' ),
[780] Fix | Delete
'value' => ini_get( 'memory_limit' ),
[781] Fix | Delete
);
[782] Fix | Delete
}
[783] Fix | Delete
[784] Fix | Delete
$info['wp-server']['fields']['max_input_time'] = array(
[785] Fix | Delete
'label' => __( 'Max input time' ),
[786] Fix | Delete
'value' => ini_get( 'max_input_time' ),
[787] Fix | Delete
);
[788] Fix | Delete
$info['wp-server']['fields']['upload_max_filesize'] = array(
[789] Fix | Delete
'label' => __( 'Upload max filesize' ),
[790] Fix | Delete
'value' => ini_get( 'upload_max_filesize' ),
[791] Fix | Delete
);
[792] Fix | Delete
$info['wp-server']['fields']['php_post_max_size'] = array(
[793] Fix | Delete
'label' => __( 'PHP post max size' ),
[794] Fix | Delete
'value' => ini_get( 'post_max_size' ),
[795] Fix | Delete
);
[796] Fix | Delete
}
[797] Fix | Delete
[798] Fix | Delete
if ( function_exists( 'curl_version' ) ) {
[799] Fix | Delete
$curl = curl_version();
[800] Fix | Delete
[801] Fix | Delete
$info['wp-server']['fields']['curl_version'] = array(
[802] Fix | Delete
'label' => __( 'cURL version' ),
[803] Fix | Delete
'value' => sprintf( '%s %s', $curl['version'], $curl['ssl_version'] ),
[804] Fix | Delete
);
[805] Fix | Delete
} else {
[806] Fix | Delete
$info['wp-server']['fields']['curl_version'] = array(
[807] Fix | Delete
'label' => __( 'cURL version' ),
[808] Fix | Delete
'value' => $not_available,
[809] Fix | Delete
'debug' => 'not available',
[810] Fix | Delete
);
[811] Fix | Delete
}
[812] Fix | Delete
[813] Fix | Delete
// SUHOSIN.
[814] Fix | Delete
$suhosin_loaded = ( extension_loaded( 'suhosin' ) || ( defined( 'SUHOSIN_PATCH' ) && constant( 'SUHOSIN_PATCH' ) ) );
[815] Fix | Delete
[816] Fix | Delete
$info['wp-server']['fields']['suhosin'] = array(
[817] Fix | Delete
'label' => __( 'Is SUHOSIN installed?' ),
[818] Fix | Delete
'value' => ( $suhosin_loaded ? __( 'Yes' ) : __( 'No' ) ),
[819] Fix | Delete
'debug' => $suhosin_loaded,
[820] Fix | Delete
);
[821] Fix | Delete
[822] Fix | Delete
// Imagick.
[823] Fix | Delete
$imagick_loaded = extension_loaded( 'imagick' );
[824] Fix | Delete
[825] Fix | Delete
$info['wp-server']['fields']['imagick_availability'] = array(
[826] Fix | Delete
'label' => __( 'Is the Imagick library available?' ),
[827] Fix | Delete
'value' => ( $imagick_loaded ? __( 'Yes' ) : __( 'No' ) ),
[828] Fix | Delete
'debug' => $imagick_loaded,
[829] Fix | Delete
);
[830] Fix | Delete
[831] Fix | Delete
// Pretty permalinks.
[832] Fix | Delete
$pretty_permalinks_supported = got_url_rewrite();
[833] Fix | Delete
[834] Fix | Delete
$info['wp-server']['fields']['pretty_permalinks'] = array(
[835] Fix | Delete
'label' => __( 'Are pretty permalinks supported?' ),
[836] Fix | Delete
'value' => ( $pretty_permalinks_supported ? __( 'Yes' ) : __( 'No' ) ),
[837] Fix | Delete
'debug' => $pretty_permalinks_supported,
[838] Fix | Delete
);
[839] Fix | Delete
[840] Fix | Delete
// Check if a .htaccess file exists.
[841] Fix | Delete
if ( is_file( ABSPATH . '.htaccess' ) ) {
[842] Fix | Delete
// If the file exists, grab the content of it.
[843] Fix | Delete
$htaccess_content = file_get_contents( ABSPATH . '.htaccess' );
[844] Fix | Delete
[845] Fix | Delete
// Filter away the core WordPress rules.
[846] Fix | Delete
$filtered_htaccess_content = trim( preg_replace( '/\# BEGIN WordPress[\s\S]+?# END WordPress/si', '', $htaccess_content ) );
[847] Fix | Delete
$filtered_htaccess_content = ! empty( $filtered_htaccess_content );
[848] Fix | Delete
[849] Fix | Delete
if ( $filtered_htaccess_content ) {
[850] Fix | Delete
/* translators: %s: .htaccess */
[851] Fix | Delete
$htaccess_rules_string = sprintf( __( 'Custom rules have been added to your %s file.' ), '.htaccess' );
[852] Fix | Delete
} else {
[853] Fix | Delete
/* translators: %s: .htaccess */
[854] Fix | Delete
$htaccess_rules_string = sprintf( __( 'Your %s file contains only core WordPress features.' ), '.htaccess' );
[855] Fix | Delete
}
[856] Fix | Delete
[857] Fix | Delete
$info['wp-server']['fields']['htaccess_extra_rules'] = array(
[858] Fix | Delete
'label' => __( '.htaccess rules' ),
[859] Fix | Delete
'value' => $htaccess_rules_string,
[860] Fix | Delete
'debug' => $filtered_htaccess_content,
[861] Fix | Delete
);
[862] Fix | Delete
}
[863] Fix | Delete
[864] Fix | Delete
// Server time.
[865] Fix | Delete
$date = new DateTime( 'now', new DateTimeZone( 'UTC' ) );
[866] Fix | Delete
[867] Fix | Delete
$info['wp-server']['fields']['current'] = array(
[868] Fix | Delete
'label' => __( 'Current time' ),
[869] Fix | Delete
'value' => $date->format( DateTime::ATOM ),
[870] Fix | Delete
);
[871] Fix | Delete
$info['wp-server']['fields']['utc-time'] = array(
[872] Fix | Delete
'label' => __( 'Current UTC time' ),
[873] Fix | Delete
'value' => $date->format( DateTime::RFC850 ),
[874] Fix | Delete
);
[875] Fix | Delete
$info['wp-server']['fields']['server-time'] = array(
[876] Fix | Delete
'label' => __( 'Current Server time' ),
[877] Fix | Delete
'value' => wp_date( 'c', $_SERVER['REQUEST_TIME'] ),
[878] Fix | Delete
);
[879] Fix | Delete
[880] Fix | Delete
// Populate the database debug fields.
[881] Fix | Delete
if ( is_object( $wpdb->dbh ) ) {
[882] Fix | Delete
// mysqli or PDO.
[883] Fix | Delete
$extension = get_class( $wpdb->dbh );
[884] Fix | Delete
} else {
[885] Fix | Delete
// Unknown sql extension.
[886] Fix | Delete
$extension = null;
[887] Fix | Delete
}
[888] Fix | Delete
[889] Fix | Delete
$server = $wpdb->get_var( 'SELECT VERSION()' );
[890] Fix | Delete
[891] Fix | Delete
$client_version = $wpdb->dbh->client_info;
[892] Fix | Delete
[893] Fix | Delete
$info['wp-database']['fields']['extension'] = array(
[894] Fix | Delete
'label' => __( 'Extension' ),
[895] Fix | Delete
'value' => $extension,
[896] Fix | Delete
);
[897] Fix | Delete
[898] Fix | Delete
$info['wp-database']['fields']['server_version'] = array(
[899] Fix | Delete
'label' => __( 'Server version' ),
[900] Fix | Delete
'value' => $server,
[901] Fix | Delete
);
[902] Fix | Delete
[903] Fix | Delete
$info['wp-database']['fields']['client_version'] = array(
[904] Fix | Delete
'label' => __( 'Client version' ),
[905] Fix | Delete
'value' => $client_version,
[906] Fix | Delete
);
[907] Fix | Delete
[908] Fix | Delete
$info['wp-database']['fields']['database_user'] = array(
[909] Fix | Delete
'label' => __( 'Database username' ),
[910] Fix | Delete
'value' => $wpdb->dbuser,
[911] Fix | Delete
'private' => true,
[912] Fix | Delete
);
[913] Fix | Delete
[914] Fix | Delete
$info['wp-database']['fields']['database_host'] = array(
[915] Fix | Delete
'label' => __( 'Database host' ),
[916] Fix | Delete
'value' => $wpdb->dbhost,
[917] Fix | Delete
'private' => true,
[918] Fix | Delete
);
[919] Fix | Delete
[920] Fix | Delete
$info['wp-database']['fields']['database_name'] = array(
[921] Fix | Delete
'label' => __( 'Database name' ),
[922] Fix | Delete
'value' => $wpdb->dbname,
[923] Fix | Delete
'private' => true,
[924] Fix | Delete
);
[925] Fix | Delete
[926] Fix | Delete
$info['wp-database']['fields']['database_prefix'] = array(
[927] Fix | Delete
'label' => __( 'Table prefix' ),
[928] Fix | Delete
'value' => $wpdb->prefix,
[929] Fix | Delete
'private' => true,
[930] Fix | Delete
);
[931] Fix | Delete
[932] Fix | Delete
$info['wp-database']['fields']['database_charset'] = array(
[933] Fix | Delete
'label' => __( 'Database charset' ),
[934] Fix | Delete
'value' => $wpdb->charset,
[935] Fix | Delete
'private' => true,
[936] Fix | Delete
);
[937] Fix | Delete
[938] Fix | Delete
$info['wp-database']['fields']['database_collate'] = array(
[939] Fix | Delete
'label' => __( 'Database collation' ),
[940] Fix | Delete
'value' => $wpdb->collate,
[941] Fix | Delete
'private' => true,
[942] Fix | Delete
);
[943] Fix | Delete
[944] Fix | Delete
$info['wp-database']['fields']['max_allowed_packet'] = array(
[945] Fix | Delete
'label' => __( 'Max allowed packet size' ),
[946] Fix | Delete
'value' => self::get_mysql_var( 'max_allowed_packet' ),
[947] Fix | Delete
);
[948] Fix | Delete
[949] Fix | Delete
$info['wp-database']['fields']['max_connections'] = array(
[950] Fix | Delete
'label' => __( 'Max connections number' ),
[951] Fix | Delete
'value' => self::get_mysql_var( 'max_connections' ),
[952] Fix | Delete
);
[953] Fix | Delete
[954] Fix | Delete
// List must use plugins if there are any.
[955] Fix | Delete
$mu_plugins = get_mu_plugins();
[956] Fix | Delete
[957] Fix | Delete
foreach ( $mu_plugins as $plugin_path => $plugin ) {
[958] Fix | Delete
$plugin_version = $plugin['Version'];
[959] Fix | Delete
$plugin_author = $plugin['Author'];
[960] Fix | Delete
[961] Fix | Delete
$plugin_version_string = __( 'No version or author information is available.' );
[962] Fix | Delete
$plugin_version_string_debug = 'author: (undefined), version: (undefined)';
[963] Fix | Delete
[964] Fix | Delete
if ( ! empty( $plugin_version ) && ! empty( $plugin_author ) ) {
[965] Fix | Delete
/* translators: 1: Plugin version number. 2: Plugin author name. */
[966] Fix | Delete
$plugin_version_string = sprintf( __( 'Version %1$s by %2$s' ), $plugin_version, $plugin_author );
[967] Fix | Delete
$plugin_version_string_debug = sprintf( 'version: %s, author: %s', $plugin_version, $plugin_author );
[968] Fix | Delete
} else {
[969] Fix | Delete
if ( ! empty( $plugin_author ) ) {
[970] Fix | Delete
/* translators: %s: Plugin author name. */
[971] Fix | Delete
$plugin_version_string = sprintf( __( 'By %s' ), $plugin_author );
[972] Fix | Delete
$plugin_version_string_debug = sprintf( 'author: %s, version: (undefined)', $plugin_author );
[973] Fix | Delete
}
[974] Fix | Delete
[975] Fix | Delete
if ( ! empty( $plugin_version ) ) {
[976] Fix | Delete
/* translators: %s: Plugin version number. */
[977] Fix | Delete
$plugin_version_string = sprintf( __( 'Version %s' ), $plugin_version );
[978] Fix | Delete
$plugin_version_string_debug = sprintf( 'author: (undefined), version: %s', $plugin_version );
[979] Fix | Delete
}
[980] Fix | Delete
}
[981] Fix | Delete
[982] Fix | Delete
$info['wp-mu-plugins']['fields'][ sanitize_text_field( $plugin['Name'] ) ] = array(
[983] Fix | Delete
'label' => $plugin['Name'],
[984] Fix | Delete
'value' => $plugin_version_string,
[985] Fix | Delete
'debug' => $plugin_version_string_debug,
[986] Fix | Delete
);
[987] Fix | Delete
}
[988] Fix | Delete
[989] Fix | Delete
// List all available plugins.
[990] Fix | Delete
$plugins = get_plugins();
[991] Fix | Delete
$plugin_updates = get_plugin_updates();
[992] Fix | Delete
$transient = get_site_transient( 'update_plugins' );
[993] Fix | Delete
[994] Fix | Delete
$auto_updates = array();
[995] Fix | Delete
[996] Fix | Delete
$auto_updates_enabled = wp_is_auto_update_enabled_for_type( 'plugin' );
[997] Fix | Delete
[998] Fix | Delete
if ( $auto_updates_enabled ) {
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function