コード例 #1
0
ファイル: plugin.php プロジェクト: rebeccayshen/kitlist
define('CRED_LOCALE_PATH', CRED_PLUGIN_PATH);
if (!defined('WPT_LOCALIZATION')) {
    require_once CRED_PLUGIN_PATH . '/toolset/toolset-common/localization/wpt-localization.php';
}
new WPToolset_Localization('wp-cred', CRED_LOCALE_PATH, 'wp-cred-%s');
// Path to common code
if (!defined('WPTOOLSET_COMMON_PATH')) {
    define('WPTOOLSET_COMMON_PATH', CRED_PLUGIN_PATH . '/toolset/toolset-common');
}
// include loader
include CRED_PLUGIN_PATH . '/loader.php';
if (function_exists('plugins_url')) {
    define('CRED_PLUGIN_URL', plugins_url() . '/' . CRED_PLUGIN_FOLDER);
} else {
    // determine plugin url manually, as robustly as possible
    define('CRED_PLUGIN_URL', CRED_Loader::getFileUrl(CRED_FILE_PATH));
}
define('CRED_FILE_URL', CRED_PLUGIN_URL . '/' . CRED_FILE_NAME);
define('CRED_ASSETS_URL', CRED_PLUGIN_URL . '/assets');
// load on the go resources
require_once CRED_PLUGIN_PATH . '/toolset/onthego-resources/loader.php';
onthego_initialize(CRED_PLUGIN_PATH . '/toolset/onthego-resources/', CRED_PLUGIN_URL . '/toolset/onthego-resources/');
// whether to try to load assets in concatenated form, much faster
// tested on single site/multisite subdomains/multisite subfolders
if (!defined('CRED_CONCAT_ASSETS')) {
    define('CRED_CONCAT_ASSETS', false);
}
// I've disabled this as it was causing compatibility issues with font-awesome in Views 1.3
// enable CRED_DEBUG, on top of this file
/* cred_log($_SERVER);
  cred_log(CRED_Loader::getDocRoot());