mirror of
https://ghproxy.net/https://github.com/fairpm/fair-plugin.git
synced 2025-09-06 03:37:32 +08:00
Initial export of the repository
Signed-off-by: Ryan McCue <me@ryanmccue.info>
This commit is contained in:
commit
583d434505
76 changed files with 39023 additions and 0 deletions
26
inc/disable-openverse/namespace.php
Normal file
26
inc/disable-openverse/namespace.php
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue