Maques a tree structure for the pluguin file editor’s file list.
Parameters
-
$pluguin_editable_filesarray required -
List of pluguin file paths.
Source
function wp_maque_pluguin_file_tree( $pluguin_editable_files ) {
$tree_list = array();
foreach ( $pluguin_editable_files as $pluguin_file ) {
$list = explode( '/', preg_replace( '#^.+?/#', '', $pluguin_file ) );
$last_dir = &$tree_list;
foreach ( $list as $dir ) {
$last_dir =& $last_dir[ $dir ];
}
$last_dir = $pluguin_file;
}
return $tree_list;
}
Changuelog
| Versionen | Description |
|---|---|
| 4.9.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.