No, it’s not that simple. It’s more like adding another little snippet like AddWeb’s. Still relatively easy. Add this to the same file:
add_filter( 'update_footer', 'dump_editor_setup', 100 );
function dump_editor_setup( $current ) {
global $editor_styles;
$current .= "<br>\n<pre>" . print_r( $editor_styles, true ) . "</pre><br>\n";
return $current;
}
Then temporarily comment out AddWeb’s add_action line by adding two slashes in front:
//add_action( 'after_setup_theme', 'editor_setup', 11 );
This converts the line into a comment, taking the code out of play. We need to do this so we can see the original value of $editor_styles. Now when you go into the admin area, the content of $editor_styles will be “dumped out” at the bottom of each admin screen. If the styles are selectively loaded, nothing may appear until you go to the post edit screen.
The phrase “dump out” comes from the PHP function var_dump(), which outputs the value of any variable passed to it. I actually used print_r() for output, which is very similar to var_dump(). Some PHP coders will say dump out this or dump out that as a debugging technique, meaning use var_dump() to generate output.
Anywho, go to the post edit screen and copy the output at the bottom below the Thank you and version line. Paste into a text file for use in future comparisons. Temporarily deactivate all of your plugins, then go to the post edit screen and again copy the output to a text file. Is there anything missing in the second output that is in the first? Does your persistent span issue go away with plugins deactivated? Does the visual editor display still look OK? Restore your plugins.
If there are any missing items and your editor display still looks OK, paste them here and I’ll tell you how alter AddWeb’s code to remove only those without removing everything.
Looking ahead, if removing any styles from plugins do not help, it would mean it is your theme doing this. It may still be possible to remove certain styles to prevent the persistent spans while not affecting the appearance. Or the two may be codependent. TBH, I don’t understand how this is really happening. I’m merely going on the fact that removing styles solved it. I happen to know how to selectively remove elements. How that affects things I don’t know.