-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathplugin-wrapper.php
More file actions
61 lines (48 loc) · 1.87 KB
/
Copy pathplugin-wrapper.php
File metadata and controls
61 lines (48 loc) · 1.87 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
<?php
/*
Plugin Name: Amazon S3 Media
Plugin URI:
Description: Use Amazon S3 to store all your uploads (non-database media).
Version: 1.0
Author: Timothy Wood (@codearachnid)
Author URI: http://www.codearachnid.com
Author Email: tim@imaginesimplicity.com
Text Domain: s3media
License: GPLv2 or later
Notes: THIS FILE IS FOR LOADING THE LIBS ONLY
License:
Copyright 2011 Imagine Simplicity (tim@imaginesimplicity.com)
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
*/
if ( !defined( 'ABSPATH' ) )
die( '-1' );
/**
* Include required files to get this show on the road
*/
require_once 'wp-s3media.php';
require_once 'class/s3media_option.php';
require_once 'class/S3.php';
//require_once 'class/s3media_aws.php'; // not using it for now due to issue with use
/**
* Add action 'plugins_loaded' to instantiate main class.
*
* @return void
*/
function s3media_load() {
if ( apply_filters( 's3media_pre_check', class_exists( 's3media' ) && s3media::prerequisites() ) ) {
add_action( 'init', array( 's3media', 'instance' ), -100, 0 );
} else {
// let the user know prerequisites weren't met: Wrong Versions
add_action( 'admin_head', array( 's3media', 'min_version_fail_notice' ), 0, 0 );
}
}
add_action( 'plugins_loaded', 's3media_load', 1 ); // high priority so that it's not too late for addon overrides