{"id":14326,"date":"2011-08-30T16:38:12","date_gmt":"2011-08-30T16:38:12","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/section-subnav\/"},"modified":"2011-08-30T16:40:54","modified_gmt":"2011-08-30T16:40:54","slug":"section-subnav","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/section-subnav\/","author":5804107,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0.9","stable_tag":"0.9","tested":"3.2.1","requires":"3.1","requires_php":"","requires_plugins":"","header_name":"Section Subnav","header_author":"Benjamin Knight","header_description":"","assets_banners_color":"","last_updated":"2011-08-30 16:40:54","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.paypal.com\/cgi-bin\/webscr?cmd=_donations&business=NYCGJ7YCGUTAQ&lc=US&item_name=Benjamin%20Knight&item_number=section%2dsubnav&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted","header_plugin_uri":"https:\/\/github.com\/benknight\/section-subnav","header_author_uri":"http:\/\/benknight.me","rating":5,"author_block_rating":0,"active_installs":60,"downloads":3996,"num_ratings":3,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"3"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.9"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1865,1753,162],"plugin_category":[43],"plugin_contributors":[86230],"plugin_business_model":[],"class_list":["post-14326","plugin","type-plugin","status-publish","hentry","plugin_tags-menu","plugin_tags-navigation","plugin_tags-widget","plugin_category-customization","plugin_contributors-benknight","plugin_committers-benknight"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/section-subnav.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This is a simple plugin that was born out of working on several projects with sectional navigations.  For example, consider the following common navigation tree structure:<\/p>\n\n<ul>\n<li>Home<\/li>\n<li>Item<\/li>\n<li>About Us\n\n<ul>\n<li>Sub-item #1<\/li>\n<li>Sub-item #2<\/li>\n<\/ul><\/li>\n<li>Item<\/li>\n<li>Item<\/li>\n<\/ul>\n\n<p>Then, whenever on the \"About Us\" page or any of its sub-items, it would output that peice of the navigation:<\/p>\n\n<ul>\n<li>About Us\n\n<ul>\n<li>Sub-item #1<\/li>\n<li>Sub-item #2<\/li>\n<\/ul><\/li>\n<\/ul>\n\n<p>This is particularly useful for websites that have a top horizontal navigation which shows top-level items and want to show a vertical subnavigation in the sidebar.<\/p>\n\n<p>This plugin works by parsing the output of the <code>wp_nav_menu<\/code> function as XML and analyzing the CSS class hooks (current-menu-ancestor, current-menu-item, and current-menu-parent).  Because it uses PHP's SimpleXML library it therefore requires PHP 5+.  It uses the theme's registered menu locations.<\/p>\n\n<p>This plugin also exposes the <code>section_subnav()<\/code> function for theme developers to use as a template tag to manually place a subnav inside the theme.  Here is the usage:<\/p>\n\n<pre><code>&lt;?php\n\n    section_subnav( array( \/\/ defaults\n        'before_widget' =&gt; '&lt;nav id=\"section-subnav\" class=\"widget widget_section-subnav\"&gt;',\n        'after_widget' =&gt; \"&lt;\/nav&gt;\",\n        'before_title' =&gt; '&lt;h3 class=\"section-subnav-title widget-title\"&gt;',\n        'after_title' =&gt; '&lt;\/h3&gt;',\n        'echo' =&gt; true\n    ));\n\n?&gt;\n<\/code><\/pre>\n\n<p>It returns false when there is no subnavigation.<\/p>\n\n<p>This function also provides the <code>section_subnav_args<\/code> filter hook for writing less code and easier integration with other plugins and child themes.<\/p>\n\n<!--section=installation-->\n<p>This section describes how to install the plugin and get it working.<\/p>\n\n<ol>\n<li>Upload <code>section-subnav<\/code> to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>Add the widget to a sidebar or use the <code>section_subnav()<\/code> function in one of your theme templates.<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>0.9<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Adds a widget and template function for displaying subnavigation based on the current navigation state.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/14326","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=14326"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/benknight"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=14326"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=14326"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=14326"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=14326"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=14326"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=14326"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}