This has been bothering me still and I don’t see any movement here, so I decided to dig into the issue.
In the plugin’s files /includes/classes/Admin_Settings.php
on line 36, the plugin inserts line of JavaScript. This JS runs an interval every minute and does this check: if(jQuery(".edit-post-fullscreen-mode-close svg").length > 0 ){
I put a debugger before that if-statement and it always returns false on the sites affected by this bug. On the sites where this works, it returned false once, then true, then false again (and kept looping and returning false because once it returned true that one time, the plugin changed the image to the exit icon). So I updated both the return objects in the private function get_editor_wp_logo
and that JavaScript check.
Basically, I just edited these two functions:
public function remove_editor_wp_logo()
{
if (!wlcms_field_setting('hide_wordpress_logo_and_links')) {
return;
}
$image = $this->get_editor_wp_logo();
wlcms_set_hidden_css('.edit-post-header .edit-post-fullscreen-mode-close svg');
wlcms_add_js(' var wlcms_change_back = setInterval(function() {if(jQuery(".edit-post-fullscreen-mode-close .wlcms_icon").length == 0 ){ jQuery(".edit-post-fullscreen-mode-close").html("' . $image . '");}if(jQuery(".edit-post-fullscreen-mode-close_site-icon").length > 0){jQuery(".edit-post-fullscreen-mode-close_site-icon").remove();}}, 1000);');
}
private function get_editor_wp_logo() {
$gutenberg_exit_icon = wlcms_field_setting('gutenberg_exit_icon');
$admin_bar_logo = wlcms_field_setting('admin_bar_logo');
if($gutenberg_exit_icon) {
$icon = "";
if($gutenberg_exit_icon == 'admin-bar-logo') {
$icon = wlcms_field_setting('admin_bar_logo');
}elseif($gutenberg_exit_icon == 'custom-icon') {
$icon = wlcms_field_setting('gutenberg_exit_custom_icon');
}else {
return '<span class=\"wlcms_icon dashicons dashicons-exit\"></span>';
}
return '<span id=\"wlcms_dashboard_logo\" class=\"wlcms_icon\"><img src=\"' . $icon . '\" alt=\"\" /></span>';
}
if($admin_bar_logo) {
return '<span id=\"wlcms_dashboard_logo\" class=\"wlcms_icon\"><img src=\"' . $admin_bar_logo. '\" alt=\"\" /></span>';
}
return '<span class=\"wlcms_icon wlcms_dashboard_exitdashicons dashicons-exit\"></span>';
}
Basically, I updated it so that all of the icons/logos/whatever that is inserted by the plugin includes the wlcms_icon
class which the loop checks for for inserting the image and then I additionally check for this strange image with the .edit-post-fullscreen-mode-close_site-icon
class that I can only assume was added because my installation was a multisite.
At any rate, this fixed my issue and I’d love if it could be included in your next update. Cheers!