WordPress.org

Make WordPress Core

Opened 22 months ago

Last modified 22 months ago

#41818 new defect (bug)

Add widget-title to default widget for consistency

Reported by: wpsmith Owned by:
Milestone: Awaiting Review Priority: lowest
Severity: minor Version: 4.9
Component: Widgets Keywords: has-patch close
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 22 months ago.
patch-41818.patch (1.3 KB) - added by mitraval192 22 months ago.
Added patch

Download all attachments as: .zip

Change History (5)

#1 follow-up: @westonruter
22 months 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
22 months 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 22 months ago by wpsmith (previous) (diff)

#3 @westonruter
22 months 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
22 months ago

Added patch

Note: See TracTickets for help on using tickets.