Replace messy function_exists code with more flexible do_action() in content.php