# Disable Openverse in the Media Inserter

> Removes the Openverse tab from the block inserter, so editors cannot pull external stock images into posts.

- Type: PHP
- Runs: Run everywhere
- Category: [Block Editor](https://wpide.com/library/category/gutenberg/)
- Tags: block-editor, openverse, media
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/disable-openverse/

## Code

```php
add_filter( 'block_editor_settings_all', function ( $settings ) {
    $settings['enableOpenverseMediaCategory'] = false;

    return $settings;
} );
```

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Disable Openverse in the Media Inserter" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
