Skip to content
Snippets Groups Projects
Commit fff4e589 authored by Krzysiek's avatar Krzysiek
Browse files

Requirements class adjusted to PHP <5.4

parent b5d30c6a
No related branches found
No related tags found
1 merge request!1Devel 1.10 - Wymagana wersja PHP i Wordpress
......@@ -60,7 +60,7 @@ if ( ! class_exists( 'WPDesk_Requirement_Checker_1_10' ) ) {
* Should be used when you want to check if others plugin are loaded (WC for example)
*/
public function check_requirements_and_load_plugin_deferred() {
add_action( "plugins_loaded", [ $this, "check_requirements_and_load_plugin" ] );
add_action( "plugins_loaded", array( $this, "check_requirements_and_load_plugin" ) );
}
/**
......@@ -157,9 +157,9 @@ if ( ! class_exists( 'WPDesk_Requirement_Checker_1_10' ) ) {
* @return string mixed
*/
private function extract_plugin_title_from_header( $file ) {
$plugin_data = get_file_data( $file, [
$plugin_data = get_file_data( $file, array(
'title' => 'Plugin Name'
] );
) );
return $plugin_data['title'];
}
......@@ -268,8 +268,8 @@ if ( ! class_exists( 'WPDesk_Requirement_Checker_1_10' ) ) {
* @return void
*/
public function disable_plugin_render_notice() {
add_action( 'admin_notices', [ $this, 'deactivate_action' ] );
add_action( 'admin_notices', [ $this, 'render_notices_action' ] );
add_action( 'admin_notices', array( $this, 'deactivate_action' ) );
add_action( 'admin_notices', array( $this, 'render_notices_action' ) );
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment