Derivation (Bayesian inference and sufficiency principle)

If $T(X)$ is a sufficient statistic, by the factorisation theorem we have $$ \begin{align*} π(θ\mid x) \propto π(θ) \, p(x\mid θ) = π(θ)\,g(T(x), θ)\, h(x) \propto π(θ) \, g(T(x), θ). \end{align*} $$