Add free/paid feature gating (Role Editor, Activity Log, DB Explorer,
Analytics, White Label, remote site switcher are paid) - New License class is the single gate every paid feature checks — today it's a placeholder (any non-empty license_key counts as active) since there's no license server yet, but every gated feature already funnels through it so swapping in real remote validation later won't touch anything else. - Role Editor, Activity Log, and Database Explorer stay registered/ capability-checked as before, but render an UpgradeNotice screen instead of the real feature when unlicensed (and skip loading the real JS bundle/REST data). Menu Creator, Admin Notices, Comments, and Plugins stay free. - Analytics' tracking hooks and REST endpoint, and White Label's favicon/rename/text-replace hooks, simply don't register without a license. Settings fields for both stay visible/editable either way. - Remote site switcher gated alongside its existing capability check. - Sidebar shows a small lock badge on locked Aurora nav items; the Dashboard's Analytics tab shows the same upgrade prompt when locked. - Fixed an unrelated bug surfaced while testing Role Editor: RolesData's REST callback called get_editable_roles() without loading wp-admin/includes/user.php first, which REST requests don't get for free (only real wp-admin page loads do) — 500'd every time. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
73591e0ca4
commit
6d502604d7
@@ -185,6 +185,9 @@ const isAuroraActive = (item) => normalize(item.url) === current.value;
|
||||
:class="{ 'sidebar__sublink--active': isAuroraActive(item) }"
|
||||
>
|
||||
{{ item.title }}
|
||||
<span v-if="item.locked" class="sidebar__pro-badge" title="Pro feature">
|
||||
<span class="dashicons dashicons-lock" />
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -382,6 +385,18 @@ const isAuroraActive = (item) => normalize(item.url) === current.value;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.sidebar__pro-badge {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: var(--aurora-text-muted);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.sidebar__pro-badge .dashicons {
|
||||
font-size: 13px;
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
}
|
||||
|
||||
/* --- Aurora branded nav (right under the native menu's own divider) ---- */
|
||||
.sidebar__aurora {
|
||||
padding-bottom: 4px;
|
||||
|
||||
Reference in New Issue
Block a user