[wp-hackers] advice needed about plugin repository

Otto otto at ottodestruct.com
Wed Mar 19 14:51:16 GMT 2008


If it's a JS library, you can avoid loading it repeatedly by correctly
using the wp_enqueue_script function to load it.

http://codex.wordpress.org/Function_Reference/wp_enqueue_script


However, regardless of this, I don't see any way to do what he asked
with the repository and the automatic update stuff. The whole point is
that the plugin goes into one sub-folder of the plugins folder. With
four different plugins, you've got four different folders.



On Tue, Mar 18, 2008 at 12:12 PM, Aaron Harun <admin at anthologyoi.com> wrote:
> A quick solution would be to distribute the library four times, but
>  only load it once.
>
>  If the library is JS, use the wp_print_scripts function or if it is
>  PHP, use an include but only include it some constant is not set.
>
>  Aaron
>
>
>
>  On 3/18/08, Robert R. Marsh, SJ <rmarshsj at hotmail.com> wrote:
>  >
>  >
>  >  I have a number of plugin I have created over the years and I would like to
>  >  host them in the official repository but I am having some trouble working
>  >  out how to structure the plugin files in my own case. I already have two
>  >  plugins hosted there with no difficulty but I have four other plugins
>  >  (Similar Posts, Recent Posts, Recent Comments, and Random Posts) which share
>  >  a common code library. Currently I have users upload one folder for each
>  >  plugin and one for the shared library. I package four zip files, each with
>  >  the two folders in. Now, how do I do something like that with the
>  >  repository?
>  >
>  >  If I have two folders under the svn folder how do I stop users manually
>  >  doing the usual thing and uploading the single folder which the repository
>  >  supplies? Above all with automatic plugin updates now in place how do I get
>  >  that process to work? I want to avoid duplicating the library code four
>  >  times.
>  >
>  >  In summary, the folder structure I want is:
>  >
>  >  plugins/
>  >         similar-posts/
>  >         recent-posts/
>  >         recent-comments/
>  >         random posts/
>  >         post-library/
>  >
>  >  Any ideas?
>  >
>  >  Rob Marsh
>  >  http://rmarsh.com
>  >
>  >  _______________________________________________
>  >  wp-hackers mailing list
>  >  wp-hackers at lists.automattic.com
>  >  http://lists.automattic.com/mailman/listinfo/wp-hackers
>  >
>  _______________________________________________
>  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