get_plugins


get_plugins ( $plugin_folder = '' )

Parameters:
  • (string) $plugin_folder Optional. Relative path to single plugin folder.
Returns:
  • (array) Key is the plugin file path and the value is an array of the plugin data.
Defined at:

Description

Check the plugins directory and retrieve all plugin files with plugin data.

WordPress only supports plugin files in the base plugins directory (wp-content/plugins) and in one directory above the plugins directory (wp-content/plugins/my-plugin). The file it looks for has the plugin data and must be found in those two locations. It is recommended to keep your plugin files in their own directories.

The file with the plugin data is the file that will be included and therefore needs to have the main execution for the plugin. This does not mean everything must be contained in the file and it is recommended that the file be split for maintainability. Keep everything in one file for extreme optimization purposes.

Related Functions

get_mu_plugins, get_plugin_files, delete_plugins, get_links, wp_get_mu_plugins

Top Google Results

User discussions

wpseek mobile