Make WordPress Core

Opened 8 years ago

Last modified 6 months ago

#36882 accepted enhancement

Add a reusable admin CSS class for destructive actions

Reported by: flixos90's profile flixos90 Owned by: joedolson's profile joedolson
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Administration Keywords: needs-patch
Focuses: Cc:

Description

As generally recommended, plugin authors should not use regular buttons for destructive actions, like removing something.

However, while there are standardized classes for buttons in WordPress admin (button, button-primary, button-secondary), a similar standardized class is missing for the destructive link. There are several locations in the admin where such links are displayed, but these are all styled using their individual selectors. Therefore plugin authors who want to use this style must either use one of these selectors (that probably do not fit the use-case at all) or recreate the style manually. Therefore I propose to standardize these style rules for a specific class, for example something like delete-button or delete-link.

Change History (14)

#1 @swissspidy
8 years ago

  • Component changed from General to Administration
  • Focuses administration removed

#2 @afercia
7 years ago

Related: #35126.

#3 @afercia
7 years ago

Thinking at #35126 where a specific class .button-link-delete was added for this purpose, it just makes sense to me to do the same thing for links too.

#4 @flixos90
7 years ago

  • Milestone changed from Awaiting Review to 4.8

#5 @jbpaul17
7 years ago

  • Keywords needs-patch added

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


7 years ago

#7 @jbpaul17
7 years ago

  • Milestone changed from 4.8 to 4.8.1

Per yesterday's bug scrub, we're going to punt this to 4.8.1.

#8 @afercia
7 years ago

Worth noting [40052] introduced .button-link-delete for <button> elements that look like links. Something similar could be done for the links.

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


7 years ago

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


7 years ago

#11 @jbpaul17
7 years ago

  • Milestone changed from 4.8.1 to 4.9

Per today's bug scrub, we'll punt this as the focus for 4.8.1 is regressions only.

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


6 years ago

#13 @jbpaul17
6 years ago

  • Milestone changed from 4.9 to Future Release

Punting to Future Release per today's 4.9 bug scrub.

#14 @joedolson
6 months ago

  • Owner set to joedolson
  • Status changed from new to accepted
Note: See TracTickets for help on using tickets.