You got two ways of doing this.
To simply turn it off, just open Developer Options and tap the ON/OFF button up to the right. By doing that, you disable all/any settings through Dev options.
To hide it, it’s slightly trickier but still not hard. Just go to Settings > Apps > All > Settings, where you clear Data. This might clear other things as well. In case you wonder “why did THAT go?”. But, the basic settings seems to stick. But, it hides Developer Options again. I assume it disables it as well.
This of course works on One M7 as well, as most/all other current HTC phones.
If you wonder how you enable it in the first please, read more HERE.