[WordPress] 外掛分享: Central Media Library For Network Websites

首頁外掛目錄 › Central Media Library For Network Websites
WordPress 外掛 Central Media Library For Network Websites 的封面圖片
全新外掛
安裝啟用
★★★★
4.2/5 分(5 則評價)
8 天前
最後更新
0%
問題解決
WordPress 4.7+ PHP 7.0+ v1.2.1 上架:2025-02-08

內容簡介

Central Media Library For Network Websites 是專為 WordPress Multisite 設計的外掛,允許網路管理員維護中央媒體庫,並將選定的媒體提供給啟用的子網站。此外掛使多個網站能夠重複使用相同的媒體資源,提升管理效率。

【主要功能】
• 中央媒體管理功能
• 可針對子網站啟用或禁用中央媒體存取
• 網路層級的中央媒體庫
• 啟用子網站的網站層級中央媒體庫
• 直接從中央媒體介面上傳媒體
• 可選擇允許子網站上傳媒體至中央庫

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.2.1) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Central Media Library For Network Websites」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Central Media Library For Network Websites is designed exclusively for WordPress Multisite.
It allows a network administrator to maintain a central collection of media and make selected media available to enabled subsites. When central media is used on a subsite, the plugin creates a site-specific attachment that references the central media source. This allows the media to work with WordPress features such as the Media Library, featured images, editors, and supported page builders.
The plugin is useful for multisite networks where several websites need to reuse the same images, videos, audio files, PDFs, and other supported media.
Important: This plugin does not automatically merge or move all existing media files from every subsite into one physical uploads directory. Existing subsite media is not migrated automatically. The plugin maintains central media records and creates linked attachment records for enabled sites.
Before updating the plugin, always take a complete backup of your WordPress files, database, and uploads.
How It Works

Install and Network Activate the plugin on a WordPress Multisite network.
Open Network Admin → Central Media → Settings.
Select the subsites that should have access to the Central Media library.
Optionally enable Site Upload Permission if users with the upload_files capability on enabled subsites should be allowed to add media to the central library.
Use Network Admin → Central Media to view and manage central media.
Enabled subsites can open Media → Central Media and reuse available central media.
When central media is used on a subsite, the plugin creates a local attachment record linked to the central media item.

Features

Central media management for WordPress Multisite.
Enable or disable Central Media access per subsite.
Network-level Central Media library.
Site-level Central Media library for enabled subsites.
Upload media directly from the Central Media interface.
Optional permission for enabled subsites to upload media to the Central Media library.
Automatically register eligible media uploaded on enabled sites as central media when site uploads are permitted.
Automatically create linked attachment records for enabled sites when new central media is added.
Reuse central media from different subsites without uploading the same source media separately to each site.
Search central media by title or filename.
Pagination for large media libraries.
Display media preview, title, filename, media type, file size, upload date, source site, and usage information.
View which network sites are currently using a central media item.
Use central media from an enabled site’s Central Media screen.
Edit central media metadata including title, alt text, caption, and description.
Supports images, audio, video, documents, and other media types supported by WordPress uploads.
Works with WordPress Media Library attachment data.
Supports featured image usage.
Supports Grid View and List View compatibility through WordPress attachment integration.
Includes compatibility handling for Elementor and Elementor Pro.
Includes REST API endpoints for reading, using, and deleting central media.
Uses WordPress nonces and capability checks for administrative actions.
Keeps central media data when the plugin is uninstalled; media cleanup is intentionally not performed automatically.

Network Settings
Go to:
Network Admin → Central Media → Settings
Enabled Sites
Select the subsites that are allowed to access the Central Media library.
Only selected/enabled sites receive the Media → Central Media interface and can use central media through the plugin.
The setting is controlled at the network level by the network administrator.
Site Upload Permission
Enable site upload
When enabled, users on enabled subsites who have the WordPress upload_files capability can upload media into the Central Media system.
When disabled, normal users on subsites cannot upload through the plugin’s Central Media upload interface. Network administrators can still manage and upload central media.
Recommendation: Leave this disabled if you want central media uploads to be controlled only by network administrators.
Network Admin
After network activation, network administrators can access:
Network Admin → Central Media
Central Media Library
The network-level library provides:

Media preview.
Search by title or filename.
Media title.
Filename.
Media type.
File size.
Upload date.
Source site.
Number of sites using each media item.
List of sites using a media item.
Edit action.
Delete action.

Network administrators can also upload media directly to the Central Media library.
Edit Central Media
The Edit action allows a network administrator to update:

Title.
Alt Text.
Caption.
Description.

