Beispiel #1
0
    // theme MUST be present in /wp-content/themes
    // plugins from /wp-content/plugins will take precedent
    // todo wp-plugins not supported yet in this plugins folder
    extract($loader->load(file_get_contents($content_config)));
    extract(${$env}['enable_db']);
}
$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;