Updating the editpost script