[wp-hackers] How to rename plugins in the plugin repository?

eric at eamann.com eric at eamann.com
Wed Jun 30 14:50:51 UTC 2010


Beyond renaming the plug-in, it's bad practice to hard-code directory names in
the first place.  Many users will want to rename this folder or that folder for
whatever reason, and hard-coding folder names in your plug-in removes that
ability.
 
Take a multi-blog environment as an example.  I host several blogs for other
users, and many like to use the same plug-ins but not the same themes.
 Occasionally, a theme comes around that will work with version 1.0 of a
plug-in, but for whatever reason won't work with version 1.2.  Rather than
telling user A they're out of luck and upgrading for user B (or vice-versa),
I'll install them side-by-side in different folders.  This way the users can
pick the version that works for them.  To do this, I have to change folder names
- if I was doing it with your plug-in, I'd then have to go in and change
hard-coded values as well.  That's a major coding no-no.
 
Instead, I'd recommend using something like define('BASE_URL', dirname(__FILE__)
); to set the current directory name as a constant.  Then you can reference
BASE_URL elsewhere in your script as necessary.
 

On June 30, 2010 at 1:50 PM list at expost.org wrote:

> Hi,
>
> 
>
> I recently submitted a plugin to the wordpress plugin repository. While
> submitting it I made the mistake of providing a long name : "WP Responder -
> Email Autoresponder and Newlsetter Plugin'. Now the plugin URL is:
>
> 
>
> http://plugins.svn.wordpress.org/wp-responder-email-autoresponder-and-newsle
> tter-plugin/
>
> 
>
> When users install the plugin from the dashboard the plugin's directory is:
>
> 
>
> wp-responder-email-autoresponder-and-newsletter-plugin
>
> 
>
> when it should be just:
>
> 
>
> wpresponder
>
> 
>
> I have hardcoded the name of the plugin's directory as 'wpresponder' in the
> plugin files. As a result the plugin is creating many problems for those who
> download and install the plugin. I am getting a lot of email from users of
> the plugin about it.
>
> 
>
> If the plugin directory was named wpresponder and the svn URL is as shown
> below the problem would be solved.
>
> 
>
> http://plugins.svn.wordpress.org/wpresponder/
>
> 
>
> Could you please tell me how the directory can be renamed? Who should I
> contact, what I need to do?
>
> 
>
> Looking forward to your replies,
>
> 
>
> Raj Sekharan
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list