As mentioned in the related question, $\mathbb{R}^2$ is a too well-behaved space for such a function to exist.
If a topological space $X$ is locally path-connected and first countable, every function $f\colon X \to Y$, where $Y$ is any topological space, such that the composition $f\circ \alpha \colon I \to Y$ is continuous for all paths $\alpha \colon I \to X$ ($I \subset \mathbb{R}$ is some nondegenerate interval, open, half-open, or closed) is already continuous.
For if $f$ is discontinuous at $x_{\ast}\in X$, then by first countability there is a sequence $(x_n)_{n\in \mathbb{N}}$ in $X$ with $x_n \to x_{\ast}$ such that $f(x_n) \nrightarrow f(x_{\ast})$. By passing to a subsequence, we can assume that there is a neighbourhood $W$ of $f(x_{\ast})$ such that $f(x_n) \notin W$ for all $n$. Let $\{ V_k : k \in \mathbb{N}\}$ be a neighbourhood basis of $x_{\ast}$ consisting of path-connected sets, with $V_{k+1} \subset V_k$ for all $k$. By dropping some terms from the start of the sequence if necessary, we can assume that $x_n \in V_0$ for all $n$. We then define recursively $n_0 = 0$ and
$$n_{k+1} = \min \{ m > n_k : n \geqslant m \implies x_n \in V_{k+1}\}.$$
We can now replace $(x_n)$ by the subsequence $(x_{n_k})$, or equivalently assume that $n_k = k$ for all $k$.
Now we construct a path passing through the points $x_k$: Since $x_k$ and $x_{k+1}$ both lie in $V_k$, we can choose a path $\alpha_k \colon [2^{-k-1},2^{-k}] \to V_k$ with $\alpha_k(2^{-k-1}) = x_{k+1}$ and $\alpha_{k}(2^{-k}) = x_k$. Then define $\alpha \colon [0,1] \to X$ by
$$\alpha(t) = \begin{cases} x_{\ast} &, t = 0 \\ \alpha_k(t) &, 2^{-k-1} < t \leqslant 2^{-k}.\end{cases}$$
Since $\alpha_k(2^{-k-1}) = \alpha_{k+1}(2^{-k-1}) = x_{k+1}$, $\alpha$ is continuous on $(0,1]$, and since $\alpha([0,2^{-k}]) \subset V_k$, $\alpha$ is also continuous at $0$.
But $f(\alpha(2^{-k})) = f(x_k) \notin W$, so $f\circ \alpha$ is not continuous at $0$.