[wp-hackers] Improving Plugin (and Theme) metadata

Stephen Rider wp-hackers at striderweb.com
Fri Jan 25 05:25:29 GMT 2008


On Jan 24, 2008, at 4:17 PM, Peter Westwood wrote:
> Example metadata.php file:
>
> <?php
>
> load_plugin_textdomain();
>
> register_plugin( plugin_filename.php,
> ~                 __('Description'),
> ~                 __('Plugin Name'),
> ~                'http://example.com',
> ~                'Joe Bloggs',
> ~                 'http://joe.bloggs.name'),);
>
> //The End
> ?>
>
> What do people think?

I don't think it's necessary to put all this complexity into the  
plugins themselves!

Look, we could leave the metadata exactly where and as it is, with  
one addition:

Text Domain: myplugin

The additional functionality should be added _once_, in core, instead  
of in each plugin.  Doing this will avoid issues of having to  
"upgrade" plugins.  In the core function that parses the Metadata, it  
would look for the presence of the "Text Domain" string.  If present,  
it would load that text domain, and then pass each meta string  
through __() with that domain.

A few lines of code in core, one line added to plugins following the  
new system, and NO incompatibilities with older plugins.

What's not to like?

Stephen


-- 
Stephen Rider
<http://striderweb.com/>


More information about the wp-hackers mailing list