# mcguffin/acf-quickedit-fields architecture

> Architecture diagram of the GitHub repository mcguffin/acf-quickedit-fields, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mcguffin/acf-quickedit-fields
- Repository: https://github.com/mcguffin/acf-quickedit-fields

## Overview

##### Main Components

a. Core Plugin Architecture:
- Core Component (Core/Core.php as the central hub)
- Plugin Component (Core/Plugin.php for WordPress integration)
- Singleton Pattern Implementation (Core/Singleton.php)

b. Feature Modules:
- Admin Module
- Ajax Handler
- Asset Management
- Fields System
- Compatibility Layer

##### Relationship Structure

**WordPress Core**

**ACF Plugin (External Dependency)**

**ACF QuickEdit Fields Plugin**
- Core Layer
- Plugin Initialization
- Admin Interface Layer
- Quick Edit
- Bulk Edit
- Columns
- Field Groups
- Field Types Layer
- Basic Fields (Text, Number, etc.)
- Choice Fields (Select, Radio, etc.)
- Content Fields (File, Image, etc.)
- Relationship Fields
- Support Layer
- Asset Management
- Ajax Handlers
- Compatibility (e.g., Polylang)

##### Key Interactions to Highlight

a. Data Flow:
- WordPress Admin → Quick Edit Interface
- Field Handlers → Database
- Ajax Handlers → Field Updates

b. Integration Points:
- ACF Plugin Hook Points
- WordPress Admin Hooks
- Custom Ajax Endpoints

##### Implementation Details

Technical aspects:
- PHP Class Structure (based on include/ACFQuickEdit directory)
- JavaScript/CSS Asset Pipeline
- Field Type Registration System
- Admin Interface Integration Points

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Define styles
    classDef wordpress fill:#e3e3e3,stroke:#666
    classDef core fill:#4a90e2,stroke:#357abd,color:white
    classDef admin fill:#f5a623,stroke:#d4940d,color:white
    classDef fields fill:#7ed321,stroke:#63a81d,color:white
    classDef support fill:#b8b8b8,stroke:#979797
    classDef external fill:#9013fe,stroke:#7110c5,color:white

    %% WordPress and ACF
    WP["WordPress Core"]:::wordpress
    ACF["Advanced Custom Fields Plugin"]:::external
    WP --> ACF

    %% Core Layer
    subgraph CoreLayer["Core Layer"]
        Core["Core Component"]:::core
        Plugin["Plugin Component"]:::core
        Singleton["Singleton Pattern"]:::core
    end

    click Core "https://github.com/mcguffin/acf-quickedit-fields/blob/master/include/ACFQuickEdit/Core/Core.php"
    click Plugin "https://github.com/mcguffin/acf-quickedit-fields/blob/master/include/ACFQuickEdit/Core/Plugin.php"
    click Singleton "https://github.com/mcguffin/acf-quickedit-fields/blob/master/include/ACFQuickEdit/Core/Singleton.php"

    %% Admin Interface Layer
    subgraph AdminLayer["Admin Interface Layer"]
        Admin["Admin Module"]:::admin
        QuickEdit["Quick Edit"]:::admin
        BulkEdit["Bulk Edit"]:::admin
        Columns["Columns"]:::admin
        FieldGroups["Field Groups"]:::admin
    end

    click Admin "https://github.com/mcguffin/acf-quickedit-fields/blob/master/include/ACFQuickEdit/Admin/Admin.php"
    click QuickEdit "https://github.com/mcguffin/acf-quickedit-fields/blob/master/include/ACFQuickEdit/Admin/Quickedit.php"
    click BulkEdit "https://github.com/mcguffin/acf-quickedit-fields/blob/master/include/ACFQuickEdit/Admin/Bulkedit.php"
    click Columns "https://github.com/mcguffin/acf-quickedit-fields/blob/master/include/ACFQuickEdit/Admin/Columns.php"
    click FieldGroups "https://github.com/mcguffin/acf-quickedit-fields/blob/master/include/ACFQuickEdit/Admin/FieldGroup.php"

    %% Field Types Layer
    subgraph FieldsLayer["Field Types Layer"]
        BasicFields["Basic Fields"]:::fields
        ChoiceFields["Choice Fields"]:::fields
        ContentFields["Content Fields"]:::fields
        RelationshipFields["Relationship Fields"]:::fields
    end

    click BasicFields "https://github.com/mcguffin/acf-quickedit-fields/blob/master/include/ACFQuickEdit/Fields/TextField.php"
    click ChoiceFields "https://github.com/mcguffin/acf-quickedit-fields/blob/master/include/ACFQuickEdit/Fields/ChoiceField.php"
    click ContentFields "https://github.com/mcguffin/acf-quickedit-fields/blob/master/include/ACFQuickEdit/Fields/FileField.php"
    click RelationshipFields "https://github.com/mcguffin/acf-quickedit-fields/blob/master/include/ACFQuickEdit/Fields/RelationshipField.php"

    %% Support Layer
    subgraph SupportLayer["Support Layer"]
        AssetMgmt["Asset Management"]:::support
        AjaxHandler["Ajax Handler"]:::support
        Compatibility["Compatibility Layer"]:::support
    end

    click AssetMgmt "https://github.com/mcguffin/acf-quickedit-fields/blob/master/include/ACFQuickEdit/Asset/Asset.php"
    click AjaxHandler "https://github.com/mcguffin/acf-quickedit-fields/blob/master/include/ACFQuickEdit/Ajax/AjaxHandler.php"
    click Compatibility "https://github.com/mcguffin/acf-quickedit-fields/tree/master/include/ACFQuickEdit/Compat/"

    %% Frontend Assets
    JSComp["JavaScript Components"]:::support
    CSSComp["CSS Components"]:::support

    click JSComp "https://github.com/mcguffin/acf-quickedit-fields/tree/master/src/js/lib/fields/"
    click CSSComp "https://github.com/mcguffin/acf-quickedit-fields/tree/master/src/scss/lib/"

    %% Relationships
    ACF --> Core
    Core --> Plugin
    Core --> Singleton
    Core --> Admin
    Admin --> QuickEdit
    Admin --> BulkEdit
    Admin --> Columns
    Admin --> FieldGroups
    Admin --> FieldsLayer
    Core --> AjaxHandler
    Core --> AssetMgmt
    Core --> Compatibility
    AssetMgmt --> JSComp
    AssetMgmt --> CSSComp

    %% Legend
    subgraph Legend
        L1["WordPress Components"]:::wordpress
        L2["Core Components"]:::core
        L3["Admin Interface"]:::admin
        L4["Field Components"]:::fields
        L5["Support Systems"]:::support
        L6["External Dependencies"]:::external
    end
```
