Skip to content

Instantly share code, notes, and snippets.

@shazdeh
Created February 4, 2015 22:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shazdeh/6b9c6442eab67eb13196 to your computer and use it in GitHub Desktop.
Save shazdeh/6b9c6442eab67eb13196 to your computer and use it in GitHub Desktop.
<?php
/*
Plugin Name: Themify WPTouch Compatibility
Description: This plugin makes Builder in Themify framework compatible with the WPTouch plugin.
*/
function themify_wptouch_compat() {
$theme_root = wp_get_theme()->get_template_directory();
if( ! is_admin()
&& wptouch_is_mobile_theme_showing()
&& file_exists( $theme_root . '/themify/themify-builder/themify-builder.php' )
) {
define( 'THEMIFY_VERSION', '2.0.9' );
define( 'THEME_DIR', $theme_root );
define( 'THEME_URI', wp_get_theme()->get_template_directory_uri() );
add_filter( 'themify_builder_is_frontend_editor', '__return_false' );
include_once $theme_root . '/theme-options.php';
include_once $theme_root . '/themify/themify-database.php';
include_once $theme_root . '/themify/class-themify-config.php';
include_once $theme_root . '/themify/themify-utils.php';
include_once $theme_root . '/themify/themify-builder/themify-builder.php';
include_once $theme_root . '/themify/themify-shortcodes.php';
include_once $theme_root . '/themify/themify-widgets.php';
}
}
add_action( 'wptouch_pro_loaded', 'themify_wptouch_compat', 11 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment