VaultPress::resolve_upload_path PHP Method

resolve_upload_path() public method

public resolve_upload_path ( )
    function resolve_upload_path()
    {
        $upload_path = false;
        $upload_dir = wp_upload_dir();
        if (isset($upload_dir['basedir'])) {
            $upload_path = $upload_dir['basedir'];
        }
        // Nothing recorded? use a best guess!
        if (!$upload_path || $upload_path == realpath(ABSPATH)) {
            return $this->resolve_content_dir() . 'uploads' . DIRECTORY_SEPARATOR;
        }
        if (substr($upload_path, -1) != DIRECTORY_SEPARATOR) {
            $upload_path .= DIRECTORY_SEPARATOR;
        }
        return $upload_path;
    }
VaultPress