[wp-hackers] Re: Adding custom buttons to TinyMCE v3.x

Andrew Ozz admin at laptoptips.ca
Wed Mar 12 09:22:27 GMT 2008

Thanks Alex. It's your contribution too.

Alex Rabe wrote:
> One note, as I alreay said before I have problems with the cache/
> compression mode.
> I don't want to disable it, so I will add this to my plguin
> function myplugin_change_tinymce_version($version) {
> 	return ++$version;
> }
> // Modify the version when your tinyMCE plugins are changed.
> add_filter('tiny_mce_version', 'myplugin_change_tinymce_version');
> I this a good way / solution ? Any opionion ?
> Of course i can integrate a fixed number, but this could causes
> problem with other plugins.

It was meant as a way to one-time invalidate the cache if needed. Any 
change to the init array will invalidate it too, so the tiny_mce_version 
filter is there just as a shortcut. I was even thinking that it's not 

What's good about it is that it will also invalidate the browser cache 
when changed. However I can see the limitations. Perhaps it can be left 
as in 2.3, filtering the tiny_mce_config url, so additional args an be 
added. Then each plugin can add it's own arg to the url that will 
invalidate both the server side cache and the browser cache at the same 

You didn't mention exactly what kind of problems you're having with the 
cache file. Doesn't it get replaced when enabling TinyMCE plugin? Now 
it's stored in /wp-includes/uploads/js_cache. Part of its name is the 
md5 of all settings values, so the name would change every time a 
setting changes.

More information about the wp-hackers mailing list