{"id":19338853,"url":"https://github.com/andreiigna/if-menu","last_synced_at":"2026-04-17T06:03:35.378Z","repository":{"id":40659983,"uuid":"190402288","full_name":"AndreiIgna/if-menu","owner":"AndreiIgna","description":"If Menu - WordPress plugin","archived":false,"fork":false,"pushed_at":"2025-05-16T08:47:12.000Z","size":398,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-17T06:22:57.792Z","etag":null,"topics":["menus","wordpress"],"latest_commit_sha":null,"homepage":"https://layered.market/plugins/if-menu","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AndreiIgna.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-06-05T13:41:39.000Z","updated_at":"2025-05-16T08:47:16.000Z","dependencies_parsed_at":"2024-09-08T17:29:03.848Z","dependency_job_id":"fb54df29-95c0-4641-81be-4ab7f2dd3b5a","html_url":"https://github.com/AndreiIgna/if-menu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AndreiIgna/if-menu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiIgna%2Fif-menu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiIgna%2Fif-menu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiIgna%2Fif-menu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiIgna%2Fif-menu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndreiIgna","download_url":"https://codeload.github.com/AndreiIgna/if-menu/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiIgna%2Fif-menu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31917372,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["menus","wordpress"],"created_at":"2024-11-10T03:18:53.795Z","updated_at":"2026-04-17T06:03:35.342Z","avatar_url":"https://github.com/AndreiIgna.png","language":"PHP","readme":"If Menu\n=========\n\n**If Menu** is a WordPress plugin which adds extra functionality for menu items, making it easy to hide or display menu items based on user-defined rules. Example:\n\n* Display a menu item only if current `User is logged in`\n* Hide menu items if `visiting from mobile device`\n* Display menu items just for `Admins and Editors`\n\nThe plugin is easy to use, each menu item will have a “Change menu item visibility” option which will enable the selection of rules.\n\n\u003e This repo is used only for development, downloading \u0026 installing from here won't work as expected. Install from [WordPress.org plugin page](https://wordpress.org/plugins/if-menu/)\n\n\n## Features\n\n* Basic set of visibility rules\n  * User state `User is logged in`\n  * User roles `Admin` `Editor` `Author` etc\n  * Page type `Front page` `Single page` `Single post`\n  * Device `Is Mobile`\n  * Language `Is RTL`\n* Multiple rules - mix multiple rules for a menu item visibility\n  * show if `User is logged in` AND `Device is mobile`\n  * show if `User is Admin` AND `Is front page`\n* Support for adding your custom rules\n\n\n\n## Adding custom visibility rules in a plugin or theme\n\nCustom visibility rules can be added easily by any plugin or theme.\nExample of adding a new rule for displaying/hiding a menu item when current page is a custom-post-type.\n\n```\n// theme's functions.php or plugin file\nadd_filter('if_menu_conditions', 'my_new_menu_conditions');\n\nfunction my_new_menu_conditions($conditions) {\n\n  $conditions[] = array(\n    'id'        =\u003e  'single-my-custom-post-type',           // unique ID for the condition\n    'name'      =\u003e  __('Single my-CPT', 'i18n-domain'),     // name of the condition\n    'condition' =\u003e  function($item) {                       // callback - must return Boolean\n      return is_singular('my-custom-post-type');\n    }\n  );\n\n  return $conditions;\n}\n```\n\n\n\n## WordPress.org\n\nHead over to [plugin's page on WordPress.org](https://wordpress.org/plugins/if-menu/) for more info, reviews and support\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreiigna%2Fif-menu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreiigna%2Fif-menu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreiigna%2Fif-menu/lists"}