plug-ins
Using Shortcodes for Plug-ins in WordPress
by WeblashAdmin on Sep.05, 2009, under Uncategorized, WordPress, development, plug-ins
First step: read the shortcode API reference in WordPress Codex. I had a difficult time figuring out exactly where to place the “add_shortcode” function call.
Second step: Place the “add_shortcode(‘shortcut name’, ‘shortcut function’);” to the same place you put your add_action and add_filter calls — I’m basing this off the excellent tutorial I found — “How to Write a WordPress Plug-in“:
//add actions
add_action('admin_menu', 'DevloungePluginSeries_ap');
add_action('wp_head', array(&$dl_pluginSeries, 'addHeaderCode'), 1);
add_action('activate_devlounge-plugin-series/devlounge-plugin-series.php', array(&$dl_pluginSeries, 'init'));
//Filters
add_filter('the_content', array(&$dl_pluginSeries, 'addContent'),1);
add_filter('get_comment_author', array(&$dl_pluginSeries, 'authorUpperCase'));
//Shortcodes
add_shortcode('shortcodename', array(&$dl_pluginSeries, 'function'));
Excellent Tutorial on developing WordPress Plug-ins
by WeblashAdmin on Sep.03, 2009, under WordPress, WordPress, content, development, plug-ins, web, web development
So I decided I was going to write my first plug-in for WordPress about a week ago. I felt it would be a good addition to WordPress users. It’s currently in development now so I’m not going to specify just what it is quite yet.
Having danced around and around the WordPress Codex, I wasn’t getting very far. Issue number one is: I’m not a PHP devleoper – yet! However, I got a long way very fast by reading through this tutorial by Ronald Huereca. I’ll give an update soon, when my plug-in is released.
If you’re struggling with the WordPress APIs, and want more insight to developing a plug-in for WordPress, check this out:













