PluginProbe
Leyka / 2.3.9
Leyka v2.3.9
3.32.3 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.6.1 2.3.7 2.3.8 2.3.9 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1 3.10 3.11 3.11.1 3.12 3.13 3.14 3.15 3.16 3.17 All 89 releases
leyka / leyka.php

leyka.php in Leyka 2.3.9, at leyka.php

122 lines 5.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if( !defined('WPINC') ) die; // If this file is called directly, abort
2 /**
3 * Plugin Name: Leyka
4 * Plugin URI: https://leyka.te-st.ru/
5 * Description: The donations management system for your WP site
6 * Version: 2.3.9
7 * Author: Teplitsa of social technologies
8 * Author URI: https://te-st.ru
9 * Text Domain: leyka
10 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
11 * Contributors:
12 Lev "ahaenor" Zvyagintsev (ahaenor@gmail.com)
13 Anna "foralien" Ladoshkina (webdev@foralien.com)
14 Denis Cherniatev (denis.cherniatev@gmail.com)
15 Marie Borisyonok (pro100mary@gmail.com)
16 Vladimir Petrozavodsky (petrozavodsky@gmail.com)
17
18 * License: GPLv2 or later
19 Copyright (C) 2012-2018 by Teplitsa of Social Technologies (http://te-st.ru).
20
21 GNU General Public License, Free Software Foundation <http://www.gnu.org/licenses/gpl-2.0.html>
22
23 This program is free software; you can redistribute it and/or modify
24 it under the terms of the GNU General Public License as published by
25 the Free Software Foundation; either version 2 of the License, or
26 (at your option) any later version.
27
28 This program is distributed in the hope that it will be useful,
29 but WITHOUT ANY WARRANTY; without even the implied warranty of
30 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 GNU General Public License for more details.
32
33 You should have received a copy of the GNU General Public License
34 along with this program; if not, write to the Free Software
35 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
36 */
37
38 // Leyka plugin version:
39 if( !defined('LEYKA_VERSION') ) {
40 define('LEYKA_VERSION', '2.3.9');
41 }
42
43 // Plugin base file:
44 if( !defined('LEYKA_PLUGIN_BASE_FILE') ) { // "leyka.php"
45 define('LEYKA_PLUGIN_BASE_FILE', basename(__FILE__));
46 }
47
48 // Plugin base directory:
49 if( !defined('LEYKA_PLUGIN_DIR_NAME') ) { // Most commonly, "leyka"
50 define('LEYKA_PLUGIN_DIR_NAME', basename(dirname(__FILE__)));
51 }
52
53 // Plugin URL:
54 if( !defined('LEYKA_PLUGIN_BASE_URL') ) {
55 define('LEYKA_PLUGIN_BASE_URL', plugin_dir_url(__FILE__));
56 }
57
58 // Plugin DIR, with trailing slash:
59 if( !defined('LEYKA_PLUGIN_DIR') ) {
60 define('LEYKA_PLUGIN_DIR', plugin_dir_path(__FILE__));
61 }
62
63 // Plugin ID:
64 if( !defined('LEYKA_PLUGIN_INNER_SHORT_NAME') ) { // "leyka/leyka.php"
65 define('LEYKA_PLUGIN_INNER_SHORT_NAME', plugin_basename(__FILE__));
66 }
67
68 // Plugin support email:
69 if( !defined('LEYKA_SUPPORT_EMAIL') ) {
70 define('LEYKA_SUPPORT_EMAIL', 'support@te-st.ru,sidorenko.a@gmail.com');
71 }
72
73 // Environment checks. If some failed, deactivate the plugin to save WP from possible crushes:
74 if( !defined('PHP_VERSION') || version_compare(PHP_VERSION, '5.3.0', '<') ) {
75
76 echo '<div id="message" class="error"><p><strong>Внимание:</strong> версия PHP ниже <strong>5.3.0</strong>. Лейка нуждается в PHP �
77 отя бы <strong>версии 5.3.0</strong>, чтобы работать корректно. Плагин будет деактивирован.<br /><br />Пожалуйста, направьте вашему �
78 остинг-провайдеру запрос на повышение версии PHP для этого сайта.</p> <p><strong>Warning:</strong> your PHP version is below <strong>5.3.0</strong>. Leyka needs PHP <strong>v5.3.0</strong> or later to work. Plugin will be deactivated.<br /><br />Please contact your hosting provider to upgrade your PHP version.</p></div>';
79
80 die();
81
82 }
83
84 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-tmp-translations.php');
85 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-functions.php');
86 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-class-options-controller.php');
87 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-polylang.php');
88 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-core.php');
89 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-gateways-api.php');
90 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-class-campaign.php');
91 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-class-donation.php');
92 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-class-payment-form.php');
93 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-class-template-controller.php');
94 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-ajax.php');
95 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-shortcodes.php');
96 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-widgets.php');
97 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-hooks.php');
98
99 /** Automatically include all sub-dirs of /leyka/gateways/ */
100 $gateways_dir = dir(LEYKA_PLUGIN_DIR.'gateways/');
101 if( !$gateways_dir ) {
102 // ?..
103 } else {
104
105 while(false !== ($gateway_id = $gateways_dir->read())) {
106
107 $file_addr = LEYKA_PLUGIN_DIR."gateways/$gateway_id/leyka-class-$gateway_id-gateway.php";
108
109 if($gateway_id != '.' && $gateway_id != '..' && file_exists($file_addr)) {
110 require_once($file_addr);
111 }
112 }
113
114 $gateways_dir->close();
115
116 }
117
118 register_activation_hook(__FILE__, array('Leyka', 'activate')); // Activation
119 add_action('plugins_loaded', array('Leyka', 'activate')); // Any update needed
120 register_deactivation_hook(__FILE__, array('Leyka', 'deactivate')); // Deactivate
121
122 leyka(); // All systems go