Skip to content

Instantly share code, notes, and snippets.

@KittenCodes
Last active April 7, 2025 06:55
Show Gist options
  • Save KittenCodes/bcf17d357328d68a8674482236f4a450 to your computer and use it in GitHub Desktop.
Save KittenCodes/bcf17d357328d68a8674482236f4a450 to your computer and use it in GitHub Desktop.
How to Hide the "Use Default Editor" Button in Breakdance Builder
<?php
add_action('admin_head', 'winusoft_conditional_remove_default_editor_button');
function winusoft_conditional_remove_default_editor_button() {
// Specify the Post IDs where the button should NOT be removed
$excluded_post_ids = []; // Replace with a comma separated list of your post IDs
// Get the current post ID
$current_post_id = isset($_GET['post']) ? intval($_GET['post']) : null;
// If the current post ID is not in the excluded list, hide the button
if (!in_array($current_post_id, $excluded_post_ids, true)) {
echo '<style>
.breakdance-launcher-link {
display: none !important;
}
</style>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment