[wp-trac] [WordPress Trac] #4067: Changes to TinyMCE filters don't
get updated due to browser cache
WordPress Trac
wp-trac at lists.automattic.com
Mon Apr 2 05:36:37 GMT 2007
#4067: Changes to TinyMCE filters don't get updated due to browser cache
----------------------------+-----------------------------------------------
Reporter: Viper007Bond | Owner: anonymous
Type: defect | Status: new
Priority: low | Milestone: 2.2
Component: Administration | Version: 2.2
Severity: minor | Keywords: needs-patch
----------------------------+-----------------------------------------------
''Didn't know what to call this one, so someone feel free to improve the
ticket's title.''
I have a plugin that adds an external TinyMCE plugin and then adds some
buttons via `mce_buttons` or `mce_buttons_2` filters depending on what
line number the user wants the buttons on.
However, if they change the option and my plugin uses the other filter, it
won't show the change until the user hard refreshes (and clears there
cache). Or at least this is the case with the latest version of Firefox.
Here's some code to show what I'm doing:
{{{
add_filter('mce_plugins', array(&$this, 'mce_plugins'));
if ( 1 != $this->settings['tinymce_linenumber'] ) {
add_filter('mce_buttons_' . $this->settings['tinymce_linenumber'],
array(&$this, 'mce_buttons'));
} else {
add_filter('mce_buttons', array(&$this, 'mce_buttons'));
}
add_action('tinymce_before_init', array(&$this, 'tinymce_before_init'));
}}}
{{{
// Add buttons in WordPress v2.1+, thanks to An-archos
function mce_plugins($plugins) {
array_push($plugins, '-vipersvideoquicktags');
return $plugins;
}
function mce_buttons($buttons) {
if ( 1 == $this->settings['tinymce_linenumber'] )
array_push($buttons, 'separator');
array_push($buttons, 'vipersvideoquicktags');
return $buttons;
}
function tinymce_before_init() {
echo "tinyMCE.loadPlugin('vipersvideoquicktags', '" .
$this->fullfolderurl . "resources/tinymce/');\n";
}
}}}
Not a big deal (I added a notice telling users to clear their cache), but
a bug nonetheless.
--
Ticket URL: <http://trac.wordpress.org/ticket/4067>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list