fair-plugin/inc/disable-openverse/namespace.php
Colin Stewart 0dc693b68d
Add and apply coding standards. (#129)
Signed-off-by: costdev <79332690+costdev@users.noreply.github.com>
Signed-off-by: Colin Stewart <79332690+costdev@users.noreply.github.com>
Co-authored-by: Andy Fragen <andy@thefragens.com>
2025-06-26 18:10:59 +01:00

26 lines
638 B
PHP

<?php
/**
* Disable the Openverse media category in the block editor.
*
* @package FAIR
*/
namespace FAIR\Disable_Openverse;
/**
* Bootstrap the module functionality.
*/
function bootstrap() {
add_filter( 'block_editor_settings_all', __NAMESPACE__ . '\\disable_openverse_block_editor_settings' );
}
/**
* Disable the Openverse media category in the block editor.
*
* @param array $settings The block editor settings.
* @return array The modified block editor settings.
*/
function disable_openverse_block_editor_settings( array $settings ) : array {
$settings['enableOpenverseMediaCategory'] = false;
return $settings;
}