コード例 #1
0
ファイル: submit.php プロジェクト: axeljohansson1988/oddcv
function get_root_path()
{
    return find_wp_config_path();
}
コード例 #2
0
<?php

function find_wp_config_path()
{
    $dir = dirname(__FILE__);
    do {
        if (file_exists($dir . "/wp-config.php")) {
            return $dir;
        }
    } while ($dir = realpath("{$dir}/.."));
    return null;
}
if (!function_exists('add_action')) {
    include_once find_wp_config_path() . '/wp-load.php';
}
class Render
{
    function view($file_name, $data = null)
    {
        if (is_array($data)) {
            extract($data);
        }
        include WP_EGRIDS_PATH . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . $file_name;
        //if(isset($_SESSION['quiz_flash'])){ unset($_SESSION['quiz_flash']); }
    }
}