Prevent fatal error when `get_sample_permalink()` not present

I have found that `get_sample_permalink()` is not always available and that WordPress Front-end Editor throws a fatal error when calling it. This PR solves the problem in the same manner it's solved elsewhere in WordPress Front-end Editor.