Created
April 22, 2015 13:02
-
-
Save dashaluna/a473d84336e7739e201a to your computer and use it in GitHub Desktop.
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
function __construct( ) { | |
add_action( 'init', array( $this, 'register_shortcode_ui' ) ); | |
} | |
function register_shortcode_ui() { | |
apply_filters( 'hm_toc_register_shortcode_ui', false ); | |
// Do I need to include the actual code/file here that registers things | |
// depending on the bool from above ^^ | |
} | |
add_filter( 'hm_toc_register_shortcode_ui', function( $registered ) { | |
if ( function_exists( 'some_integration' ) && ! $registered ) { | |
//register using some_integration | |
return true; | |
} | |
return false; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment