[wp-hackers] Codex on 2.5 plugin/theme migration...

Ryan Boren ryan at boren.nu
Thu Feb 14 23:55:06 GMT 2008

On Thu, Feb 14, 2008 at 3:38 PM, Jennifer Hodgdon <yahgrp at poplarware.com> wrote:
> We might need a Codex article on migrating plugins and themes to 2.5.
>  The last "migrating" article was for 2.1:
>    http://codex.wordpress.org/Migrating_Plugins_and_Themes_to_2.1
>  The only issues I know about right now for 2.5:
>  - Plugins are activated in a non-global scope, so you may have to add
>  a couple of 'global' declarations to your plugin to get the activation
>  to work.

We can register some common globals within activate_plugin() and in
includes files where they are used outside of a function such as

>  - Format/markup of the post edit screen has changed, so if your plugin
>  adds sections to this screen, it needs to do it differently.

Could do something like this:
if (function_exists(add_meta_box()) {
  // 2.5 style
} else {
  // 2.3

More information about the wp-hackers mailing list