qdr-temporary-shared-storage.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. /**
  3. * Plugin Name: QDR - Temporary Shared Storage (via REST API)
  4. * Plugin URI: https://www.quadarax.com/plugins/qdr-temporary-shared-storage
  5. * Description: Extends WordPress functionality for REST API interface to upload temporary media files and provide permalink to download to anybody who has permalink (via password protected download page)
  6. * Version: 1.0.0
  7. * Requires at least: 6.8.1
  8. * Requires PHP: 8.2
  9. * Author: Dalibor Votruba
  10. * Author URI: https://www.quadarax.com
  11. * License: GPL v2 or later
  12. * License URI: https://www.gnu.org/licenses/gpl-2.0.html
  13. * Text Domain: qdr-temporary-shared-storage
  14. * Domain Path: /languages
  15. * WC requires at least: 9.0
  16. * WC tested up to: 9.8
  17. */
  18. // If this file is called directly, abort.
  19. if (!defined('WPINC')) {
  20. die;
  21. }
  22. // Define plugin version
  23. define('QDR_TSS_VERSION', '1.0.0');
  24. /**
  25. * The code that runs during plugin activation.
  26. */
  27. function activate_qdr_tss() {
  28. require_once plugin_dir_path(__FILE__) . 'includes/class-qdr-tss-activator.php';
  29. QDR_TSS_Activator::activate();
  30. }
  31. /**
  32. * The code that runs during plugin deactivation.
  33. */
  34. function deactivate_qdr_tss() {
  35. require_once plugin_dir_path(__FILE__) . 'includes/class-qdr-tss-deactivator.php';
  36. QDR_TSS_Deactivator::deactivate();
  37. }
  38. register_activation_hook(__FILE__, 'activate_qdr_tss');
  39. register_deactivation_hook(__FILE__, 'deactivate_qdr_tss');
  40. /**
  41. * The core plugin class that is used to define internationalization,
  42. * admin-specific hooks, and public-facing site hooks.
  43. */
  44. require plugin_dir_path(__FILE__) . 'includes/class-qdr-tss.php';
  45. /**
  46. * Begins execution of the plugin.
  47. *
  48. * @since 1.0.0
  49. */
  50. function run_qdr_tss() {
  51. $plugin = new QDR_TSS();
  52. $plugin->run();
  53. }
  54. // Let's go!
  55. run_qdr_tss();