Disable the font library REST API endpoints WordPress 6.5

Disable the font library REST API endpoints WordPress 6.5.

Snippet Type

Execute on Child Sites

Snippet

add_action( 'init', function() {
   	 unregister_post_type( 'wp_font_family' );
   	 unregister_post_type( 'wp_font_face' );
} );