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

Custom Templates: Use "title" from the theme.json #35592

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

@Mamaduka
Copy link
Member

@Mamaduka Mamaduka commented Oct 13, 2021

Description

Updates _gutenberg_get_template_files method to merge customTemplates definition from the "theme.json."

PR introduces new _gutenberg_add_template_info helper method.

Fixes #32818.

How has this been tested?

  1. Install and Activate TT1 Blocks.
  2. Create a page.
  3. Templates dropdown should display a title - "Page without title" instead of a "slug."

Screenshots

Before After
CleanShot 2021-10-13 at 16 14 22 CleanShot 2021-10-13 at 16 15 00

Types of changes

Bugfix

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

1 participant