Mar 23, 2011 0
Feh. As per my previous post on inserting iframe tags in the TinyMCE editor in WordPress for amazon affiliate links and youtube videos, this is something a user needs to be able to do without having the editor delete them as soon as you switch into WYSIWYG mode.
This plugin — Amazon Widgets Shortcodes — almost does what I’d want with amazon affiliate links. It’s nice that it makes them stand out in the editor with a little amazon logo. It seems to work in the WYSIWYG editor, but there are some issues with trying to move the cursor before or after it that make it necessary to switch to HTML mode to insert a placeholder character and then go back to WYSIWYG and move the cursor to the placeholder. Icky.
This comment regarding the TinyMCE Unfilter plugin points out the problem with inadequate care in coding. Otherwise the TSL TinyMCE Unfilter plugin seems to do what is actually needed. Unfortunately, the author hasn’t updated it in 6 months. And if you go in and edit it yourself, you run the risk of the author someday updating it and WordPress allowing you to overwrite your edited version with the author’s update — whether or not he addressed this issue.
That’s a problem with WordPress plugins – you can’t tell which ones will be abandoned or when or what the effects of that will be.
It looks to me like the TinyMCE Unfilter plugin will work if you aren’t making any other modifications via plugin to the TinyMCE. I think.
I couldn’t find anything else in the WordPress plugin repository that would do this kind of thing — which surprises me. Might just be an issue of not searching for the right keyword. Or results being buried under plugins that only work in version 2 of WordPress. Or whatever.
But there’s two other possible solutions — which both beat messing with the functions.php file and losing your stuff when you change themes.