Improved conditional PHP logic to prevent publishing without image. Hacky but functional.