Skip to content

Templates: Fix empty block templates output string#30145

Merged
carolinan merged 2 commits into
WordPress:trunkfrom
carolinan:update/empty-template-sting
Mar 31, 2021
Merged

Templates: Fix empty block templates output string#30145
carolinan merged 2 commits into
WordPress:trunkfrom
carolinan:update/empty-template-sting

Conversation

@carolinan
Copy link
Copy Markdown
Contributor

@carolinan carolinan commented Mar 23, 2021

Description

Fixes #20276

Hides the "empty template" messages from logged out visitors.
Adds the template title to the message. Example message: Empty template: Index.

How has this been tested?

  1. Follow the instructions in the GitHub issue to reproduce the problem.
  2. When logged in: confirm that the message shows on the front and that the title of the template is included.
  3. When logged out: confirm that the message does not show on the front.

Types of changes

Enhancement

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.

@carolinan carolinan marked this pull request as ready for review March 23, 2021 14:45
Comment thread lib/full-site-editing/template-loader.php Outdated
Copy link
Copy Markdown
Contributor

@ntsekouras ntsekouras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 - thanks Carolina!

@carolinan carolinan merged commit 6484a26 into WordPress:trunk Mar 31, 2021
@github-actions github-actions Bot added this to the Gutenberg 10.4 milestone Mar 31, 2021
@gziolo gziolo added [Type] Bug An existing feature does not function as intended [Type] Experimental Experimental feature or API. labels Apr 6, 2021
@gziolo gziolo changed the title Fix Empty Block Templates output string Site Editor: Fix Empty Block Templates output string Apr 6, 2021
@gziolo gziolo changed the title Site Editor: Fix Empty Block Templates output string Templates: Fix empty Block Templates output string Apr 6, 2021
@gziolo gziolo changed the title Templates: Fix empty Block Templates output string Templates: Fix empty block templates output string Apr 6, 2021
@gziolo gziolo added the [Feature] Templates API Related to API powering block template functionality in the Site Editor label Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Templates API Related to API powering block template functionality in the Site Editor [Type] Bug An existing feature does not function as intended [Type] Experimental Experimental feature or API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Empty Block Templates output string on front-end stating "Empty Template".

3 participants