https://github.com/masonitedoors/wp-theme-lock
https://github.com/masonitedoors/wp-theme-lock
headless-cms wordpress wordpress-muplugin
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/masonitedoors/wp-theme-lock
- Owner: masonitedoors
- Created: 2020-11-12T15:47:29.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-12T16:25:29.000Z (over 5 years ago)
- Last Synced: 2025-01-27T05:57:48.335Z (about 1 year ago)
- Topics: headless-cms, wordpress, wordpress-muplugin
- Language: PHP
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WP Theme Lock
[](https://packagist.org/packages/masonitedoors/wp-theme-lock)
An mu-plugin that forces a WordPress theme to always be active. Intended for a [Headless WordPress](https://www.gatsbyjs.com/docs/glossary/headless-wordpress/) setup.
## Config
Out of the box, this mu-plugin expects [wp-headless-theme](https://github.com/masonitedoors/wp-headless-theme) to be installed.
You can set your own theme using the available filter in a separate mu-plugin.
```php
add_filter( 'wp_theme_lock', function() {
return 'twentytwenty'; // Theme directory to lock.
});
```