Checks all possible theme directories for is_writable#3245
Checks all possible theme directories for is_writable#3245thijsoo wants to merge 1 commit intoWordPress:trunkfrom
Conversation
| foreach ( $wp_theme_directories as $wp_directory_listing ) { | ||
| $is_writable_template_directory = wp_is_writable( $wp_directory_listing ); |
There was a problem hiding this comment.
| foreach ( $wp_theme_directories as $wp_directory_listing ) { | |
| $is_writable_template_directory = wp_is_writable( $wp_directory_listing ); | |
| foreach ( $wp_theme_directories as $wp_theme_directory ) { | |
| $is_writable_template_directory = wp_is_writable( $wp_theme_directory ); |
|
Thank you for the patch @thijsoo ! In addition to the suggested variable naming from @costdev, there's a few things we need to keep track of, the current proposed solution would set the value of $is_writable_value = [];
$is_writable_debug = [];
foreach ( $theme_directories as $theme_directory ) {
$is_writable_value[] = sprintf(
'%s: %s',
$theme_directory,
( wp_is_writable( $theme_directory ) ? __( 'Writable' ) : __( 'Not writable' ) )
);
$is_writable_debug[] = sprintf(
'%s: %s',
$theme_directory,
( wp_is_writable( $theme_directory ) ? 'writable' : 'not writable' )
);
}(Note that it needs two variables, as the debug value is never translated, for consistency between languages in debug data.) The label for "The themes directory" should also be updated to use the |
I made sure all themes in the wp_theme_directories global are checked for wp_is_writable
Trac ticket: https://core.trac.wordpress.org/ticket/50018
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.