PHPackages                             soderlind/super-admin-all-sites-menu - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. soderlind/super-admin-all-sites-menu

ActiveWordpress-plugin[Admin Panels](/categories/admin)

soderlind/super-admin-all-sites-menu
====================================

For the super admin, replace WP Admin Bar My Sites menu with an All Sites menu.

1.12.3(2mo ago)342314[5 PRs](https://github.com/soderlind/super-admin-all-sites-menu/pulls)GPL-2.0-or-laterJavaScriptCI passing

Since Jun 26Pushed 3w ago1 watchersCompare

[ Source](https://github.com/soderlind/super-admin-all-sites-menu)[ Packagist](https://packagist.org/packages/soderlind/super-admin-all-sites-menu)[ Docs](https://github.com/soderlind/super-admin-all-sites-menu)[ Fund](https://paypal.me/PerSoderlind)[ RSS](/packages/soderlind-super-admin-all-sites-menu/feed)WikiDiscussions main Synced today

READMEChangelog (10)DependenciesVersions (118)Used By (0)

Super Admin All Sites Menu
==========================

[](#super-admin-all-sites-menu)

[![WordPress Plugin Version](https://camo.githubusercontent.com/e5c59a97e6c106ea858f9de911898605004c94a27286243ed90206894bb35bd4/68747470733a2f2f696d672e736869656c64732e696f2f776f726470726573732f706c7567696e2f762f73757065722d61646d696e2d616c6c2d73697465732d6d656e75)](https://wordpress.org/plugins/super-admin-all-sites-menu/)[![Tested up to](https://camo.githubusercontent.com/03680666959d69bc2d8ffde8b3b45a75ec87a6a66915ff48615fe2f6765e08dc/68747470733a2f2f696d672e736869656c64732e696f2f776f726470726573732f706c7567696e2f7465737465642f73757065722d61646d696e2d616c6c2d73697465732d6d656e75)](https://wordpress.org/plugins/super-admin-all-sites-menu/)[![License: GPL v2+](https://camo.githubusercontent.com/ec6306119631a4bc812f4abc1b429674bd65410ae0ef38af01f43483fccc51ce/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d47504c25323076322532422d626c75652e737667)](LICENSE)

Replace the default **My Sites** menu in the WordPress Admin Bar with a fast, searchable **All Sites** menu — built for super admins managing large multisite networks.

[![Super Admin All Sites Menu demo](.wordpress-org/screenshot-1.gif)](.wordpress-org/screenshot-1.gif)

Why?
----

[](#why)

The built-in My Sites menu has problems on large networks:

- It only lists sites where you are a local admin.
- It [can't scroll past the viewport](https://core.trac.wordpress.org/ticket/15317) (open bug since 2010).
- It calls `switch_to_blog()` for every site, which is slow.

This plugin fixes all three. Site data is fetched once via the REST API, cached in **IndexedDB**, and rendered client-side — so the menu loads instantly on subsequent visits.

Features
--------

[](#features)

- **[Switch free](docs/switch-free.md), no `switch_to_blog()`** — reads site properties directly, avoiding the performance hit.
- **IndexedDB caching** — menu data is stored locally and updated automatically when sites, blog names, or monitored plugins change.
- **Incremental REST loading** — fetches sites in batches (default 100) so the admin bar isn't blocked.
- **Lists every subsite**, not just sites you administer locally.
- **Alphabetical sorting** with a built-in **search filter** (appears when you have 20+ sites).
- **Restricted Site Access indicator** — sites running [Restricted Site Access](https://github.com/10up/restricted-site-access) get a red icon.
- **Extra quick-links** per site: New Page, Users, Plugins, Settings; plus "Add New Site" under Network Admin.

Requirements
------------

[](#requirements)

RequirementMinimumWordPress5.6 (Multisite)PHP8.0BrowserAny modern browser (no IE 11)Installation
------------

[](#installation)

**WordPress.org**

Install from [wordpress.org/plugins/super-admin-all-sites-menu](https://wordpress.org/plugins/super-admin-all-sites-menu/), then **Network Activate**.

**Manual**

1. [Download the latest release](https://github.com/soderlind/super-admin-all-sites-menu/releases/latest).
2. Upload to `wp-content/plugins/` and [network activate](https://wordpress.org/support/article/managing-plugins/#manual-upload-via-wordpress-admin).

**Composer**

```
composer require soderlind/super-admin-all-sites-menu
```

Filters
-------

[](#filters)

All filters are optional. Add them to a plugin or your theme's `functions.php`.

### `all_sites_menu_order_by`

[](#all_sites_menu_order_by)

Sort order. Accepts `name` (default), `id`, or `url`.

```
add_filter( 'all_sites_menu_order_by', function( string $order_by ): string {
    return 'url';
} );
```

### `all_sites_menu_load_increments`

[](#all_sites_menu_load_increments)

Sites fetched per REST batch. Default `100`.

```
add_filter( 'all_sites_menu_load_increments', function( int $increments ): int {
    return 300;
} );
```

### `all_sites_menu_plugin_trigger`

[](#all_sites_menu_plugin_trigger)

Plugins whose (de)activation triggers an IndexedDB refresh. Default: `[ 'restricted-site-access/restricted_site_access.php' ]`.

```
add_filter( 'all_sites_menu_plugin_trigger', function( array $plugins ): array {
    return [
        'restricted-site-access/restricted_site_access.php',
        'myplugin/myplugin.php',
    ];
} );
```

### `all_sites_menu_search_threshold`

[](#all_sites_menu_search_threshold)

Minimum number of sites before the search field appears. Default `20`.

```
add_filter( 'all_sites_menu_search_threshold', function( int $threshold ): int {
    return 40;
} );
```

### `all_sites_menu_force_refresh_expiration`

[](#all_sites_menu_force_refresh_expiration)

Seconds between forced cache refreshes. Default `3600` (1 hour). Set to `0` to disable.

```
add_filter( 'all_sites_menu_force_refresh_expiration', function( int $seconds ): int {
    return 7200;
} );
```

### `all_sites_menu_submenu_items`

[](#all_sites_menu_submenu_items)

Customise the per-site submenu items. Add, remove, or reorder entries. Each item is an associative array with `id`, `title`, and `href` keys.

**Parameters:**

ParamTypeDescription`$items``array`Default submenu items (Dashboard, New Post, New Page, …, Visit).`$blog_id``int`The numeric blog ID.`$admin_url``string`The site admin URL, e.g. `https://example.com/wp-admin`.`$site_url``string`The site frontend URL, e.g. `https://example.com`.**Add an "Edit Site" link (network admin):**

```
add_filter( 'all_sites_menu_submenu_items', function( array $items, int $blog_id, string $admin_url ): array {
    $items[] = [
        'id'    => 'edit-site',
        'title' => 'Edit Site',
        'href'  => network_admin_url( 'site-info.php?id=' . $blog_id ),
    ];
    return $items;
}, 10, 3 );
```

**Remove "Manage Comments":**

```
add_filter( 'all_sites_menu_submenu_items', function( array $items ): array {
    return array_filter( $items, fn( $item ) => $item['id'] !== 'c' );
} );
```

Demo
----

[](#demo)

Try it in [WordPress Playground](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/soderlind/super-admin-all-sites-menu/refs/heads/main/blueprint.json) (loads 50 subsites — may take a moment).

- Deactivate the plugin to see the default My Sites menu fail to scroll.
- Activate **Restricted Site Access** to see the red indicator icon.

How it works
------------

[](#how-it-works)

```
PHP (server)                        JS (browser)
─────────────                       ────────────
get_revision() ──inline_script──▶   pluginAllSitesMenu.revision
                                   │
                        Compare with snapshot metadata revision
                                   │
                        ┌──────────┴──────────┐
                        │ mismatch            │ match
                        ▼                     ▼
                    Clear DB              Use cached snapshot
                        │                     │
                        ▼                     │
                REST /sites?offset=0          │
                REST /sites?offset=100        │
                …(batched)                    │
                        │                     │
                        ▼                     ▼
                    Store in IndexedDB ──▶ Render menu

```

The PHP revision acts as an opaque cache version. It is bumped whenever a site is added/deleted, a blog name changes, or a monitored plugin is (de)activated. On the client side, a mismatch triggers a full re-fetch; a match means the cached snapshot is used as-is.

IndexedDB storage[![IndexedDB view in DevTools](.wordpress-org/screenshot-2.png)](.wordpress-org/screenshot-2.png)Development
-----------

[](#development)

```
# Install dependencies
npm install

# Build
npm run build

# Run tests
npm test

# Format source
npm run format
```

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md).

Credits
-------

[](#credits)

- [Dexie.js](https://github.com/dfahlander/Dexie.js) (Apache 2.0) — IndexedDB wrapper
- Submenu offset adjustment — [zephyr7501](https://qiita.com/zephyr7501/items/dd0967fddabd888b28c4)
- Search field CSS — [trepmal/my-sites-search](https://github.com/trepmal/my-sites-search)

License
-------

[](#license)

Copyright 2021 Per Soderlind. Licensed under the [GNU General Public License v2 or later](LICENSE).

You should have received a copy of the GNU Lesser General Public License along with the Extension. If not, see .

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance91

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 97.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~22 days

Recently: every ~5 days

Total

80

Last Release

68d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1649452?v=4)[Per Søderlind](/maintainers/soderlind)[@soderlind](https://github.com/soderlind)

---

Top Contributors

[![soderlind](https://avatars.githubusercontent.com/u/1649452?v=4)](https://github.com/soderlind "soderlind (402 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (8 commits)")[![Zodiac1978](https://avatars.githubusercontent.com/u/870475?v=4)](https://github.com/Zodiac1978 "Zodiac1978 (1 commits)")

---

Tags

wordpress-multisitewordpress-pluginwordpressmultisiteadminsuperadmin

### Embed Badge

![Health badge](/badges/soderlind-super-admin-all-sites-menu/health.svg)

```
[![Health](https://phpackages.com/badges/soderlind-super-admin-all-sites-menu/health.svg)](https://phpackages.com/packages/soderlind-super-admin-all-sites-menu)
```

###  Alternatives

[wecodemore/current-admin-info

Displays info about the current admin screen and its globals, contextual hooks, etc.

852.7k](/packages/wecodemore-current-admin-info)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
