WordPress.org

Making WordPress.org

Opened 5 weeks ago

Closed 4 weeks ago

Last modified 4 weeks ago

#5304 closed defect (fixed)

Incorrect code tags in @param block for WP_Term_Query::__construct()

Reported by: ocean90 Owned by: coffee2code
Milestone: Priority: normal
Component: Developer Hub Keywords:
Cc:

Description

See https://developer.wordpress.org/reference/classes/wp_term_query/__construct/#parameters

The documentation for the $fields parameter is broken due to a missing closing code tag. This seems to be related to #2900 because after removing the fix_param_description_parsedown_bug filter the code tags are correct for this case.

While we're here, I'm wondering if could render the list as an actual list.

Related: [WP46652], #WP44305

Attachments (8)

5304-with-filter.png (140.7 KB) - added by ocean90 5 weeks ago.
5304-no-filter.png (176.0 KB) - added by ocean90 5 weeks ago.
no-filter.txt (6.8 KB) - added by ocean90 5 weeks ago.
descriptionlike or meta_query have incorrect code tags
all-filters.txt (6.8 KB) - added by ocean90 5 weeks ago.
orderby and fields have incorrect code tags
without-last-replacement.txt (6.8 KB) - added by ocean90 5 weeks ago.
meta_query, meta_key and meta_value have broken tags, fields and orderby are ok
5304.diff (1.5 KB) - added by ocean90 5 weeks ago.
after.png (192.1 KB) - added by ocean90 5 weeks ago.
after-broken-autolink.png (120.6 KB) - added by ocean90 5 weeks ago.

Download all attachments as: .zip

Change History (12)

@ocean90
5 weeks ago

descriptionlike or meta_query have incorrect code tags

@ocean90
5 weeks ago

orderby and fields have incorrect code tags

@ocean90
5 weeks ago

meta_query, meta_key and meta_value have broken tags, fields and orderby are ok

@ocean90
5 weeks ago

@ocean90
5 weeks ago

#1 @ocean90
5 weeks ago

5304.diff applies fix_param_hash_formatting() on each description in a hash notation. This seems to work so far, see after.png.

Unfortunally it keeps breaking the code tags around the auto-linked WP_Meta_Query, see after-broken-autolink.png. The HTML is:

<li><b>'meta_query'</b><br /><i><span class='type'>(array)</span></i> Optional. Meta query clauses to limit retrieved terms by. See</code><a href="https://developer.wordpress.org/reference/classes/wp_meta_query/">WP_Meta_Query</a><code>. </li>

@coffee2code Do you have some other ideas to work around the issue?

#2 @coffee2code
4 weeks ago

  • Owner set to coffee2code
  • Resolution set to fixed
  • Status changed from new to closed

In 10067:

Developer theme: Fix the fix for the parsing bug regarding 'code' tags misapplied during parsing.

Bug became evident in text containing multiple code tags where some 'code' tags were correctly present in the original text.

Props ocean90, coffee2code.
Fixes #5304.

#3 @coffee2code
4 weeks ago

In 10068:

Developer theme: Convert lists (defined using * or - for items) appearing in descriptions into actual HTML lists.

Props ocean90, coffee2code.
See #5304.

#4 @ocean90
4 weeks ago

  • Keywords needs-patch removed

Thank you!

Note: See TracTickets for help on using tickets.