Enclosure Flex WordPress Plugin
I’ve only been using WordPress for a week, and don’t really know PHP or MYSQL but I was developing this video blog for my friend Sean and I couldn’t understand why the default enclosure creation was so restrictive and why I didn’t have the option to delete them if I wanted. So I sat down and wrote this plugin. It makes things a little more flexible. There’s a lot more work to do, but this should help those of you who are looking for more enclosure options.
I also reccomend Garrick Van Buren’s WP-iPodCatter plugin which will add iTunes specific tags to your feed.
Before you start using this keep in mind this is very early in development and I’ve never written a plugin before so this could have unintended consequences. So far it works fine for me.
This plugin was developed using WordPress 2.0 and has not been tested on 1.5
How to use KG-Enclosure Flex
- Upload kg-enclosureflex.php to the wp-content/plugins on your server
- Activate the plugin from the plugins page.
- The “edit post” page now has an enclosures drop down list below the post cotent window. When you start writing the post, the list won’t have anything in it. Once you’ve written the post, hit “save and continue editing”
- Now the list will be populated with every link in the post, including non-media ones. I could screen them out, but the idea of this plugin is flexibility. Eventually I plan to give you the option to choose your preferred mime types in the options page.
- Choose the link you want to enclose. By default nothing will be enclosed unless you choose a link. That’s another thing I’m going to work on for the options page.
- Hit save and the link you chose will be enclosed, including the length and mime type information.
- If you want to add another enclosure just choose another link and save the post. Multiple selections in one step will be added in the future, but it’s my understanding that nobody is using them and they can break a lot of podcast readers so that’s not high on my list.
- To delete an enclosure you’ve already added, make sure “No Enclosures” is selected in the list and then delete the custom field. It won’t be re-created automatically like WordPress usually does.
KG-EnclosureFlex is released under the GNU General Public License.
0.5 (Released January 03 2006)
-First release. Very simple, but works.