blacksnotling / hdwsbbl-legacy

Old Code for the HDWSBBL website and team network - No longer maintained
hdwsbbl.co.uk
0 stars 0 forks source link

Make a function to query the plugins template directory for adhoc pages #45

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Once the bblm templates are within the plugin, they will not be accessible from 
the add.page menu. Most of the BBLM plugin can generate the pages using their 
own screens so adding the meta data needed is not an issue but there are some 
such as graveyard, statistics, results pages etc and possible future ones such 
as Hall of fame that need to use the custom templates.

For these I will need to create a custom meta box on the add / edit page 
screens so that the templates stored within the plugin are available. the code 
in the plugin that then checks the wp meta for the template needs to be updated 
to check this new additional meta key and load that template as the standard 
meta key won't be available.

The query should look in the bblm/templates folder and return the list of 
templates. the existing wp function get_page_templates() can be cloned and 
adapted for this purpose. a meta box function needs to be created along with a 
hook for when pages are saved / added (should be the same hook).

Original issue reported on code.google.com by blacksno...@gmail.com on 19 Oct 2011 at 9:51

GoogleCodeExporter commented 9 years ago

Original comment by blacksno...@gmail.com on 25 Oct 2011 at 10:29