Skip to content

Commit

Permalink
Show grayed Disabled message when DISALLOW_FILE_MODS is set
Browse files Browse the repository at this point in the history
  • Loading branch information
yatsukhnenko committed Apr 15, 2024
1 parent b582fba commit c9af1c8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
4 changes: 4 additions & 0 deletions assets/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
color: #d63638;
}

#rediscache .form-table .disabled {
color: #808080;
}

#rediscache .form-table td ul {
margin: 0;
}
Expand Down
17 changes: 11 additions & 6 deletions includes/ui/tabs/overview.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,21 @@
<tr>
<th><?php esc_html_e( 'Filesystem:', 'redis-cache' ); ?></th>
<td>
<?php if ( $filesystem_writable instanceof \WP_Error ) : ?>
<span class="error">
<span class="dashicons dashicons-dismiss"></span>
<?php esc_html_e( 'Not writeable', 'redis-cache' ); ?>
</span>
<?php else : ?>
<?php if ( ! $filesystem_writable instanceof \WP_Error ) : ?>
<span class="success">
<span class="dashicons dashicons-yes-alt"></span>
<?php esc_html_e( 'Writeable', 'redis-cache' ); ?>
</span>
<?php elseif ( $filesystem_writable->get_error_code() === 'disallowed' ) : ?>
<span class="disabled">
<span class="dashicons dashicons-warning"></span>
<?php esc_html_e( 'Disabled', 'redis-cache' ); ?>
</span>
<?php else : ?>
<span class="error">
<span class="dashicons dashicons-dismiss"></span>
<?php esc_html_e( 'Not writeable', 'redis-cache' ); ?>
</span>
<?php endif; ?>
</td>
</tr>
Expand Down

0 comments on commit c9af1c8

Please sign in to comment.