-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreadme.txt
More file actions
272 lines (170 loc) · 8.38 KB
/
Copy pathreadme.txt
File metadata and controls
272 lines (170 loc) · 8.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
=== Virtual Media Folders – Editorial Workflow ===
Contributors: PerS
Tags: media, folders, workflow, editorial, permissions
Requires at least: 6.8
Tested up to: 7.0
Requires PHP: 8.3
Stable tag: 1.8.2
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Role-based folder access, move restrictions, and Inbox workflow for Virtual Media Folders.
== Description ==
This add-on extends [Virtual Media Folders](https://github.com/soderlind/virtual-media-folders) with enterprise-grade editorial workflow features:
* **Per-role folder visibility** — Control which folders each role can see
* **Move/assignment restrictions** — Define who can move media into which folders
* **Inbox workflow** — Contributors upload to an inbox; editors triage and move onward
* **Review workflow** — Track items needing review with dedicated admin screen
* **Internationalization** — Fully translatable with Norwegian Bokmål included
= Requirements =
* WordPress 6.8+
* PHP 8.3+
* Virtual Media Folders plugin
== Installation ==
1. Upload the `vmfa-editorial-workflow` folder to `/wp-content/plugins/`
2. Ensure Virtual Media Folders is installed and activated
3. Activate the plugin through the 'Plugins' menu
4. Configure settings under Media → VMF Settings → Editorial Workflow
== Configuration ==
= Folder Permissions =
Navigate to **Media → VMF Settings → Editorial Workflow** to configure:
1. **Permission Matrix** — Set view/move/upload/remove permissions per folder per role
2. **Inbox Mapping** — Assign default upload folders for each role
3. **Approved Folder** — Choose which folder approved items are moved to
= Supported Roles =
The permission settings automatically include **all roles that have the `upload_files` capability** — not just Editor and Author. This means custom roles are fully supported:
* Custom roles like "Contributor with upload" or "Shop Manager" will appear automatically
* Any role granted the `upload_files` capability via plugins (e.g., Members, User Role Editor) will be configurable
* Administrator is excluded from settings as they always have full access to all folders
= Default Permissions =
Out of the box, the plugin applies sensible defaults:
* **Editor** — Full access to all folders by default (can be restricted via settings)
* **Author** — No access by default (must be explicitly granted permissions)
* **Custom roles** — No access by default (must be explicitly granted permissions)
= Workflow Folders =
On activation, the plugin creates protected system folders:
* `/Workflow/Needs Review` — Items pending editorial review
* `/Workflow/Approved` — Items that have been approved
These folders cannot be renamed or deleted.
= Review Screen =
Access **Media → Review** to:
* View all items needing review
* Bulk approve items (moves to Approved folder)
* Bulk assign items to destination folders
* See notification badge with count of pending items
== Frequently Asked Questions ==
= Does this work with custom roles? =
Yes! Any role with the `upload_files` capability will automatically appear in the settings. This includes custom roles created by plugins like Members or User Role Editor.
= Can I change where approved items go? =
Yes, you can configure the approved folder destination in the Workflow settings.
= What happens to existing media when I activate the plugin? =
Existing media is not affected. The workflow only applies to new uploads and explicit move actions.
== Changelog ==
= 1.8.2 =
* Security: Resolved the majority of Dependabot alerts by updating build/test dependencies (`@wordpress/scripts` 31 → 32, `@wordpress/components` → 36). Remaining alerts are dev-only transitive dependencies.
* Changed: Added grouped `.github/dependabot.yml` config to consolidate future dependency update PRs.
= 1.8.1 =
* Changed: Renamed "Review" menu to "VMF Review" for consistency.
* Changed: Moved VMF Review menu to bottom of Media submenu.
= 1.8.0 =
* Changed: Refactored Plugin class to extend VMF core `AbstractPlugin` base class
* Changed: Refactored SettingsTab to extend `AbstractSettingsTab`
* Changed: Removed duplicated singleton boilerplate and manual textdomain loading
= 1.7.0 =
* Added: WP 7.0+ design-token style overrides for settings and review pages
= 1.6.3 =
* Security: Updated npm and Composer dependencies.
= 1.6.2 =
* Changed: Tested up to WordPress 7.0
= 1.6.1 =
* Fixed: Uncommented `build/` in `.gitignore`
= 1.6.0 =
* Changed: Replaced inline plugin updater with shared `class-github-updater.php`
= 1.5.1 =
**Fixed**
* Removed redundant `require_once` calls in Plugin.php (handled by Composer autoloading)
**Added**
* `uninstall.php` for clean plugin removal
= 1.5.0 =
**Fixed**
* Renamed generic `vmfa-settings` script handle to `vmfa-editorial-workflow-settings`
* Prevents script/style handle collisions with other add-ons
**Changed**
* Improved cross-plugin compatibility by using unique asset handles
= 1.4.0 =
**Added**
* Force folder sidebar view for non-admin users in Media Library
* Non-admins can no longer toggle to list/grid view without folders
**Changed**
* Refactored to use external asset files instead of inline scripts/styles
= 1.3.5 =
**Changed**
* Replaced "Remove From" permission with "Delete Folder" permission
* Delete permission controls who can delete folders (system folders always protected)
* Moving between folders now only requires "Move To" on destination
* Removing media to Uncategorized no longer requires special permission
**Fixed**
* Permission enforcement now blocks drag-drop moves in Media Library for users without permission
* Added AJAX interception for `vmfo_move_to_folder` and `vmfo_bulk_move_to_folder` actions
= 1.3.4 =
**Fixed**
* Permission enforcement now blocks drag-drop moves in Media Library for users without permission
* Added AJAX interception for `vmfo_move_to_folder` and `vmfo_bulk_move_to_folder` actions
= 1.3.3 =
**Added**
* GitHub Plugin Updater for automatic updates from GitHub releases
* GitHub Actions workflows for building release zip files
**Changed**
* Moved development documentation to docs/development.md
* Reorganized README.md structure
= 1.3.2 =
**Changed**
* Improved color contrast for WCAG AA accessibility compliance
* Simplified workflow settings help text for clarity
* Review page badge now properly vertically aligned with title
**Removed**
* Unused VMFA Rules Engine integration code and documentation
= 1.3.1 =
**Added**
* JavaScript test suite with Vitest for React components and utilities
**Changed**
* Updated `vitest` to v4.0.18
* Improved color contrast for WCAG AA accessibility compliance
* Simplified workflow settings help text for clarity
= 1.3.0 =
**Added**
* Internationalization (i18n) support with Norwegian Bokmål translation
* NPM scripts for translation workflow (`npm run i18n`)
* JavaScript translation loading via `wp_set_script_translations()`
= 1.2.0 =
**Added**
* Unified Review page toolbar with single destination dropdown and Apply button
* Hierarchical folder display in all dropdowns (matching sidebar structure)
**Changed**
* Simplified Review page UX: "Approve" is now first option in destination dropdown
* Folder dropdowns now show hierarchy with indentation for nested folders
**Fixed**
* "Allow Editors to review media" toggle now properly saves and loads
= 1.1.0 =
**Added**
* Configurable approved folder destination in workflow settings
* Support for all roles with `upload_files` capability (custom roles automatically included)
* Auto-dismiss success notices with fade-out animation after 3 seconds
* Race condition prevention on Review page (prevents double-clicks and concurrent operations)
**Changed**
* Workflow is now always enabled when plugin is active (removed enable/disable toggle)
* Settings icon updated to Gutenberg settings icon
* Administrator role excluded from settings (always has full access)
* Editor has full access by default; Author and custom roles have no access by default
**Fixed**
* "Revoke All Permissions" now works correctly for Editor role
* Saving settings no longer toggles all permissions ON unexpectedly
* Permission system properly handles empty arrays vs deleted entries
= 1.0.0 =
* Initial release
* Role-based folder permissions
* Inbox workflow with automatic routing
* Review screen with bulk actions
* System folder protection
== Upgrade Notice ==
= 1.1.0 =
Workflow is now always enabled. If you previously disabled the workflow, it will be active after updating.