-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from happyprime/fix/improvements
Focus on templates, ignore template parts
- Loading branch information
Showing
4 changed files
with
45 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
# Restrict Network Templates | ||
|
||
Restrict the use of templates and `network-` prefixed template parts to the main site on a network. | ||
Restrict the management of templates to a network's main site. | ||
|
||
## Description | ||
|
||
This plugin should be network activated on a multisite network. When activated: | ||
|
||
* The list of default template types is filtered to return an empty list. | ||
* The `/wp/v2/templates` endpoint in WordPress returns an empty list. | ||
* Any template part with a filename starting with `network-` is removed from lists of template parts. | ||
* The `WP_REST_Templates_Controller` permissions check is overridden to prevent the update of templates and `network-` prefixed template parts. | ||
* The `WP_REST_Templates_Controller` permissions check is overridden to prevent the update of templates outside of the main site. | ||
|
||
This plugin works in tandem with [Network Template Parts](https://github.com/happyprime/network-template-parts) to provide a framework for a shared look and feel of websites on a multisite network. | ||
|
||
Activating this plugin **will** impact the usefulness of the full site editor in WordPress and will require thinking about the site in parts rather than full templates. It assumes the main template files in your theme will be built using the blocks provided in [Network Template Parts](https://github.com/happyprime/network-template-parts). | ||
Activating this plugin **will** impact the usefulness of the full site editor in WordPress and will require thinking about the site in parts rather than full templates. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Restrict Network Templates | ||
Contributors: happyprime, jeremyfelt, slocker, philcable | ||
Tags: site-editor, templates, multisite | ||
Requires at least: 6.2 | ||
Tested up to: 6.2 | ||
Stable tag: 1.0.0 | ||
License: GPLv2 or later | ||
Requires PHP: 7.4 | ||
|
||
Restrict the management of templates to a network's main site. | ||
|
||
## Description | ||
|
||
This plugin should be network activated on a multisite network. When activated: | ||
|
||
* The list of default template types is filtered to return an empty list. | ||
* The `/wp/v2/templates` endpoint in WordPress returns an empty list. | ||
* The `WP_REST_Templates_Controller` permissions check is overridden to prevent the update of templates outside of the main site. | ||
|
||
This plugin works in tandem with [Network Template Parts](https://github.com/happyprime/network-template-parts) to provide a framework for a shared look and feel of websites on a multisite network. | ||
|
||
Activating this plugin **will** impact the usefulness of the full site editor in WordPress and will require thinking about the site in parts rather than full templates. | ||
|
||
## Changelog | ||
|
||
### 1.0.0 | ||
|
||
Initial release |