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: 5.1.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 plugin_dir_path( __FILE__ ) . 'vendor/autoload.php'; |
||
64 | |||
65 | if ( ! defined( 'PRONAMIC_PAY_DEBUG' ) ) { |
||
66 | define( 'PRONAMIC_PAY_DEBUG', false ); |
||
67 | } |
||
68 | |||
69 | if ( PRONAMIC_PAY_DEBUG ) { |
||
70 | foreach ( glob( __DIR__ . '/repositories/*/*/composer.json' ) as $file ) { |
||
71 | $content = file_get_contents( $file ); |
||
72 | |||
73 | $object = json_decode( $content ); |
||
74 | |||
75 | if ( isset( $object->autoload ) ) { |
||
76 | foreach ( $object->autoload as $type => $map ) { |
||
77 | if ( 'psr-4' === $type ) { |
||
78 | foreach ( $map as $prefix => $path ) { |
||
79 | $loader->addPsr4( $prefix, dirname( $file ) . '/' . $path, true ); |
||
80 | } |
||
81 | } |
||
82 | } |
||
83 | } |
||
84 | } |
||
85 | } |
||
86 | |||
87 | /** |
||
88 | * Bootstrap. |
||
89 | */ |
||
90 | \Pronamic\WordPress\Pay\Plugin::instance( array( |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
91 | 'file' => __FILE__, |
||
92 | 'version' => '5.1.0', |
||
93 | 'extensions' => array( |
||
94 | '\Pronamic\WordPress\Pay\Extensions\Charitable\Extension::bootstrap', |
||
95 | '\Pronamic\WordPress\Pay\Extensions\Give\Extension::bootstrap', |
||
96 | '\Pronamic\WordPress\Pay\Extensions\WooCommerce\Extension::bootstrap', |
||
97 | '\Pronamic\WordPress\Pay\Extensions\GravityForms\Extension::bootstrap', |
||
98 | '\Pronamic\WordPress\Pay\Extensions\Shopp\Extension::bootstrap', |
||
99 | '\Pronamic\WordPress\Pay\Extensions\Jigoshop\Extension::bootstrap', |
||
100 | '\Pronamic\WordPress\Pay\Extensions\WPeCommerce\Extension::bootstrap', |
||
101 | '\Pronamic\WordPress\Pay\Extensions\ClassiPress\Extension::bootstrap', |
||
102 | '\Pronamic\WordPress\Pay\Extensions\EventEspressoLegacy\Extension::bootstrap', |
||
103 | '\Pronamic\WordPress\Pay\Extensions\EventEspresso\Extension::bootstrap', |
||
104 | '\Pronamic\WordPress\Pay\Extensions\AppThemes\Extension::bootstrap', |
||
105 | '\Pronamic\WordPress\Pay\Extensions\S2Member\Extension::bootstrap', |
||
106 | '\Pronamic\WordPress\Pay\Extensions\Membership\Extension::bootstrap', |
||
107 | '\Pronamic\WordPress\Pay\Extensions\EasyDigitalDownloads\Extension::bootstrap', |
||
108 | '\Pronamic\WordPress\Pay\Extensions\IThemesExchange\Extension::bootstrap', |
||
109 | '\Pronamic\WordPress\Pay\Extensions\MemberPress\Extension::bootstrap', |
||
110 | '\Pronamic\WordPress\Pay\Extensions\FormidableForms\Extension::bootstrap', |
||
111 | '\Pronamic\WordPress\Pay\Extensions\RestrictContentPro\Extension::bootstrap', |
||
112 | ), |
||
113 | ) ); |
||
114 | |||
115 | /** |
||
116 | * Pronamic Pay plugin. |
||
117 | * |
||
118 | * @return \Pronamic\WordPress\Pay\Plugin |
||
119 | */ |
||
120 | function pronamic_pay_plugin() { |
||
121 | return \Pronamic\WordPress\Pay\Plugin::instance(); |
||
122 | } |
||
123 | |||
124 | /** |
||
125 | * Backward compatibility. |
||
126 | */ |
||
127 | global $pronamic_ideal; |
||
128 | |||
129 | $pronamic_ideal = pronamic_pay_plugin(); |
||
130 |