get_file_data
get_file_data ( $file, $default_headers, $context = '' )
Parameters:- (string) file Absolute path to the file.
- (array) default_headers List of headers, in the format `array( 'HeaderKey' => 'Header Name' )`.
- (string) context Optional. If specified adds filter hook {@see 'extra_$context_headers'}. Default empty string.
Links:Returns:- (string[]) Array of file header values keyed by header name.
Defined at: - Introduced in WordPress: 2.9.0
- Deprecated in WordPress: —
Description
Retrieves metadata from a file.Searches for metadata in the first 8 KB of a file, such as a plugin or theme.
Each piece of metadata must be on its own line. Fields can not span multiple
lines, the value will get cut at the end of the first line.
If the file data is not within that first 8 KB, then the author should correct
their plugin file and move the data headers to the top.