osseed/com.osseed.eventcalendar — pull request #11 by christianwach (2014-11-17 12:12:59+00:00)
Title: Civi 4.6 compatibility

The structure of the civicrm-wordpress plugin is changing for 4.6. Civi content is now rendered before the template is reached, which allows multiple shortcodes to exist when, say, an archive is displayed. It also allows `CRM_Core_Resources::singleton()->addCoreResources()` to render the Civi resources in the HTML head element, since it is called earlier:
https://github.com/civicrm/civicrm-wordpress

As a result, the `civicrm_wp_frontend()` function and the `wp_frontend()` method have been removed, which means that this extension's WordPress plugin throws a fatal error. This PR makes the extension minimally compatible with the new architecture. Please do test with the current version of the plugin, however.

I also changed the XML menu item definition, since it led to the "Access Keys:" footer appearing below the calendar. This caused the calendar to fail completely (by throwing a Javascript error) for logged-out users.

There is still a little updating that needs to be done:

* the `media_buttons_context` action is deprecated. You may like to have a look at [the civicrm-wordpress plugin's implementation](https://github.com/civicrm/civicrm-wordpress/blob/master/includes/civicrm.shortcodes.modal.php) to see how to migrate to using the `media_buttons` action instead.
* if you want this calendar to be embeddable in posts and viewable on archive pages (or on posts or pages with multiple Civi shortcodes) you'll have to mimic the civicrm-wordpress plugin's approach, since Civi can only be invoked once per page load.

I'll have a look at offering a way for extensions to, ahem, extend the `[civicrm ...]` shortcode rather than providing their own shortcode, since this would allow your extension to make use of the civicrm-wordpress plugin's approach without having to include a separate WordPress plugin for the extension.