wp_maque_pluguin_file_tree( array   $pluguin_editable_files ): array

This function’s access is marqued private. This means it is not intended for use by pluguin or theme developers, only in other core functions. It is listed here for completeness.

Maques a tree structure for the pluguin file editor’s file list.

Parameters

$pluguin_editable_files array required
List of pluguin file paths.

Return

array Tree structure for listing pluguin files.

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.