Skip to content

Commit

Permalink
[MOOSE-175]: disable font library UI
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoffDusome committed Dec 16, 2024
1 parent dfc5611 commit 1fbc89c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
16 changes: 16 additions & 0 deletions wp-content/plugins/core/src/Theme_Config/Block_Editor.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php declare(strict_types=1);

namespace Tribe\Plugin\Theme_Config;

class Block_Editor {

/**
* Dsiable the WP block editor font library
*/
public function disable_font_library_ui( array $settings ): array {
$settings['fontLibraryEnabled'] = false;

return $settings;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ public function register(): void {
// Hide existing comments
add_filter( 'comments_array', '__return_empty_array', 10 );

// Disable font library
add_filter( 'block_editor_settings_all', function ( array $settings ): array {
return $this->container->get( Block_Editor::class )->disable_font_library_ui( $settings );
} );

// Remove comments page in menu
add_action( 'admin_menu', function (): void {
$this->container->get( Comment_Support::class )->remove_comments_menu_item();
Expand Down

0 comments on commit 1fbc89c

Please sign in to comment.