bobbingwide / oik-plugins

WordPress plugins server
https://www.oik-plugins.com/oik-plugins/oik-plugins-wordpress-plugins-server/
GNU General Public License v2.0
0 stars 0 forks source link

Extend _oikp_download to support satellite sites #10

Open bobbingwide opened 7 years ago

bobbingwide commented 7 years ago

Background

Bobbingwidewebdesign.com is undergoing a makeover, with existing content that was created as pages being converted to posts and new content being created for the referenced plugins and themes. The [bw_plug] shortcode has been changed to detect the locally defined plugin. We now need a method to link to the original source of the plugin. A QAD proposal is to extend _oikp_download to cater for plugins which don't have any related plugin versions. The theory being that these are satellite definitions.

Requirements

Proposed solution

bobbingwide commented 5 years ago

When the referenced plugin is an oik plugin then the download link doesn’t work if oik-shortcodes is activated. This is because oik-shortcodes overrides a constant that’s used in oik_get_plugins_server(). The workaround is to set the plugin type to premium and supply the url in the plugin URI field. This will then cause the download button to link to the plugin’s home page. The other advantage of this is that the Changelog tab is not displayed

The fix either involves changing oik-shortcodes and libs/oik-sc-help to not set the shortcode parameters server until we know we have to or use a different routine to determine the server without overriding the constant BW_OIK_PLUGIN_SERVER