Created
February 4, 2015 22:14
-
-
Save shazdeh/6b9c6442eab67eb13196 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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