Skip to content

Instantly share code, notes, and snippets.

View arenagroove's full-sized avatar

Luis Alberto Martinez arenagroove

  • Less Rain GmbH
  • Vilanova i la Geltrú, Catalonia, Spain
  • 09:17 (UTC +02:00)
  • LinkedIn in/luis-martinez-lr
View GitHub Profile
@arenagroove
arenagroove / lr-temporary-download.php
Last active April 13, 2026 06:09
Wordpress MU plugin for obfuscated, time-limited download links for multiple files (PDF, ZIP, etc.)
<?php
/**
* Plugin Name: LR Temporary Download
* Description: Serve files through obfuscated, time-limited download links. The public URL (/?download=slug) is stable and safe to publish in forms, emails, and confirmation pages — it redirects through a short-lived rotating token so the actual file path is never exposed. Supports PDF, ZIP, DOCX, XLSX, PPTX, MP4. Per-file download counters, attachment/inline disposition, and configurable token lifetime. Not a login gate or paywall — just a clean delivery layer with visibility.
*
* Usage:
* - Public, stable URL: /?download=SLUG
* - Internal, temporary URL: /?download_token=XYZ (never used manually)
*
* Admin:
@arenagroove
arenagroove / lr-acf-quick-text-editor.php
Last active April 14, 2026 03:43
LR ACF Quick Text Editor
<?php
/**
* Plugin Name: LR ACF Quick Text Editor
* Description: Lightweight meta box for editing ACF flexible content text fields directly in the post editor. Also supports root-level ACF fields outside flex content. Configurable via Settings > Quick Text Editor.
* Author: Luis Martinez
* Author URI: https://www.lessrain.com
* Version: 7.3.3
* Requires PHP: 7.4
*
* Changelog 7.3.3 (14/04/2026)
@arenagroove
arenagroove / lr-acf-suite.php
Created March 17, 2026 05:29
LR ACF Suite, MU utility plugin for managing ACF/ACFE behavior across projects.
<?php
/**
* Plugin Name: LR ACF Suite
* Description: ACF/ACFE management — performance, field-group collapse, permissions and HTML escaping. Configurable via Settings → LR ACF Suite.
* Version: 1.1.1
* Author: Luis Martinez
* Author URI: https://www.lessrain.com
*/
if ( ! defined( 'ABSPATH' ) ) exit;
@arenagroove
arenagroove / lr-admin-columns.php
Last active April 14, 2026 13:13
WordPress MU plugin — Admin Columns — Featured Image, URL Path, Modified Date, Post ID. Per-column enable/disable, role visibility, and URL path truncation — all configurable via Settings → LR Admin Columns.
<?php
/**
* Plugin Name: LR Admin Columns
* Description: Unified admin list columns — Featured Image, URL Path, Modified Date, Post ID. Per-column enable/disable, role visibility, and URL path truncation — all configurable via Settings → LR Admin Columns.
* Version: 1.3.6
* Author: Luis Martinez
* Author URI: https://www.lessrain.com
* Requires at least: 5.6
* Tested up to: 6.5
* Requires PHP: 7.4
@arenagroove
arenagroove / lr-llms-generator.php
Last active April 16, 2026 02:44
WordPress MU plugin — unified llms.txt + per-page .md endpoint for LLM content serving. Lazy-generated Markdown with HTML→MD converter, shared exclusions, YAML frontmatter, Polylang support, rate limiting, and a single settings page. Built for Classic Editor + ACF sites using the Less Rain framework.
<?php
/**
* Plugin Name: LR LLMs Generator
* Description: Generates a multilingual llms.txt for LLM indexing and serves clean .md endpoints for every public post/page. Unified settings under Tools.
* Version: 3.5.2
* Author: Luis Martinez
* Author URI: https://www.lessrain.com
* Requires at least: 5.6
* Tested up to: 6.5
* Requires PHP: 7.4
@arenagroove
arenagroove / lr-db-search-replace.php
Created March 4, 2026 05:57
WordPress MU plugin for DB search and replace. Preview first, select rows, then apply. Hard-locked by default: attachments, core options, media paths, GUIDs.
<?php
/**
* Plugin Name: LR DB Search & Replace (MU)
* Description: Safe serialization-aware DB search & replace. Protected by
* default — attachments, core options, media paths, GUIDs are
* always locked unless you explicitly unlock them.
* Author: Luis Martinez / Less Rain
* Version: 4.0.0
*/
@arenagroove
arenagroove / lr-resource-hints-manager.php
Created February 22, 2026 06:17
WP mu-plugins: Centralized preload / prefetch / preconnect manager for critical assets (hero videos, images, fonts).
<?php
/**
* Plugin Name: LR Resource Hints Manager
* Description: Centralized preload / prefetch / preconnect manager for critical assets (hero videos, images, fonts).
* Supports responsive image preloading via the `media` attribute — define separate hints for
* desktop and mobile breakpoints on the same page slot.
* Page-specific and infrastructure-safe. Designed for performance tuning.
*
* Admin:
* Tools → LR Resource Hints
@arenagroove
arenagroove / Quickstart.md
Created December 18, 2025 06:18
A lightweight, secure WordPress plugin that displays a customizable Coming Soon page to non-logged-in users while maintaining proper HTTP status codes and SEO protection.

Quick Start Guide

Installation (2 minutes)

Option A: Must-Use Plugin (Recommended)

# Upload to your WordPress installation
wp-content/mu-plugins/lr-coming-soon-page.php
@arenagroove
arenagroove / markdown-stress-test.md
Last active December 4, 2025 15:11
CodePen Home ChatGPT → Markdown
@arenagroove
arenagroove / lr-classic-editor-compatibility.php
Last active December 3, 2025 06:00
Fix WordPress 6.9+ CSS Loading Issue (Classic Editor + ACF + WPForms)
/**
* Plugin Name: LR Classic Editor Compatibility
* Plugin URI: https://www.lessrain.com
* Description: Ensures proper CSS loading for Classic Editor, ACF, and shortcode-based content in WordPress 6.9+.
* Author: Luis Martinez
* Author URI: https://www.lessrain.com
* Version: 1.0.0
*/
// Prevent direct access