Make WordPress Core

Opened 3 months ago

Closed 6 weeks 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.


2 months ago
#1

  • Keywords has-patch added; needs-patch removed

#2 @Mamaduka
2 months ago

  • Keywords has-unit-tests added

@Mamaduka commented on PR #6495:


2 months 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:


2 months ago
#4

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

@Mamaduka commented on PR #6495:


2 months ago
#5

Was GB active on your checkout?

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

@ellatrix commented on PR #6495:


7 weeks ago
#6

@Mamaduka Is this good to merge?

@Mamaduka commented on PR #6495:


7 weeks ago
#7

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

#8 @Mamaduka
7 weeks ago

  • Keywords commit added

@ellatrix commented on PR #6495:


6 weeks ago
#9

Could you merge it?

@ellatrix commented on PR #6495:


6 weeks ago
#10

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

#11 @ellatrix
6 weeks 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.