Skip to content
Snippets Groups Projects
Commit 0a4b2cc9 authored by dyszczo's avatar dyszczo
Browse files

plugin name in constructor

parent edc576cd
No related branches found
No related tags found
1 merge request!1alpha version of requirement checker basic plugin info
This commit is part of merge request !1. Comments created here will be created in the context of that merge request.
......@@ -30,14 +30,14 @@ class WPDesk_Basic_Requirement_Checker {
private $notices;
/**
* @param $plugin_file
* @param $php_version
* @param $wp_version
* @param string|null $wc_version
* @param string $plugin_file
* @param string $plugin_name
* @param string $php_version
* @param string $wp_version
*/
public function __construct( $plugin_file, $php_version, $wp_version ) {
public function __construct( $plugin_file, $plugin_name, $php_version, $wp_version ) {
$this->plugin_file = $plugin_file;
$this->plugin_name = $this->extract_plugin_title_from_header( $plugin_file );
$this->plugin_name = $plugin_name;
$this->set_min_php_require( $php_version );
$this->set_min_wp_require( $wp_version );
......@@ -124,19 +124,6 @@ class WPDesk_Basic_Requirement_Checker {
return $this;
}
/**
* @param string $file
*
* @return string mixed
*/
private function extract_plugin_title_from_header( $file ) {
$plugin_data = get_file_data( $file, array(
'title' => 'Plugin Name'
) );
return $plugin_data['title'];
}
/**
* @return bool
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment