Timber\URLHelper::get_full_path PHP 메소드

get_full_path() 공개 정적인 메소드

public static get_full_path ( string $src ) : string
$src string
리턴 string
    public static function get_full_path($src)
    {
        $root = ABSPATH;
        $old_root_path = $root . $src;
        $old_root_path = str_replace('//', '/', $old_root_path);
        return $old_root_path;
    }

Usage Example

예제 #1
0
파일: Image.php 프로젝트: mrgrain/timber
 /**
  * @internal
  * @param string $relative_path
  */
 protected function init_with_relative_path($relative_path)
 {
     $this->abs_url = home_url($relative_path);
     $file_path = URLHelper::get_full_path($relative_path);
     $this->file_loc = $file_path;
     $this->file = $file_path;
 }