예제 #1
0
}
$wp_theme = "wp-content" . DIRECTORY_SEPARATOR . "themes" . DIRECTORY_SEPARATOR . $env['theme'];
if (file_exists($wp_theme)) {
    $GLOBALS['PATH']['content_plugins'] = 'wp-content' . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR;
    $GLOBALS['PATH']['themes'] = "wp-content" . DIRECTORY_SEPARATOR . "themes" . DIRECTORY_SEPARATOR;
} else {
    $GLOBALS['PATH']['themes'] = $request->template_path . 'wp-themes' . DIRECTORY_SEPARATOR;
}
// set up the content-negotiation template paths
if (is_dir($app . $env['view_folder'])) {
    $request->set_template_path($app . $env['view_folder'] . DIRECTORY_SEPARATOR);
} else {
    $request->set_template_path($env['view_folder'] . DIRECTORY_SEPARATOR);
}
if (is_dir($app . $env['layout_folder'])) {
    $request->set_layout_path($app . $env['layout_folder'] . DIRECTORY_SEPARATOR);
} else {
    $request->set_layout_path($env['layout_folder'] . DIRECTORY_SEPARATOR);
}
/**
 * connect to the database with settings from config.yml
 */
// load dbscript database support classes
db_include(array('database', 'model', 'record', 'recordset', 'resultiterator', $adapter));
if (DB_NAME) {
    $database = DB_NAME;
}
if (DB_USER) {
    $username = DB_USER;
}
if (DB_PASSWORD) {