From 6553180f206aa89c8bee646a3168c9cb22f73766 Mon Sep 17 00:00:00 2001 From: Kelly de Vries Date: Wed, 15 Jul 2015 15:07:27 -0700 Subject: [PATCH 1/2] generate cookie on lti_launch, add LTI_header_display function to call in header.php --- wp-content/plugins/candela-lti/candela-lti.php | 3 +-- .../plugins/candela-utility/themes/washington/functions.php | 3 +++ .../plugins/candela-utility/themes/washington/header.php | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/wp-content/plugins/candela-lti/candela-lti.php b/wp-content/plugins/candela-lti/candela-lti.php index 134f0261..0e78720f 100644 --- a/wp-content/plugins/candela-lti/candela-lti.php +++ b/wp-content/plugins/candela-lti/candela-lti.php @@ -102,7 +102,7 @@ public static function deactivate() { */ public static function lti_launch() { global $wp; - + setcookie('content_only', 1, time()+3600, COOKIEPATH, COOKIE_DOMAIN); // allows deep links with an LTI launch urls like: // candela/api/lti/BLOGID?page_title=page_name // candela/api/lti/BLOGID?page_title=section_name%2Fpage_name @@ -643,4 +643,3 @@ public static function remove_db_table() { } } - diff --git a/wp-content/plugins/candela-utility/themes/washington/functions.php b/wp-content/plugins/candela-utility/themes/washington/functions.php index d861dad7..3be0eb87 100644 --- a/wp-content/plugins/candela-utility/themes/washington/functions.php +++ b/wp-content/plugins/candela-utility/themes/washington/functions.php @@ -124,3 +124,6 @@ function add_iframe_resize_message() { ); } + function LTI_header_display() { + isset($_COOKIE['content_only']); + } diff --git a/wp-content/plugins/candela-utility/themes/washington/header.php b/wp-content/plugins/candela-utility/themes/washington/header.php index 99b9091a..1e5dc0b2 100644 --- a/wp-content/plugins/candela-utility/themes/washington/header.php +++ b/wp-content/plugins/candela-utility/themes/washington/header.php @@ -76,7 +76,7 @@ Skip to main content - +