[wp-hackers] Re: Rename plugin directory name

DD32 wordpress at dd32.id.au
Wed Apr 2 11:24:41 GMT 2008


>> for some reasons I've changed  the name for my plugin directory from
>> "pagebar" to "pagebar2". This was no problem until the new "automatic
>> update" feature, since it creates the "wrong" (old) directory.
>>
>> Is there any possibility to rename the repository on the WP-server?

I guess this entire problem is coming up as you're hard-coding a plugin  
foldername into your plugin files?

Ideally a function is needed to return information about the current  
plugin IMO.

Here is some code i've used before to determine the folder WP is installed  
in: $folder = dirname(plugin_basename(__FILE__));
(That code is off the top of my head, but should be allright)

In a smilar fashion, theres a trac ticket for adding plugin_url to return  
something like http://.../wp-content/plugins/my-plugin-folder/


On Wed, 02 Apr 2008 22:09:21 +1100, Chris Poteet <cpoteet at siolon.com>  
wrote:
> Thanks for the question Lutz.  I as well have the same question.  I
> would like to rename my plugin called (currently) "Persistent Styles
> Plugin" to "Persistent Styles".

It should be simple enough to simply change the plugin name in the .php  
and readme.txt files, but you'd retain the same slug(ie. it'd still be  
persistent-styles-plugin, yet called "Persistant Styles").

Its possible to get the folders changed though, just required a  
wp-plugins.org admin to do it though i think.


More information about the wp-hackers mailing list