=== DSS Top Bar ===
Contributors: ejscorp
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPL-2.0-or-later

Fully configurable top menu bar rendered via shortcode.

== Description ==

Adds a "Top Bar" admin menu where an administrator can configure:

* On/off display toggle
* Background color, text color, padding, margin, font size
* Alignment (left / center / right) and link separator character
* Unlimited menu items, each one of three types:
  * Plain link — text link (pipe-separated, as in the reference design)
  * Styled button — custom background + text color
  * Icon only — no visible label (label becomes the aria-label)
* Each item links to an internal page (dropdown) or a custom/external URL
  (https://, tel:, mailto: all supported) with target _self or _blank
  (_blank automatically gets rel="noopener noreferrer")
* Icons per item: built-in SVGs (phone, email, Facebook, Instagram, X,
  LinkedIn, YouTube, WhatsApp, TikTok, location), any WordPress Dashicon,
  or pasted 3rd-party SVG markup (sanitized on save)

== Usage ==

Shortcode anywhere:

[dss_topbar]

Optional attribute overrides:

[dss_topbar align="left" class="my-extra-class"]

In a PHP template:

<?php echo do_shortcode( '[dss_topbar]' ); ?>

In a Timber/Twig template:

{{ function('do_shortcode', '[dss_topbar]') | raw }}

== Notes ==

* The complete frontend stylesheet is INLINED into the shortcode output and
  printed once per page request. This makes the bar immune to enqueue timing:
  it styles correctly even when the shortcode runs after wp_head() (e.g. placed
  inside a Timber/Twig body block) and even if the theme never calls wp_footer().
* Frontend CSS is fully scoped under .dss-topbar with an "html body" prefix and
  !important declarations, so it cannot leak into the theme and the theme's
  global CSS cannot override it.
* The inner wrapper background is forced transparent so a theme rule like
  div{background:#eee} cannot bleed through the bar.
* Dashicons stylesheet is enqueued in <head> (on wp_enqueue_scripts) only when
  at least one item uses a Dashicon, so it loads reliably regardless of where
  the shortcode is placed.
* Fully responsive: items wrap and center below 768px; font and padding scale
  down below 480px.

== Changelog ==

= 1.1.0 =
* Fix: top bar now styles correctly when the shortcode runs after wp_head()
  (Timber/Twig body placement). CSS is inlined into the output instead of being
  enqueued late. Dashicons enqueued early only when needed. Inner wrapper
  background forced transparent.

= 1.0.0 =
* Initial release.
