johnbintz / comicpress-2.8

ComicPress 2.8
http://comicpress.org/
5 stars 1 forks source link

Child theme partials... comicpress_check_child_file() #25

Closed mindfaucet closed 15 years ago

mindfaucet commented 15 years ago

In functions.php should the extensions on the filenames here be .inc rather than .php to coincide with existing ComicPress file naming?


function comicpress_check_child_file($filename = '') { if (empty($filename)) return false; if (get_stylesheet_directory() != get_template_directory()) { if (file_exists(get_stylesheet_directory() .'/'. $filename . '.php')) { return include(get_stylesheet_directory() .'/'. $filename . '.php'); } } return false; }

Frumph commented 15 years ago

the inc means it's auto included with special code for the classes in the functions.php so that the classes are read and registered all at once, of course I could be totally wrong, John confuses the hell out of me with elaborate code sometimes..

johnbintz commented 15 years ago

Yes, they should be .inc for security purposes. No, .inc does not mean "auto-included". Lines 238-256 of functions.php does the inclusion. Change the value of the "functions" key to "inc" to get that to work. Yes, the "elaborate code" is necessary to cut down on copy/pasted solutions.

Frumph commented 15 years ago

closing