{"id":312828,"date":"2026-05-14T14:04:46","date_gmt":"2026-05-14T14:04:46","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/shed-menu\/"},"modified":"2026-09-25T07:14:33","modified_gmt":"2026-09-25T07:14:33","slug":"shed-menu","status":"publish","type":"plugin","link":"https:\/\/bal.wordpress.org\/plugins\/shed-menu\/","author":23489683,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0.1.7","stable_tag":"0.1.7","tested":"7.1.3","requires":"6.0","requires_php":"8.1","requires_plugins":null,"header_name":"Shed Menu","header_author":"WP Shed","header_description":"Show or hide WordPress menu items based on login status, user role, or scheduled date range.","assets_banners_color":"434952","last_updated":"2026-09-25 07:14:33","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/wpshed.jp\/plugins\/shed-menu\/","header_author_uri":"https:\/\/wpshed.jp","rating":0,"author_block_rating":0,"active_installs":0,"downloads":330,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"0.1.5":{"tag":"0.1.5","author":"teamstaccato","date":"2026-05-14 14:04:31","revision":3532105},"0.1.6":{"tag":"0.1.6","author":"teamstaccato","date":"2026-05-20 09:28:13","revision":3538697},"0.1.7":{"tag":"0.1.7","author":"teamstaccato","date":"2026-09-25 07:14:33","revision":3712561}},"upgrade_notice":{"0.1.5":"<p>Block renamed to <code>shed-menu\/conditional<\/code>, helper function to <code>shedmenu_visible()<\/code>, shortcode to <code>[shedmenu_visible]<\/code>. First public release \u2014 no existing content to migrate.<\/p>","0.1.4":"<p>Performance and reliability improvements. Upgrade recommended.<\/p>","0.1.0":"<p>Initial release.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3532541,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3532541,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3532541,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3532541,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1.5","0.1.6","0.1.7"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3532541,"resolution":"1","location":"assets","locale":"","width":422,"height":738},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3532541,"resolution":"2","location":"assets","locale":"","width":1912,"height":815},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3532541,"resolution":"3","location":"assets","locale":"","width":1039,"height":246}},"screenshots":{"1":"Visibility fields added to each menu item in Appearance \u2192 Menus.","2":"The Conditional block in the Gutenberg editor with sidebar settings.","3":"Plugin settings screen (Settings \u2192 Shed Menu)."}},"plugin_section":[],"plugin_tags":[4060,1865,1753,3710,6309],"plugin_category":[43],"plugin_contributors":[262385],"plugin_business_model":[],"class_list":["post-312828","plugin","type-plugin","status-publish","hentry","plugin_tags-conditional","plugin_tags-menu","plugin_tags-navigation","plugin_tags-role","plugin_tags-visibility","plugin_category-customization","plugin_contributors-teamstaccato","plugin_committers-teamstaccato"],"banners":{"banner":"https:\/\/ps.w.org\/shed-menu\/assets\/banner-772x250.png?rev=3532541","banner_2x":"https:\/\/ps.w.org\/shed-menu\/assets\/banner-1544x500.png?rev=3532541","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/shed-menu\/assets\/icon-128x128.png?rev=3532541","icon_2x":"https:\/\/ps.w.org\/shed-menu\/assets\/icon-256x256.png?rev=3532541","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/shed-menu\/assets\/screenshot-1.png?rev=3532541","caption":"Visibility fields added to each menu item in Appearance \u2192 Menus."},{"src":"https:\/\/ps.w.org\/shed-menu\/assets\/screenshot-2.png?rev=3532541","caption":"The Conditional block in the Gutenberg editor with sidebar settings."},{"src":"https:\/\/ps.w.org\/shed-menu\/assets\/screenshot-3.png?rev=3532541","caption":"Plugin settings screen (Settings \u2192 Shed Menu)."}],"raw_content":"<!--section=description-->\n<p>Shed Menu adds visibility conditions to WordPress navigation menu items. You can show or hide each item based on three conditions:<\/p>\n\n<ul>\n<li>Login status (logged in \/ logged out \/ everyone)<\/li>\n<li>Date range (start datetime, end datetime)<\/li>\n<li>User roles (administrator, editor, author, contributor, subscriber, or custom roles)<\/li>\n<\/ul>\n\n<p>All conditions are optional and combined with AND logic. This plugin reads the current user's role information via <code>wp_get_current_user()<\/code> to evaluate role-based conditions.<\/p>\n\n<h4>Important: this is display control, not access control<\/h4>\n\n<p>Shed Menu hides menu items, blocks, and shortcode content from output. It does <strong>not<\/strong> restrict access to the underlying page, post, or URL. A visitor who knows or guesses the direct URL can still open it even if the menu link to it is hidden. Do not rely on Shed Menu to protect private or paid content \u2014 use post visibility settings (Private \/ Password protected) or a membership plugin for that.<\/p>\n\n<h4>Three ways to use<\/h4>\n\n<ol>\n<li><strong>Standard menus<\/strong> \u2014 Open Appearance \u2192 Menus, expand any item, and set the conditions inline.<\/li>\n<li><strong>Hand-coded themes<\/strong> \u2014 Use the helper function <code>shedmenu_visible()<\/code> in your <code>header.php<\/code> or other template files.<\/li>\n<li><strong>Block editor<\/strong> \u2014 Wrap any blocks in the \"Shed Menu \u2014 Conditional\" block to show\/hide them based on the same conditions.<\/li>\n<\/ol>\n\n<h4>Helper function example<\/h4>\n\n<pre><code>&lt;?php if ( shedmenu_visible( [ 'login' =&gt; 'in' ] ) ) : ?&gt;\n    &lt;li&gt;&lt;a href=\"\/mypage\/\"&gt;My Page&lt;\/a&gt;&lt;\/li&gt;\n&lt;?php endif; ?&gt;\n<\/code><\/pre>\n\n<h4>Shortcode example<\/h4>\n\n<pre><code>[shedmenu_visible login=\"in\" start=\"2026-04-01\" end=\"2026-04-30\" roles=\"administrator\"]\nThis content is only visible to administrators between April 1 and April 30.\n[\/shedmenu_visible]\n<\/code><\/pre>\n\n<h4>\u65e5\u672c\u8a9e\u306e\u8aac\u660e<\/h4>\n\n<p>WordPress \u6a19\u6e96\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3\u30e1\u30cb\u30e5\u30fc\u306b\u3001\u30e1\u30cb\u30e5\u30fc\u9805\u76ee\u5358\u4f4d\u306e\u8868\u793a\u6761\u4ef6\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n\n<ul>\n<li>\u30ed\u30b0\u30a4\u30f3\u72b6\u614b\uff08\u30ed\u30b0\u30a4\u30f3\u4e2d \/ \u30ed\u30b0\u30a2\u30a6\u30c8\u4e2d \/ \u5168\u54e1\uff09<\/li>\n<li>\u8868\u793a\u671f\u9593\uff08\u958b\u59cb\u65e5\u6642\u30fb\u7d42\u4e86\u65e5\u6642\uff09<\/li>\n<li>\u30e6\u30fc\u30b6\u30fc\u30ed\u30fc\u30eb\uff08\u7ba1\u7406\u8005 \/ \u7de8\u96c6\u8005 \/ \u6295\u7a3f\u8005 \u7b49\uff09<\/li>\n<\/ul>\n\n<p>\u5168\u3066\u306e\u6761\u4ef6\u306f\u4efb\u610f\u3067\u3001AND \u6761\u4ef6\u3067\u7d44\u307f\u5408\u308f\u3055\u308c\u307e\u3059\u3002<\/p>\n\n<p>\u5916\u89b3 \u2192 \u30e1\u30cb\u30e5\u30fc\u753b\u9762\u3067\u5404\u9805\u76ee\u306b\u6761\u4ef6\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u3059\u3002\u30c6\u30fc\u30de\u3067 <code>wp_nav_menu()<\/code> \u3092\u4f7f\u308f\u305a HTML \u76f4\u66f8\u304d\u3057\u3066\u3044\u308b\u5834\u5408\u306f <code>shedmenu_visible()<\/code> \u30d8\u30eb\u30d1\u30fc\u95a2\u6570\u3092\u4f7f\u3063\u3066\u304f\u3060\u3055\u3044\u3002Gutenberg \u3067\u306f\u300cShed Menu \u2014 Conditional\u300d\u30d6\u30ed\u30c3\u30af\u3067\u4efb\u610f\u306e\u30d6\u30ed\u30c3\u30af\u7fa4\u3092\u6761\u4ef6\u8868\u793a\u306b\u3067\u304d\u307e\u3059\u3002<\/p>\n\n<p><strong>\u91cd\u8981: \u3053\u308c\u306f\u300c\u8868\u793a\u306e\u5236\u5fa1\u300d\u3067\u3042\u308a\u300c\u30a2\u30af\u30bb\u30b9\u5236\u9650\u300d\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/strong> Shed Menu \u306f\u30e1\u30cb\u30e5\u30fc\u9805\u76ee\u30fb\u30d6\u30ed\u30c3\u30af\u30fb\u30b7\u30e7\u30fc\u30c8\u30b3\u30fc\u30c9\u306e\u5185\u5bb9\u3092\u51fa\u529b\u3057\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u3060\u3051\u3067\u3001\u30ea\u30f3\u30af\u5148\u306e\u30da\u30fc\u30b8\u3084\u6295\u7a3f\u30fbURL \u81ea\u4f53\u3078\u306e\u30a2\u30af\u30bb\u30b9\u3092\u5236\u9650\u3059\u308b\u3082\u306e\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u30e1\u30cb\u30e5\u30fc\u3092\u975e\u8868\u793a\u306b\u3057\u3066\u3082\u3001URL \u3092\u76f4\u63a5\u77e5\u3063\u3066\u3044\u308b\uff08\u307e\u305f\u306f\u63a8\u6e2c\u3067\u304d\u308b\uff09\u8a2a\u554f\u8005\u306f\u305d\u306e\u30da\u30fc\u30b8\u3092\u958b\u3051\u307e\u3059\u3002\u975e\u516c\u958b\u306b\u3057\u305f\u3044\u30fb\u6709\u6599\u4f1a\u54e1\u9650\u5b9a\u306b\u3057\u305f\u3044\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u4fdd\u8b77\u306b\u306f\u3001\u6295\u7a3f\u306e\u516c\u958b\u72b6\u614b\uff08\u975e\u516c\u958b\u30fb\u30d1\u30b9\u30ef\u30fc\u30c9\u4fdd\u8b77\uff09\u3084\u4f1a\u54e1\u5236\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f7f\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n<h3>Third-Party Services<\/h3>\n\n<p>This plugin does not connect to any external services. All processing happens on your own server.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>shed-menu<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory, or install via the Plugins screen in WordPress.<\/li>\n<li>Activate the plugin through the Plugins screen.<\/li>\n<li>Go to Appearance \u2192 Menus, expand any menu item, and configure visibility conditions.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20this%20work%20with%20caching%20plugins%3F\"><h3>Does this work with caching plugins?<\/h3><\/dt>\n<dd><p>Login-based visibility is evaluated per request. If you use a page caching plugin, make sure it serves separate cached pages for logged-in vs logged-out users. Most caching plugins support this by default.<\/p><\/dd>\n<dt id=\"does%20this%20conflict%20with%20other%20menu%20plugins%3F\"><h3>Does this conflict with other menu plugins?<\/h3><\/dt>\n<dd><p>Shed Menu uses the standard <code>wp_nav_menu_objects<\/code> filter and does not override menu rendering. It works alongside most menu plugins.<\/p><\/dd>\n<dt id=\"why%20doesn%27t%20the%20date%20condition%20work%20in%20the%20navigation%20block%20%28block%20theme%29%3F\"><h3>Why doesn't the date condition work in the Navigation block (block theme)?<\/h3><\/dt>\n<dd><p>The Navigation block uses its own internal item structure that does not expose per-item post meta in a stable way. Use the \"Shed Menu \u2014 Conditional\" block to wrap navigation links instead.<\/p><\/dd>\n<dt id=\"what%20happens%20to%20my%20settings%20when%20i%20uninstall%3F\"><h3>What happens to my settings when I uninstall?<\/h3><\/dt>\n<dd><p>Uninstalling removes all visibility settings stored on menu items and plugin options. Deactivating without uninstalling preserves all settings.<\/p><\/dd>\n<dt id=\"can%20i%20use%20custom%20roles%3F\"><h3>Can I use custom roles?<\/h3><\/dt>\n<dd><p>Yes. The Roles field in the menu item editor lists all roles registered in your WordPress installation, including custom roles added by other plugins.<\/p><\/dd>\n<dt id=\"does%20hiding%20a%20menu%20item%20also%20protect%20the%20page%20it%20links%20to%3F\"><h3>Does hiding a menu item also protect the page it links to?<\/h3><\/dt>\n<dd><p>No. Shed Menu only controls whether a menu item, block, or shortcode content is rendered in the output. It does not restrict access to the linked page, post, or URL itself \u2014 a visitor who has the direct link can still open it. To actually restrict access to content, use WordPress's built-in post visibility settings (Private \/ Password protected) or a membership plugin.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>0.1.7<\/h4>\n\n<ul>\n<li>[doc] Clarified in the description, FAQ, and manual that Shed Menu controls display only, not access \u2014 hiding a menu item does not restrict access to the linked page or URL.<\/li>\n<li>Confirmed compatibility with WordPress 7.1 (including the block editor changes shipped in 7.1.1).<\/li>\n<\/ul>\n\n<h4>0.1.6<\/h4>\n\n<ul>\n<li>Confirmed compatibility with WordPress 7.0<\/li>\n<\/ul>\n\n<h4>0.1.5<\/h4>\n\n<ul>\n<li>[fix] Block namespace renamed from <code>shed\/conditional<\/code> to <code>shed-menu\/conditional<\/code> for WordPress.org compliance.<\/li>\n<li>[fix] Helper function renamed from <code>shed_menu_visible()<\/code> to <code>shedmenu_visible()<\/code> for prefix consistency.<\/li>\n<li>[fix] Shortcode renamed from <code>[shed_menu_visible]<\/code> to <code>[shedmenu_visible]<\/code> for prefix consistency.<\/li>\n<li>[fix] readme.txt License field updated to SPDX identifier GPL-2.0-or-later.<\/li>\n<\/ul>\n\n<h4>0.1.4<\/h4>\n\n<ul>\n<li>[perf] Child-item cascade removal now uses O(1) hash lookup instead of O(n) in_array; added circular-reference guard.<\/li>\n<li>[fix] Added update_meta_cache() call in filter_menu_items() to prevent N+1 meta queries on large menus.<\/li>\n<li>[fix] normalize_datetime() now validates month\/day with checkdate() to reject invalid dates like 2026-02-30.<\/li>\n<li>[fix] array_filter() applied to roles meta in is_item_visible() to strip empty strings stored in serialized arrays.<\/li>\n<li>[fix] Added Domain Path header; renamed wp_localize_script object from wsmData to shedmenuData.<\/li>\n<li>[fix] Removed non-standard Description-ja header field.<\/li>\n<\/ul>\n\n<h4>0.1.2<\/h4>\n\n<ul>\n<li>[fix] Constant <code>Shedmenu_PATH<\/code> renamed to <code>SHEDMENU_PATH<\/code> to follow WordPress naming conventions (uppercase).<\/li>\n<li>[fix] Replaced <code>phpcs:disable\/enable<\/code> blocks with per-line <code>phpcs:ignore<\/code> in menu item save handler. Added English comment explaining core nonce pre-verification.<\/li>\n<\/ul>\n\n<h4>0.1.1<\/h4>\n\n<ul>\n<li>Changed: All function, class, constant, hook, and option prefixes renamed from wsm_\/WSM_ to shedmenu_\/SHEDMENU_\/Shedmenu_.<\/li>\n<\/ul>\n\n<h4>0.1.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<li>Login status visibility (in \/ out \/ either).<\/li>\n<li>Scheduled date range visibility (start \/ end datetime).<\/li>\n<li>Role-based visibility (all registered roles supported).<\/li>\n<li>Helper function shed_menu_visible() for hand-coded themes.<\/li>\n<li>Shortcode [shed_menu_visible] for widgets, pages, and classic editor.<\/li>\n<li>Conditional block (shed\/conditional) for the block editor.<\/li>\n<li>Automatic cascade: hiding a parent item also hides all its children.<\/li>\n<\/ul>","raw_excerpt":"Show or hide WordPress menu items based on login status, user role, or scheduled date range. Adds conditional visibility to your navigation.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/312828","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=312828"}],"author":[{"embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/teamstaccato"}],"wp:attachment":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=312828"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=312828"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=312828"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=312828"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=312828"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=312828"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}