Title: Menu Rules
Author: Phill Brown
Published: <strong>Ẹrẹ́nà 21, 2012</strong>
Last modified: Ọ̀pẹ  17, 2012

---

Ṣàwárí àwọn plugin

![](https://ps.w.org/menu-rules/assets/banner-772x250.png?rev=625921)

Plugin yìí **kò tíì ṣe àyẹ̀wò pẹ̀lú àwọn ìtújáde mẹ́ta pàtàkì tó kẹ́yìn ti WordPress**.
Ó lè jẹ́ pé a kò tọ́jú tàbí ṣe àtìlẹ́yìn fún un mọ́, ó sì lè ní àwọn ọ̀ràn ìbámu
nígbà tí a bá lò ó pẹ̀lú àwọn ẹ̀yà WordPress tuntun.

![](https://s.w.org/plugins/geopattern-icon/menu-rules_9d7d59.svg)

# Menu Rules

 Láti ọwọ́ [Phill Brown](https://profiles.wordpress.org/phill_brown/)

[Ṣe ìgbàsílẹ̀](https://downloads.wordpress.org/plugin/menu-rules.1.2.2.zip)

 * [Àwọn àlàyé](https://yor.wordpress.org/plugins/menu-rules/#description)
 * [Àwọn àgbéyẹ̀wò](https://yor.wordpress.org/plugins/menu-rules/#reviews)
 *  [Ìgbéwọlẹ̀](https://yor.wordpress.org/plugins/menu-rules/#installation)
 * [Ìdàgbàsókè](https://yor.wordpress.org/plugins/menu-rules/#developers)

 [Ìrànlọ́wọ́](https://wordpress.org/support/plugin/menu-rules/)

## Àpèjúwe

**[This plugin has been replaced by Context Manager](https://wordpress.org/extend/plugins/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](http://twitter.com/phill_brown) if you need any help with
the transfer.

#### About Menu Rules

In WordPress thereÌtumọ̀ Yorùbá: ’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:

 1. [Install](https://wordpress.org/extend/plugins/menu-rules/installation/) the Menu
    Rules plugin
 2. Add a menu rule
 3. Give it a meaningful name in the title field. This is just for administration purposes
 4. In the conditions field enter `is_singular( 'product' )`
 5. Choose _Emulate current page as a child but do not create a menu item._ as the 
    menu rule
 6. Find your products page in the menu dropdown
 7. Hit publish

#### Extending Menu Rules

 1. Create a class that extends `Menu_Rules_Handler` and includes a `handler` method.
 2. Write your custom functionality
 3. 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Ìtumọ̀ Yorùbá: ’re stuck, ask me for help on [Twitter](http://twitter.com/phill_brown).

## Ìgbéwọlẹ̀

 1. Download and unzip the folder from [the WordPress plugins repository](https://wordpress.org/extend/plugins/menu-rules/)
 2. Upload the menu-rules folder into to the `/wp-content/plugins/` directory
 3. Activate the plugin through the ‘Plugins’ menu in WordPress
 4. Open the ‘Appearance’ menu item and click the ‘Menu Rules’ link
 5. Add a new menu rule and click ok.

## Àwọn àgbéyẹ̀wò

Kò sí àwọn àgbéyẹ̀wò fún plugin yìí.

## Àwọn Olùkópa & Olùgbéejáde

“Menu Rules” jẹ́ ètò ìṣàmúlò orísun ṣíṣí sílẹ̀. Àwọn ènìyàn wọ̀nyí ti ṣe ìkópa sí
plugin yìí.

Àwọn Olùkópa

 *   [ Phill Brown ](https://profiles.wordpress.org/phill_brown/)

[Túmọ̀ “Menu Rules” sí èdè rẹ.](https://translate.wordpress.org/projects/wp-plugins/menu-rules)

### Ṣe o nífẹ̀ẹ́ sí ìdàgbàsókè?

[Ṣàwárí koodu](https://plugins.trac.wordpress.org/browser/menu-rules/), ṣàyẹ̀wò 
[ibi ìpamọ́ SVN](https://plugins.svn.wordpress.org/menu-rules/), tàbí ṣe àgbékalẹ̀
sí [àkọsílẹ̀ ìdàgbàsókè](https://plugins.trac.wordpress.org/log/menu-rules/) nípasẹ̀
[RSS](https://plugins.trac.wordpress.org/log/menu-rules/?limit=100&mode=stop_on_copy&format=rss).

## Àkọsílẹ̀ àwọn àyípadà

#### 1.2.2

 * Upgrade notice to Context Manager

#### 1.2.1

 * Fixed fatal bug in PHP 5.4

#### 1.2

 * Conditions and Reactions divided into 2 meta boxes to improve usability
 * Theme improvements
 * Added _description_ and _footer_ options to PB Framework forms
 * Moved plugin meta box styles into PB Framework
 * Added default meta box display in PB Framework
 * Added field setter for PB Framework meta box class
 * Bugfix where frontend assets werenÌtumọ̀ Yorùbá: ’t being loaded when on a new
   menu rule
 * Bugfix in meta box get_fields()
 * Bugfix for post updated messages

**Note:** Some stylesheets and Javascript files have had their handles changed.

#### 1.1

 * Added new _force inactive parent_ rule
 * Changed behaviour to one rule per item
 * Minor enhancements to PB Framework
 * Cleaned some unused code

## Àkójọpọ̀ Meta

 *  Ẹ̀yà **1.2.2**
 *  Ìgbàgbọ́hùn tó kẹ́yìn **ọdún 14 sẹ́yìn**
 *  Àwọn ìgbéwọlẹ̀ tó ṣiṣẹ́ **10+**
 *  Ẹ̀yà WordPress ** 3.2 tàbí ju bẹ́ẹ̀ lọ **
 *  Dánwò dé **3.5.2**
 *  Èdè
 * [English (US)](https://wordpress.org/plugins/menu-rules/)
 * Àwọn àmì
 * [context](https://yor.wordpress.org/plugins/tags/context/)[menu](https://yor.wordpress.org/plugins/tags/menu/)
   [menus](https://yor.wordpress.org/plugins/tags/menus/)[rules](https://yor.wordpress.org/plugins/tags/rules/)
 *  [Ìwòye Tó Péye](https://yor.wordpress.org/plugins/menu-rules/advanced/)

## Àwọn ìbò

Kò sí ìwádìí tí a tíì fi ránṣẹ́.

[Your review](https://wordpress.org/support/plugin/menu-rules/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/menu-rules/reviews/)

## Àwọn Olùkópa

 *   [ Phill Brown ](https://profiles.wordpress.org/phill_brown/)

## Ìrànlọ́wọ́

Nǹkan wà tí o fẹ́ sọ? Ṣé o nílò ìrànlọ́wọ́?

 [Wo àpéjọ ìrànlọ́wọ́](https://wordpress.org/support/plugin/menu-rules/)

## Ṣe ìtọrẹ

Ṣé o fẹ́ ṣe àtìlẹ́yìn fún ìlọsíwájú plugin yìí?

 [ Ṣe ìtọrẹ sí plugin yìí ](http://pbweb.co.uk/donate)