Make WordPress Core


Ignore:
Timestamp:
10/13/2017 02:38:19 AM (6 years ago)
Author:
westonruter
Message:

File Editors: Display list of theme/plugin files in scrollable directory tree.

Props WraithKenny, afercia, melchoyce, westonruter.
Amends [41721].
Fixes #24048.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/plugin-editor.php

    r41774 r41851  
    232232
    233233<div id="templateside">
    234     <h2><?php _e( 'Plugin Files' ); ?></h2>
     234    <h2 id="plugin-files-label"><?php _e( 'Plugin Files' ); ?></h2>
    235235
    236236    <?php
     
    242242    }
    243243    ?>
    244     <ul>
    245     <?php foreach ( $plugin_editable_files as $plugin_file ) : ?>
    246         <li class="<?php echo esc_attr( $file === $plugin_file ? 'notice notice-info' : '' ); ?>">
    247             <a href="plugin-editor.php?file=<?php echo urlencode( $plugin_file ); ?>&amp;plugin=<?php echo urlencode( $plugin ); ?>"><?php echo esc_html( preg_replace( '#^.+?/#', '', $plugin_file ) ); ?></a>
    248         </li>
    249     <?php endforeach; ?>
     244    <ul role="tree" aria-labelledby="plugin-files-label">
     245    <li role="treeitem" tabindex="-1" aria-expanded="true"
     246        aria-level="1"
     247        aria-posinset="1"
     248        aria-setsize="1">
     249        <ul role="group" style="padding-left: 0;">
     250            <?php wp_print_plugin_file_tree( wp_make_plugin_file_tree( $plugin_editable_files ) ); ?>
     251        </ul>
    250252    </ul>
    251253</div>
Note: See TracChangeset for help on using the changeset viewer.