From e562f6b12d8e2d064d1b81e4a54df62d5e3e2f1e Mon Sep 17 00:00:00 2001 From: audrasjb Date: Mon, 3 Jun 2024 21:57:07 +0000 Subject: [PATCH] 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 --- wp-admin/includes/class-wp-debug-data.php | 6 ++++++ wp-includes/version.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/class-wp-debug-data.php b/wp-admin/includes/class-wp-debug-data.php index 57e1dd8bb4..b8307cade2 100644 --- a/wp-admin/includes/class-wp-debug-data.php +++ b/wp-admin/includes/class-wp-debug-data.php @@ -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' ), + ), ), ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 7ee0ac5104..7bae5d3f0a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.