Make WordPress Core

Opened 6 weeks ago

Last modified 6 days ago

#61765 assigned enhancement

Twenty Twelve: The large quote pattern does not use a quote block

Reported by: poena's profile poena Owned by:
Milestone: 6.7 Priority: low
Severity: normal Version:
Component: Bundled Theme Keywords: good-first-bug has-patch changes-requested
Focuses: Cc:

Description

The pattern "Left-aligned Large Quote" does not insert a quote block. Instead, it inserts paragraphs, which is unexpected based on its name.

I suggest updating the blocks in the pattern and use a quote.

Attachments (6)

61765.diff (3.4 KB) - added by iflairwebtechnologies 6 weeks ago.
Review quote pattern issue
61765.patch (3.4 KB) - added by iflairwebtechnologies 6 weeks ago.
Review quote pattern issue here also attached patch file
SCR-20240727-kywa.png (201.4 KB) - added by karmatosed 6 weeks ago.
61765.2.patch (2.7 KB) - added by iflairwebtechnologies 6 weeks ago.
Revise updated code
61765.3.patch (3.7 KB) - added by iflairwebtechnologies 5 weeks ago.
61765.4.patch (1.8 KB) - added by wpeople 5 weeks ago.
Updated Patch

Download all attachments as: .zip

Change History (21)

#1 @poena
6 weeks ago

  • Keywords good-first-bug added

@iflairwebtechnologies
6 weeks ago

Review quote pattern issue

#2 @iflairwebtechnologies
6 weeks ago

Please review here 61765.diff the solved issue about Twenty Twelve: The large quote pattern does not use a quote block

@iflairwebtechnologies
6 weeks ago

Review quote pattern issue here also attached patch file

This ticket was mentioned in PR #7099 on WordPress/wordpress-develop by iflair.


6 weeks ago
#3

  • Keywords has-patch added

Fixes #61765 : Twenty Twelve The large quote pattern fix to use a quote block

#4 @karmatosed
6 weeks ago

  • Owner set to karmatosed
  • Status changed from new to assigned

#5 @karmatosed
6 weeks ago

  • Keywords needs-testing added
  • Milestone changed from Awaiting Review to 6.7

Thank you everyone this makes sense to me. I am going to go ahead and test to see about getting this in.

#6 @karmatosed
6 weeks ago

Unfortunately in testing this patch ends up with blocks being unable to be recovered due to the changes. I would suggest more testing and looking at this @iflairwebtechnologies in your patch.

#7 @karmatosed
6 weeks ago

  • Keywords changes-requested added

#8 @karmatosed
6 weeks ago

  • Owner karmatosed deleted

@iflairwebtechnologies
6 weeks ago

Revise updated code

#9 @iflairwebtechnologies
6 weeks ago

@karmatosed
We have tested the code and also made changes in the code

#10 @shailu25
6 weeks ago

  • Keywords changes-requested removed

#11 @sabernhardt
6 weeks ago

  • Keywords changes-requested added; needs-testing removed

To replace blocks in a theme's pattern:

  1. Copy the content value from the block pattern PHP.
  2. Activate the theme.
  3. Go to the editor and insert that pattern.
  4. Transform the block(s) to another block.
  5. Adjust block settings and/or markup, if appropriate. (With the Quote block in Twenty Twelve, the em tags are unnecessary because both the paragraph and citation are italicized.)
  6. Switch to Code view, and copy the new block(s).
  7. Paste that into the block pattern PHP, in the content value.
  8. Indent any new lines (with tabs).
  9. Replace any text with the translatable strings you copied in step 1.
  10. Return to the editor, and insert the updated pattern.
  11. Switch to Code view, and verify that the pattern matches what you made in steps 4 and 5.
			'content'       => '<!-- wp:quote -->
				<blockquote class="wp-block-quote"><!-- wp:paragraph {"style":{"typography":{"fontSize":"40px","lineHeight":1.5}}} -->
				<p style="font-size:40px;line-height:1.5"><strong>' . esc_html__( '"Few people are capable of expressing with equanimity opinions which differ from the prejudices of their social environment. Most people are even incapable of forming such opinions."', 'twentytwelve' ) . '</strong></p>
				<!-- /wp:paragraph --><cite>' . esc_html__( '—  Albert Einstein', 'twentytwelve' ) . '</cite></blockquote>
				<!-- /wp:quote -->',

The nested Paragraph block above could produce invalid/unexpected content errors in older versions of WordPress, though I think that is the best option.

  • Block patterns were introduced in WordPress 5.5.
  • Twenty Twelve added its patterns in #51105, at the same time as WordPress 5.8.
  • The Quote block started nesting a Paragraph block inside it in WordPress 6.1.

The comment also needs updating because the pattern does not have a heading. Suggestion:

// Quote with large paragraph text.

#12 @iflairwebtechnologies
5 weeks ago

@sabernhardt
You can review 61765.3.patch,
Uploaded a new patch here with updated changes

@wpeople
5 weeks ago

Updated Patch

#13 @wpeople
5 weeks ago

I have Updated Patch because there was an issue with cta text & also space is missing in inline comment

  • cite Text should be — Albert Einstein instead of ΓÇö Albert Einstein
  • Added Space in Inline Comment.
Version 1, edited 5 weeks ago by wpeople (previous) (next) (diff)

This ticket was mentioned in Slack in #core by chaion07. View the logs.


10 days ago

This ticket was mentioned in Slack in #core-themes by poena. View the logs.


6 days ago

Note: See TracTickets for help on using tickets.