=== Static menus | inventivo ===
Contributors: inventivogermany
Plugin Name:  Static Menus | inventivo
Plugin URI:   https://www.inventivo.de/webseiten/wordpress-plugins
Description:  Save WordPress menus as static files for faster page loading times
Version:      1.0.0
Author:       Nils Harder
Author URI:   https://www.inventivo.de
Tags: static menus, page speed
Requires at least: 5.0
Requires PHP: 7.4
Tested up to: 7.1
Stable tag: 1.0.0
Text Domain: inventivo-static-menus
Domain Path: /languages
License:      GPL2
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
*/

Save WordPress menus as static files for faster page loading times.

== Description ==

PLEASE NOTE: As of version 1.0.0 the static menu files are written to wp-content/uploads/inventivo-static-menus. Earlier versions wrote them to a /static/ folder in the document root, which is not writable on every server. If your theme includes those files, update the path after the upgrade.

Static menus - WordPress Plugin

This plugin saves every WordPress menu as a static HTML file in the folder wp-content/uploads/inventivo-static-menus. Whenever you save a menu the HTML files are recreated.
Including the menus as static files saves time for rendering the menus which results in faster page loading times.

This is an example for including the files in your WordPress Theme:

<?php require_once ( trailingslashit( wp_upload_dir()['basedir'] ) . 'inventivo-static-menus/primary.html' ); ?>

The filename is created from the menu location plus .html, for example primary.html. Please note for upgrades from version 0.0.4: without WPML the old files carried the literal suffix ICL_LANGUAGE_CODE in their name, so both the folder and the filename change with this version.

This plugin is tested with WordPress native menus and Max Megamenu Plugin.

Visit our <a href="https://www.inventivo.de">website</a> in order to see the plugin in action.

Our plugins are mall and simple:
- Responsive - fits to all screens
- Easy configuration
- Lightweight code

Get your Static Menus Plugin now!

How it works:

1. Upload the Plugin
2. Activate the Plugin
3. Configure the plugin to fit to your needs.

== Installation ==

Use WordPress' Add New Plugin feature, searching "Static menus | inventivo", or download the archive and:

1. Unzip the archive on your computer  
2. Upload `inventivo-static-menus` directory to the `/wp-content/plugins/` directory
3. Activate the plugin through the 'Plugins' menu in WordPress
4. Save any WordPress menu
5. Include the file(s) from the wp-content/uploads/inventivo-static-menus directory in your WordPress Theme

== Frequently Asked Questions ==


== Screenshots ==


== Changelog ==

1.0.0 Tested with WordPress 7.1 on PHP 7.4, 8.3 and 8.4. Fixed a fatal error that occurred on PHP 8 when saving a menu on a site without WPML. Important: static menu files are now written to wp-content/uploads/inventivo-static-menus instead of a /static/ folder in the document root, because that location is not writable on every server. Failed writes are now reported in the admin area instead of failing silently.
0.0.4   Internationalization
0.0.2   Code optimization
