Last active
November 18, 2016 20:44
-
-
Save hostz-frank/a9e95be476508738b7ba to your computer and use it in GitHub Desktop.
Enable the Fusion Core Builder on other WordPress CPT's (custom post types).
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: Fusion Core on Events | |
Description: Enables the ThemeFusion Core page builder on post type "tribe_events" of The Events Calendar | |
*/ | |
defined( 'ABSPATH' ) OR die(); | |
/** | |
* Enable Fusion Pagebuilder for post type "tribe_events" (The Events Calendar). | |
*/ | |
add_action ( 'plugins_loaded', function () { | |
remove_action( 'plugins_loaded', array( 'Fusion_Core_PageBuilder', 'get_instance' ) ); | |
if( ! get_option( 'avada_disable_builder' ) ) { | |
if ( is_admin() ) { | |
require_once( WP_PLUGIN_DIR . '/fusion-core/admin/class-pagebuilder.php' ); | |
require_once( WP_PLUGIN_DIR . '/fusion-core/admin/page-builder/classes/class-ui.php' ); | |
$instance = Fusion_Core_PageBuilder::get_instance(); | |
$instance->allowed_post_types[] = 'tribe_events'; | |
$ui = Fusion_Core_PageBuilder_UI::get_instance(); | |
$ui->settings['allowed_post_types'][] = 'tribe_events'; | |
} | |
} | |
}, 9); // priority 9 to be called before the line of fusion-core.php |
Hello,
Can you update this to last version of Avada ?!
regards
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, i put this code in functions.php but doest work, can u say me where i need put this code?
Thanks in advance