From 606d29f61249736c2a80e9b169cbf79d3a2ed0b7 Mon Sep 17 00:00:00 2001 From: Jared Date: Tue, 16 Oct 2012 16:00:04 -0400 Subject: [PATCH] added files so espresso is compatible with the event calendar plugin --- events/ecp-page-template.php | 36 ++++++++++++++++++++++++++++++++++ events/ecp-single-template.php | 30 ++++++++++++++++++++++++++++ functions.php | 1 + 3 files changed, 67 insertions(+) create mode 100644 events/ecp-page-template.php create mode 100644 events/ecp-single-template.php diff --git a/events/ecp-page-template.php b/events/ecp-page-template.php new file mode 100644 index 0000000..c951ffd --- /dev/null +++ b/events/ecp-page-template.php @@ -0,0 +1,36 @@ + The Events Calendar -> Theme Settings -> Events Template, +* then this file loads the page template for all ECP views except for the individual +* event view. Generally, this setting should only be used if you want to manually +* specify all the shell HTML of your ECP pages in this template file. Use one of the other Theme +* Settings -> Events Template to automatically integrate views into your +* theme. +* +* You can customize this view by putting a replacement file of the same name (ecp-page-template.php) in the events/ directory of your theme. +*/ + +// Don't load directly +if ( !defined('ABSPATH') ) { die('-1'); } + +//added this code so we can support the-events-calendar plugin + + $view = tribe_get_current_template(); + if( basename($view) === 'gridview.php' ){ + add_filter('espresso_content_layout','espresso_tec_edit_layout'); + } + + function espresso_tec_edit_layout(){ + return 'content'; + } + + + +?> + + +

+ + + + \ No newline at end of file diff --git a/events/ecp-single-template.php b/events/ecp-single-template.php new file mode 100644 index 0000000..7502610 --- /dev/null +++ b/events/ecp-single-template.php @@ -0,0 +1,30 @@ + The Events Calendar -> Theme Settings -> Events Template, +* then this file loads the page template for all for the individual +* event view. Generally, this setting should only be used if you want to manually +* specify all the shell HTML of your ECP pages in this template file. Use one of the other Theme +* Settings -> Events Template to automatically integrate views into your +* theme. +* +* You can customize this view by putting a replacement file of the same name (ecp-single-template.php) in the events/ directory of your theme. +*/ + +// Don't load directly +if ( !defined('ABSPATH') ) { die('-1'); } +?> + + +
+
+ +
> +

+ + ', ''); ?> +
+ +
+
+ + diff --git a/functions.php b/functions.php index 3a833d7..81103c0 100755 --- a/functions.php +++ b/functions.php @@ -154,6 +154,7 @@ function removeHeadLinks() { } add_action( 'after_setup_theme', 'espresso_setup' ); + /** * Register all the scripts for espresso *