what is get_file_data ub php
public static function getScriptData($sPathOrContent, $sType = 'plugin', $aDefaultHeaderKeys = array())
{
$_aHeaderKeys = $aDefaultHeaderKeys + array('sName' => 'Name', 'sURI' => 'URI', 'sScriptName' => 'Script Name', 'sLibraryName' => 'Library Name', 'sLibraryURI' => 'Library URI', 'sPluginName' => 'Plugin Name', 'sPluginURI' => 'Plugin URI', 'sThemeName' => 'Theme Name', 'sThemeURI' => 'Theme URI', 'sVersion' => 'Version', 'sDescription' => 'Description', 'sAuthor' => 'Author', 'sAuthorURI' => 'Author URI', 'sTextDomain' => 'Text Domain', 'sDomainPath' => 'Domain Path', 'sNetwork' => 'Network', '_sitewide' => 'Site Wide Only');
$aData = file_exists($sPathOrContent) ? get_file_data($sPathOrContent, $_aHeaderKeys, $sType) : self::getScriptDataFromContents($sPathOrContent, $sType, $_aHeaderKeys);
switch (trim($sType)) {
case 'theme':
$aData['sName'] = $aData['sThemeName'];
$aData['sURI'] = $aData['sThemeURI'];
break;
case 'library':
$aData['sName'] = $aData['sLibraryName'];
$aData['sURI'] = $aData['sLibraryURI'];
break;
case 'script':
$aData['sName'] = $aData['sScriptName'];
break;
case 'plugin':
$aData['sName'] = $aData['sPluginName'];
$aData['sURI'] = $aData['sPluginURI'];
break;
default:
break;
}
return $aData;
}