コード例 #1
0
ファイル: templates.php プロジェクト: asalce/wp-ci
function wpci_template($default)
{
    log_message('debug', "Default template is {$default}");
    $template = $default;
    if (is_codeigniter()) {
        global $RTR;
        // application/class/action template
        if ($path = template_exists($RTR->fetch_app() . '/' . $RTR->fetch_class() . '/' . $RTR->fetch_method() . EXT)) {
            $template = $path;
        } else {
            if ($path = template_exists($RTR->fetch_app() . '/' . $RTR->fetch_class() . EXT)) {
                $template = $path;
            } else {
                if ($path = template_exists($RTR->fetch_class() . '/' . $RTR->fetch_method() . EXT)) {
                    $template = $path;
                } else {
                    if ($path = template_exists($RTR->fetch_class() . EXT)) {
                        $template = $path;
                    } else {
                        if ($path = template_exists($RTR->fetch_app() . EXT)) {
                            $template = $path;
                        } else {
                            if ($path = template_exists('codeigniter' . EXT)) {
                                $template = $path;
                            }
                        }
                    }
                }
            }
        }
    }
    log_message('debug', "Loading template {$template}");
    return $template;
}
コード例 #2
0
ファイル: WPCI.php プロジェクト: allviss/wp-ci
 static function wp_title($title, $sep, $seplocation)
 {
     return is_codeigniter() ? WPCI::get_title($sep, $seplocation) : $title;
 }