These values are saved to the source attachment and the central media record where applicable.
Delete Central Media
Only users with the manage_network capability can delete central media from the Central Media management screen.
Warning: Deleting a central media record removes the plugin’s central database record and usage records. Always make a backup before deleting important media.
The plugin’s uninstall routine does not automatically delete media files or central media records.
Subsite Usage
After a site is enabled in Network Admin:
Dashboard → Media → Central Media
becomes available to users with the required WordPress media permissions.
From the Central Media screen, an enabled site can:

Search central media by title or filename.
View media previews and information.
See the source site of a media item.
See how many sites use a media item.
Use a central media item on the current site.

When Use is selected, the plugin creates a site-specific WordPress attachment linked to the central media item. This makes the media available to WordPress functionality on that site.
If the current site already has a linked attachment for the same central media item, the plugin reuses the existing relationship instead of creating another one.
Upload Behaviour
There are two supported upload paths.
Network Admin Upload
A network administrator can upload directly from:
Network Admin → Central Media
The uploaded file is stored using the main site’s WordPress upload configuration, and the media is registered in the central media library.
The plugin can then create linked attachment records for enabled sites.
Enabled Subsite Upload
If Site Upload Permission is enabled, an eligible user on an enabled subsite can upload media through the Central Media interface.
The upload is initially handled by the site where the upload occurs. The plugin registers that attachment as central media and can create linked attachment records on the other enabled sites.
Existing Media
Existing media uploaded before the plugin is activated is not automatically migrated or copied into the central media library.
Existing attachments remain on their original sites.
For existing media that you want to share through the Central Media system, use the plugin’s supported central-media upload/use workflow rather than assuming that old site media has been migrated automatically.
WordPress Editor and Page Builder Compatibility
The plugin integrates with WordPress attachment data so central media can be used by supported WordPress media functionality.
It includes compatibility handling for:

Classic Editor.
Gutenberg Editor.
Featured Images.
WordPress Media Library Grid View.
WordPress Media Library List View.
Elementor.
Elementor Pro.

Compatibility can depend on the version of WordPress, the page builder, the theme, and other installed plugins.
REST API
The plugin registers REST API routes under:
/wp-json/central-media/v1/

Available operations include:

GET /media — List central media.
GET /media/{id} — Get a central media item.
POST /media/{id}/use — Create/use the central media attachment on the current site.
DELETE /media/{id} — Delete a central media record when the current user has the required network permissions.

REST requests are protected by the plugin’s WordPress capability and site-access checks.
Developers should authenticate requests appropriately and should not expose authenticated REST requests to untrusted users.
Permissions
The plugin uses WordPress capabilities to control access.
Network Administrators
Users with the manage_network capability can:

Manage Central Media.
Change network settings.
Enable or disable sites.
Upload central media.
Edit central media metadata.
Delete central media.

Enabled Site Users
Users must have the appropriate WordPress media capability, normally upload_files, to use the site’s Central Media interface.
Subsite uploading also depends on the network administrator enabling Site Upload Permission.
Requirements

WordPress Multisite.
WordPress 4.7 or later.
PHP 7.0 or later.
Network activation.

This plugin does not support regular single-site WordPress installations.
Privacy
This plugin stores central media information such as:

Source site ID.
Source attachment ID.
Source URL.
Media title.
Filename.
MIME type.
File size.
User ID of the user who created the central record.
Creation and update timestamps.
Site usage relationships.

The plugin does not provide an external cloud media storage service. Media is handled using the WordPress installation’s own media and database infrastructure.
Site owners should review their network’s privacy requirements and installed plugins when determining their complete privacy obligations.
Data Storage
The plugin creates its own database tables for:

Central media records.
Central media usage by network sites.

These records are used to maintain relationships between central media and site-specific WordPress attachments.
Troubleshooting
Central Media is not visible on a subsite
Check that:

The plugin is Network Activated.
The subsite is selected under Network Admin → Central Media → Settings.
The current user has the required WordPress media capability.
The network settings were saved successfully.

Subsite users cannot upload central media
Check that:

The subsite is enabled.
Site Upload Permission is enabled.
The user has the upload_files capability.

A media item is available centrally but not working correctly on a site
Check the source media, the site’s attachment record, WordPress upload configuration, and compatibility with the active theme/page builder. Clear relevant caches if the site uses an object, page, or CDN cache.
Before updating
Always back up:

WordPress database.
WordPress files.
wp-content/uploads.
Current plugin files.

Developer Notes
The plugin is structured into separate classes for administration, database operations, REST API handling, asset loading, and activation.
Developers can extend the plugin through standard WordPress hooks and APIs.
The REST namespace is:
central-media/v1

The plugin text domain is:
central-media-library-for-network-websites

Credits

Developed by Kirtikumar Solanki.
Donations are welcome via PayPal.

文章
Filter
Mastodon