wp_make_theme_file_tree
函数
wp_make_theme_file_tree ( $allowed_files )
- Access
- Private
- 参数
-
-
(array)
$allowed_files
List of theme file paths.- Required: 是
-
(array)
- 返回值
-
- (array) Tree structure for listing theme files.
- 定义位置
-
-
wp-admin/includes/misc.php
, line 366
-
wp-admin/includes/misc.php
- 引入
- 4.9.0
- 弃用
- –
Makes a tree structure for the theme file editor’s file list.
function wp_make_theme_file_tree( $allowed_files ) {
$tree_list = array();
foreach ( $allowed_files as $file_name => $absolute_filename ) {
$list = explode( '/', $file_name );
$last_dir = &$tree_list;
foreach ( $list as $dir ) {
$last_dir =& $last_dir[ $dir ];
}
$last_dir = $file_name;
}
return $tree_list;
}
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。