WP Manifestindependent plugin directory
manifest / utilities / fishotel-misc-plugin

FisHotel Misc Plugin

This will be a plugin that simply is created to be a catch all for replacing all the very small plugins that do very small jobs throughout the site. Removing bloat and only installing features and ideas that are needed.

by FisHotel · github.com/dierks27/fishotel-misc-plugin

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/dierks27/fishotel-misc-plugin/archive/refs/heads/main.zip

Readme

FisHotel Misc Plugin

A modular container plugin for WordPress with a dark theme admin interface.

Overview

FisHotel Misc Plugin provides a framework for managing independent feature "sections" through a unified dark-themed dashboard. Each section is a self-contained module that can be enabled or disabled independently.

Requirements

  • WordPress 5.8+
  • PHP 7.4+

Installation

  1. Upload the fishotel-misc-plugin folder to /wp-content/plugins/.
  2. Activate the plugin through the Plugins menu in WordPress.
  3. Navigate to FisHotel Tools → Dashboard to manage sections.

Architecture

fishotel-misc-plugin/
├── fishotel-misc-plugin.php        # Bootstrap & autoloader
├── includes/
│   ├── class-plugin.php            # Main plugin orchestrator
│   ├── class-section-manager.php   # Section discovery & toggling
│   └── sections/
│       ├── announcer/              # Example section (placeholder)
│       └── lottery-draw/           # Verifiable lottery for group orders
├── admin/
│   ├── css/admin-style.css         # Dark theme styles
│   ├── js/admin-script.js          # Toggle & AJAX handling
│   └── views/dashboard.php         # Dashboard template
└── README.md

Creating a Section

  1. Create a directory under includes/sections/ (e.g. my-feature/).
  2. Add a class file named class-my-feature.php.
  3. Implement the required static methods:
namespace FisHotel\Misc\Sections\My_feature;

class My_feature {

    public static function get_section_info() {
        return [
            'name'        => 'My Feature',
            'description' => 'A brief description.',
            'icon'        => 'dashicons-star-filled',
        ];
    }

    public static function boot() {
        // Initialise your feature hooks here.
    }

    public static function register_menu() {
        // Optional: add a submenu page.
    }
}

The Section Manager will automatically discover and register the section.

Version

0.35 — Lottery Draw: added a JSON importer so a whole draw can be pasted in rather than retyped fish by fish. Validation renders a preview (slots, tickets, and whether each fish is a real draw or rank-only) before anything is written. A payload carrying winners or waitlist is refused outright and named, never silently stripped, and import only ever writes a draft — results can only ever come from the draw itself. Each import is logged with who, when, and how many fish and tickets.

0.34 — Added Lottery Draw section — allocates contested group-order fish by a seeded lottery members can recompute in their own browser. The draw algorithm lives in exactly one implementation (draw.js), shared verbatim by the admin screen that produces a result and the public page that re-checks it; PHP stores and renders but never draws. Seeds are committed before entries close (or taken from external randomness), published draws are immutable, and a tampered result renders a red MISMATCH banner instead of a green one.

0.31 — Hotfix: Visitor Stats timezone bug. Pageviews now stored and queried in UTC, so the "online now" counter and recent-window aggregates work correctly regardless of site vs. MySQL server timezone. One-time backfill converts existing rows from site-local to UTC.

0.30 — Added Visitor Stats section — lightweight pageview tracker via JS beacon (cache-safe), with live "online now" counter, top pages, top products, top referrers, date-range toggle (24h/7d/30d), 30-day rolling retention, and a WP admin dashboard widget for at-a-glance stats.

0.29 — Added Coming Soon section — flag variable products with a release datetime to display a ribbon, live countdown, and "Notify Me" button while server-side blocking purchase. No cron: release transitions are detected per-request from a _fh_release_datetime parent meta vs. time(). Auto-reload on countdown end with random jitter.

0.28 — Added Product Archive section — archive WooCommerce products to hide from shop/admin without deleting.

0.26 — Add onsubmit="return false" HTML safeguard to Performance form; prevents hard POST if all JS fails.

0.25 — Full audit fix: skip gzip on AJAX (root cause), move form handler to inline script (Varnish-proof), safe response access.

0.24 — Use check_ajax_referer instead of check_admin_referer in Performance save handler.

0.23 — Wrap admin JS event bindings in DOM-ready handler to fix Performance form hard-POST.

0.22 — Replace redirect with wp_send_json_success in Performance save handler; add AJAX form submit.

0.21 — Fix Performance save handler: switch to wp_ajax hook and admin-ajax.php endpoint.

0.20 — Fix Performance toggle saving error; scope dashboard AJAX handler, add try/catch and AJAX guard.

0.19 — Add CSS/JS file combiner to Performance section.

0.18 — Add Performance Optimization section (script cleanup, cache headers, gzip, query-string removal).

0.17 — Defer plugin_dir_url() to plugins_loaded hook to fix early-load notice.

0.16 — Hide theme skip links when announcement bar is present.

0.15 — Raise z-index to 9999999 to fix theme skip links overlapping bar.

0.14 — Fix dark theme: white gap, white editor, TinyMCE iframe styling.

0.13 — Fix 3800px bar: replace the_content filter, add max-height constraint.

0.12 — Force position:fixed via JS inline styles to override Elementor CSS.

0.11 — Bulletproof rendering: wp_footer + JS DOM relocation + position:fixed.

0.10 — Complete rewrite: static positioning with CSS sticky, no body padding hacks.

0.9 — Fix bar stretching to full viewport; inline critical styles, explicit constraints.

0.8 — Switch to wp_body_open for rendering, with wp_footer fallback.

0.7 — Fix announcement bars not displaying (position: fixed for all bars).

0.6 — Move admin menu to position 4 (below Theme Panel, above Posts).

0.5 — Force dark theme with !important on whitelisted plugin pages.

0.4 — Fix update checker to read version from main branch (no releases needed).

0.3 — Redesign announcer admin: sidebar nav, list table toggles, dark theme, preview.

0.2 — Add Announcer section and GitHub update checker.

0.1 — Initial dark theme plugin framework.

Read the full README on GitHub →