Tiny MCE-modifications (plugins) stopped working in WordPress 5.6

Question

A while back I stumbled across this post from 2015, that showed how to add Tiny MCE-buttons.

It has been working for more than a year. But after the latest WordPress update (to version 5.6) it stopped working (the added dropdown-button isn’t in the UI any longer).

What’s wierd is that I had made 2 modifications to Tiny MCE:

• add_filter( 'mce_buttons', 'custom_register_mce_button' ); – which still works.
• add_filter( 'mce_external_plugins', 'custom_add_tinymce_plugin' ); – which stopped working.

I have the same code running on another site, which has also been updated to version 5.6. On it’s the same buttons that has disappeared on both sites. So I’m quite sure that it’s the WP-update that messed this up.

And I have checked the source code in the backend, and it is to be found in the code (so I can see that it is loaded).

My code

In functions.php:

/**
*
*/

if( ! current_user_can( 'edit_posts' ) && ! current_user_can( 'edit_pages' ) ){
return;
}

if( 'true' == get_user_option( 'rich_editing' ) ){
}
}

function custom_register_mce_button( $buttons ){ array_push($buttons, 'custom_mce_button' );

return $buttons; } function custom_add_tinymce_plugin($plugin_array ){
$plugin_array['custom_mce_button'] = get_stylesheet_directory_uri() . '/assets/admin/js/tiny-mce-buttons.js'; return$plugin_array;
}


The contents of tiny-mce-buttons.js:

( function() {
text: 'Buttons',
icon: false,
{
text: 'Button (simple)',
onclick: function() {
}
},
{
text: 'Button (centered)',
onclick: function() {
}
},
{
text: 'Button (all properties)',
onclick: function() {