Make WordPress Core


Ignore:
Timestamp:
06/03/2024 09:55:38 PM (6 months ago)
Author:
audrasjb
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-debug-data.php

    r58307 r58310  
    348348        $is_writable_wp_plugin_dir      = wp_is_writable( WP_PLUGIN_DIR );
    349349        $is_writable_template_directory = wp_is_writable( get_theme_root( get_template() ) );
     350        $is_writable_fonts_dir          = wp_is_writable( wp_get_font_dir()['basedir'] );
    350351
    351352        $info['wp-filesystem'] = array(
     
    377378                    'value' => ( $is_writable_template_directory ? __( 'Writable' ) : __( 'Not writable' ) ),
    378379                    'debug' => ( $is_writable_template_directory ? 'writable' : 'not writable' ),
     380                ),
     381                'fonts'      => array(
     382                    'label' => __( 'The fonts directory' ),
     383                    'value' => ( $is_writable_fonts_dir ? __( 'Writable' ) : __( 'Not writable' ) ),
     384                    'debug' => ( $is_writable_fonts_dir ? 'writable' : 'not writable' ),
    379385                ),
    380386            ),
Note: See TracChangeset for help on using the changeset viewer.