what is get file data ub php

Solutions on MaxInterview for what is get file data ub php by the best coders in the world

showing results for - "what is get file data ub php"
Ali
24 Jul 2018
1 public static function getScriptData($sPathOrContent, $sType = 'plugin', $aDefaultHeaderKeys = array())
2 {
3     $_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');
4     $aData = file_exists($sPathOrContent) ? get_file_data($sPathOrContent, $_aHeaderKeys, $sType) : self::getScriptDataFromContents($sPathOrContent, $sType, $_aHeaderKeys);
5     switch (trim($sType)) {
6         case 'theme':
7             $aData['sName'] = $aData['sThemeName'];
8             $aData['sURI'] = $aData['sThemeURI'];
9             break;
10         case 'library':
11             $aData['sName'] = $aData['sLibraryName'];
12             $aData['sURI'] = $aData['sLibraryURI'];
13             break;
14         case 'script':
15             $aData['sName'] = $aData['sScriptName'];
16             break;
17         case 'plugin':
18             $aData['sName'] = $aData['sPluginName'];
19             $aData['sURI'] = $aData['sPluginURI'];
20             break;
21         default:
22             break;
23     }
24     return $aData;
25 }