Last active
January 7, 2017 15:19
-
-
Save gschoppe/88c7b4e918c94080b0d3dd8b246ba6fa to your computer and use it in GitHub Desktop.
Add Blockade to new post types or WP editors
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 /* place in functions.php or in a custom plugin */ | |
// Add Blockade to the custom post types "foo" and "bar" | |
add_filter('wp-blockade-override-post-types', 'add_my_blockade_post_types'); | |
function add_my_blockade_post_types( $post_types ) { | |
$post_types[] = "foo"; | |
$post_types[] = "bar"; | |
return $post_types; | |
} | |
// Add Blockade to the custom editor with the ID "baz" | |
add_filter('wp-blockade-override-editors', 'add_my_blockade_editors'); | |
function add_my_blockade_editors( $editors ) { | |
$editors[] = "baz"; | |
return $editors; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment