Skip to content

Instantly share code, notes, and snippets.

@deckerweb
Last active December 13, 2018 12:31
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 deckerweb/01829da4f0501baaf07d61f5a5afe4e8 to your computer and use it in GitHub Desktop.
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
<?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