Files
WPS3Media/classes/upgrades/upgrade-item-extra-data.php
Malin 3248cbb029 feat: add S3-compatible storage provider (MinIO, Ceph, R2, etc.)
Adds a new 'S3-Compatible Storage' provider that works with any
S3-API-compatible object storage service, including MinIO, Ceph,
Cloudflare R2, Backblaze B2, and others.

Changes:
- New provider class: classes/providers/storage/s3-compatible-provider.php
  - Provider key: s3compatible
  - Reads user-configured endpoint URL from settings
  - Uses path-style URL access (required by most S3-compatible services)
  - Supports credentials via AS3CF_S3COMPAT_ACCESS_KEY_ID /
    AS3CF_S3COMPAT_SECRET_ACCESS_KEY wp-config.php constants
  - Disables AWS-specific features (Block Public Access, Object Ownership)
- New provider SVG icons (s3compatible.svg, -link.svg, -round.svg)
- Registered provider in main plugin class with endpoint setting support
- Updated StorageProviderSubPage to show endpoint URL input for S3-compatible
- Built pro settings bundle with rollup (Svelte 4.2.19)
- Added package.json and updated rollup.config.mjs for pro-only builds
2026-03-03 12:30:18 +01:00

76 lines
1.5 KiB
PHP

<?php
/**
* Upgrade extra info in custom objects table.
*
* This upgrade is redundant, superseded by upgrade 12,
* but needs to be kept for sequence continuity.
*
* @package amazon-s3-and-cloudfront
* @subpackage Classes/Upgrades/Upgrade_Item_Extra_Data
* @copyright Copyright (c) 2021, Delicious Brains
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
* @since 2.6.0
*/
namespace DeliciousBrains\WP_Offload_Media\Upgrades;
use stdClass;
/**
* Upgrade_Item_Extra_Data Class
*
* This class handles updating extra info in the custom objects table.
*
* @since 2.6.0
*/
class Upgrade_Item_Extra_Data extends Upgrade {
/**
* @var int
*/
protected $upgrade_id = 10;
/**
* @var string
*/
protected $upgrade_name = 'item_extra_data';
/**
* @var string 'metadata', 'attachment'
*/
protected $upgrade_type = 'metadata';
/**
* Get running update text.
*
* @return string
*/
protected function get_running_update_text() {
return __( 'and updating metadata about offloaded items to new format.', 'amazon-s3-and-cloudfront' );
}
/**
* Update extra_info in items table.
*
* @param stdClass $item
*
* @return bool
*/
protected function upgrade_item( $item ) {
return true;
}
/**
* Get all items to be processed.
*
* @param string $prefix Table prefix for blog.
* @param int $limit
* @param bool|mixed $offset
*
* @return array
*/
protected function get_items_to_process( $prefix, $limit, $offset = false ) {
return array();
}
}