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; }
static function wp_title($title, $sep, $seplocation) { return is_codeigniter() ? WPCI::get_title($sep, $seplocation) : $title; }