awesomemotive / one-click-demo-import

One Click Demo Import plugin
https://www.awesomemotive.com/
195 stars 83 forks source link

Added `pt-ocdi/pre_download_import_files` filter #192

Closed hogash closed 5 years ago

hogash commented 5 years ago

Added this filter to download packages before running the actual downloads.

I'm trying to pass AWS S3 presigned download url's with expiration time, on import_file_url, import_widget_file_url and import_customizer_file_url but because they're temporary, this would be applicable only if the expiring URL request is made when the dialog is confirmed ( clear decision that user wants to import the demo ).

If you're familiar with WP's upgrader_package_options filter, it would basically mean the same, before running the WP updates, plugin or theme options can be filtered and their download links can be changed.

primozcigler commented 5 years ago

Hey!

Thank you for the PR. It looks good to be merged. Before I do so, can you maybe add the documentation or example how to use the filter in readme.txt? And after you do so, you can generate the readme.md using the grunt task grunt wp_readme_to_markdown.

hogash commented 5 years ago

Awesome, done. Thanks Primoz!

primozcigler commented 5 years ago

@hogash thank you for the great work. This has just been merged. I plan to update the plugin later this week on wp.org, is that OK?

hogash commented 5 years ago

That's great, thank you too sir!!