How to prevent ‘third-party available blocks’ in block inserter…

WordPress in inherently open source, so it’s natural for it to offer alternative sources of blocks that might be available. You’re more after a “walled garden” approach, which is counter to the WP open source concept. A walled garden approach is fine, it’s your site after all, but you’ll need to expect to fight WP a little to accomplish it.

Contributors and authors don’t see the 3rd party offers. Only those with elevated privileges will be able to utilize the feature. If you don’t trust those with elevated privileges to refrain from doing undesirable things, it’s questionable why they’d be granted elevated privileges to start with. Just sayin’

Aside from removing user privileges, I’m not sure how easily the feature can be fully removed. However, it is relatively simple to just hide the feature with some custom admin CSS:

.block-directory-downloadable-blocks-panel {
    display: none;
}

Those with adequate knowledge and privilege could re-display the feature and utilize it, but being out of sight should deter nearly all users.

Totally makes sense @bcworkz and thanks. I actually considered the feature might be expected to act as you’ve described it given the open source nature of the core platform. Since I couldn’t find any documentation that clarifies it is indeed a feature of the open source platform (not a bug or setting) or what roles it may be attached too (something else I’d considered), I felt like the only relevant option was too ask the community here.

Our roles and permissions are currently (and most unfortunately) all over the map due to previously misunderstood definitions and subsequent handling via prior administration. As I noted, I’m just ‘the developer’ and for the most part have been kept out of participating in the ‘who does, or can do what’ conversations.

That said your reply helps a lot including the css snippet. I also wouldn’t be surprised to find out the section is tied to a hook somewhere in core. I may poke around for the knowledge at least.

Thanks again!

  • This reply was modified 22 seconds ago by sushidub.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer