includes/class-wp-requirements.php
protected function set_plugin( $the__file__ ) {
		if ( ! function_exists( 'get_plugins' ) ) {
			/* @noinspection PhpIncludeInspection */
			require_once ABSPATH . 'wp-admin/includes/plugin.php';
		}

		$this->plugin['fullpath'] = $the__file__;
		$this->plugin['basename'] = plugin_basename( $this->plugin['fullpath'] );
		list( $this->plugin['dirname'], $this->plugin['filename'] ) = explode( '/', $this->plugin['basename'] );

		$plugin_data          = get_plugin_data( $this->plugin['fullpath'] );
		$this->plugin['name'] = $plugin_data['Name'];
	}
protected function set_plugin( $the__file__ ) {
		if ( ! function_exists( 'get_plugins' ) ) {
			/* @noinspection PhpIncludeInspection */
			require_once ABSPATH . 'wp-admin/includes/plugin.php';
		}

		$this->plugin['fullpath'] = $the__file__;
		$this->plugin['basename'] = plugin_basename( $this->plugin['fullpath'] );
		list( $this->plugin['dirname'], $this->plugin['filename'] ) = explode( '/', $this->plugin['basename'] );

		$plugin_data          = get_plugin_data( $this->plugin['fullpath'] );
		$this->plugin['name'] = $plugin_data['Name'];
	}
protected function set_plugin ( $ the__file__ ) { if ( ! function_exists ( 'get_plugins' ) ) { /* @noinspection PhpIncludeInspection */ require_once ABSPATH . 'wp-admin/includes/plugin.php' ; } $ this -> plugin [ 'fullpath' ] = $ the__file__ ; $ this -> plugin [ 'basename' ] = plugin_basename ( $ this -> plugin [ 'fullpath' ] ) ; list ( $ this -> plugin [ 'dirname' ] , $ this -> plugin [ 'filename' ] ) = explode ( '/' , $ this -> plugin [ 'basename' ] ) ; $ plugin_data = get_plugin_data ( $ this -> plugin [ 'fullpath' ] ) ; $ this -> plugin [ 'name' ] = $ plugin_data [ 'Name' ] ; }
Set paths, name etc for a plugin

@param string $the__file__ Pass `__FILE__` from the loader through Constructor.
Set paths name etc for a plugin