Opens in a new tab
Deliver toTennessee
0 0 0Cart
Get a Project Quote

Athenian File Management

v0.3.0 October 6, 2026
A structured WordPress file-management and media-operations layer for organized asset handling.

Overview

Product overview

This document consolidates technical implementation notes and marketing-ready positioning for the Athenian File Management (AFM) WordPress/WooCommerce plugin. It is intended to support product-page content, internal documentation, sales enablement, implementation planning, and future roadmap refinement.

The summary below is based on inspection of the uploaded plugin package, including the primary plugin bootstrap, PHP classes, admin JavaScript/CSS assets, REST API handlers, and bundled Markdown documentation.

---

Admin file browsing and organization workflows.
Media and file operations with REST/service boundaries.
Asset-oriented UI and storage considerations documented from source.
New canonical GitHub baseline established for iterative release work.

Use cases

  • Media operations
  • Asset organization
  • File review
  • Admin content workflows

Developer

Developer starting point

This baseline is generated from the reviewed local technical reference and source folder. Deployed-version parity and external-provider effects remain separate verification steps.

Admin Workflow

Setup Workflow

  1. Activate Athenian File Management.
  2. Go to Media -> AFM Folders to create folder structures.
  3. Go to Media -> AFM Settings to configure upload role defaults and WooCommerce behavior.
  4. Optionally set the WooCommerce product media root folder name.
  5. Use the Media Library, media modal, or Media -> AFM Explorer to begin organizing assets.

Daily Media Management Workflow

  1. Open Media -> AFM Explorer.
  2. Choose a cleanup collection or folder from the sidebar.
  3. Search, filter, sort, and inspect media items.
  4. Select items in grid or list view.
  5. Move selected files into a target folder or unassign them.
  6. Use the inspector panel to review alt text, dimensions, file size, uploader, and attachment state.

WooCommerce Product Media Workflow

  1. Enable WooCommerce auto-organization in AFM settings.
  2. Set a root folder such as Products.
  3. Save or update a WooCommerce product with a featured image and/or gallery images.
  4. AFM determines the best category path from the product's deepest assigned category.
  5. AFM creates the folder path if it does not already exist.
  6. AFM assigns the product's featured and gallery images to that folder.

---

Technical Architecture

File Structure

athenian-file-management.php
includes/
  class-afm-plugin.php
  class-afm-rest.php
  class-afm-ui.php
assets/
  css/afm-media.css
  js/afm-explorer.js
  js/afm-media-modal.js
  js/afm-media-sidebar.js
docs/
  afm-marketing-document.md
  athenian-platform-marketing.md
  athenian-platform-technical.md

Main Components

| Component | Responsibility | |---|---| | athenian-file-management.php | Plugin header, constants, class includes, bootstrapping on plugins_loaded. | | Athenian\\AFM\\Plugin | Taxonomy registration, settings, admin menus, Media Library integration, bulk actions, attachment edit fields, role defaults, WooCommerce product image auto-organization. | | Athenian\\AFM\\Rest | REST endpoints for explorer bootstrap data, folder tree data, collection definitions, assignment actions, and media queries. | | Athenian\\AFM\\UI | Conditional admin asset loading and JavaScript localization for Media Library, media modal, post screens, and AFM Explorer. | | afm-explorer.js | Dedicated desktop-style explorer app. | | afm-media-sidebar.js | Media Library sidebar injection and drag/drop wiring. | | afm-media-modal.js | WordPress media modal extension with folder/collection navigation and drag/drop assignment. | | afm-media.css | Admin styling for the explorer, modal, sidebar, and media-management surfaces. |

Boot Sequence

The plugin defines constants and loads class files in the main bootstrap file. On plugins_loaded, it calls:

\Athenian\AFM\Plugin::boot();

Plugin::boot() registers the primary runtime hooks, boots the REST layer, boots the UI layer, and attaches all Media Library, settings, upload, and WooCommerce integration hooks.

---

Data Model

Taxonomy

AFM uses a dedicated attachment taxonomy:

| Field | Value | |---|---| | Taxonomy | afm_folder | | Object Type | attachment | | Hierarchical | true | | Public | false | | REST Enabled | true | | Admin UI | true | | Rewrite | false | | Capabilities | upload_files for manage/edit/delete/assign terms |

