WP_Debug_Data::get_wp_paths_sizes(): array|null

In this article

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only by core. It is listed here for completeness.

Gets the WordPress paths and sizes section of the debug data.

Return

array|null Paths and sizes debug data for single sites, otherwise null for multi-site installs.

Source

private static function get_wp_paths_sizes(): ?array {
	if ( is_multisite() ) {
		return null;
	}

	$loading = __( 'Loading…' );

	$fields = array(
		'wordpress_path' => array(
			'label' => __( 'WordPress directory location' ),
			'value' => untrailingslashit( ABSPATH ),
		),
		'wordpress_size' => array(
			'label' => __( 'WordPress directory size' ),
			'value' => $loading,
			'debug' => 'loading...',
		),
		'uploads_path'   => array(
			'label' => __( 'Uploads directory location' ),
			'value' => wp_upload_dir()['basedir'],
		),
		'uploads_size'   => array(
			'label' => __( 'Uploads directory size' ),
			'value' => $loading,
			'debug' => 'loading...',
		),
		'themes_path'    => array(
			'label' => __( 'Themes directory location' ),
			'value' => get_theme_root(),
		),
		'themes_size'    => array(
			'label' => __( 'Themes directory size' ),
			'value' => $loading,
			'debug' => 'loading...',
		),
		'plugins_path'   => array(
			'label' => __( 'Plugins directory location' ),
			'value' => WP_PLUGIN_DIR,
		),
		'plugins_size'   => array(
			'label' => __( 'Plugins directory size' ),
			'value' => $loading,
			'debug' => 'loading...',
		),
		'fonts_path'     => array(
			'label' => __( 'Fonts directory location' ),
			'value' => wp_get_font_dir()['basedir'],
		),
		'fonts_size'     => array(
			'label' => __( 'Fonts directory size' ),
			'value' => $loading,
			'debug' => 'loading...',
		),
		'database_size'  => array(
			'label' => __( 'Database size' ),
			'value' => $loading,
			'debug' => 'loading...',
		),
		'total_size'     => array(
			'label' => __( 'Total installation size' ),
			'value' => $loading,
			'debug' => 'loading...',
		),
	);

	return array(
		/* translators: Filesystem directory paths and storage sizes. */
		'label'  => __( 'Directories and Sizes' ),
		'fields' => $fields,
	);
}

Changelog

VersionDescription
6.7.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.