WPDev.one
Core Function
View Source on Trac ↗

get_plugin_data()

get_plugin_data( mixed $plugin_file, mixed $markup = true, mixed $translate = true )

Parses the plugin contents to retrieve plugin's metadata.

Parameters 2 required

Name / Type Description
$plugin_file
string

Absolute path to the main plugin file.

Required
bool

$markup Optional. If the returned data should have HTML markup applied. Default true.

Required
$translate
bool

Optional. If the returned data should be translated. Default true.

Return Value

(array)
array { Plugin data. Values will be empty if not supplied by the plugin.

Function Information

Since Version
1.5.0
Source File
wp-admin/includes/plugin.php
Advertisement