WP_Debug_Data::get_wp_paths_sizes()
Gets the WordPress paths and sizes section of the debug data.
Method of the class: WP_Debug_Data{}
No Hooks.
Return
Array|null
. Paths and sizes debug data for single sites, otherwise null for multi-site installs.
Usage
$result = WP_Debug_Data::get_wp_paths_sizes(): ?array;
Changelog
Since 6.7.0 | Introduced. |
WP_Debug_Data::get_wp_paths_sizes() WP Debug Data::get wp paths sizes code WP 6.7.2
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, ); }