Skip to content

Instantly share code, notes, and snippets.

@wpmudev-sls
Last active February 25, 2020 03:33
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 wpmudev-sls/7061c25ec1a9d0c3334d95041fefa48a to your computer and use it in GitHub Desktop.
Save wpmudev-sls/7061c25ec1a9d0c3334d95041fefa48a to your computer and use it in GitHub Desktop.
[Smush Pro] - Fix conflict with Thrive Architect/Tatsu Builder plugin
<?php
/**
* Plugin Name: [Smush Pro] - Fix conflict with Thrive Architect/Tatsu Builder plugin
* Description: [Smush Pro] - Fix conflict with Thrive Architect/Tatsu Builder plugin
* Task: 0/11289012348292/1160340389295819 | 0/11289012348292/1163212896969386
* Author: Thobk @ WPMUDEV
* Author URI: https://premium.wpmudev.org
* License: GPLv2 or later
*/
if ( ! defined( 'ABSPATH' ) ) { exit; } elseif ( defined( 'WP_CLI' ) && WP_CLI ) { return; }
add_action( 'plugins_loaded', 'wpmudev_smpro_fix_conflict_with_builder_plugin_func', 9 );
function wpmudev_smpro_fix_conflict_with_builder_plugin_func() {
$is_page_builder = 0;
// check is Thrive Architect Builder
if( isset( $_GET['tve'], $_GET['tcbf'] ) && $_GET['tve'] && $_GET['tcbf'] ){
$is_page_builder = 1;
// check is Tatsu page builder
}elseif( ! empty( $_GET['tatsu'] ) ){
$is_page_builder = 1;
}
if( $is_page_builder ){
if( ! defined('SHOW_CT_BUILDER') ){
define('SHOW_CT_BUILDER', 1);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment