Minn\Admin
The minn-admin/v1 namespace and serving the Minn Admin app. 29 classes, 125 public methods and 62 internals. This page is the public surface; each class name opens the whole class.
ActivityChart final readonly class
public/minn/src/Minn/Admin/ActivityChart.php · 65 lines · Open the class →
The overview's activity chart: published posts and pages plus every comment, counted per bar. A window over 45 days is drawn in weeks, anything shorter in days; each bar carries the (from, to] GMT bounds the drill-down asks for.
| new | __construct(Minn\Db $db, Minn\Content\Site $site) | |
| method | bars(int $days, int $now): array | The bars for a window of days, counted from the database. @return list<array{label: string, value: int, from: string, to: string}> |
| static | bucket(array $dates, int $days, int $now, int $offset): array | GMT stamps into bars, oldest first. Labels are site-local: the day for daily bars, "Week of" the bar's first day for weekly ones. @param list<string> $dates "Y-m-d H:i:s" in GMT@return list<array{label: string, value: int, from: string, to: string}> |
ActivityFeed final readonly class
public/minn/src/Minn/Admin/ActivityFeed.php · 212 lines · Open the class →
What happened lately, as the overview and the bell tell it: the caller's own recent posts and the latest comments, and the events behind one chart bar. Also the visibility rule every comment row is put through.
| new | __construct(Minn\Db $db, Minn\Content\Users $users, Minn\Auth\Capabilities $capabilities) | |
| method | recent(int $userId, int $now, int $offset): array | The overview's four most recent items, times already worded ("2 hours ago"). Oracle-caught quirk: the reference's recent-activity query runs with a multi-type post_type plus perm=editable, and on that combination it restricts EVERY status to post_author = caller, admins included, published posts included. Authorless posts appear for nobody. The engine reproduces the observed behavior, not the intent. @return list<array> |
| method | between(int $userId, string $from, string $to, int $now): array | The events behind one chart bar, (from, to] GMT, newest first. Post rows decode the RAW stored title; comment rows decode the texturized one (the reference's asymmetry, kept). @return list<array> |
| method | commentVisible(int $userId, int $postId): bool | May this caller see a comment row that names its post? |
| method | postTitle(int $postId): string | A post's stored title, empty when the post is gone. |
| method | displayName(int $userId): string | A user's display name, empty when the user is gone. |
| inside | ownPosts(), latestComments(), publishedBetween(), commentsBetween() |
AdminTypes final class
public/minn/src/Minn/Admin/AdminTypes.php · 85 lines · Open the class →
Admin-facing type facts (viewable, labels, supports, the edit gate) live beside, not inside, the wp/v2 registry, so the types route's payload stays byte-faithful.
| new | __construct(Minn\Rest\Types $types, Minn\Auth\Capabilities $capabilities) | |
| method | extra(): array | The types beyond post and page the app may show, with their labels. |
| method | section(int $userId): array | The boot-status types section: edit-visible types for this user, slimmed. |
| method | restBaseOf(string $slug): string | The rest_base of a type slug. |
| method | singularOf(string $slug): string | A type's singular label. |
| method | editable(): array | The viewable types a person edits in the app: slug => rest base. @return array<string, string> @return array<string, string> |
| method | commentsEnabled(): bool | Whether a UI post type still supports comments. |
App final readonly class
public/minn/src/Minn/Admin/App.php · 100 lines · Open the class →
The Minn Admin app on disk: the symlinked dev copy the engine serves the shell and assets from. Minn Admin is MIT, so reading its files is fine.
| new | __construct(string $dir) | |
| static | switchedOff(string $contentDir, Minn\Content\Site $site): bool | Whether the site has switched Minn Admin off: its plugin folder is in wp-content/plugins (the record the reference keeps) and active_plugins does not name it. A site that carries only the engine's bundle has no such record and keeps its admin. |
| method | dir(): string | Where the bundle sits on disk. |
| method | installed(): bool | Whether the bundle is on disk. |
| method | version(): string | The bundle's version from its plugin header. |
| method | file(string $relative): ?string | The absolute path of a readable file inside the app, or null. |
| method | assetVersion(string $relative): string | A self-busting asset version: app version plus file mtime. |
| method | asset(string $relative): ?array | The absolute path and content type of an asset inside the app, or null for anything missing or outside it. @return array{0: string, 1: string}|null |
AppController final readonly class
public/minn/src/Minn/Admin/AppController.php · 149 lines · Open the class →
Serves Minn Admin from the engine: the path-routed shell (every sub-path renders the same page) and the app's assets. The nonce refresh app.js asks admin-ajax.php for is the reference's own rest-nonce action (Runtime\AjaxController).
| new | __construct(Minn\Admin\App $app, Minn\Admin\BootPayload $payload, Minn\Auth\Authenticator $authenticator, Minn\Auth\Capabilities $capabilities, Minn\Front\Permalinks $permalinks, string $engineVersion, Minn\Content\SiteIcon $icon, bool $off = false) | |
| method | shell(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin (public)GET /minn-admin/{rest*} (public) | Requires a signed-in user who can edit content; otherwise the login form. |
| method | asset(Minn\Http\Request $request, string $path): Minn\Http\ResponseGET /minn/admin/assets/{path*} (public) | One file of the app bundle, with its content type and caching headers. |
| inside | offPage(), favicon(), render() |
Appearance final readonly class
public/minn/src/Minn/Admin/Appearance.php · 82 lines · Open the class →
A person's Minn Admin appearance: the colour scheme and its custom token maps, stored where the app stores them (user meta minn_admin_appearance, a serialized array) so the choice survives an eject. The two WordPress-era switches, "Minn is the default admin" and "Minn admin bar on the site", are always on here: there is no other admin and no other bar, so the engine reports them true and ignores writes to them.
| const | META = 'minn_admin_appearance' | |
| const | SCHEMES = array ( 0 => 'minn', 1 => 'ocean', 2 => 'forest', 3 => 'amber', 4 => 'rose', 5 => 'coral', 6 => 'teal', 7 => 'slate', 8 => 'dusk', ) | |
| const | SLOTS = array ( 0 => 'bg', 1 => 'bg2', 2 => 'panel', 3 => 'panel2', 4 => 'hover', 5 => 'border', 6 => 'border2', 7 => 'text', 8 => 'text2', 9 => 'text3', 10 => 'accent', 11 => 'accent2', 12 => 'accentFg', ) | Scheme slots in the order the app lists them. |
| const | BASE = array ( 'dark' => array ( 'bg' => '#0b0b0d', 'bg2' => '#101013', 'panel' => '#151518', 'panel2' => '#1b1b1f', 'hover' => '#202027', 'border' => '#242429', 'border2' => '#31313a', 'text' => '#ececed', 'text2' => '#9d9da7', 'text3' => '#63636d', 'accent' => '#6e62f5', 'accent2' => '#8a80f8', 'accentFg' => '#ffffff', ), 'light' => array ( 'bg' => '#f6f6f7', 'bg2' => '#ffffff', 'panel' => '#ffffff', 'panel2' => '#f4f4f6', 'hover' => '#eeeef1', 'border' => '#e7e7ea', 'border2' => '#dadade', 'text' => '#1a1a1f', 'text2' => '#5e5e69', 'text3' => '#9696a0', 'accent' => '#6a5ef2', 'accent2' => '#5a4ef0', 'accentFg' => '#ffffff', ), ) | The app's own Minn tokens, the fill for incomplete custom maps. |
| new | __construct(Minn\Content\Users $users) | |
| method | read(int $userId): array | A user's saved appearance, normalised. @return array{scheme: string, custom: array, defaultAdmin: bool, frontBar: bool, font: string} |
| method | save(int $userId, array $raw): array | Merges the given keys over the stored map and writes it back; returns the normalised result. |
| static | normalise(array $raw): array | The appearance with every field valid and every missing one defaulted. |
| static | hex(string $value): string | #rgb or #rrggbb to lowercase #rrggbb, or '' for anything else. |
BootPayload final readonly class
public/minn/src/Minn/Admin/BootPayload.php · 245 lines · Open the class →
The window.MINN boot payload, assembled from the engine: the keys app.js needs to boot and drive the wp/v2 surface, with capabilities from the engine's own model.
| new | __construct(Minn\Content\Site $site, Minn\Front\Permalinks $permalinks, Minn\Auth\Capabilities $capabilities, Minn\Admin\App $app, string $engineVersion, Minn\Admin\Appearance $appearance, Minn\Admin\HiddenIntegrations $hidden, Minn\Content\SiteIcon $icon, bool $blockTheme = false, ?Minn\Admin\Translations $translations = NULL) | |
| method | siteName(): string | The site's name, or Site when it has none. |
| method | build(Minn\Auth\Authenticated $session): array | The window.MINN payload the app boots from, for one signed-in session. |
| inside | userSlice(), siteSlice(), commerce(), caps(), pluginPayload(), standHomeQuery(), adapterSlices() |
BundleController final readonly class
public/minn/src/Minn/Admin/BundleController.php · 45 lines · Open the class →
What the app bundle answers for: the user guide it carries, the translation offers (none: the engine polls no translation channel), and the two changelogs, Minn Admin's and the engine's, read from GitHub because a release carries neither.
| new | __construct(Minn\Admin\App $app, Minn\Rest\Caller $caller, Minn\Ops\Changelog $adminChangelog, Minn\Ops\Changelog $engineChangelog) | |
| method | translations(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/translations (floor edit_posts) | The translation offers; none on the engine. |
| method | changelog(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/changelog (floor edit_posts) | Minn Admin's changelog, released sections only, beside the bundle's version. |
| method | engineChangelog(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/engine-changelog (floor edit_posts) | The engine's own changelog, kept in its repository and not in a release, shown beside the app's on Minn. |
| method | guide(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/guide (floor edit_posts) | The app's bundled user guide. |
| inside | bundled() |
Dashboard final readonly class
public/minn/src/Minn/Admin/Dashboard.php · 273 lines · Open the class →
The overview payload: stat cards, the activity chart, and the recent activity feed, plus the per-bar activity drill-down.
| new | __construct(Minn\Db $db, Minn\Content\Site $site, Minn\Content\Users $users, Minn\Auth\Capabilities $capabilities, Minn\Admin\ActivityChart $chart, Minn\Admin\ActivityFeed $feed, string $uploadsDir) | |
| method | overview(int $userId, int $days): array | The stat cards, the metric catalog and layout, the chart, and the feed. |
| method | metricLayout(int $userId, array $catalog, array $stats): array | Which cards show: the user's saved picks over the site default over the built-in layout, unknown keys dropped and slots refilled. @param list<array> $catalog@param list<array> $stats@return array{keys: list<string>, defaults: list<string>, custom: bool} |
| static | cleanMetricKeys(mixed $keys): array | At most six unique sanitize_key metric ids; anything else drops. |
| method | activity(int $userId, string $from, string $to): array | The events behind one chart bar, (from, to] GMT. |
| inside | postsCard(), pagesCard(), usersCard(), commentsCard(), mediaCard(), metricCatalog(), overlayMetricKeys(), statusCounts(), commentCounts() |
EditorController final readonly class
public/minn/src/Minn/Admin/EditorController.php · 45 lines · Open the class →
The editor's helpers in minn-admin/v1: the edit lock, and the template and pattern lists (honestly empty: the engine carries no theme content).
| new | __construct(Minn\Content\PostWriter $writer, Minn\Rest\Caller $caller) | |
| method | lock(Minn\Http\Request $request, string $id): Minn\Http\ResponsePOST /minn-admin/v1/posts/{id:\d+}/lock (floor edit_posts) | Takes the edit lock on a post. |
| method | unlock(Minn\Http\Request $request, string $id): Minn\Http\ResponsePOST /minn-admin/v1/posts/{id:\d+}/unlock (floor edit_posts) | Releases the edit lock on a post. |
| method | templates(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/templates (floor edit_posts) | No theme, no page templates: an honest empty set. |
| method | patterns(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/patterns (floor edit_posts) | Theme patterns are GPL theme content the engine does not carry. |
Format final class
public/minn/src/Minn/Admin/Format.php · 51 lines · Open the class →
The dashboard's number, size, age, and title formatting.
| static | number(int|float $value, int $decimals = 0): string | number_format_i18n for the default locale: comma thousands. |
| static | size(int $bytes): string | size_format with one decimal: 1024-step units, comma thousands. |
| static | humanTimeDiff(int $from, ?int $to = NULL): string | Humanized age, pinned by an oracle capture table: each unit rounds, floors at 1, and hands off at the next unit boundary. |
| static | plainTitle(string $raw): string | A post title as the feed shows it: texturized, entities decoded, tags gone. |
LanguageChoices final class
public/minn/src/Minn/Admin/LanguageChoices.php · 42 lines · Open the class →
The language picker's markup. English always leads the list and carries the empty value, because "no locale" and "American English" are the same choice. When the picker also offers what could be downloaded, the two halves split into named groups; otherwise every option sits in one flat list.
The attribute order is not tidy and is not ours to tidy: the English option carries `data-installed` before `selected`, an installed translation carries it after, and themes and plugins have been matching on that markup for years.
| static | dropdown(string $name, string $id, array $installed, array $available, string $selected, bool $offerAvailable): string | The language select's HTML, installed languages first. @param list<string> $installed locale codes the site already holds@param array<string, array{language: string, native_name: string, iso: array<int|string, string>}> $available every translation the directory offers, keyed by locale |
| inside | option() |
LanguageController final readonly class
public/minn/src/Minn/Admin/LanguageController.php · 98 lines · Open the class →
Languages: what is installed, what a person reads in, what the site defaults to.
| new | __construct(Minn\Admin\Translations $translations, Minn\Content\Users $users, Minn\Content\Site $site, Minn\Auth\Capabilities $capabilities, Minn\Rest\Caller $caller) | |
| method | languages(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/languages (floor edit_posts) | The languages a user may pick, installed and available. |
| method | bootLocale(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/boot-locale (floor edit_posts) | The slice of the boot payload a language switch repaints from. |
| method | mine(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/me/language (floor edit_posts) | Sets the caller's own locale. |
| method | user(Minn\Http\Request $request, string $id): Minn\Http\ResponsePOST /minn-admin/v1/users/{id:\d+}/language (floor edit_posts) | Sets another user's locale. |
| method | site(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/site/language (floor edit_posts + manage_options) | Sets the site's locale. |
| inside | setUserLocale(), ensure() |
Notifications final readonly class
public/minn/src/Minn/Admin/Notifications.php · 191 lines · Open the class →
The bell feed: pending and recent comments, translation offers and a newer Minn, and new registrations. Plugin and theme update rows need an extension inventory the engine does not have (a recorded gap); on the reference database those sections are empty, so parity holds by construction.
| new | __construct(Minn\Db $db, Minn\Content\Site $site, Minn\Content\Users $users, Minn\Auth\Capabilities $capabilities, Minn\Admin\ActivityFeed $feed, Minn\Ops\Updates $updates, Minn\Ops\Releases $releases) | |
| method | items(int $userId): array | The bell feed for a user, newest first, grouped and marked read or unread. |
| method | markRead(int $userId, string $id): void | An id marks one item read; an empty id marks everything read. |
| inside | commentItems(), updateItems(), updateItem(), coreItems(), registrationItems(), commentItem(), translationCount() |
OverviewController final readonly class
public/minn/src/Minn/Admin/OverviewController.php · 140 lines · Open the class →
The Overview of minn-admin/v1: the payload, the drill-down behind one chart bar, and the pick of cards, the person's own and the site's default.
| new | __construct(Minn\Db $db, Minn\Content\Site $site, Minn\Admin\Dashboard $dashboard, Minn\Content\Users $users, Minn\Rest\Caller $caller) | |
| method | overview(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/overview (floor edit_posts) | The overview payload. |
| method | overviewActivity(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/overview/activity (floor edit_posts) | The events behind one chart bar. |
| method | setOverviewMetrics(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/overview/metrics (floor edit_posts) | Saves the caller's pick of overview cards. |
| method | setOverviewMetricDefaults(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/overview/metric-defaults (floor edit_posts + manage_options) | Saves the site's default overview cards. |
| inside | metricKeysFrom(), storedMetricLayout(), days(), window(), parameterError() |
PackagesController final readonly class
public/minn/src/Minn/Admin/PackagesController.php · 113 lines · Open the class →
Adding and removing themes and extensions from the Extensions view.
| new | __construct(Minn\Ops\Packages $packages, Minn\Content\Site $site, Minn\Rest\Caller $caller) | |
| method | searchThemes(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/themes/search (floor edit_posts + install_themes) | Searches the theme directory. |
| method | installTheme(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/themes/install (floor edit_posts + install_themes) | Installs a theme from the directory by slug. |
| method | uploadTheme(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/themes/upload (floor edit_posts + install_themes) | Installs a theme from an uploaded zip. |
| method | deleteTheme(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/themes/delete (floor edit_posts + delete_themes) | Deletes an inactive theme. |
| method | uploadPlugin(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/plugins/upload (floor edit_posts + install_plugins) | A plugin zip: a WordPress plugin or a Minn extension. |
| method | installFromUrl(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/plugins/install-url (floor edit_posts + install_plugins) | A zip URL, or a GitHub owner/repo whose latest release carries a zip asset. |
| method | searchPlugins(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/plugins/search (floor edit_posts + install_plugins) | Searches the plugin directory. |
| method | pluginInfo(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/plugins/info (floor edit_posts + install_plugins) | One directory plugin's details. |
| inside | uploaded() |
PostListMarkup final class
public/minn/src/Minn/Admin/PostListMarkup.php · 39 lines · Open the class →
The markup a post list writes beside each post, as the reference writes it (probe placeholders-admin): the states after a title (an em dash, then each state in its span, a comma inside every span but the last), and the hidden fields quick edit reads, one div each, in its order.
| static | states(array $states): string | The states after a post's title, or nothing when it has none. @param array<string|int, string> $states |
| static | inline(int $id, array $post, string $more): string | The quick edit fields: the escaped title and slug, the author, the two discussion statuses, the status, the date in its six parts and the password, then what the caller adds (parent, template, order, terms, sticky, format) unbroken, and the closing tag. @param array{title: string, name: string, author: int, comments: string, pings: string, status: string, date: string, password: string} $post |
PreferencesController final readonly class
public/minn/src/Minn/Admin/PreferencesController.php · 115 lines · Open the class →
A person's own settings in minn-admin/v1: their appearance, the views they hid, and an administrator's reach into another person's, for the user edit page.
| new | __construct(Minn\Admin\Appearance $appearance, Minn\Admin\HiddenIntegrations $hiddenIntegrations, Minn\Rest\Caller $caller) | |
| method | myAppearance(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/me/appearance (floor edit_posts) | The caller's appearance. |
| method | saveMyAppearance(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/me/appearance (floor edit_posts) | Saves the caller's appearance. |
| method | userAppearance(Minn\Http\Request $request, string $id): Minn\Http\ResponseGET /minn-admin/v1/users/{id:\d+}/appearance (cap edit_user on {id}) | A user's appearance, for one who may edit them. |
| method | saveUserAppearance(Minn\Http\Request $request, string $id): Minn\Http\ResponsePOST /minn-admin/v1/users/{id:\d+}/appearance (cap edit_user on {id}) | Saves a user's appearance. |
| method | hidden(Minn\Http\Request $request, string $id): Minn\Http\ResponseGET /minn-admin/v1/users/{id:\d+}/hidden (cap edit_user on {id}) | The target user's restore list, for the user edit page. |
| method | unhideForUser(Minn\Http\Request $request, string $id): Minn\Http\ResponsePOST /minn-admin/v1/users/{id:\d+}/integrations/unhide (cap edit_user on {id}) | An administrator restores something another person hid; hiding stays that person's own choice. |
| method | hide(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/integrations/hide (floor edit_posts) | Hides a view for the caller. |
| method | unhide(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/integrations/unhide (floor edit_posts) | Shows a view again for the caller. |
| inside | integrationId(), integrationState(), appearanceBody(), editableUser() |
RenderController final readonly class
public/minn/src/Minn/Admin/RenderController.php · 52 lines · Open the class →
The editor's island previews: block markup rendered by the same renderer the public site uses, with the stylesheets that site loads (the engine's block stylesheet, the theme's, and the theme.json rules) so a preview looks like the page will.
| new | __construct(Minn\Db $db, Minn\Content\Site $site, Minn\Content\Posts $posts, Minn\Front\Permalinks $permalinks, Minn\Rest\Caller $caller, string $themesDir) | |
| method | render(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/render-blocks (floor edit_posts) | Renders blocks for the editor's preview. |
| method | editorStyles(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/editor-styles (floor edit_posts) | The stylesheets previews are scoped under: the engine's own, the theme's, and theme.json inline. |
| inside | styles() |
SessionsController final readonly class
public/minn/src/Minn/Admin/SessionsController.php · 72 lines · Open the class →
A person's sign-in sessions, read from the same session_tokens store the login endpoint writes. Verifiers are the store's keys (the sha256 of each cookie token), so the app can name one without ever seeing the token. Expired rows are skipped, not garbage-collected here.
| new | __construct(Minn\Content\Users $users, Minn\Auth\Sessions $sessions, Minn\Rest\Caller $caller) | |
| method | list(Minn\Http\Request $request, string $id): Minn\Http\ResponseGET /minn-admin/v1/users/{id:\d+}/sessions (cap edit_user on {id}) | A user's sessions, the caller's own marked. |
| method | destroyAll(Minn\Http\Request $request, string $id): Minn\Http\ResponseDELETE /minn-admin/v1/users/{id:\d+}/sessions (cap edit_user on {id}) | Signs the person out everywhere; a caller acting on themselves keeps the session they are using. |
| method | destroy(Minn\Http\Request $request, string $id, string $verifier): Minn\Http\ResponseDELETE /minn-admin/v1/users/{id:\d+}/sessions/{verifier:[a-f0-9]{40,64}} (cap edit_user on {id}) | Signs one session out. |
| inside | target() |
SiteController final readonly class
public/minn/src/Minn/Admin/SiteController.php · 90 lines · Open the class →
The small Settings-view routes of minn-admin/v1: the site logo, the permalink structure, the spam queue, and the months the library spans.
| new | __construct(Minn\Db $db, Minn\Content\Site $site, Minn\Content\Posts $posts, Minn\Front\Permalinks $permalinks, Minn\Rest\Caller $caller) | |
| method | siteLogo(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/site-logo (floor edit_posts) | The site logo attachment. |
| method | permalinks(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/permalinks (floor edit_posts) | The permalink structure. |
| method | spam(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/spam (floor edit_posts) | The spam settings. |
| method | mediaMonths(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/media/months (floor edit_posts) | The months the library has uploads in. |
| inside | logoUrl() |
StructureController final readonly class
public/minn/src/Minn/Admin/StructureController.php · 131 lines · Open the class →
The Structure view of minn-admin/v1: post types, taxonomies, and the terms switcher, each with its live counts, answered from the registries.
| new | __construct(Minn\Db $db, Minn\Rest\Types $types, Minn\Rest\Taxonomies $taxonomies, Minn\Rest\Caller $caller) | |
| method | termTaxonomies(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/term-taxonomies (floor edit_posts) | The taxonomies of each public type, for the Structure view. |
| method | postTypes(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/post-types (floor edit_posts) | The Structure view's post types: core and site-declared, with their live counts. |
| method | taxonomies(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/taxonomies (floor edit_posts) | Every taxonomy with its counts. |
| inside | publicTypes(), termCount(), postCount() |
SystemController final readonly class
public/minn/src/Minn/Admin/SystemController.php · 73 lines · Open the class →
The System view: diagnostics, the scheduled-post list, autoloaded options, and the logs.
| new | __construct(Minn\Ops\Diagnostics $diagnostics, Minn\Ops\Logs $logs, Minn\Rest\Caller $caller) | |
| method | system(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/system (cap manage_options) | The System view's payload. |
| method | cron(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/system/cron (cap manage_options) | The scheduled posts. |
| method | autoload(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/system/autoload (cap manage_options) | The autoloaded options. |
| method | config(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/system/config (cap manage_options) | The engine never rewrites wp-config.php; the file is the site's, edited by hand. |
| method | logs(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/system/logs (cap manage_options) | The logs list. |
| method | log(Minn\Http\Request $request, string $id): Minn\Http\ResponseGET /minn-admin/v1/system/logs/{id:[a-zA-Z0-9:_.\-]+} (cap manage_options) | One log's tail. |
| method | clearLog(Minn\Http\Request $request, string $id): Minn\Http\ResponseDELETE /minn-admin/v1/system/logs/{id:[a-zA-Z0-9:_.\-]+} (cap manage_options) | Empties one log. |
| method | debugLog(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/system/debug-log (cap manage_options) | The debug log's tail. |
| method | clearDebugLog(Minn\Http\Request $request): Minn\Http\ResponseDELETE /minn-admin/v1/system/debug-log (cap manage_options) | Empties the debug log. |
ThemesController final readonly class
public/minn/src/Minn/Admin/ThemesController.php · 99 lines · Open the class →
The theme inventory of minn-admin/v1: every theme on disk with its headers, screenshot, and update offer, and the switch of the active one.
| new | __construct(Minn\Content\Site $site, Minn\Front\Permalinks $permalinks, Minn\Ops\Updates $updates, Minn\Rest\Caller $caller, string $contentDir) | |
| method | themes(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/themes (floor edit_posts) | Every theme on disk with the active one marked. |
| method | activateTheme(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/themes/activate (floor edit_posts + switch_themes) | Switches the active theme. |
| inside | themeText(), themeFolders(), screenshot() |
Translations final readonly class
public/minn/src/Minn/Admin/Translations.php · 237 lines · Open the class →
Languages for the admin. A person's locale is their `locale` user meta, else the site's WPLANG, else en_US, exactly as the reference resolves it. The app translates itself from a map of its source strings, read from the JED catalogs Minn Admin's language packs install under wp-content/languages/plugins (the bundle's own languages folder is the fallback). Installing a pack fetches the release asset the bundle's manifest names for that locale, checks its hash, and unpacks only that locale's files, so an eject leaves the files WordPress would have written.
| new | __construct(Minn\Content\Users $users, Minn\Content\Site $site, Minn\Admin\App $app, string $contentDir, Minn\Http $http = \Minn\Http::__set_state(array( 'within' => array ( ), 'fake' => NULL, 'refusal' => NULL, ))) | |
| method | localeOf(int $userId): string | The locale a person reads the admin in. |
| method | siteLocale(): string | The site's locale from WPLANG, en_US by default. |
| static | isRtl(string $locale): bool | Whether a locale reads right to left. |
| method | catalog(string $locale): array | The app's translation map for a locale: source string => translation, or the plural forms as a list. Later folders win, so the installed pack lands over the bundle's fallback. @return array{0: array<string, string|list<string>>, 1: string} map and the Plural-Forms rule |
| method | isInstalled(string $locale): bool | Whether a locale has any files on this site: a core pack or Minn Admin's own. |
| method | installed(): array | The locales with a pack on disk, the two defaults first. @return list<array{0: string, 1: string}> the site-default row, en_US, then every installed locale |
| method | payload(int $forUser): array | The languages route's payload; `current` is the raw meta of the user asked about. |
| method | readOnlyPayload(int $forUser): array | The same payload for a caller who may switch languages but not install one: no available list. |
| method | install(string $locale): bool | Fetches and unpacks Minn Admin's language pack for a locale from the release the bundle's manifest names. True when files were written; false when the manifest offers no pack for the locale. |
| inside | languages(), catalogFiles(), installedCodes(), names(), download() |
UpdatesController final readonly class
public/minn/src/Minn/Admin/UpdatesController.php · 129 lines · Open the class →
The minn-admin/v1 update routes: offers, directory meta, the check, the installs, the auto-update lists.
| new | __construct(Minn\Ops\Updates $updates, Minn\Ops\CoreStatus $core, Minn\Rest\Caller $caller) | |
| method | pluginUpdates(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/plugin-updates (signed in) | The plugin update offers. |
| method | pluginMeta(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/plugin-meta (signed in) | Icons and details for the installed plugins. |
| method | check(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/check-updates (signed in) | Asks the Minn update service again, now: for plugin and theme offers, and for Minn itself (its status answered as core). |
| method | updatePlugin(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/plugins/update (signed in) | Updates one plugin. |
| method | updateAll(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/plugins/update-all (signed in) | Updates every plugin with an offer. |
| method | updateTheme(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/themes/update (signed in) | Updates one theme. |
| method | autoUpdates(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/auto-updates | Turns auto-updates on or off for one asset. |
UploadsSize final readonly class
public/minn/src/Minn/Admin/UploadsSize.php · 93 lines · Open the class →
How much the uploads folder holds, as Minn Admin 0.43 works it out and shares it through the minn_admin_uploads_size transient: the cached figure in either shape it has had ({bytes, partial}, or a bare count from before the budget), else a walk only an administrator may start, one at a time behind a two-minute lock, stopped after four seconds and kept as partial for an hour instead of twelve.
| new | __construct(Minn\Content\Site $site, Minn\Auth\Capabilities $capabilities, string $dir) | |
| method | label(int $userId): string | The Media card's "N used" line, "over N used" for a walk cut short, or "" when the size is not known. |
| method | measure(int $userId): ?array | The uploads size, cached or walked now. @return array{bytes: int, partial: bool}|null null when nothing is known and this caller may not find out |
| inside | cached(), lock(), walk() |
V1Controller final readonly class
public/minn/src/Minn/Admin/V1Controller.php · 80 lines · Open the class →
The boot burst of minn-admin/v1: the bell feed and its read marker, the core status, and the one-round-trip boot-status the app starts from. Every route sits behind the same capability floor (edit_posts) the plugin declares.
| new | __construct(Minn\Db $db, Minn\Admin\Notifications $notifications, Minn\Ops\CoreStatus $core, Minn\Admin\AdminTypes $types, Minn\Rest\Caller $caller) | |
| method | notifications(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/notifications (floor edit_posts) | The bell feed. |
| method | notificationsRead(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/notifications/read (floor edit_posts) | Body {id} marks one read; {} marks all read. |
| method | core(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/core (floor edit_posts) | Minn's version and any newer release; a day-old check of the update service runs once the answer is sent. |
| method | coreUpdate(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/core/update (floor edit_posts + update_core) | Replaces the running engine with the release on offer. |
| method | bootStatus(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/boot-status (floor edit_posts) | The app's one-round-trip boot burst. Absent sections are the contract's own fallback: the client loads a missing section standalone. The engine serves what it can honestly answer and omits the plugin-inventory sections it has no installation for. |
| inside | checkingReleases() |
Nothing matches.