Plugin_Upgrader::plugin_info()
Retrieve the path to the file that contains the plugin info.
Description Description
This isn’t used internally in the class, but is called by the skins.
Return Return
(string|false) The full path to the main plugin file, or false.
Source Source
File: wp-admin/includes/class-plugin-upgrader.php
public function plugin_info() { if ( ! is_array( $this->result ) ) { return false; } if ( empty( $this->result['destination_name'] ) ) { return false; } $plugin = get_plugins( '/' . $this->result['destination_name'] ); //Ensure to pass with leading slash if ( empty( $plugin ) ) { return false; } $pluginfiles = array_keys( $plugin ); //Assume the requested plugin is the first in the list return $this->result['destination_name'] . '/' . $pluginfiles[0]; }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
2.8.0 | Introduced. |