forked from megumiteam/staticpress-s3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugin.php
49 lines (41 loc) · 1.71 KB
/
plugin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
/*
Plugin Name: StaticPress S3
Author: wokamoto
Plugin URI: https://github.com/megumiteam/staticpress-s3
Description: StaticPress -> S3.
Version: 0.1.1
Author URI: http://www.digitalcube.jp/
Text Domain: static-press-S3
Domain Path: /languages
License:
Released under the GPL license
http://www.gnu.org/copyleft/gpl.html
Copyright 2013 (email : [email protected])
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
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
*/
add_action('plugins_loaded', function(){
global $staticpress;
if (!isset($staticpress))
return;
if (!class_exists('S3_helper'))
require(dirname(__FILE__).'/includes/class-S3_helper.php');
if (!class_exists('staticpress_s3_admin'))
require(dirname(__FILE__).'/includes/class-staticpress_s3_admin.php');
if (!class_exists('staticpress_s3'))
require(dirname(__FILE__).'/includes/class-staticpress_s3.php');
//load_plugin_textdomain(staticpress_s3_admin::TEXT_DOMAIN, false, dirname(plugin_basename(__FILE__)) . '/languages/');
new staticpress_s3(staticpress_s3_admin::get_option());
if (is_admin())
new staticpress_s3_admin();
});