[wp-hackers] Plugins using post types with localization

Andrew Nacin wp at andrewnacin.com
Mon Jul 4 18:26:30 UTC 2011


On Mon, Jul 4, 2011 at 12:32 AM, Dion Hulse (dd32) <wordpress at dd32.id.au>wrote:

> I'm surprised no-one pointed this out straight away... It's something I've
> accidentally done before, infact, It looks like Log Deprecated Calls may
> even have this problem too
>
> You're registering your post types before you're telling WordPress to load
> your translations. You need to load your translations before registering
> the
> post type/taxonomies.


Oooh, fail. Would probably make sense to move the load_plugin_textdomain()
to init, but wrap it in an is_admin(). admin_init is definitely too late if
you've got a post type being registered on init. Thanks Dion.

Nacin


More information about the wp-hackers mailing list