Skip to content

Instantly share code, notes, and snippets.

@Ritesh-patel
Last active August 29, 2015 14:02
Show Gist options
  • Save Ritesh-patel/26b7b9df5361923d9dba to your computer and use it in GitHub Desktop.
Save Ritesh-patel/26b7b9df5361923d9dba to your computer and use it in GitHub Desktop.
rtMedia patch for razor theme
diff --git framework/theme-functions/template-engine.php framework/theme-functions/template-engine.php
index d4a5257..bdc9b73 100644
--- framework/theme-functions/template-engine.php
+++ framework/theme-functions/template-engine.php
@@ -10,6 +10,13 @@ if ( ! function_exists( 'template_context' ) ) :
function template_context($template) {
global $context, $target_wp_template_file, $theme_design_loaded;
+ //** RTMEDIA FIX **//
+ global $rt_ajax_request;
+ if ( isset($rt_ajax_request) && $rt_ajax_request === true ){
+ return $template;
+ }
+ //** E.O.RTMEDIA FIX **//
+
// set this global variable for cases where we might need it, like helping with old versions, etc.
$target_wp_template_file = $template;
diff --git functions.php functions.php
index df11f0d..d4bfd2d 100644
--- functions.php
+++ functions.php
@@ -196,6 +196,11 @@ add_theme_support( 'bp-responsive' );
-
+//** RTMEDIA FIX **//
+function rtmedia_main_template_include($template, $new_rt_template) {
+ return $new_rt_template;
+}
+add_filter('rtmedia_main_template_include', 'rtmedia_main_template_include', 10, 2);
+//** E.O.RTMEDIA FIX **//
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment