Scriptless registers just one block, but you can add this to your functions.php file to unregister it:
add_action( 'init', 'rgc_unregister_scriptless_block', 20 );
/**
* Remove the Scriptless Social Sharing block if it has been registered.
*/
function rgc_unregister_scriptless_block() {
$block_name = 'scriptlesssocialsharing/buttons';
if ( ! WP_Block_Type_Registry::get_instance()->is_registered( $block_name ) ) {
return;
}
WP_Block_Type_Registry::get_instance()->unregister( $block_name );
}
I can look into adding an option to not register the block at all. Thank you for the suggestion.
It did not work (using code snippets plugin). Let me just wait for when you implement it.
-
This reply was modified 6 years, 9 months ago by
politicske.
The develop branch of the plugin on Github has this option added, if you have a place to try out a beta version of 3.1.0. There are quite a few changes in this version, which you can see in the changelog on Github. I hope to finish testing and release it within the next week or so.
No problem. Thank you very much for all the effort and support you put into the plugin.
Hi @littlerchicken what I meant with this is to (also) remove the Pinterest image sharing block (or what are they called?) from the block editor’s sidebar. How do I do that? The new update does not resolve that either.
Found a snippet to hide it with CSS.
In the block editor, if you click on the three dots in the upper right of the screen to access the “More tools & options”, then click Options at the bottom of that, you can disable the Scriptless Social Sharing metabox under the Advanced Panels section to hide it that way.
I found some code from my theme author and targeted the metabox (found this is the correct term) ID and I was able to unhook it. I found unticking did not work always and the metaboxes kept coming back after a while. Thanks anyway.
add_action( 'add_meta_boxes', function() {
remove_meta_box( 'scriptless_social_sharing', 'post', 'side' );
}, 999 );