theme-editor non functional whith a child theme
|Reported by:||YS1||Owned by:|
I just created a simple child theme, named ys, before upgrading my Twentythirteen theme.
Since I have started using this child theme, I cannot use the built-in theme editor : loading wp-admin/theme-editor.php brings a message "Désolé, on ne peut pas modifier les fichiers avec « .. » dans le nom.", which in admin-fr_FR.po is
"Sorry, can’t edit files with “..” in the name. If you are "
"trying to edit a file in your WordPress home directory, you can just type "
"the name of the file in."
This seems to be fired from line 76 of theme-editor.php. Further investigation shows that the default file that the editor tries to display is wp-content/themes/ys/./style.css.
The presence of "./" in the path is disliked by validate_file() in wp-includes/functions.php
It seems to come from the fact that WP_Theme::get_stylesheet_directory() returns "wp-content/themes/ys/." (with the dot at the end) when called on my child theme.