/**
 * Returns path to attachment relative to upload_dir.
 *
 * @param type $abspath
 * @return string '2014/01/img.jpg'
 */
function wpcf_image_normalize_attachment($abspath)
{
    WPCF_Loader::loadView('image');
    return Types_Image_Utils::getInstance()->normalizeAttachment($abspath);
}
Ejemplo n.º 2
0
 /**
  * Returns instance.
  * 
  * @return type
  */
 public static function getInstance()
 {
     if (is_null(self::$__singleton)) {
         self::$__singleton = new Types_Image_Utils();
     }
     return self::$__singleton;
 }