Title: Compatability with uncode
Last modified: April 7, 2021

---

# Compatability with uncode

 *  Resolved [sanderkooger](https://wordpress.org/support/users/sanderkooger/)
 * (@sanderkooger)
 * [5 years ago](https://wordpress.org/support/topic/compatability-with-uncode/)
 * Dear,
 * We run the uncode theme and that includes a customized version of VC, I have 
   read through the code and I see the validation of the existence of VC does not
   yet take in account custom installation directories.
 * The current check looks like this
 *     ```
       if ( is_plugin_active( 'js_composer/js_composer.php' ) ){
   
       /* Constants */
       define( 'ASVC_URL', rtrim( plugin_dir_url( __FILE__ ), '/' ) );
       define( 'ASVC_DIR', rtrim( plugin_dir_path( __FILE__ ), '/' ) );
       if ( ! function_exists( 'prime_WordPressCheckup' ) ) {
           function prime_WordPressCheckup( $version = '3.8' ) {
               global $wp_version;
               if ( version_compare( $wp_version, $version, '>=' ) ) {
                   return "true";
               } else {
                   return "false";
               }
           }
       }
       ```
   
 * and
 *     ```
       else {
           function asvc_required_plugin() {
               if ( is_admin() && current_user_can( 'activate_plugins' ) &&  !is_plugin_active( 'js_composer/js_composer.php' ) ) {
                   add_action( 'admin_notices', 'asvc_required_plugin_notice' );
   
                   deactivate_plugins( plugin_basename( __FILE__ ) ); 
   
                   if ( isset( $_GET['activate'] ) ) {
                       unset( $_GET['activate'] );
                   }
               }
   
           }
       add_action( 'admin_init', 'asvc_required_plugin' );
   
           function asvc_required_plugin_notice(){
               ?><div class="error"><p>Error! you need to install or activate the <a target="_blank" href="https://codecanyon.net/item/visual-composer-page-builder-for-wordpress/242431?ref=themebonwp">WPBakery Page Builder for WordPress (formerly Visual Composer)</a> plugin to run "<span style="font-weight: bold;">Flipbox Addon for WPBakery Page Builder</span>" plugin.</p></div><?php
           }
       }
       ```
   
 * Woudl it be possible to rewrite the check in such a way that it verifies in a
   different way if VC is installed. for example the method that massive addons 
   is ussing?
 *     ```
       add_action( 'init', 'mpc_check_vc' );
       if ( ! function_exists( 'mpc_check_vc' ) ) {
       	function mpc_check_vc() {
       		// Exit when full package of MA is active
       		if ( plugin_basename( __FILE__ ) != 'mpc-massive/mpc-massive.php' && ( defined( 'MPC_MASSIVE_FULL' ) || is_plugin_active( 'mpc-massive/mpc-massive.php' ) ) ) {
       			return;
       		}
   
       		if ( defined( 'WPB_VC_VERSION' ) ) {
       			if ( version_compare( WPB_VC_VERSION, '4.7', '<' ) ) {
       				add_action( 'admin_notices', 'mpc_vc_outdated' );
   
       				return;
       			}
   
       			define( 'MPC_MASSIVE_FALLBACK', ! function_exists( 'vc_lean_map' ) );
   
       			$mpc_ma_version = get_option( 'mpc_ma_version' );
       			if ( ! $mpc_ma_version || version_compare( MPC_MASSIVE_VERSION, $mpc_ma_version, '>' ) ) {
       				update_option( 'mpc_ma_version', MPC_MASSIVE_VERSION );
   
       				if ( ! $mpc_ma_version ) {
       					set_transient( 'mpc_setup_wizard', true );
       				}
   
       				MPC_Utils::add_htaccess_rules();
       			}
   
       			/* Add panel settings */
       			require_once( mpc_get_plugin_path( __FILE__, 'dir' ) . '/panel/panel.php' );
   
       			if ( is_admin() ) {
   
       				/* Add welcome screen */
       				if ( get_transient( 'mpc_setup_wizard' ) ) {
       					set_transient( 'mpc_setup_wizard', false );
   
       					wp_redirect( admin_url( 'admin.php?page=ma-setup' ) );
       				}
       				if ( ! empty( $_GET[ 'page' ] ) && $_GET[ 'page' ] == 'ma-setup' ) {
       					require_once( mpc_get_plugin_path( __FILE__, 'dir' ) . '/panel/extra/welcome-screen.php' );
       				}
   
       				/* Add system info */
       				require_once( mpc_get_plugin_path( __FILE__, 'dir' ) . '/panel/extra/system-info.php' );
   
       				/* Add page installer */
       				if ( defined( 'MPC_MASSIVE_FULL' ) ) {
       					require_once( mpc_get_plugin_path( __FILE__, 'dir' ) . '/panel/extra/page-installer.php' );
       				}
   
       				/* Add automatic updates */
       				if ( defined( 'MPC_MASSIVE_FULL' ) ) {
       					require_once( mpc_get_plugin_path( __FILE__, 'dir' ) . '/panel/extra/updater.php' );
       					if ( class_exists( 'MPC_Plugin_Updater' ) ) {
       						$MPC_Massive_Updater = new MPC_Plugin_Updater( __FILE__ );
       					}
       				}
   
       				/* Add params */
       				require_once( mpc_get_plugin_path( __FILE__, 'dir' ) . '/params/params.php' );
       			}
   
       			/* Add shortcodes */
       			require_once( mpc_get_plugin_path( __FILE__, 'dir' ) . '/shortcodes/shortcodes.php' );
       			do_action( 'mpc_load_shortcodes' );
       		} else {
       			add_action( 'admin_notices', 'mpc_vc_disabled' );
       		}
       	}
       }
   
       if ( ! function_exists( 'mpc_vc_disabled' ) ) {
       	function mpc_vc_disabled() {
       		echo '<div class="notice notice-error"><p>' . __( '<strong>Massive Addons</strong>: Please install and activate WPBakery Page Builder to use this plugin', 'mpc' ) . '</p></div>';
       	}
       }
   
       if ( ! function_exists( 'mpc_vc_outdated' ) ) {
       	function mpc_vc_outdated() {
       		echo '<div class="notice notice-warning"><p>' . __( '<strong>Massive Addons</strong>: Please update WPBakery Page Builder to the newest version to use this plugin', 'mpc' ) . '</p></div>';
       	}
       }
       ```
   
 * The reason for this request is that some themes that come pre-bundled with VC
   install in a custom dir like /uncode-js_composer/js_composer.php
    -  This topic was modified 5 years ago by [sanderkooger](https://wordpress.org/support/users/sanderkooger/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [baljitdhanjal](https://wordpress.org/support/users/baljitdhanjal/)
 * (@baljitdhanjal)
 * [5 years ago](https://wordpress.org/support/topic/compatability-with-uncode/#post-14287056)
 * Hi [@sanderkooger](https://wordpress.org/support/users/sanderkooger/),
 * The code you shared is not of our Flipboxes plugin.
    Please confirm in which 
   plugin you are using.
 * Thanks
 *  Thread Starter [sanderkooger](https://wordpress.org/support/users/sanderkooger/)
 * (@sanderkooger)
 * [5 years ago](https://wordpress.org/support/topic/compatability-with-uncode/#post-14292003)
 * Ohh I see. this is the other flipbox plugin we tried. Sorry for the intrusion.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Compatability with uncode’ is closed to new replies.

 * ![](https://ps.w.org/flip-boxes/assets/icon-256x256.png?rev=3277131)
 * [Cool Flipbox - Shortcode & Gutenberg Block](https://wordpress.org/plugins/flip-boxes/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/flip-boxes/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/flip-boxes/)
 * [Active Topics](https://wordpress.org/support/plugin/flip-boxes/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/flip-boxes/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/flip-boxes/reviews/)

## Tags

 * [uncode](https://wordpress.org/support/topic-tag/uncode/)

 * 2 replies
 * 2 participants
 * Last reply from: [sanderkooger](https://wordpress.org/support/users/sanderkooger/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/compatability-with-uncode/#post-14292003)
 * Status: resolved