WordPress plugin intelligence profile

Menu Rules

An extension of the menu system with context-based rules and a flexible framework to write your own.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 3.5
Current version1.2.2
WordPress coverageTested up to WordPress 3.5
Minimum stackWP 3.2 · PHP —
Directory statusactive
Last directory update17 Dec 201213y ago
Active installations10Adoption metric — not a quality score
WordPress.org ratingNo WordPress.org ratings yet
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Menu Rules version 1.2.2 as active, updated 13y ago and tested up to WordPress 3.5.

Overview

About this plugin

This plugin has been replaced by Context Manager

Context Manager does the same job as Menu Rules, but comes with many more features to save you time and unnecessary coding.

Menu Rules can run alongside Context Manager while you migrate your rules across. Speak to me on Twitter if you need any help with the transfer.

About Menu Rules

In WordPress there’s no way to apply context to the menu system. Menu Rules solves this problem and gives you a framework to write your own menu extensions.

Example usage

You have an e-commerce website that has a custom post type called ‘products’. You have a page that lists products which is listed in your main menu. A user visits the page and the menu item becomes ‘active’.

You click through to a product and the menu item loses its active state. This is how to fix it with menu rules:

  • Install the Menu Rules plugin
  • Add a menu rule
  • Give it a meaningful name in the title field. This is just for administration purposes
  • In the conditions field enter is_singular( 'product' )
  • Choose Emulate current page as a child but do not create a menu item. as the menu rule
  • Find your products page in the menu dropdown
  • Hit publish

Extending Menu Rules

  • Create a class that extends Menu_Rules_Handler and includes a handler method.
  • Write your custom functionality
  • Register your class using add_action( 'plugins_loaded', create_function( '', 'Menu_Rules::register( "Your_Menu_Rule_Class" );' ) );

Built-in rules are found in menu-rules/rules/

Support

If you’re stuck, ask me for help on Twitter.

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • parent menu
  • context
  • menus
  • rules
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 3.5

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 3.5.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to3.5
Minimum requirementsWordPress 3.2 · PHP not listed
Update activity17 Dec 201213y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.