{"id":16173363,"url":"https://github.com/rarst/toolbar-theme-switcher","last_synced_at":"2025-03-19T00:30:49.591Z","repository":{"id":17089364,"uuid":"19854566","full_name":"Rarst/toolbar-theme-switcher","owner":"Rarst","description":"Adds WordPress toolbar menu that allows users to switch theme for themselves.","archived":false,"fork":false,"pushed_at":"2016-11-27T22:03:00.000Z","size":34,"stargazers_count":19,"open_issues_count":0,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-28T13:23:14.229Z","etag":null,"topics":["wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rarst.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-16T11:43:49.000Z","updated_at":"2023-08-23T07:39:49.000Z","dependencies_parsed_at":"2022-08-26T11:32:32.290Z","dependency_job_id":null,"html_url":"https://github.com/Rarst/toolbar-theme-switcher","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rarst%2Ftoolbar-theme-switcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rarst%2Ftoolbar-theme-switcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rarst%2Ftoolbar-theme-switcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rarst%2Ftoolbar-theme-switcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rarst","download_url":"https://codeload.github.com/Rarst/toolbar-theme-switcher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243955805,"owners_count":20374373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["wordpress","wordpress-plugin"],"created_at":"2024-10-10T04:08:30.877Z","updated_at":"2025-03-19T00:30:49.291Z","avatar_url":"https://github.com/Rarst.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Toolbar Theme Switcher — for WordPress ##\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/Rarst/toolbar-theme-switcher/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/Rarst/toolbar-theme-switcher/?branch=master)\n\nPlugin provides toolbar (admin bar) menu to quickly switch between available themes.\n\nTheme choice is individual for user, saved in cookies and doesn't affect current theme of the site.\n\nPlugin is multisite-aware — it will only list themes allowed for site and save choice for each site separately.\n\n## Installation ##\n\nDownload plugin archive from [releases section](https://github.com/Rarst/toolbar-theme-switcher/releases).\n\nOr install in plugin directory via [Composer](https://getcomposer.org/):\n\n    composer create-project rarst/toolbar-theme-switcher --no-dev\n\n## Frequently Asked Questions ##\n\n### I switched to a broken theme!\n\nYou can reset via special URL parameter `example.com?tts_reset` or by clearing browser’s cookies for the site. \n\n### I don't want all themes to show...\n\nFilter `tts_allowed_themes` and unset unwanted themes.\n\nExample code (removes Twenty Ten theme from the list):\n\n```php\nadd_filter( 'tts_allowed_themes', 'hide_twenty_ten' );\n\nfunction hide_twenty_ten( $themes ) {\n\n\tunset( $themes['Twenty Ten'] );\n\n\treturn $themes;\n}\n```\n\n### Who can see and use the menu?\n\nUsers with `switch_themes` capability (administrators by default).\n\nFilter `tts_capability` (capability name) or `tts_can_switch_themes` (boolean) to customize.\n\n### I don't want theme name in toolbar? | I want something else in toolbar?\n\nFilter `tts_root_title` to control what it says.\n\n### I have a lot of themes and it's becoming sluggish... \n\nPlugin needs to build full list of available themes, which isn't typically needed on each page load and can be relatively slow with a lot of disk access.\n \nWhen using Object Cache, caching theme data in WordPress can be enabled via:\n\n```php\nadd_filter( 'wp_cache_themes_persistently', '__return_true' );\n```\n\nSince it doesn't handle invalidation (will need to wait or flush cache when themes are added/removed), plugin isn't enabling it and leaves choice up to the user.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frarst%2Ftoolbar-theme-switcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frarst%2Ftoolbar-theme-switcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frarst%2Ftoolbar-theme-switcher/lists"}