WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#43800 closed enhancement (fixed)

Unnecessary <br /> tag in a note on the category page.

Reported by: pratikthink Owned by: pento
Milestone: 5.1 Priority: normal
Severity: normal Version: 4.9.5
Component: Taxonomy Keywords: has-screenshots has-patch ui-feedback
Focuses: ui Cc:

Description

An unnecessary <br /> element produces a line break in a note on the Category page.
The description should be appear only after 'Note:'

Please have a look on the attachment.

Attachments (12)

Categories-Note-before.jpg (64.7 KB) - added by pratikthink 4 years ago.
Categories - Note after patch.jpg (64.6 KB) - added by pratikthink 4 years ago.
43800.diff (561 bytes) - added by pratikthink 4 years ago.
Removed <br /> element and added a space
43800.1.diff (595 bytes) - added by jainnidhi 4 years ago.
43800.2.diff (596 bytes) - added by jainnidhi 4 years ago.
43800.3.patch (593 bytes) - added by pratikthink 4 years ago.
added &nbsp; Just after Note:
43800.4.diff (588 bytes) - added by pratikthink 4 years ago.
added space and removed nbsp
43800.3.diff (621 bytes) - added by joanrho 3 years ago.
Hey, just tested and works well. I agree with @mdgl about bumping up the second line so that it's one single paragraph. Here's that change attached.
43800.5.diff (1.3 KB) - added by joanrho 3 years ago.
Apologies for the confusion: I had mistakenly edited the wrong edit-tags.php file under "build" instead of "src" so my changes weren't shown in my previous attachment. Please test this diff instead.
Categories Note paragraph screenshot.png (89.0 KB) - added by joanrho 3 years ago.
Categories Note paragraph screenshot of my changes
43800.6.diff (1.1 KB) - added by joanrho 3 years ago.
Remove "Note:" text to align with the descriptive text styles on the Tags page and reintroduce paragraphs to clarify and separate the two different topics.
Category page descriptive text.png (90.5 KB) - added by joanrho 3 years ago.
Screenshot of my changes.

Download all attachments as: .zip

Change History (21)

@pratikthink
4 years ago

Removed <br /> element and added a space

@jainnidhi
4 years ago

#1 @pratikthink
4 years ago

  • Component changed from Text Changes to Taxonomy

@jainnidhi
4 years ago

#2 @pratikthink
4 years ago

thanks @jainnidhi for patch
I had already added the space to my first patch.

But I think its not a right way.

@pratikthink
4 years ago

added &nbsp; Just after Note:

#3 @pratikthink
4 years ago

see wp-admin\includes\network.php

echo '<div class="updated inline"><p><strong>' . __( 'Note:' ) . '</strong> ';


space is used.

@pratikthink
4 years ago

added space and removed nbsp

#4 @SergeyBiryukov
4 years ago

  • Milestone changed from Awaiting Review to 5.0
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#5 @mdgl
4 years ago

To my eyes, there are two notes here, which is why there are two separate paragraphs.

Running in the first note as suggested by the current patch leaves the second one hanging.

Better, perhaps to change the text to "Notes:" and keep the line break.

Alternatively merge both notes into a single paragraph preceded by "Note:" and ignore the fact that the text refers to two different issues.

@joanrho
3 years ago

Hey, just tested and works well. I agree with @mdgl about bumping up the second line so that it's one single paragraph. Here's that change attached.

@joanrho
3 years ago

Apologies for the confusion: I had mistakenly edited the wrong edit-tags.php file under "build" instead of "src" so my changes weren't shown in my previous attachment. Please test this diff instead.

@joanrho
3 years ago

Categories Note paragraph screenshot of my changes

#6 @pento
3 years ago

Thank you for the updated patch, @joanrho!

Rather than removing just the <br /> tag, let's remove the entire Note:. When editing tags, there's also a comment about converting tags to categories, but it doesn't have the Note prefix.

@joanrho
3 years ago

Remove "Note:" text to align with the descriptive text styles on the Tags page and reintroduce paragraphs to clarify and separate the two different topics.

@joanrho
3 years ago

Screenshot of my changes.

#7 @pento
3 years ago

  • Owner changed from SergeyBiryukov to pento
  • Status changed from reviewing to accepted

Perfect, thanks @joanrho!

#8 @pento
3 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 43663:

Taxonomy: Remove the "Note" label from the notes on the Category edit list.

There are notes on both the Tag and Category pages, but only the latter prefixes it with a "Note" label.

Props joanrho, pratikthink, jainnidhi.
Fixes #43800.

#9 @johnbillion
3 years ago

  • Milestone changed from 5.0 to 5.1
Note: See TracTickets for help on using tickets.