parallelus/Plugin-Installer-for-Runway

Selecting a plugin from the WordPress.org repository isn't working.

Closed this issue · 2 comments

Entering a URL for a plugin from the WordPress repository to be included in the Plugin Installer is causing the plugin to download and install on the site but not add the plugin to required plugins or list it in the Plugin Installer list.

image

This may be a unique problem that only happens on network installs of WordPress. I didn't test this on a regular install.

I am not completely clear with the issue. In Plugin Installer extension we can add the plugin: "Add new", select the plugin's zip and add it to required plugins list by clicking "Copy now". If we installed the plugin, does this mean that it should automatically get to plugin-installer/plugins folder?

Adding a plugin from the WordPress plugins directory does not actually save the files for that plugin to the theme. It's unnecessary and the code already has a feature to permit a "link" reference to a WordPress.org repository item to be automatically installed as a "recommended" or "required" plugin, just like the ones we have now using the file upload method.

When a plugin URL is entered into that field it should create a reference to the plugin and register it with the installer. The plugin should be included in the list on the Plugin Installer admin for setting as required or recommended.

The functionality is based on the TGM Class which already includes support for WordPress.org plugins. The data needed for a WordPress.org plugin is minimal compared to the other options.

// This is an example of how to include a plugin from the WordPress Plugin Repository.
array(
    'name'      => 'BuddyPress',
    'slug'      => 'buddypress',
    'required'  => false,
),

From the TGM Class information: http://tgmpluginactivation.com/#features

When the users enters the URL for the plugin from the WordPress.org repository, we should be using that to query the items "name" and "slug" so we can populate those settings to register the item with our Plugin Installer. The code exists for this, we just need to make use of it and include the reference in the Plugin Installer user interface.