{"id":19600288,"url":"https://github.com/fabrikage/wp-env-switcher","last_synced_at":"2026-05-18T10:09:01.449Z","repository":{"id":211579021,"uuid":"729513226","full_name":"fabrikage/wp-env-switcher","owner":"fabrikage","description":"Use this package to add a menu item in your WordPress admin bar in which you can switch between environments. This is useful when you have a DTAP street and you want to quickly switch between your environments.","archived":false,"fork":false,"pushed_at":"2023-12-09T13:30:49.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-03T14:45:13.986Z","etag":null,"topics":["php","php8","wordpress","wordpress-development"],"latest_commit_sha":null,"homepage":"https://fabrikage.nl","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fabrikage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-12-09T13:21:57.000Z","updated_at":"2024-11-29T18:06:44.000Z","dependencies_parsed_at":"2023-12-09T16:43:17.547Z","dependency_job_id":null,"html_url":"https://github.com/fabrikage/wp-env-switcher","commit_stats":null,"previous_names":["bartkleinreesink/wp-env-switcher","fabrikage/wp-env-switcher"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/fabrikage/wp-env-switcher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabrikage%2Fwp-env-switcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabrikage%2Fwp-env-switcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabrikage%2Fwp-env-switcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabrikage%2Fwp-env-switcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabrikage","download_url":"https://codeload.github.com/fabrikage/wp-env-switcher/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabrikage%2Fwp-env-switcher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33174091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["php","php8","wordpress","wordpress-development"],"created_at":"2024-11-11T09:14:21.208Z","updated_at":"2026-05-18T10:09:01.431Z","avatar_url":"https://github.com/fabrikage.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://fabrikage.nl/assets/img/logo-alt.svg\"\u003e\n  \u003cimg alt=\"Fabrikage logo\" src=\"https://fabrikage.nl/assets/img/logo.svg\"\u003e\n\u003c/picture\u003e\u003c/p\u003e\n\n# \u003cp align=\"center\"\u003efabrikage/wp-env-switcher\u003c/p\u003e\n\n\u003cp align=\"center\"\u003eUse this package to add a menu item in your WordPress admin bar in which you can switch between environments. This is useful when you have a DTAP street and you want to quickly switch between your environments.\u003c/p\u003e\n\n\\\n\u0026nbsp;\n\nThe library will compare your current URL with the environment URLs you have set in your environment variables. If the current URL matches one of the environment URLs, that environment will be marked as active. Other environments will show in the submenu.\n\n## Screenshot\n![A screenshot of the menu item](screenshot.jpg)\n\n## Requirements\n\nSet the following `$_ENV` variables in your project:\n\n```bash\nURL_DEVELOPMENT='https://example.dev'\nURL_TESTING='https://example.test'\nURL_ACCEPTANCE='https://example.acceptance'\nURL_PRODUCTION='https://example.com'\n```\n\n*Note: These variables are not required, but if you don't set them, the corresponding menu item will not show up.*\n\n## Installation\n\nInstall the package using composer:\n\n```bash\ncomposer require fabrikage/wp-env-switcher\n```\n\n## Usage\n\nAdd the following code to your `functions.php`:\n\n```php\n\\Fabrikage\\WordPress\\EnvSwitcher::enable();\n```\n\nIf you want to enable the menu for specific users, pass an array with usernames:\n\n```php\n\\Fabrikage\\WordPress\\EnvSwitcher::enable(['admin', 'other-user']);\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabrikage%2Fwp-env-switcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabrikage%2Fwp-env-switcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabrikage%2Fwp-env-switcher/lists"}