Site Health: Add a `wp_is_writable()` for fonts directory.

This changeset adds a check in Site Health to display whether the fonts directory is writable or not.

Follow-up to [58299].

Props ironprogrammer.
Fixes #60719.



Built from https://develop.svn.wordpress.org/trunk@58310


git-svn-id: http://core.svn.wordpress.org/trunk@57767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
audrasjb 2024-06-03 21:57:07 +00:00
parent ab5693f9f0
commit e562f6b12d
2 changed files with 7 additions and 1 deletions

View File

@ -347,6 +347,7 @@ class WP_Debug_Data {
$is_writable_upload_dir = wp_is_writable( $upload_dir['basedir'] );
$is_writable_wp_plugin_dir = wp_is_writable( WP_PLUGIN_DIR );
$is_writable_template_directory = wp_is_writable( get_theme_root( get_template() ) );
$is_writable_fonts_dir = wp_is_writable( wp_get_font_dir()['basedir'] );
$info['wp-filesystem'] = array(
'label' => __( 'Filesystem Permissions' ),
@ -377,6 +378,11 @@ class WP_Debug_Data {
'value' => ( $is_writable_template_directory ? __( 'Writable' ) : __( 'Not writable' ) ),
'debug' => ( $is_writable_template_directory ? 'writable' : 'not writable' ),
),
'fonts' => array(
'label' => __( 'The fonts directory' ),
'value' => ( $is_writable_fonts_dir ? __( 'Writable' ) : __( 'Not writable' ) ),
'debug' => ( $is_writable_fonts_dir ? 'writable' : 'not writable' ),
),
),
);

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.6-alpha-58309';
$wp_version = '6.6-alpha-58310';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.