PluginProbe
Leyka / 3.6
Leyka v3.6
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 3.6, at leyka.php

141 lines 5.2 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 /**
4 * Plugin Name: Leyka
5 * Plugin URI: https://leyka.te-st.ru/
6 * Description: The donations management system for your WP site
7 * Version: 3.6
8 * Author: Teplitsa of social technologies
9 * Author URI: https://te-st.ru
10 * Text Domain: leyka
11 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
12 * Contributors:
13 Lev "ahaenor" Zvyagintsev (ahaenor@gmail.com)
14 Anna "foralien" Ladoshkina (webdev@foralien.com)
15 Denis Cherniatev (denis.cherniatev@gmail.com)
16 Marie Borisyonok (pro100mary@gmail.com)
17 Vladimir Petrozavodsky (petrozavodsky@gmail.com)
18
19 * License: GPLv2 or later
20 Copyright (C) 2012-2019 by Teplitsa of Social Technologies (http://te-st.ru).
21
22 GNU General Public License, Free Software Foundation <http://www.gnu.org/licenses/gpl-2.0.html>
23
24 This program is free software; you can redistribute it and/or modify
25 it under the terms of the GNU General Public License as published by
26 the Free Software Foundation; either version 2 of the License, or
27 (at your option) any later version.
28
29 This program is distributed in the hope that it will be useful,
30 but WITHOUT ANY WARRANTY; without even the implied warranty of
31 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 GNU General Public License for more details.
33
34 You should have received a copy of the GNU General Public License
35 along with this program; if not, write to the Free Software
36 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
37 */
38
39 // Leyka plugin version:
40 if( !defined('LEYKA_VERSION') ) {
41 define('LEYKA_VERSION', '3.6');
42 }
43
44 // Plugin base file:
45 if( !defined('LEYKA_PLUGIN_BASE_FILE') ) {
46 define('LEYKA_PLUGIN_BASE_FILE', basename(__FILE__));
47 }
48
49 // Plugin base directory:
50 if( !defined('LEYKA_PLUGIN_DIR_NAME') ) {
51 define('LEYKA_PLUGIN_DIR_NAME', basename(dirname(__FILE__)));
52 }
53
54 // Plugin URL:
55 if( !defined('LEYKA_PLUGIN_BASE_URL') ) {
56 define('LEYKA_PLUGIN_BASE_URL', plugin_dir_url(__FILE__));
57 }
58
59 // Plugin DIR, with trailing slash:
60 if( !defined('LEYKA_PLUGIN_DIR') ) {
61 define('LEYKA_PLUGIN_DIR', plugin_dir_path(__FILE__));
62 }
63
64 // Plugin ID:
65 if( !defined('LEYKA_PLUGIN_INNER_SHORT_NAME') ) { // "leyka/leyka.php"
66 define('LEYKA_PLUGIN_INNER_SHORT_NAME', plugin_basename(__FILE__));
67 }
68
69 // Plugin support email:
70 if( !defined('LEYKA_SUPPORT_EMAIL') ) {
71 define('LEYKA_SUPPORT_EMAIL', 'support@te-st.ru,sidorenko.a@gmail.com');
72 }
73
74 if( !defined('LEYKA_DEBUG') ) {
75 define('LEYKA_DEBUG', false);
76 }
77
78 if( !defined('LEYKA_USAGE_STATS_DEV_SERVER_URL') ) {
79 define('LEYKA_USAGE_STATS_DEV_SERVER_URL', 'https://ngo2.ru/leyka-usage-stats/');
80 }
81
82 if( !defined('LEYKA_USAGE_STATS_PROD_SERVER_URL') ) {
83 define('LEYKA_USAGE_STATS_PROD_SERVER_URL', 'https://ls.te-st.ru/');
84 }
85
86 if(get_locale() === 'ru_RU') {
87 load_textdomain('leyka', dirname(realpath(__FILE__)).'/languages/leyka-ru_RU.mo'); // Load the lang. pack included
88 }
89 load_plugin_textdomain('leyka', false, basename(dirname(__FILE__)).'/languages/'); // Load the lang. pack by priority
90
91 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-tmp-translations.php');
92 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-functions.php');
93 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-class-options-controller.php');
94 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-polylang.php');
95 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-core.php');
96 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-gateways-api.php');
97 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-class-campaign.php');
98 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-class-donation.php');
99 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-class-donor.php');
100 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-class-payment-form.php');
101 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-class-template-controller.php');
102 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-ajax.php');
103 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-shortcodes.php');
104 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-widgets.php');
105 require_once(LEYKA_PLUGIN_DIR.'inc/leyka-hooks.php');
106 require_once(ABSPATH . 'wp-admin/includes/meta-boxes.php');
107
108 /** Automatically include all sub-dirs of /leyka/gateways/ */
109 $gateways_dir = dir(LEYKA_PLUGIN_DIR.'gateways/');
110 if( !$gateways_dir ) {
111 // ?..
112 } else {
113
114 while(false !== ($gateway_id = $gateways_dir->read())) {
115
116 $file_addr = LEYKA_PLUGIN_DIR."gateways/$gateway_id/leyka-class-$gateway_id-gateway.php";
117
118 if($gateway_id !== '.' && $gateway_id !== '..' && file_exists($file_addr)) {
119 require_once($file_addr);
120 }
121
122 }
123
124 $gateways_dir->close();
125
126 }
127
128 if(leyka_options()->opt('donor_accounts_available')) {
129 require_once(LEYKA_PLUGIN_DIR.'templates/account/template-tags.php');
130 }
131
132 function leyka_load_plugin_textdomain() {
133 load_plugin_textdomain('leyka', false, basename(dirname(__FILE__)).'/languages/');
134 }
135 add_action('plugins_loaded', 'leyka_load_plugin_textdomain');
136
137 register_activation_hook(__FILE__, array('Leyka', 'activate')); // Activation
138 //add_action('plugins_loaded', array('Leyka', 'activate')); // Any update needed
139 register_deactivation_hook(__FILE__, array('Leyka', 'deactivate')); // Deactivate
140
141 leyka(); // All systems go