{"id":42957,"date":"2016-04-02T09:18:43","date_gmt":"2016-04-02T09:18:43","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/menu-in-menu\/"},"modified":"2016-04-02T09:19:52","modified_gmt":"2016-04-02T09:19:52","slug":"menu-in-menu","status":"publish","type":"plugin","link":"https:\/\/hr.wordpress.org\/plugins\/menu-in-menu\/","author":8776642,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.0","stable_tag":"1.0.0","tested":"4.5.33","requires":"4.3","requires_php":"","requires_plugins":"","header_name":"Menu In Menu","header_author":"Roger Barrett","header_description":"","assets_banners_color":"99cfb9","last_updated":"2016-04-02 09:19:52","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.paypal.com\/cgi-bin\/webscr?cmd=_s-xclick&hosted_button_id=KP2LVCBXNCEB4","header_plugin_uri":"http:\/\/wordpress.org\/plugins\/menu-in-menu\/","header_author_uri":"http:\/\/www.wizzud.com\/","rating":5,"author_block_rating":0,"active_installs":200,"downloads":9640,"num_ratings":4,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"1.0.0":"<ul>\n<li>New release<\/li>\n<\/ul>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"4"},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":"1385572","resolution":"128x128","location":"assets"},"icon-256x256.png":{"filename":"icon-256x256.png","revision":"1385572","resolution":"256x256","location":"assets"}},"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":"1385572","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1384921","resolution":"1","location":"assets"}},"screenshots":{"1":"Navigation Menus metabox"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1865],"plugin_category":[43],"plugin_contributors":[78854],"plugin_business_model":[],"class_list":["post-42957","plugin","type-plugin","status-publish","hentry","plugin_tags-menu","plugin_category-customization","plugin_contributors-wizzud","plugin_committers-wizzud"],"banners":{"banner":"https:\/\/ps.w.org\/menu-in-menu\/assets\/banner-772x250.png?rev=1385572","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/menu-in-menu\/assets\/icon-128x128.png?rev=1385572","icon_2x":"https:\/\/ps.w.org\/menu-in-menu\/assets\/icon-256x256.png?rev=1385572","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/menu-in-menu\/assets\/screenshot-1.png?rev=1384921","caption":"Navigation Menus metabox"}],"raw_content":"<!--section=description-->\n<p>This plugin enables a Custom Menu to \"include\" any other Custom Menu, so groups of items that get repeated across multiple menus can be defined just once and then included into any other menu at will.<\/p>\n\n<p>If you have a set of menu items that you repeat across several menus, it can be a bit of a pain when\none of that set needs updating and you have to go through all your menus changing each one.<\/p>\n\n<p>This plugin allows you to define the subset of items as a separate menu, and then include that menu\ninto any other menu. If you then need to maintain one of the items in the subset, you only need to update\none menu, and the change automatically gets reflected in all the other menus that include that subset!<\/p>\n\n<p>It's as easy to use as adding a Post, Page, Category or Tag to your menu...<\/p>\n\n<p>With the plugin activated, go to your Menus page in admin.\nAs well as being able to add Posts, Categories, etc, to your menu, you should now see a metabox for\n<strong>Navigation Menus<\/strong> which has checkboxes for each of your defined Menus (if you don't see the metabox,\ncheck your Screen Options settings at the top of the page).\nAll you need to do is create your submenu (as you would any other menu),\nopen the menu you want to insert the new submenu into,\nselect the submenu from the Navigation Menus metabox,\nAdd it,\nand position it.\nSave and you're done!<\/p>\n\n<p>The inserted Menu <em>replaces<\/em> the Navigation Menu item in the menu. You can insert multiple instances of the\nsame submenu into one menu, and you can include a submenu into as many other menus as you need.<\/p>\n\n<h4>Perpetual Loops<\/h4>\n\n<p>The one thing that the plugin guards against is getting into a never-ending loop : it won't prevent you\nsetting one up (see FAQs as to why), but it <em>will not<\/em> output any submenu that has itself as an antecedent.<\/p>\n\n<p>For example, you can set up menus such that Menu A includes Menu B, which includes Menu C. Fine, no problem.\nHowever, if you were to also add Menu B into Menu C as a Navigation Menu item,\nthen no matter which menu you choose to output, you have a potential loop\n(... B, includes C, includes B, includes C, ... and so on).<\/p>\n\n<p>If WP_DEBUG is enabled, the plugin will print a warning wherever it has taken action to prevent a loop condition.\nThis behaviour can be changed by hooking into a filter (see FAQs).<\/p>\n\n<h4>Frontend Only<\/h4>\n\n<p>The plugin only performs the menu replacement at the frontend of WordPress (ie. not on Admin pages).\nThis behaviour can be changed by hooking into a filter (see FAQs),\nbut please ensure that you do <strong>not<\/strong> enable it for the Menus admin page!<\/p>\n\n<!--section=installation-->\n<p>Install and activate via 'Plugins &gt; Add New' in your WP Admin.<\/p>\n\n<!--section=faq-->\n<p>If you have a question or problem that is not covered here, please use the <a href=\"https:\/\/wordpress.org\/support\/plugin\/menu-in-menu\">Support forum<\/a>.<\/p>\n<dl>\n<dt>Why can't I see the Navigation Menus metabox on the Menus page?<\/dt>\n<dd><p>Check your Screen Options (top of the page). Screen Options give you the ability to turn off\/on metaboxes,\nand it's possible that Naviagtion Menus is turned off : just activate the checkbox in Screen Options and\nthe Navigation Menus metabox should appear (assuming the plugin is activated, of course).<\/p><\/dd>\n<dt>Why isn't an included menu appearing in the menu I put it in?<\/dt>\n<dd><p>It's possible that the inclusion might have created a perpetual loop, and the plugin won't allow that - it\nsimply refuses to output any menu that is contained within itself (ie. has itself as an antedecent). If you enable\nWP_DEBUG you will see a message <em>if<\/em> the plugin has taken action to prevent a perpetual loop.\nIf it's not a perpetual loop situation then it may be that another plugin is getting in the way. And that is\na lot harder to resolve!<\/p><\/dd>\n<dt>Why doesn't the plugin stop me setting up a perpetual loop?<\/dt>\n<dd><p>Because they have the potential to be used deliberately.\nTake an example where Menu A includes Menu B, and Menu includes Menu A.\nIf you output Menu A, you'll get Menu A with Menu B included.\nIf you output Menu B, you'll get Menu B with Menu A included.\nThey may be occasions where this is useful.<\/p><\/dd>\n<dt>How do I resolve an unintended perpetual loop?<\/dt>\n<dd><p>Enable WP_DEBUG and check the message produced by the plugin. Part of the message gives the names of menus\nthat have included one another, the last one being the one that would have caused the loop. Somewhere\npreceding it you should see the same menu name. The first name was the menu that was requested to be\ndisplayed, and it included the 2nd, which in turn included the 3rd, etc. You can use this to determine\nhow you need to restructure your menus so as to avoid any perpetual loops.<\/p><\/dd>\n<dt>Can I prevent the notification of a perpetual loop, while keeping WP_DEBUG enabled?<\/dt>\n<dd><p>Yes, there's a filter you can hook into. Add the following code (modified to suit) to your theme's\nfunctions.php (or wherever you feel is more appropriate)...<\/p>\n\n<pre><code>add_filter( 'mim_notify_recursion', your_function_name );\nfunction your_function_name( $notify ) { return false; }\n<\/code><\/pre>\n\n<p>By default, <code>$notify<\/code> is <strong>false<\/strong> <em>unless<\/em> WP_DEBUG is enabled.<\/p><\/dd>\n<dt>Can I get notification of perpetual loops without having to enable WP_DEBUG?<\/dt>\n<dd><p>This is the flip side of the previous question,\nand you simply need to return <strong>true<\/strong> - instead of false - from a 'mim_notify_recursion' filter (see above).<\/p><\/dd>\n<dt>Can I enable the menu replacement for Admin pages?<\/dt>\n<dd><p>Yes, there's a filter you can hook into. Add the following code (modified to suit) to your theme's\nfunctions.php (or wherever you feel is more appropriate)...<\/p>\n\n<pre><code>add_filter( 'mim_expand_menus', your_function_name );\nfunction your_function_name( $expand, $current_screen ) {\n  \/\/ex. enables everywhere except Menus admin page...\n  return $expand || empty( $current_screen ) || $current_screen != 'nav-menus';\n}\n<\/code><\/pre>\n\n<p>By default, <code>$expand<\/code> is <strong>true<\/strong> <em>unless<\/em> running Admin.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>","raw_excerpt":"Place one Custom Menu inside another Custom Menu","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/42957","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=42957"}],"author":[{"embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/wizzud"}],"wp:attachment":[{"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=42957"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=42957"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=42957"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=42957"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=42957"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/hr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=42957"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}