civicrm/civicrm-wordpress — pull request #36 by agh1 (2014-02-19 00:16:34+00:00)
Title: CRM-14244 WordPress plugins that process the_content dump CiviCRM content into head

In WordPress, CiviCRM echoes its content when the_content is called. This works fine assuming this only happens within the Loop, but some WordPress plugins process the_content at other times. This is particularly common for SEO plugins that try to put meta information in the

. The result is that CiviCRM content gets output within the head, above the whole page.

There's a WordPress function called in_the_loop() that checks whether the filter is applied within the Loop; I've made civicrm.php check to see that it's true before proceeding with invoking CiviCRM. Maggie pointed out that the exception to this is for snippets, so it checks to see if "snippet" is set.