mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-05 21:24:35 +00:00
File Editors: Display list of theme/plugin files in scrollable directory tree.
Props WraithKenny, afercia, melchoyce, westonruter. Amends [41721]. Fixes #24048. git-svn-id: https://develop.svn.wordpress.org/trunk@41851 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -231,7 +231,7 @@ if ( 'POST' === $_SERVER['REQUEST_METHOD'] ) {
|
||||
</div>
|
||||
|
||||
<div id="templateside">
|
||||
<h2><?php _e( 'Plugin Files' ); ?></h2>
|
||||
<h2 id="plugin-files-label"><?php _e( 'Plugin Files' ); ?></h2>
|
||||
|
||||
<?php
|
||||
$plugin_editable_files = array();
|
||||
@@ -241,12 +241,14 @@ if ( 'POST' === $_SERVER['REQUEST_METHOD'] ) {
|
||||
}
|
||||
}
|
||||
?>
|
||||
<ul>
|
||||
<?php foreach ( $plugin_editable_files as $plugin_file ) : ?>
|
||||
<li class="<?php echo esc_attr( $file === $plugin_file ? 'notice notice-info' : '' ); ?>">
|
||||
<a href="plugin-editor.php?file=<?php echo urlencode( $plugin_file ); ?>&plugin=<?php echo urlencode( $plugin ); ?>"><?php echo esc_html( preg_replace( '#^.+?/#', '', $plugin_file ) ); ?></a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<ul role="tree" aria-labelledby="plugin-files-label">
|
||||
<li role="treeitem" tabindex="-1" aria-expanded="true"
|
||||
aria-level="1"
|
||||
aria-posinset="1"
|
||||
aria-setsize="1">
|
||||
<ul role="group" style="padding-left: 0;">
|
||||
<?php wp_print_plugin_file_tree( wp_make_plugin_file_tree( $plugin_editable_files ) ); ?>
|
||||
</ul>
|
||||
</ul>
|
||||
</div>
|
||||
<form name="template" id="template" action="plugin-editor.php" method="post">
|
||||
|
||||
Reference in New Issue
Block a user