function theme_include_lib($name) { if (function_exists('locate_template')) { locate_template(array('library/' . $name), true); } else { theme_locate_template(array('library/' . $name), true); } }
function get_template_part($slug, $name = null) { do_action("get_template_ptheme_{$slug}", $slug, $name); $templates = array(); if (isset($name)) { $templates[] = "{$slug}-{$name}.php"; } $templates[] = "{$slug}.php"; theme_locate_template($templates, true, false); }