コード例 #1
0
 *
 * @package     SimpleCalendar
 * @copyright   2015 Moonstone Media/Phil Derksen. All rights reserved.
 */
// Exit if accessed directly.
if (!defined('ABSPATH')) {
    exit;
}
// Composer fallback for PHP < 5.3.0.
if (version_compare(PHP_VERSION, '5.3.0') === -1) {
    include_once 'vendor/autoload_52.php';
} else {
    include_once 'vendor/autoload.php';
}
// Plugin constants.
$this_plugin_path = trailingslashit(dirname(__FILE__));
$this_plugin_dir = plugin_dir_url(__FILE__);
$this_plugin_constants = array('SIMPLE_CALENDAR_VERSION' => '3.0.8', 'SIMPLE_CALENDAR_MAIN_FILE' => __FILE__, 'SIMPLE_CALENDAR_URL' => $this_plugin_dir, 'SIMPLE_CALENDAR_ASSETS' => $this_plugin_dir . 'assets/', 'SIMPLE_CALENDAR_PATH' => $this_plugin_path, 'SIMPLE_CALENDAR_INC' => $this_plugin_path . 'includes/');
foreach ($this_plugin_constants as $constant => $value) {
    if (!defined($constant)) {
        define($constant, $value);
    }
}
// Check plugin requirements before loading plugin.
$this_plugin_checks = new WP_Requirements('Simple Calendar', plugin_basename(__FILE__), array('PHP' => '5.3.0', 'WordPress' => '4.0.0', 'Extensions' => array('curl', 'mbstring')));
if ($this_plugin_checks->pass() === false) {
    $this_plugin_checks->halt();
    return;
}
// Load plugin.
include_once 'includes/main.php';
コード例 #2
0
	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License, version 2, as
	published by the Free Software Foundation.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program; if not, write to the Free Software
	Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/
/**
 * WP CAS Server main plugin file.
 *
 * @version 1.2.0
 */
if (!defined('WPINC')) {
    die;
}
require_once dirname(__FILE__) . '/wp-requirements.php';
$wp_cas_server_requirements = new WP_Requirements(__('Cassava CAS Server', 'wp-cas-server'), plugin_basename(__FILE__), array('PHP' => '5.3.2', 'WordPress' => '3.9.0', 'Extensions' => array('libxml')));
if ($wp_cas_server_requirements->pass() === false) {
    $wp_cas_server_requirements->halt();
    return;
}
if (file_exists(dirname(__FILE__) . '/vendor/autoload.php')) {
    require_once dirname(__FILE__) . '/vendor/autoload.php';
}
require_once dirname(__FILE__) . '/plugin.php';