-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathliterally-wordpress.php
73 lines (62 loc) · 3.77 KB
/
literally-wordpress.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
/**
* Plugin Name: Litteraly WordPress
* Plugin URI: http://lwper.info
* Description: This plugin make your WordPress post object payable via PayPal and so on. ePub, PDF, MP3, Live ticket, Web-Magazine... What you sell is up to you.
* Author: Takahashi Fumiki<[email protected]>
* Version: 0.9.3.0
* Author URI: http://takahashifumiki.com
* Text Domain: literally-wordpress
* Domain Path: /language/
*/
//Check requirements.
if(version_compare(PHP_VERSION, '5.0') >= 0 && function_exists('curl_init')){
//Main class
require_once dirname(__FILE__).DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."literally-wordpress.php";
//Static
foreach(scandir(dirname(__FILE__).DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR.'statics') as $file){
if(preg_match("/^[^\.].*\.php/", $file)){
require_once dirname(__FILE__).DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR.'statics'.DIRECTORY_SEPARATOR.$file;
}
}
//Base class
require_once dirname(__FILE__).DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."base".DIRECTORY_SEPARATOR."literally-wordpress-common.php";
require_once dirname(__FILE__).DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."base".DIRECTORY_SEPARATOR."japanese-payment.php";
//Subclass
require_once dirname(__FILE__).DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."capability.php";
require_once dirname(__FILE__).DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."campaign.php";
require_once dirname(__FILE__).DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."refund-manager.php";
require_once dirname(__FILE__).DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."post.php";
require_once dirname(__FILE__).DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."form.php";
require_once dirname(__FILE__).DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."notifier.php";
require_once dirname(__FILE__).DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."subscription.php";
require_once dirname(__FILE__).DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."reward.php";
require_once dirname(__FILE__).DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."event.php";
require_once dirname(__FILE__).DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."ios.php";
//Payment Class
require_once dirname(__FILE__).DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."payment".DIRECTORY_SEPARATOR."softbank-payment.php";
require_once dirname(__FILE__).DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."payment".DIRECTORY_SEPARATOR."gmo.php";
/**
* Instance of Literally_WordPress
*
* @var Literally_WordPress
*/
$lwp = new Literally_WordPress();
//Load user functions.
require_once dirname(__FILE__).DIRECTORY_SEPARATOR."functions.php";
//For poedit scraping. It won't be executed.
if(false){
$lwp->_('Literally WordPress is activated but is not available. This plugin needs PHP version 5<. Your PHP version is %1$s.');
$lwp->_(' Furthermore, this plugin needs cURL module.');
$lwp->_(' Please contact to your server administrator to change server configuration.');
$lwp->_('This plugin make your WordPress post object payable via PayPal and so on. ePub, PDF, MP3, Live ticket, Web-Magazine... What you sell is up to you.');
}
}else{
load_plugin_textdomain('literally-wordpress', false, basename(__FILE__).DIRECTORY_SEPARATOR."language");
$error_msg = sprintf(__('Literally WordPress is activated but is not available. This plugin needs PHP version 5<. Your PHP version is %1$s.', 'literally-wordpress'), phpversion());
if(!function_exists('curl_init')){
$error_msg .= __(' Furthermore, this plugin needs cURL module.', 'literally-wordpress');
}
$error_msg .= __(' Please contact to your server administrator to change server configuration.');
add_action('admin_notices', create_function('', 'echo "<div id=\"message\" class=\"error\"><p><strong>'.$error_msg.'</strong></p></div>"; '));
}