Skip to content

Instantly share code, notes, and snippets.

@dashaluna
Created April 22, 2015 13:02
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 dashaluna/a473d84336e7739e201a to your computer and use it in GitHub Desktop.
Save dashaluna/a473d84336e7739e201a to your computer and use it in GitHub Desktop.
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