Make WordPress Core

Opened 6 weeks ago

Closed 25 hours ago

#61023 closed enhancement (fixed)

Add 'label' argument to register_setting

Reported by: mamaduka's profile Mamaduka Owned by: mamaduka's profile Mamaduka
Milestone: 6.6 Priority: normal
Severity: normal Version:
Component: Options, Meta APIs Keywords: has-patch has-unit-tests commit
Focuses: Cc:

Description

A sync ticket for https://github.com/WordPress/gutenberg/pull/59243.

The 'label' will displayed to users when editing core or custom settings via block editors. It avoids hardcoding Settings labels and improves extensibility.

Please take a look at the original issue for additional details: https://github.com/WordPress/gutenberg/issues/41637.

Change History (11)

This ticket was mentioned in PR #6495 on WordPress/wordpress-develop by @Mamaduka.


4 weeks ago
#1

  • Keywords has-patch added; needs-patch removed

#2 @Mamaduka
4 weeks ago

  • Keywords has-unit-tests added

@Mamaduka commented on PR #6495:


4 weeks ago
#3

Thanks for the review, @TimothyBJacobs 🙇

The wp-api-generated.js file will need to be rebuilt before committing.

I always forget about it. I wish there was a pre-commit hook for it. To update it, I need to run a full PHP test suite, correct?

@TimothyBlynJacobs commented on PR #6495:


4 weeks ago
#4

Yeah the process is a bit frustrating. Was GB active on your checkout?

@Mamaduka commented on PR #6495:


4 weeks ago
#5

Was GB active on your checkout?

No. I've got a separate installation just for core patches.

@ellatrix commented on PR #6495:


10 days ago
#6

@Mamaduka Is this good to merge?

@Mamaduka commented on PR #6495:


10 days ago
#7

@ellatrix, yes, it's good to be merged.

#8 @Mamaduka
8 days ago

  • Keywords commit added

@ellatrix commented on PR #6495:


26 hours ago
#9

Could you merge it?

@ellatrix commented on PR #6495:


26 hours ago
#10

Should https://github.com/WordPress/gutenberg/pull/61351 be included here or in a separate backport?

#11 @ellatrix
25 hours ago

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

In 58230:

Options: Add 'label' argument to register_setting.

The 'label' will displayed to users when editing core or custom settings via block editors. It avoids hardcoding Settings labels and improves extensibility.

Backports https://github.com/WordPress/gutenberg/pull/59243.

Props mamaduka, timothyblynjacobs, ellatrix.

Fixes #61023.

Note: See TracTickets for help on using tickets.