Make WordPress Core

Opened 7 years ago

Closed 5 years ago

Last modified 5 years ago

#41818 closed defect (bug) (duplicate)

Add widget-title to default widget for consistency

Reported by: wpsmith's profile wpsmith Owned by:
Milestone: Priority: lowest
Severity: minor Version: 4.9
Component: Widgets Keywords: has-patch
Focuses: Cc:

Description

widgettitle appears only in 3 places within core. Everywhere else it is widget-title. This patch makes everything consistent.

Attachments (2)

wp-includes-widgets-php.diff (1.4 KB) - added by wpsmith 7 years ago.
patch-41818.patch (1.3 KB) - added by mitraval192 7 years ago.
Added patch

Download all attachments as: .zip

Change History (7)

#1 follow-up: @westonruter
7 years ago

  • Priority changed from normal to lowest

Is there any benefit to this other than adding consistency? Is there any CSS that would take advantage of it?

#2 in reply to: ↑ 1 @wpsmith
7 years ago

  • Keywords has-patch added
  • Severity changed from normal to minor

Replying to westonruter:

Is there any benefit to this other than adding consistency? Is there any CSS that would take advantage of it?

Yes, just look at widgettitle usagehttps://github.com/WordPress/WordPress/search?utf8=%E2%9C%93&q=widgettitle&type= versus widget-titlehttps://github.com/WordPress/WordPress/search?utf8=%E2%9C%93&q=widget-title&type=. widget-title has CSS and JS implications and it appears widgettitle is useless.

Last edited 7 years ago by wpsmith (previous) (diff)

#3 @westonruter
7 years ago

  • Keywords close added

This has been reported and closed previously in #39408 and #38244.

If a theme wants to use widget-title, then they just have to supply the before_title when they register the sidebar, like Twenty Seventeen does.

I think adding a secondary class name in the default before_title just adds bloat for the sake of consistency, and it could introduce backwards-compatibility problems if there is any CSS selectors for other elements that have the widget-title class.

@mitraval192
7 years ago

Added patch

#4 @audrasjb
5 years ago

  • Keywords close removed
  • Milestone Awaiting Review deleted
  • Resolution set to maybelater
  • Status changed from new to closed

Closing this ticket as the second class doesn't look to add strong benefits for users.
Feel free to reopen it if you have further use cases where is could add some value for the end-users or plugin/theme developers.

#5 @SergeyBiryukov
5 years ago

  • Resolution changed from maybelater to duplicate

Duplicate of #38244.

Note: See TracTickets for help on using tickets.