Last active
December 13, 2018 12:31
-
-
Save deckerweb/01829da4f0501baaf07d61f5a5afe4e8 to your computer and use it in GitHub Desktop.
Disable "Builder Template Category" taxonomy for the WP Real Categories Management (RCL) plugin - only for Elementor My Templates post type
This file contains 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 | |
/** Do NOT include the opening php tag */ | |
add_filter( 'RCL/Available', 'btc_rcl_elementor_my_templates', 10, 3 ); | |
/** | |
* Disable "Builder Template Category" taxonomy for Elementor My Templates for | |
* the "WP Real Categories Management" plugin (Premium, by Matthias Günter). | |
* | |
* @author David Decker - DECKERWEB | |
* @link https://gist.github.com/deckerweb/01829da4f0501baaf07d61f5a5afe4e8/edit | |
* | |
* @param bool $activate | |
* @param string $post_type | |
* @param object $taxonomy | |
* @return bool | |
*/ | |
function btc_rcl_elementor_my_templates( $activate, $post_type, $taxonomy ) { | |
/** | |
* Disable connection for Elementor My Templates post type, when "Builder | |
* Template Categories" plugin is active. | |
*/ | |
if ( 'elementor_library' === $post_type && defined( 'BTC_PLUGIN_VERSION' ) ) { | |
return FALSE; | |
} | |
/** Otherwise return the default (activated) */ | |
return TRUE; | |
} // end function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment