Display if and when a particular field exists
Welcome to d7 - just in time as d6 will soon become unsupported.
In D7, content_format is deprecated.

https://www.drupal.org/node/1054586 

Check out this for how to render entity fields in d7: https://www.computerminds.co.uk/articles/rendering-drupal-7-fields-right-way

You'll have to adapt your existing script to this new rendering method. It might be a good opportunity to clean up the presentation and readability of the script so that you'll be prepared for the inevitable migration to d8!