This taxonomy powers folder organization while preserving WordPress's native media attachment model.

Options

AFM stores configuration in the afm_settings option.

Default settings:

[
    'role_defaults' => [],
    'wc_auto_product_folders' => 1,
    'wc_root_folder' => 'Products',
]

| Option Key | Purpose | |---|---| | role_defaults | Maps WordPress roles to AFM folder term IDs for upload-time routing. | | wc_auto_product_folders | Enables/disables automatic WooCommerce product image folder assignment. | | wc_root_folder | Root folder name used for WooCommerce product media paths. |

Attachment Metadata Used

AFM reads or uses the following attachment/product metadata:

| Meta Key | Purpose | |---|---| | _wp_attachment_image_alt | Used for missing-alt collection and inspector display. | | _product_image_gallery | Used to collect WooCommerce gallery image IDs for product image auto-organization. |

No Custom Database Tables Detected

The current plugin package does not create custom database tables. It relies on WordPress options, taxonomies, attachment posts, attachment metadata, and existing WooCommerce product metadata.

---

REST API

AFM registers REST endpoints under the afm/v1 namespace. All current routes require current_user_can('upload_files').

| Method | Route | Purpose | |---|---|---| | GET | /afm/v1/bootstrap | Returns folder tree, collection definitions, uploader list, and key admin URLs for the explorer. | | GET | /afm/v1/folders | Returns the AFM folder tree. | | POST | /afm/v1/assign | Assigns attachments to a folder or clears folder assignment. | | GET | /afm/v1/collections | Returns built-in/filterable collection definitions. | | GET | /afm/v1/query | Queries attachments with filters for folder, collection, search, mime group, uploader, date range, size, attachment state, sort, and pagination. |

/assign Request Model

The assignment route expects:

{
  "attachment_ids": [123, 456],
  "folder_id": 789,
  "unassign": 0
}

To clear folder assignment:

{
  "attachment_ids": [123, 456],
  "folder_id": 0,
  "unassign": 1
}

The route validates that attachment IDs are an array and that folder_id is present unless unassign is truthy. It then uses wp_set_object_terms() to update the afm_folder assignment.

/query Response Model

The query route returns media items with operational metadata such as:

  • Attachment ID
  • Title
  • Filename
  • File URL
  • Medium thumbnail URL
  • MIME type
  • MIME label
  • Upload date
  • Modified date
  • File size in bytes
  • Uploader ID/name
  • Image dimensions
  • Alt text
  • Folder summary
  • Attached parent post ID/title
  • Image flag

This response powers the AFM Explorer grid, list, and inspector panel.

---

WordPress Hooks and Integration Points

Actions

| Hook | Purpose | |---|---| | plugins_loaded | Boots the plugin classes. | | init | Registers the afm_folder attachment taxonomy. | | restrict_manage_posts | Adds the AFM folder filter dropdown to the Media Library. | | admin_notices | Displays move success notices and folder-selection prompts. | | admin_menu | Adds AFM Explorer, AFM Folders, and AFM Settings under Media. | | admin_init | Registers AFM settings and settings fields. | | add_attachment | Applies role-based default folder assignment on upload. | | save_post_product | Auto-organizes WooCommerce product featured/gallery images. | | rest_api_init | Registers AFM REST endpoints. | | admin_enqueue_scripts | Loads AFM admin styles/scripts on supported screens. |

Filters

| Filter | Purpose | |---|---| | manage_upload_columns | Adds the AFM Folder column to the Media Library list table. | | manage_media_custom_column | Renders folder path values in the Media Library column. | | parse_query | Applies AFM folder, unassigned, and selected smart-collection filters to the Media Library query. | | ajax_query_attachments_args | Applies folder/unassigned filters to media modal AJAX attachment queries. | | bulk_actions-upload | Adds the Move to AFM Folder... bulk action. | | handle_bulk_actions-upload | Processes bulk folder assignment for selected media. | | attachment_fields_to_edit | Adds the AFM folder selector to attachment edit forms. | | attachment_fields_to_save | Saves AFM folder selection from attachment edit forms. | | afm_explorer_collections | Allows developers to modify or extend explorer smart collections. |

---

WooCommerce Integration

AFM integrates with WooCommerce product media through save_post_product.

