コード例 #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

/*
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]");
}