コード例 #1
0
<?php

/**
 * Plugin Name: Strata Bootstraper
 * Plugin URI: https://github.com/strata-mvc/strata/
 * Description: A bootstraper that hooks Strata into the project.
 * Version: 1.0.1
 * Author: Francois Faubert
 * Author URI: http://www.strata-framework.com/
 * License: Apache 2 License
 */
if (!is_blog_installed()) {
    return;
}
Strata\Strata::app()->run();
コード例 #2
0
<?php

/**
 * Do not edit this file. Edit the config files found in the config/ dir instead.
 * This file is required in the root directory so WordPress can find it.
 * WP is hardcoded to look in its own directory or one directory up for wp-config.php.
 */
require_once dirname(__DIR__) . '/vendor/autoload.php';
require_once dirname(__DIR__) . '/config/application.php';
$app = Strata\Strata::bootstrap(Strata\Strata::requireVendorAutoload());
$app->registerErrorHandler();
require_once ABSPATH . 'wp-settings.php';
コード例 #3
0
<?php

/*
Plugin Name: Polyglot
Plugin URI: http://polyglot.francoisfaubert.com/
Description: Wordpress localization
Version: 1.1
Author: Francois Faubert
Author URI: http://www.francoisfaubert.com
License: GPL3
*/
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
if (!class_exists("Strata\\Strata")) {
    throw new Exception("Polyglot Localization plugin is expected to be ran within a Strata environment.");
}
if (class_exists("Polyglot\\Plugin\\Adaptor\\PluginAdaptor")) {
    $plugin = new Polyglot\Plugin\Adaptor\PluginAdaptor(__FILE__);
    $plugin->addFilters();
} else {
    Strata\Strata::app()->log("Though Polyglot is enabled, it could not be loaded.", "[Plugins:Polyglot]");
}