PHPackages                             binary-wp/admin-guide - 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. binary-wp/admin-guide

ActiveLibrary[Admin Panels](/categories/admin)

binary-wp/admin-guide
=====================

JSON-driven admin guide builder for WordPress. Works as a standalone plugin or as a Composer dependency in another plugin/theme.

v0.8.0(1mo ago)047MITPHPPHP &gt;=7.4

Since Apr 10Pushed 1mo agoCompare

[ Source](https://github.com/binary-wp/admin-guide)[ Packagist](https://packagist.org/packages/binary-wp/admin-guide)[ RSS](/packages/binary-wp-admin-guide/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (3)Dependencies (2)Versions (10)Used By (0)

Admin Guide
===========

[](#admin-guide)

Admin guide builder for WordPress with hierarchical CPT storage, drag &amp; drop nav-menu style builder, WYSIWYG editor with placeholder pills, JSON-driven integration registry, and per-instance prefix isolation so multiple hosts can bundle it side-by-side.

Works **three ways**:

1. **Standalone plugin** — drop into `wp-content/plugins/admin-guide/`, activate, done.
2. **Composer dependency** in another plugin — `composer require binary-wp/admin-guide`, then `Plugin::boot()` from your plugin's main file.
3. **Composer dependency** in a theme — same as above from `functions.php`.

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

[](#requirements)

- PHP 7.4+
- WordPress 5.8+

Installation
------------

[](#installation)

### As a standalone plugin

[](#as-a-standalone-plugin)

```
cd wp-content/plugins
git clone https://github.com/wasilosos/admin-guide.git
cd admin-guide
composer install
```

Then activate "Admin Guide" in `Plugins`.

### As a Composer dependency

[](#as-a-composer-dependency)

```
composer require binary-wp/admin-guide
```

In your plugin/theme main file, boot an instance **before** `admin_menu`:

```
use BinaryWP\AdminGuide\Plugin;

// Minimal — package_path/url auto-detected from vendor location:
Plugin::boot( 'my_prefix' );
```

All options are optional. Full example with overrides:

```
Plugin::boot( 'my_prefix', [
    'package_path'    => __DIR__ . '/vendor/binary-wp/admin-guide/',
    'package_url'     => plugin_dir_url( __FILE__ ) . 'vendor/binary-wp/admin-guide/',
    'package_version' => '0.8.0',
    'guide_dir'       => __DIR__ . '/guide/',
    'capability'      => 'manage_options',
    'menu'            => [
        'parent'        => 'tools.php',     // or your own top-level slug, or '' for standalone
        'viewer_label'  => 'Admin Guide',
        'builder_label' => 'Guide Builder',
    ],
    'integrations_dirs' => [ __DIR__ . '/my-integrations/' ],
] );
```

Auto-detection: `package_path` defaults to the package's own directory. `package_url` is resolved via `plugins_url()` or theme URI. `guide_dir` falls back to the nearest plugin/theme root + `/guide/`.

Your instance prefix (`'my_prefix'`) scopes all CPT slugs, AJAX actions, nonces, asset handles, and admin page slugs so multiple instances can coexist.

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

[](#how-it-works)

### Storage

[](#storage)

Guide pages are stored as a **hierarchical custom post type** (`{prefix}_guide`):

FieldUsage`post_title`Tab label`post_name`Tab slug`post_content`HTML template with `{{placeholders}}``post_parent`Hierarchy (0 = top-level, &gt;0 = child)`menu_order`Sort position`_guide_source` meta`system` / `post_type` / `taxonomy` / `platform` / `custom``_guide_group` meta`1` = group-only tab (no own content, shows first child)Benefits: revisions, REST API, standard WP queries, native WP export.

### Builder page

[](#builder-page)

Nav-menu style drag &amp; drop sortable with depth management (max 1 level deep). Matches WP core menu editor look and feel. Sidebar with metaboxes for adding system guides (from integrations) and custom guides.

### Editor page

[](#editor-page)

Standalone TinyMCE with placeholder palette sidebar. Click to insert or drag &amp; drop placeholders into the editor. Placeholders render as non-editable pills in the editor and are stored as `{{tokens}}` in the database.

### Output generation

[](#output-generation)

On every save, the generator:

1. Queries all published `{prefix}_guide` posts
2. Resolves `{{placeholders}}` via PHP callbacks
3. Writes `.html` snapshots to `guide/html/` (for fast admin rendering)
4. Writes `.md` copies to `guide/` (portable reading, via `league/html-to-markdown`)

### Display

[](#display)

The host renders the guide viewer with:

- Top-level tabs as horizontal `nav-tab-wrapper`
- Children as inline sub-navigation (WooCommerce-style `subsubsub`)
- Group-only tabs auto-fall through to first child content

Per-host integrations
---------------------

[](#per-host-integrations)

Ship your own JSON integration definitions alongside the package:

```
Plugin::boot( 'my_prefix', [
    'integrations_dirs' => [ __DIR__ . '/guide-integrations/' ],
    // ...
] );
```

Each directory is scanned for `*.json` integration files. Each JSON defines:

- `name`, `slug`, `requires` (class/function/option checks for auto-detection)
- `placeholders[]` with token, description, type, optional callback
- `tab_templates[]` for auto-creating system tabs
- `external_status` for live service status checks

Render functions live in `functions/{slug}.php` alongside the JSON files.

### Example: custom integration JSON

[](#example-custom-integration-json)

Create `guide-integrations/my-crm.json`:

```
{
    "slug": "my-crm",
    "name": "My CRM",
    "prefix": "my_crm",
    "requires": { "plugin": "my-crm/my-crm.php" },
    "settings_url": "admin.php?page=my-crm-settings",
    "docs_url": "https://example.com/docs/",
    "external": [
        {
            "service": "API Connection",
            "description": "CRM sync status",
            "check": "my_crm_api"
        }
    ],
    "tab_templates": [
        { "slug": "my-crm-overview", "label": "My CRM Overview" }
    ],
    "placeholders": {
        "{{my_crm_sync_status}}": {
            "callback": "guide_render_my_crm_sync_status",
            "description": "Current CRM sync status"
        },
        "{{my_crm_settings_link}}": {
            "type": "settings_link",
            "url": "admin.php?page=my-crm-settings",
            "label": "CRM Settings",
            "description": "Link to CRM settings page"
        }
    }
}
```

Then create `guide-integrations/functions/my-crm.php` with the render callback:

```
function guide_render_my_crm_sync_status() {
    $last_sync = get_option( 'my_crm_last_sync' );
    return $last_sync
        ? sprintf( 'Last sync: %s', human_time_diff( $last_sync ) . ' ago' )
        : 'Not synced yet';
}
```

The integration auto-detects when `my-crm/my-crm.php` is active — its placeholders and tab templates appear in the builder automatically.

Exposed API
-----------

[](#exposed-api)

```
$plugin = \BinaryWP\AdminGuide\Plugin::get( 'my_prefix' );

// Tabs
$plugin->config->get_tabs();                   // [ slug => label ] (top-level)
$plugin->config->get_children( $parent_slug ); // [ slug => label ] (children)
$plugin->config->get_all_guides();             // full tree with depth
$plugin->config->get_template( $slug );        // raw HTML content
$plugin->config->add_tab( $slug, $label, $source );
$plugin->config->remove_tab( $slug );
$plugin->config->save_order( $items );         // [{ id, parent_id, position }]

// Import / Export
$plugin->config->export();                     // JSON-serializable array
$plugin->config->import( $bundle );            // true | WP_Error

// Generator
$plugin->generator->generate();                // regenerate all output files
$plugin->generator->read_tab( $slug );         // rendered HTML for display
$plugin->generator->remove_files( $slug );     // clean up generated files for a slug
```

Hooks
-----

[](#hooks)

Filters (each also fires a prefix-scoped variant, e.g. `my_prefix/guide_builder/guide_dir`):

- `guide_builder/guide_dir` — output directory for generated files
- `guide_builder/system_tabs` — available system tab groups in the builder UI

Actions:

- `guide_builder/placeholders` — register custom placeholders
- `guide_builder/integrations` — register additional integrations at runtime

Translations
------------

[](#translations)

The package ships with a translation template (`languages/binary-wp-admin-guide.pot`) and a Czech translation (`cs_CZ`). Text domain: `binary-wp-admin-guide`, loaded on `init` priority 1.

To contribute a translation:

1. Copy `languages/binary-wp-admin-guide.pot` to `languages/binary-wp-admin-guide-{locale}.po`
2. Translate each `msgstr` (use [Poedit](https://poedit.net/) or any PO editor)
3. Compile: `msgfmt --check --output-file=languages/binary-wp-admin-guide-{locale}.mo languages/binary-wp-admin-guide-{locale}.po`
4. Submit a PR with both `.po` and `.mo` files

### Regenerating the `.pot` template

[](#regenerating-the-pot-template)

```
xgettext \
  --language=PHP --from-code=UTF-8 \
  --keyword=__:1 --keyword=_e:1 \
  --keyword=esc_html__:1 --keyword=esc_html_e:1 \
  --keyword=esc_attr__:1 --keyword=esc_attr_e:1 \
  --keyword=_x:1,2c --keyword=esc_html_x:1,2c \
  --keyword=_n:1,2 --keyword=_nx:1,2,4c \
  --copyright-holder='BinaryWP' \
  --package-name='Admin Guide' --package-version='0.6.2' \
  --msgid-bugs-address='https://github.com/binary-wp/admin-guide/issues' \
  --add-comments=translators: \
  --output=languages/binary-wp-admin-guide.pot \
  src/*.php integrations/functions/*.php admin-guide.php
```

License
-------

[](#license)

MIT

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance94

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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 ~4 days

Total

8

Last Release

31d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/36801f8e5b4b1e0e842d88e17b4fd2d4f84d3a9392a55bf81106c3e4c4c674ab?d=identicon)[wasil-cz](/maintainers/wasil-cz)

---

Top Contributors

[![wasil-cz](https://avatars.githubusercontent.com/u/2989706?v=4)](https://github.com/wasil-cz "wasil-cz (13 commits)")

---

Tags

wordpressdocumentationbuilderadminguidehelp

### Embed Badge

![Health badge](/badges/binary-wp-admin-guide/health.svg)

```
[![Health](https://phpackages.com/badges/binary-wp-admin-guide/health.svg)](https://phpackages.com/packages/binary-wp-admin-guide)
```

###  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)
