[wp-hackers] Finding installed custom buttons to TinyMCE v3.x
Andrew Ozz
admin at laptoptips.ca
Wed Mar 12 20:48:23 GMT 2008
Jess Planck wrote:
>
> I'm trying to figure out a reliable method to determine buttons and
> plugins added after all filtering in tiny_mce_config.php.
>
> You can't do an include on tiny_mce_config.php (duh) nor is it possible
> to do a include capture with ob_start (no kidding). I know you could an
> fopen on the URL or maybe a curl and parse that, but I wanted to see if
> anyone had a decent method of divining tiny_mce options in other scripts
> from the inside?
>
> So the only other possibility seems to try to capture the button,
> plugin, and other tinymce settings through some javascript dancing by
> doing a wp_enqueue_script( 'tiny_mce' ) and trying to parse the values
> without actually setting up an editor.
>
> Am I missing the obvious?
>
> Jess
Try using tiny_mce_before_init with a priority of 99. That would include
the whole init array after all changes have been made by other filters.
function my_get_all_mce_settings($init_array) {
print_r($init_array);
return $init_array;
}
add_filter('tiny_mce_before_init', 'my_get_all_mce_settings', 99);
The above will break TinyMCE, access directly
siteurl/wp-includes/js/tinymce/tiny_mce_config.php with FF to see the
result.
Also it would be a good idea to disable caching while testing, so set
'disk_cache' => false, in tiny_mce_config.php.
More information about the wp-hackers
mailing list