> For the complete documentation index, see [llms.txt](https://whoisandywhite.gitbook.io/porterwp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://whoisandywhite.gitbook.io/porterwp/documentation/porter-json.md).

# Porter Json

`porter/config/porter.json` is the **root config** that PorterWP reads first. It has three top‑level keys:

```
version   ⇠ cache‑buster
premium   ⇠ feature toggles that require the premium plugin
settings  ⇠ everything else (theme‑support, public assets, admin assets…)
```

```jsonc
{
  "version": "1.3.0",

  "premium": {
    "filters": true                 // enable Premium Filters block assets
  },

  "settings": {
    "theme-support": {
      "align-wide": true,
      "responsive-embeds": true,
      "editor-styles": true
    },

    "admin": {
      "editor_scripts": {
        "fontawesome": {
          "src": "//kit.fontawesome.com/XXXXXXXX.js",
          "args": { "in_footer": true }
        }
      },
      "editor_styles": {
        "admin_css": {
          "src": "./assets/dist/css/editor.min.css",
          "deps": []
        }
      }
    },

    "public": {
      "scripts": {
        "main": {
          "src": "./assets/dist/js/main.min.js",
          "deps": ["wp-i18n"],
          "ver": "1.0.0",
          "args": { "in_footer": true, "strategy": "defer" },
          "data": { "crossorigin": "anonymous", "async": true }
        }
      },
      "styles": {
        "theme": { "src": "./assets/dist/css/theme.min.css", "deps": [] }
      }
    }
  }
}
```

| Path                            | Type   | Purpose                                                                                                  |
| ------------------------------- | ------ | -------------------------------------------------------------------------------------------------------- |
| `version`                       | string | Increment to invalidate PorterWP’s object‑cache slice for this file.                                     |
| `premium`                       | object | Feature switches. \*\*Currently only \*\*\`\` (boolean) is read by `Porter_Premium_Features::filters()`. |
| `settings.theme-support`        | object | Keys forwarded to `add_theme_support()`.                                                                 |
| `settings.admin.editor_scripts` | object | Register/enqueue **block‑editor‑only** scripts. Same schema as `public.scripts`.                         |
| `settings.admin.editor_styles`  | object | Register/enqueue **editor‑only** stylesheets.                                                            |
| `settings.public.scripts`       | object | Front‑end scripts (see sample above).                                                                    |
| `settings.public.styles`        | object | Front‑end stylesheets.                                                                                   |

***

## Enqueue logic cheat‑sheet

| Context                   | Source file                         | Hook                                                  | Notes                                                              |
| ------------------------- | ----------------------------------- | ----------------------------------------------------- | ------------------------------------------------------------------ |
| **Public scripts/styles** | `includes/porter-config-public.php` | `wp_enqueue_scripts`                                  | Adds `<script>` attributes from `data` via `script_loader_tag`.    |
| **Admin scripts/styles**  | `includes/porter-config-admin.php`  | `enqueue_block_editor_assets`, `enqueue_block_assets` | Only loaded inside the block editor.                               |
| **Premium Filters**       | `includes/premium-features.php`     | `init`                                                | Loads premium PHP classes **only if** `premium.filters` is truthy. |

***

⇐ [Back to Config Index](/porterwp/documentation/configuration-files.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://whoisandywhite.gitbook.io/porterwp/documentation/porter-json.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
