I have, on an existing project, created a folder named
templates in the theme root directory where I have put all my custom template files, all the files that have the
Template Name: BlahBlahBlah in the top of the file.
This change broke places in the code where I had done this to get the file name:
get_post_meta( $post_id, '_wp_page_template', true );.
I fixed it like this:
basename(get_post_meta( $post_id, '_wp_page_template', true ));.
My question is if I broke something in WordPress by doing this change. Does anyone know?