After answering this question I wondered if it is possible to manipulate the dropdown list of possible page templates that's available when you edit a page. WordPress derives this list from the template files available in the root directory (like page.php
, page-onecolumn.php
, page-about-us.php
). It doesn´t seem to store the list in the database.
I could imagine there are legit reasons to want this, for instance if you have ten page templates, but you want to limit access to some of them for non-admin users. Or perhaps you want to create templates dynamically through an option page, so you want to extend the list.