@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | final class EDU_SveaWebPay_Loader { |
| 58 | 58 | public function __construct() { |
| 59 | - add_action( 'plugins_loaded', array( $this, 'init' ) ); |
|
| 59 | + add_action( 'plugins_loaded', array ( $this, 'init' ) ); |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | public function init() { |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | require_once( __DIR__ . '/vendor/autoload.php' ); // Load dependencies |
| 65 | 65 | require_once( __DIR__ . '/class/class-edu-sveawebpay.php' ); |
| 66 | 66 | |
| 67 | - add_filter( 'edu_integrations', array( $this, 'add_integration' ) ); |
|
| 67 | + add_filter( 'edu_integrations', array ( $this, 'add_integration' ) ); |
|
| 68 | 68 | } |
| 69 | 69 | } |
| 70 | 70 | |
@@ -36,9 +36,9 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | |
| 38 | 38 | add_action( 'admin_init', 'checkForEduAdminPlugin' ); |
| 39 | -function checkForEduAdminPlugin() { |
|
| 40 | - if ( is_admin() && current_user_can( 'activate_plugins' ) && ! is_plugin_active( 'eduadmin/eduadmin.php' ) ) { |
|
| 41 | - add_action( 'admin_notices', function() { |
|
| 39 | +function checkForEduAdminPlugin() {
|
|
| 40 | + if ( is_admin() && current_user_can( 'activate_plugins' ) && ! is_plugin_active( 'eduadmin/eduadmin.php' ) ) {
|
|
| 41 | + add_action( 'admin_notices', function() {
|
|
| 42 | 42 | ?> |
| 43 | 43 | <div class="error"> |
| 44 | 44 | <p><?php _e( 'This plugin requires the EduAdmin-WordPress-plugin to be installed and activated.', 'eduadmin-sveawebpay' ); ?></p> |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | } ); |
| 47 | 47 | deactivate_plugins( plugin_basename( __FILE__ ) ); |
| 48 | 48 | |
| 49 | - if ( isset( $_GET['activate'] ) ) { |
|
| 49 | + if ( isset( $_GET['activate'] ) ) {
|
|
| 50 | 50 | unset( $_GET['activate'] ); |
| 51 | 51 | } |
| 52 | 52 | } |
@@ -54,13 +54,13 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | if ( ! class_exists( 'EDU_SveaWebPay_Loader' ) ): |
| 56 | 56 | |
| 57 | - final class EDU_SveaWebPay_Loader { |
|
| 58 | - public function __construct() { |
|
| 57 | + final class EDU_SveaWebPay_Loader {
|
|
| 58 | + public function __construct() {
|
|
| 59 | 59 | add_action( 'plugins_loaded', array( $this, 'init' ) ); |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | - public function init() { |
|
| 63 | - if ( class_exists( 'EDU_Integration' ) ) { |
|
| 62 | + public function init() {
|
|
| 63 | + if ( class_exists( 'EDU_Integration' ) ) {
|
|
| 64 | 64 | require_once( __DIR__ . '/vendor/autoload.php' ); // Load dependencies |
| 65 | 65 | require_once( __DIR__ . '/class/class-edu-sveawebpay.php' ); |
| 66 | 66 | |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | } |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | - public function add_integration( $integrations ) { |
|
| 71 | + public function add_integration( $integrations ) {
|
|
| 72 | 72 | $integrations[] = 'EDU_SveaWebPay'; |
| 73 | 73 | |
| 74 | 74 | return $integrations; |