<?php defined('SYSPATH') or die('No direct script access.'); // Render Debugger Toolbar on the end of application execution if (Kohana::$config->load('debugger.register_shutdown_function') === true) { Debugger::init(); register_shutdown_function(array('Debugger', 'shutdown')); }
/** * * * @since 1.5 */ public static function launch($loader_path) { if (self::$plugin) { wp_die(__('Cheatin’ huh?')); } self::$plugin = new self($loader_path); if (WP_DEBUG) { include self::$plugin->dirPath . '/debugger/debugger.class.php'; self::$debugger = Debugger::init('SiteTree', self::$plugin->dirPath); } if (version_compare(get_bloginfo('version'), self::MIN_WP_VERSION, '<')) { self::$plugin->registerFatalError(sprintf(__('To run %s you need at least WordPress %s. Please, update your WordPress installation to ' . 'the %slatest version%s available.', 'sitetree'), 'SiteTree', self::MIN_WP_VERSION, '<a href="http://wordpress.org/download/" target="_blank">', '</a>')); add_action('plugins_loaded', array(self::$plugin, 'loadTextdomain')); return -1; } global $pagenow; switch ($pagenow) { case 'wp-cron.php': add_action('sitetree_ping', array(self::$plugin->pingController(), 'ping')); // During cron we load the bare minimum, so all works faster. return 2; case 'plugins.php': register_activation_hook($loader_path, array(self::$plugin, 'activate')); } add_action('init', array(self::$plugin, 'finishLaunching')); }
<?php date_default_timezone_set('UTC'); $debugger = __DIR__ . '/../vendor/crisu83/yii-debug/helpers/Debugger.php'; require_once $debugger; Debugger::init(__DIR__ . '/../app/runtime/debug'); $yii = __DIR__ . '/../vendor/yiisoft/yii/framework/yii.php'; $global = __DIR__ . '/../app/helpers/global.php'; $builder = __DIR__ . '/../vendor/crisu83/yii-configbuilder/helpers/ConfigBuilder.php'; require_once $yii; require_once $global; require_once $builder; $config = ConfigBuilder::buildForEnv(array(__DIR__ . '/../app/config/main.php', __DIR__ . '/../app/config/web.php', __DIR__ . '/../app/config/environments/{environment}.php', __DIR__ . '/../app/config/local.php'), __DIR__ . '/../app/runtime/environment'); Yii::createWebApplication($config)->run();