When enabled, the plugin:

  1. Checks whether WooCommerce functions are available.
  2. Reads the product featured image ID.
  3. Reads gallery image IDs from _product_image_gallery.
  4. Builds a category path using the product's deepest assigned product_cat term.
  5. Prefixes the path with the configured root folder name.
  6. Creates missing AFM folders along the path.
  7. Assigns the featured/gallery attachments to the generated folder.

This feature is useful for stores where product imagery needs to remain organized by catalog hierarchy.

---

Security and Permissions

AFM is implemented as an admin-side media operations plugin. The inspected package uses these core safety patterns:

  • REST routes require current_user_can('upload_files').
  • Admin screens require upload_files capability.
  • Taxonomy manage/edit/delete/assign capabilities are mapped to upload_files.
  • Settings values are sanitized before being saved.
  • Folder IDs and attachment IDs are cast to integers before assignment.
  • REST requests from admin JavaScript are sent with X-WP-Nonce.
  • Media assignment is restricted to posts whose post type is attachment.

Security Notes for Future Hardening

  • Consider adding more explicit nonce/capability checks to bulk action prompt handling if this workflow expands.
  • Consider validating that a submitted folder_id exists in afm_folder before assignment.
  • Consider adding activity logging for high-risk media operations such as bulk reassignment and unassignment.
  • Consider adding role-specific permission controls for who can create folders versus only assign media.

---

Technical Notes and Observations

Native-First Design

AFM works with native WordPress attachments instead of replacing the Media Library. Folder organization is represented as taxonomy assignment, which keeps existing media URLs, metadata, thumbnails, attachment IDs, WooCommerce product relationships, and media modal behavior intact.

Single-Folder Attachment Model

The current code behaves like a single-folder-per-attachment manager by replacing folder terms with the selected target folder. This is clean for file-system-style organization, but future versions could add optional multi-folder tagging if needed.

Large File Filtering

The large collection uses a minimum size threshold of 5 MB in the REST query flow. Size filtering is performed after the attachment query by checking the attached file path with filesize(). This is practical for the current explorer but may need indexing or cached file-size metadata for very large libraries.

Query Result Count

The REST query response returns found as the count of returned items after local filtering rather than the full WordPress query total. This is sufficient for the current explorer display but should be revisited if exact totals or advanced pagination counts are required.

Media Modal Coverage

The media modal currently handles folder/unassigned filtering and simple type-based collections. Some cleanup collections, such as large files and missing alt text, are better represented in the dedicated REST-powered explorer.

No Public Shortcodes Detected

No public-facing shortcodes were detected in the current source package. AFM is currently an admin/media operations plugin.

No WP-CLI Commands Detected

No WP-CLI command registration was detected in the current package. This would be a valuable future addition for large media libraries and migration workflows.

---

Implementation Checklist

Before publishing or deploying AFM broadly, confirm:

  • Folder taxonomy appears correctly under Media -> AFM Folders.
  • Media -> AFM Explorer loads and queries attachments successfully.
  • REST nonce handling works for the current admin environment.
  • Drag-and-drop movement works in the explorer, Media Library, and media modal.
  • Bulk move workflow handles selected upload.php items as expected.
  • Role default folders are saved and applied on upload.
  • WooCommerce product image auto-organization creates expected folder paths.
  • Large libraries perform acceptably with current REST query and size-filter behavior.
  • Media modal layout remains compatible with the active admin/theme/plugin stack.

---

Install

Source and dependencies
  • Reviewed source folder: athenian-file-management
  • Plugin version reviewed: 0.3.0
  • Local source inventory: 17 files (vendor, temporary, test, and Git metadata excluded).
  • GitHub baseline: https://github.com/Athenian-Brands/athenian-file-management at main / a54818de5932283219e530a579550d6e7acdb4ab.
  • WordPress filesystem and media APIs.
  • Storage permissions, large-file behavior, and deployment-specific paths require target verification.

Configuration

