Ejemplo n.º 1
0
function theme_include_lib($name)
{
    if (function_exists('locate_template')) {
        locate_template(array('library/' . $name), true);
    } else {
        theme_locate_template(array('library/' . $name), true);
    }
}
Ejemplo n.º 2
0
 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);
 }