WordPress Expert » plugin development http://johnlamansky.com/wordpress Wed, 01 Jun 2011 18:58:49 +0000 en hourly 1 http://wordpress.org/?v=3.3 Tip for Plugin Developers: Inline Changelogs http://johnlamansky.com/wordpress/inline-changelogs/?utm_source=rss&utm_medium=rss&utm_campaign=inline-changelogs http://johnlamansky.com/wordpress/inline-changelogs/#comments Fri, 03 Jul 2009 16:51:12 +0000 John Lamansky http://wordpress.jdwebdev.com/?p=106 Recently, the Dev4Press and Weblog Tools Collection blogs made posts about integrating plugin changelogs into the Plugins dashboard. This functionality was something I was already doing in the SEO Ultimate plugin, so I thought I’d share my technique for doing this. (My method is different because it’s simpler and it integrates directly into WordPress’s update message.)

Here’s what an inline changelog looks like when implemented:

Example of inline changelog from SEO Ultimate

As you can see, a small notice like this helps users know at-a-glance what’s new in your plugin update.

Here’s the code you can incorporate into your plugin:

<?php
function my_plugin_update_info() {
	if ( $info = wp_remote_fopen("http://www.example.com/my-plugin-updates.txt") )
		echo '<br />' . strip_tags( $info, "<br><a><b><i><span>" );
}
add_action('in_plugin_update_message-'.plugin_basename(__FILE__), 'my_plugin_update_info');
?>

Of course, to keep plugin users happy, be sure that your inline changelogs are informative and unobtrusive. Happy coding!

(Plugin users, if you’d like to see this feature implemented in your favorite plugins, you could try sending the plugin author a link to this post! You could also check out the new Changelogger plugin.)

]]>
http://johnlamansky.com/wordpress/inline-changelogs/feed/ 5