Implementation reference sections
  • Document Purpose — see the linked technical reference excerpt.
  • Plugin Identity — see the linked technical reference excerpt.
  • Executive Summary — see the linked technical reference excerpt.
  • Marketing Positioning — see the linked technical reference excerpt.
  • Problem It Solves — see the linked technical reference excerpt.
  • Best-Fit Use Cases — see the linked technical reference excerpt.
  • Core Feature Set — see the linked technical reference excerpt.
  • Admin Workflow — see the linked technical reference excerpt.
  • Technical Architecture — see the linked technical reference excerpt.
  • Data Model — see the linked technical reference excerpt.
  • REST API — see the linked technical reference excerpt.
  • WordPress Hooks and Integration Points — see the linked technical reference excerpt.
  • Admin Screens — see the linked technical reference excerpt.
  • WooCommerce Integration — see the linked technical reference excerpt.

Usage

Detected extension surface
  • Shortcodes detected in local PHP source: 0
  • Static action/filter hooks detected in local PHP source: 18
  • REST route registrations detected in local PHP source: 1

Shortcodes

Detected shortcodes
  • No static add_shortcode registrations were detected by the baseline scanner.

REST Endpoints

Detected REST routes
  • afm/v1 — includes/class-afm-rest.php

Hooks

Detected hooks
  • add_attachment — includes/class-afm-plugin.php
  • admin_enqueue_scripts — includes/class-afm-ui.php
  • admin_init — includes/class-afm-plugin.php
  • admin_menu — includes/class-afm-plugin.php
  • admin_notices — includes/class-afm-plugin.php
  • ajax_query_attachments_args — includes/class-afm-plugin.php
  • attachment_fields_to_edit — includes/class-afm-plugin.php
  • attachment_fields_to_save — includes/class-afm-plugin.php
  • bulk_actions-upload — includes/class-afm-plugin.php
  • handle_bulk_actions-upload — includes/class-afm-plugin.php
  • init — includes/class-afm-plugin.php
  • manage_media_custom_column — includes/class-afm-plugin.php
  • manage_upload_columns — includes/class-afm-plugin.php
  • parse_query — includes/class-afm-plugin.php
  • plugins_loaded — athenian-file-management.php
  • restrict_manage_posts — includes/class-afm-plugin.php
  • rest_api_init — includes/class-afm-rest.php
  • save_post_product — includes/class-afm-plugin.php

Data Model

Persistence and integration boundary
  • Data Model — described in the local technical reference.
  • WordPress Hooks and Integration Points — described in the local technical reference.
  • WooCommerce Integration — described in the local technical reference.

API Reference

Source inventory and provenance
  • Local source digest: f44ae1296ec47d9df8d965446d3056f84ddcbd50a7fb1ae529c483c8e4660157
  • Repository URL: https://github.com/Athenian-Brands/athenian-file-management
  • Repository reference: main
  • Repository commit: a54818de5932283219e530a579550d6e7acdb4ab
  • Source files include: CHANGELOG.md, assets/css/afm-media.css, assets/js/afm-explorer.js, assets/js/afm-media-modal.js, assets/js/afm-media-sidebar.js, athenian-file-management-icon.png, athenian-file-management.php, athenian-file-management.php.bak, athenian-file-management.zip, docs/afm-marketing-document.md, docs/athenian-platform-marketing.md, docs/athenian-platform-technical.md, docs/technical-marketing.md, includes/class-afm-plugin.php, includes/class-afm-rest.php, includes/class-afm-ui.php, readme.txt

Troubleshooting

Baseline review boundary
  • This baseline is generated from the reviewed local technical reference and source folder. Deployed-version parity and external-provider effects remain separate verification steps.
  • Confirm the deployed plugin version, active dependencies, and current repository tree before using implementation details as a release contract.
  • Treat payment, carrier, vendor, shipment, inventory, account, credential, and external-provider behavior as integration-dependent until exercised in the target environment.

FAQ

What is this page intended to establish?

A versioned, product-linked starting point for iterative developer documentation. It combines the local implementation reference with a compact detected-code inventory and a committed GitHub baseline.

Is the linked repository baseline verified?

Yes. The repository URL, ref, and commit recorded on this page were verified from the clean GitHub baseline prepared for this documentation pass. That does not by itself prove fleet deployment parity.

What remains for release-grade documentation?

Reconcile the recorded source baseline with the deployed plugin version, then exercise the relevant authenticated, store, provider, payment, carrier, or generated-artifact paths in the target environment.

Changelog

0.3.0 2026-10-06