=== Deo Plugins Hub ===
Contributors: deoabejuela
Requires at least: 5.8
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Consolidate your custom-developed plugin admin menus under one "Deo Plugins" top-level menu with a native hover flyout.

== Description ==

Deo Plugins Hub adds a single "Deo Plugins" top-level item to the WordPress admin
sidebar and lets you pull your own plugin menus underneath it. Hovering the menu opens
the standard WordPress flyout listing every plugin you have grouped — so anyone using
the site can immediately tell which tools are yours.

Key points:

* Non-invasive. It reorganises the admin menu at runtime and never edits your other
  plugins, so nothing breaks when those plugins update.
* Author-based detection. The settings screen lists only top-level menus that belong
  to your own plugins, identified by the plugin's Author header (containing "Deo" or
  "DSS" by default; both the tokens and the rule are filterable). Custom post types and
  WordPress core menus are deliberately excluded. A collapsed fallback list is provided
  for anything detection misses.
* Ownership is resolved by reflecting each top-level page's callback back to the file
  that defines it, mapping that file to its plugin folder, and reading that plugin's
  author. This is why post types and core menus (which have no plugin callback) do not
  appear.
* Safe by design. Relocated pages keep working because WordPress still resolves each
  page's render hook back to its original top-level hook name. Critical menus
  (Dashboard, Plugins, Users, Profile) are locked and cannot be moved.
* Branded menu. Set a background and text colour for the Deo Plugins item so your
  tools stand out in the sidebar (defaults: #fae224 on black).
* Nested items too. Plugin pages that were registered as submenu items under another
  menu (for example under WooCommerce) can be linked into the Deo Plugins menu without
  moving them. The page stays registered under its original parent — so its render
  hook, screen options and assets are untouched — and is simply hidden from the old
  flyout and shown under Deo Plugins. This reverts cleanly if the hub is deactivated.

== Installation ==

1. Upload the `deo-plugins-hub` folder to `/wp-content/plugins/`, or install the ZIP
   via Plugins > Add New > Upload Plugin.
2. Activate the plugin.
3. Go to "Deo Plugins" in the admin sidebar, tick the menus to group, set the order,
   and save.

== Frequently Asked Questions ==

= How does it decide which plugins are "mine"? =
It reads each active plugin's Author header. If the author contains "Deo" or "DSS"
(case-insensitive), its top-level menu is offered in the "Your plugins" list. You can
change the tokens with the deo_plugins_hub_author_tokens filter, or override the whole
rule with the deo_plugins_hub_is_my_plugin filter.

= A plugin of mine is missing from the list. =
Open "Show other plugin menus" at the bottom of the screen — anything not attributed to
your author tokens appears there and can still be added. If its author header genuinely
does not contain your tokens, add a token via the filter or set its Author correctly.

= Why are custom post types and core menus not shown? =
By design. Ownership is detected from the plugin callback behind each menu; post types
and WordPress core menus have no plugin callback, so they are excluded.

= Will moving a plugin's menu break its settings page? =
No. Because each plugin registered its page with add_menu_page(), WordPress keeps the
original top-level hook name, so the render callback still fires when the page is
opened from the flyout.

= Who can see the grouped menu? =
By default the "Deo Plugins" parent requires the manage_options capability
(administrators). If you absorb a menu that lower roles previously accessed, they will
no longer see it unless you lower the parent capability via the stored settings.

= What about plugins that add themselves under an existing menu (not top level)? =
Use the "From other menus" section on the settings screen. It lists your plugin pages
that currently sit under another menu (detected by author) and lets you link them into
the Deo Plugins menu. The page is not physically moved — it stays registered under its
original parent so nothing about its behaviour changes — it is only linked under Deo
Plugins and hidden from its previous flyout. If you deactivate the hub, it reappears in
its original location.

= Can I change the menu colours? =
Yes. On the settings screen, "Menu background" and "Menu text" control the colour of
the Deo Plugins item in the sidebar. Defaults are #fae224 (background) and #000000
(text); the bundled icon is tinted to match the text colour.

== Changelog ==

= 1.0.0 =
* Initial release.
* Detects your own plugins by author ("Deo"/"DSS", filterable).
* Excludes custom post types and WordPress core menus; fallback list for misses.
* Links your plugin pages that are nested under other menus (e.g. WooCommerce)
  without changing how those pages work.
* Configurable background and text colour for the top-level menu.
