=== DSS Footer ===
Contributors: deoboy
Tags: footer, dynamic footer, woocommerce, columns, social icons
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A dependency-free, fully dynamic site footer. Manage the logo, about text, unlimited social icons, and unlimited link/contact columns from one admin screen.

== Description ==

DSS Footer turns the Discount Safety Signs Australia footer into a fully
manageable component — no ACF, no page builder, no theme edits required.

From a single settings screen you can:

* Set the **logo** (Media Library picker or direct URL) and **about** text.
* Add **unlimited social icons**, each with its own URL. Choose from built-in
  brand icons (Facebook, X, Instagram, LinkedIn, YouTube, TikTok, Pinterest,
  WhatsApp, Telegram, GitHub, website, generic link) or upload a **custom image**.
* Build **unlimited columns**. Each column is either:
  * a **Links list** — add as many links as you like, each with an optional
    "open in new tab" toggle; or
  * a **Contact block** — labelled rows (label / value / sub-text / optional
    link) plus optional **action buttons** (e.g. "Call now", "Email us").
* Reorder everything by drag-and-drop.
* Customise colours, max width, and an optional scroll-reveal animation.

The footer is output with a shortcode and is mobile-first: on small screens each
column becomes a tap-to-collapse accordion.

== Installation ==

1. Upload the `dss-footer` folder to `/wp-content/plugins/` (or install the ZIP
   via Plugins → Add New → Upload Plugin).
2. Activate **DSS Footer**. On activation the current DSS footer content is
   seeded automatically, so the footer looks identical out of the box.
3. Go to **DSS Footer** in the admin menu to edit any content.

== Usage ==

Output the footer anywhere with the shortcode:

`[dss_footer]`

**Timber / Twig (this project):** pass it through the context as a string, the
same way the previous footer shortcode was passed:

`$context['dss_footer'] = do_shortcode( '[dss_footer]' );`

or use the template tag directly:

`$context['dss_footer'] = dss_footer_render();`

then render it in your Twig layout where the old footer string was printed.

**Classic PHP theme:**

`<?php dss_footer(); ?>`

== Developer notes ==

All data lives in a single option (`dss_footer`). Filters are available:

* `dss_footer_settings` — modify resolved settings before render.
* `dss_footer_html` — modify the final markup.
* `dss_footer_enqueue_assets` — return false to skip global asset enqueue
  (the shortcode still enqueues on demand).

Frontend styles are fully namespaced under `.dssf-footer` and driven by inline
CSS custom properties, so they will not collide with theme styles.

== Changelog ==

= 1.1.0 =
* Mobile accordion now starts collapsed. Every footer column is closed on load at 768px and under, so the footer no longer pushes the page down on a phone. Desktop is unchanged and always fully expanded.
* The collapsed state is emitted in the markup rather than applied by JavaScript, so the first paint is already correct. Doing it in the script would flash all columns open before snapping them shut.
* New setting: Appearance > Mobile accordion. Untick to restore the previous behaviour of every column starting open.
* Added a noscript fallback that forces the columns open when scripting is unavailable, preserving the plugin's progressive-enhancement guarantee.
* aria-expanded is now kept in sync across the 768px breakpoint, so it always describes what is actually on screen.

= 1.0.0 =
* Initial release: dynamic branding, unlimited social icons, unlimited
  link/contact columns with action buttons, drag-and-drop ordering, appearance
  controls, mobile accordion, and scroll reveal.
