Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update: "templates" doc. #4371

Merged
merged 1 commit into from
Jan 10, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions docs/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Planned additions:

- Saved and assigned to pages as "page templates".
- Defined in a `template.php` file or pulled from a custom post type (`wp_templates`) that is site specific.
As the equivalent of the theme hierarchy.
- As the equivalent of the theme hierarchy.

## API

Expand All @@ -29,12 +29,11 @@ const template = [
),
```


## Custom Post types

A custom post type can register its own template during registration:

```
```php
function register_post_type() {
$args = array(
'public' => true,
Expand Down Expand Up @@ -67,5 +66,5 @@ Sometimes the intention might be to lock the template on the UI so that the bloc

*Options:*

* `all` — prevents all operations.
* `insert` — prevents inserting new blocks, but allows moving existing ones.
- `all` — prevents all operations.
- `insert` — prevents inserting new blocks, but allows moving existing ones.