- PHP 55.6%
- JavaScript 29.6%
- CSS 12%
- Shell 2.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Compact layout: title and prices share the first line, prices wrap below the title when they don't fit, and image + description take the whole card width underneath, so cards with several prices no longer turn into narrow columns of text. Long descriptions fold after a number of lines (block setting, default 4, 0 disables) with a "See more" / "See less" button. The button only shows when the text is actually cut, is re-checked on resize, and exposes aria-expanded / aria-controls. Without JavaScript the full text shows. Contrast: removed the stacked opacities on cards, descriptions, price labels and allergens, forced a normal font weight inside the block, and made subcategory filters #111 on #e0e0e0 without fading, the active one in reverse colours. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PXWEBrehMExZF8S8WjWboc |
||
| admin | ||
| assets/js | ||
| blocks/menu-display | ||
| includes | ||
| languages | ||
| LICENSE | ||
| lrob-la-carte.php | ||
| README.md | ||
| release.sh | ||
LRob - La Carte
A professional menu management plugin for bars and restaurants on WordPress.
Features
- Product Management: Organize your menu items by categories
- Hierarchical Categories: Support for nested categories
- Multiple Prices: Set different prices per product (size, format, etc.)
- Happy Hour: Mark special pricing with visual indicators
- Allergen Information: Display allergen warnings
- Badges: Highlight special items (new, recommended, spicy, etc.)
- Availability Status: Mark items as available, out of stock, or on request
- Gutenberg Block: Display your menu with customizable styling
- Multilingual Ready: Full i18n support (English + French included)
- Import/Export: Backup and restore your menu data
Prerequisite
- Gutenberg Page: We only provide a Gutenberg block. No shortcode.
Installation
- Download the latest release ZIP from git.lrob.net/WP/la-carte/releases
- Upload to WordPress via Plugins → Add New → Upload Plugin
- Activate the plugin
- Go to Menu → Categories to create your first categories
From 1.3.5 on, the plugin updates itself: new versions show up under Plugins and Dashboard → Updates like any other plugin, straight from this repository.
Usage
Creating Categories
- Navigate to Menu → Categories
- Click "Create Default Categories" for a quick start, or
- Click "Add Category" to create custom categories
- Organize with drag & drop, add icons (emoji or image)
Adding Products
- Go to Menu → Products
- Click "Add Product"
- Fill in product details:
- Name and description
- Category
- Image (optional)
- Prices (add multiple if needed)
- Allergens and badges
- Availability status
Display Your Menu
- Edit any page or post
- Add the "Menu Display" block
- Configure display options:
- Show full menu or single category
- Layout style (compact or classic)
- Colors and typography
- Show/hide images, descriptions, allergens
- Fold long descriptions behind a "See more" button (number of lines)
Development
Building a Release
Requirements:
- PHP CLI
- WP-CLI
- gettext (msgfmt)
- zip
# Install dependencies (Fedora/RHEL)
sudo dnf install php-cli php-mbstring wp-cli gettext zip
# Build release
cd lrob-la-carte/
./release.sh
The script will:
- Generate translation template (.pot)
- Compile translations (.po → .mo)
- Create a clean ZIP in
../releases/
Translation
The plugin is translation-ready with English as the default language.
Included translations:
- French (fr_FR)
Adding a new language:
# Create translation file
cp languages/lrob-la-carte-fr_FR.po languages/lrob-la-carte-es_ES.po
# Edit the file and translate msgstr values
nano languages/lrob-la-carte-es_ES.po
# Build release (automatically compiles all .po files)
./release.sh
Technical Details
- WordPress Version: 6.8+
- PHP Version: 8.4+
- Text Domain:
lrob-la-carte - Database Tables:
wp_lrob_categorieswp_lrob_productswp_lrob_product_prices
Support
For support, please open an issue or contact LRob directly
Credits
Developed by LRob, Hébergeur web spécialiste WordPress
License
LRob - La Carte Copyright (c) 2025 LRob
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see https://www.gnu.org/licenses/.
For more details, see https://www.gnu.org/licenses/gpl-2.0.html.
Changelog
1.0.0
- Initial release
- Complete English translation with i18n support
- Fixed front sorting, products hirerarchy and rendering
- French translation included
- Smart category creation (user-controlled, language-aware)
- Professional release build system
1.1.0
- Clean unused FontAwesome code
- Fixed product image management (overhaul)
- Removed not working product search in product management panel
- Made product management panel navigation similar to frontend
- Adapted product image to be a miniature image
- Improve product cards display by avoiding blank spaces
1.1.1
- Fixed property is_happy_hour
- Fixed JSON Export/import
1.2.0
-
Security overhaul
- Hardened all PHP functions: added nonce validation, strict input sanitization & output escaping.
- Restricted SQL operations with
$wpdb->prepare()and whitelisted table names. - Improved AJAX handlers security and error handling.
- Prevented XSS, CSRF, and injection vectors across admin and frontend.
-
JavaScript & admin improvements
- Rewritten JS logic for better validation and reliability.
- Removed unsafe inline operations and improved modal handling.
- Cleaned redundant event bindings and optimized AJAX calls.
-
CSS and UI cleanup
- Complete cleanup of
style.cssandadmin.css— unified structure and simplified code. - Removed redundant styles, excessive opacity, and hardcoded colors.
- All layout variables are now defined with
--lrob-*CSS variables for Gutenberg integration. - Improved responsive behavior and consistency between admin and frontend.
- Complete cleanup of
-
Performance and maintainability
- Reduced CSS and JS payloads.
- Improved layout rendering logic and block editor previews.
- Prepared structure for future Gutenberg variable bindings.
1.2.1
-
Performance Optimizations
- Admin class now loads only in admin context (not on frontend)
- Settings class no longer loaded on frontend
- Import/Export class lazy-loads only during actual import/export operations
- Frontend assets (JS/CSS) load only when block is present on page
- Admin assets load only on plugin admin pages
- Reduced memory footprint for non-admin requests
-
Code Quality Improvements
- Refactored AJAX handler registration (11 calls → 1 loop)
- Streamlined submenu registration (4 calls → 1 loop)
- Added
verify_ajax()helper for centralized AJAX security checks - Added
sanitize_object()helper to eliminate duplicate sanitization code - Removed redundant class requires from admin methods
- Nullsafe coalescing operator (
??=) for singleton pattern - Total: ~70+ lines reduced through DRY principles
-
Technical Changes
- Split admin vs frontend initialization hooks
- Database class always loads (required for activation hook + blocks)
- No breaking changes, full backward compatibility
1.3.5
- Automatic updates: the plugin now updates itself from the WordPress dashboard. New versions appear under Plugins and Dashboard → Updates, like any other plugin.
- Development moved to git.lrob.net/WP/la-carte — issues and releases live there from now on.
1.3.6
- Shorter, tidier cards: in the compact layout, the description now uses the full width of the card, even for products with several prices. Prices stay next to the name when they fit and move just below it when they don't.
- "See more" for long descriptions: long descriptions fold after 4 lines, with a "See more" / "See less" button (keyboard accessible, English and French). Choose the number of lines in the block settings (Display → Description lines), or 0 to always show the full text.
- Easier to read: descriptions, price labels and allergens are no longer faded to a pale grey, and keep a normal font weight even when the theme uses a light one. Subcategory buttons are now near-black on light grey, with the selected one shown in reverse colours. As long as your text colour contrasts well with the page background, the menu's text meets the WCAG AA contrast level.
Todo List
- Make caracteristics such as allergen or badges fully customizable
- Fix the "Unavailable" product's logic (currently doesn't make sense)
- Add other modes for general services with presets (my be used for any kind of service)
- Provide more customization options in Gutenberg editor




