コード例 #1
0
 /**
  * Calculates the URL from the given path.
  * 
  * @since			2.1.5
  * @static
  * @access			public
  * @return			string			The source url
  */
 public static function getSRCFromPath($strFilePath)
 {
     // It doesn't matter whether the file is a style or not. Just use the built-in WordPress class to calculate the SRC URL.
     $oWPStyles = new WP_Styles();
     $strRelativePath = '/' . AmazonAutoLinks_AdminPageFramework_Utilities::getRelativePath(ABSPATH, $strFilePath);
     $strHref = $oWPStyles->_css_href($strRelativePath, '', '');
     unset($oWPStyles);
     // for PHP 5.2.x or below
     return $strHref;
 }