Plugin Directory

Self Hosted Plugins

This plugin helps you to self-host your WordPress plugins on your own site. It even uses an extend/plugins/ structure

What are the available shortcodes?

To make use of your new plugin repository, use the following shortcodes in your page/post

  • [self-hosted-plugins] - lists all of your self-hosted plugins, with links to the detail pages
  • [self-hosted-plugins slug=my-slug] - the download link for the latest version of your plugin my-slug
  • [self-hosted-plugins slug=my-slug version=1.0.2] - the download link for the version 1.0.2 of your plugin my-slug
  • [self-hosted-plugins slug=my-slug history=true] - an unordered list of the versions of your my-slug plugin, with download links
  • [self-hosted-plugins slug=my-slug history=true format='Plugin Version %s'] - an unordered list of the versions of your my-slug plugin, with download links, where the link text is sprintf('Plugin Version %s',$version)
  • [self-hosted-plugins slug=my-slug details=true] - the Plugin details page for the latest version of your my-slug plugin

Note, if you're using the slug attribute, you can add a version attribute to the shortcode to display information for that version. If this attribute is not present, it defaults to the latest version

Will this make any changes to my plugin?

Plugins stored in your repository will be altered to allow the update process to function:

  1. A directory called __plugin-updates is added, containing only the file plugin-update-checker.class.php
  2. Some code is inserted at the end of your main plugin file to instantiate the above class
  3. All instances of the file .DS_STORE are removed (what can I say, I develop on a Mac and that file just bugs me)

What filters are available?

The following filters are called by this plugin:

  • apply_filters('allow_self_hosted_plugin_download',true,$Plugin,$version) - called on a download request. If you return false, then the file will not be served and the plugin will call wp_die('You do not have permission to download this plugin'). Called in self-hosted-plugins.php.
  • apply_filters('redirect_self_hosted_plugin_download','',$Plugin,$version) - called on a download request. If a URL is returned, the plugin does a wp_redirect to that page. This is useful if you want to redirect non-authorized downloaders to a sales page (for example). Called in self-hosted-plugins.php.
  • apply_filters('shp_details_action_button',$action_button,array(&$Plugin,$version)) - allows you to override the download button/link on the details page. The default is <p class="action-button"><a href="'.$Plugin->get('download_url',$version).'">'.__('Download').'</a></p>. Called in SelfHostedPlugin.php.
  • apply_filters('shp_remove_files_from_zip',array('.DS_Store')) - if you want to globally remove particularly named files from your plugin.zip file, then use this filter. I develop on a Mac and I hate that pesky .DS_Store file. Called from SelfHostedPluginContainer.php

How do I name my screenshots?

The plugin will properly display screenshot images named screenshot-N.(jpg|jpeg|png|gif) where N is the screenshot number (1, 2, 3, etc)

I'm testing and I want to force an update request on the remote server

WordPress only checks for updates on a plugin every 12 hours or so. You can force an update check on all self-hosted plugins by manually adding a query variable called forceCheck (the value doesn't matter) to the url on the plugins page. For example, http://mysite.com/wp-admin/plugins.php?forceCheck=foo. Useful for testing.

Any plans to extend this to themes as well?

Not at this point. I'm a plugin writer, not a theme writer. If you're interested in collaborating on this project to include themes, find me at topquark.com

Is it internationalization ready?

No. I don't have any experience developing internationalizable plugins. Wanna help? Find me at topquark.com

Requires: 3.0 or higher
Compatible up to: 3.1.4
Last Updated: 2011-6-25
Downloads: 814

Average Rating

4 stars
(6 ratings)

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
100,2,2
0,1,0
50,2,1