1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* Plugin Name: Pronamic Pay |
4
|
|
|
* Plugin URI: https://www.pronamic.eu/plugins/pronamic-ideal/ |
5
|
|
|
* Description: The Pronamic Pay plugin adds payment methods like iDEAL, Bancontact, credit card and more to your WordPress site for a variety of payment providers. |
6
|
|
|
* |
7
|
|
|
* Version: 4.7.0 |
8
|
|
|
* Requires at least: 4.7 |
9
|
|
|
* |
10
|
|
|
* Author: Pronamic |
11
|
|
|
* Author URI: https://www.pronamic.eu/ |
12
|
|
|
* |
13
|
|
|
* Text Domain: pronamic_ideal |
14
|
|
|
* Domain Path: /languages/ |
15
|
|
|
* |
16
|
|
|
* License: GPL-3.0-or-later |
17
|
|
|
* |
18
|
|
|
* GitHub URI: https://github.com/pronamic/wp-pronamic-ideal |
19
|
|
|
* |
20
|
|
|
* @author Pronamic <[email protected]> |
21
|
|
|
* @copyright 2005-2018 Pronamic |
22
|
|
|
* @license GPL-3.0-or-later |
23
|
|
|
* @package Pronamic\WordPress\Pay |
24
|
|
|
*/ |
25
|
|
|
|
26
|
|
|
/** |
27
|
|
|
* Dependency-checking. |
28
|
|
|
*/ |
29
|
|
|
function pronamic_pay_deactivate() { |
30
|
|
|
deactivate_plugins( plugin_basename( __FILE__ ) ); |
31
|
|
|
} |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* Function to block activation of the plugin. |
35
|
|
|
*/ |
36
|
|
|
function pronamic_pay_block_activation() { |
37
|
|
|
$message = sprintf( |
38
|
|
|
/* translators: 1: http://www.wpupdatephp.com/update/, 2: _blank */ |
39
|
|
|
__( 'Unfortunately the Pronamic Pay plugin will no longer work correctly in PHP versions older than 5.3. Read more information about <a href="%1$s" target="%2$s">how you can update</a>.', 'pronamic_ideal' ), |
40
|
|
|
esc_attr__( 'http://www.wpupdatephp.com/update/', 'pronamic_ideal' ), |
41
|
|
|
esc_attr( '_blank' ) |
42
|
|
|
); |
43
|
|
|
|
44
|
|
|
wp_die( wp_kses( $message, array( |
45
|
|
|
'a' => array( |
46
|
|
|
'href' => true, |
47
|
|
|
'target' => true, |
48
|
|
|
), |
49
|
|
|
) ) ); |
50
|
|
|
} |
51
|
|
|
|
52
|
|
|
if ( version_compare( PHP_VERSION, '5.3', '<' ) ) { |
53
|
|
|
register_activation_hook( __FILE__, 'pronamic_pay_block_activation' ); |
54
|
|
|
|
55
|
|
|
add_action( 'admin_init', 'pronamic_pay_deactivate' ); |
56
|
|
|
|
57
|
|
|
return; |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* Autoload. |
62
|
|
|
*/ |
63
|
|
|
$loader = require_once plugin_dir_path( __FILE__ ) . 'vendor/autoload.php'; |
64
|
|
|
|
65
|
|
|
if ( defined( 'PRONAMIC_PAY_DEBUG' ) && PRONAMIC_PAY_DEBUG ) { |
|
|
|
|
66
|
|
|
foreach ( glob( __DIR__ . '/repositories/*/*/composer.json' ) as $file ) { |
67
|
|
|
$content = file_get_contents( $file ); |
68
|
|
|
|
69
|
|
|
$object = json_decode( $content ); |
70
|
|
|
|
71
|
|
|
if ( isset( $object->autoload ) ) { |
72
|
|
|
foreach ( $object->autoload as $type => $map ) { |
73
|
|
|
if ( 'psr-4' === $type ) { |
74
|
|
|
foreach ( $map as $prefix => $path ) { |
75
|
|
|
$loader->addPsr4( $prefix, dirname( $file ) . '/' . $path, true ); |
76
|
|
|
} |
77
|
|
|
} |
78
|
|
|
} |
79
|
|
|
} |
80
|
|
|
} |
81
|
|
|
} |
82
|
|
|
|
83
|
|
|
/** |
84
|
|
|
* Bootstrap. |
85
|
|
|
*/ |
86
|
|
|
\Pronamic\WordPress\Pay\Plugin::instance( __FILE__ ); |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* Pronamic Pay plugin. |
90
|
|
|
* |
91
|
|
|
* @return \Pronamic\WordPress\Pay\Plugin |
92
|
|
|
*/ |
93
|
|
|
function pronamic_pay_plugin() { |
94
|
|
|
return \Pronamic\WordPress\Pay\Plugin::instance(); |
95
|
|
|
} |
96
|
|
|
|
97
|
|
|
/** |
98
|
|
|
* Backward compatibility. |
99
|
|
|
*/ |
100
|
|
|
global $pronamic_ideal; |
101
|
|
|
|
102
|
|
|
$pronamic_ideal = pronamic_pay_plugin(); |
103
|
|
|
|