WPDev.one
Core Function
View Source on Trac ↗

get_file_data()

get_file_data( mixed $file, mixed $default_headers, mixed $context = '' )

Retrieves metadata from a file.

Parameters 3 required

Name / Type Description
$file
string

Absolute path to the file.

Required
$default_headers
array

List of headers, in the format `array( 'HeaderKey' => 'Header Name' )`.

Required
string

$context Optional. If specified adds filter hook {@see 'extra_$context_headers'}. Default empty string.

Required

Return Value

(string[])
Array of file header values keyed by header name.

Function Information

Since Version
2.9.0
Source File
wp-includes/functions.php
Advertisement