Make WordPress Core

Opened 21 months ago

Closed 21 months ago

Last modified 21 months ago

#62746 closed defect (bug) (fixed)

after_section not printed if $wp_settings_section doesn't have fields attached

Reported by: alpipego Owned by: SergeyBiryukov
Priority: normal Milestone: 6.8
Component: Options, Meta APIs Version:
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

If a settings section doesn't have any fields attached via $wp_settings_fields the additional after_section argument doesn't get printed. before_section does, however.

Change History (8)

#1 @alpipego
21 months ago

  • Resolutioninvalid
  • Status newclosed

#2 @alpipego
21 months ago

  • Resolution invalid
  • Status closedreopened
Last edited 21 months ago by alpipego (previous) (diff)

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


21 months ago
#3

  • Keywords has-patch added

When a section did not have fields attached, the loop moved to the next item. By inverting the logic check for fields, this change makes sure the after_section argument gets printed.

Trac ticket: https://core.trac.wordpress.org/ticket/62746

#5 @alpipego
21 months ago

  • Keywords has-patch added

#6 @SergeyBiryukov
21 months ago

  • Milestone Awaiting Review6.8

#7 @SergeyBiryukov
21 months ago

  • Owner set to SergeyBiryukov
  • Resolutionfixed
  • Status reopenedclosed

In 59564:

Options, Meta APIs: Ensure after_section is printed for sections without any fields.

This brings consistency with the before_section HTML content, which did get printed in do_settings_sections() regardless of whether the settings section has any fields attached.

Follow-up to [8855], [21742], [54247].

Props alpipego, SergeyBiryukov.
Fixes #62746.

@SergeyBiryukov commented on PR #8055:


21 months ago
#8

Thanks for the PR! Merged in r59564.

Note: See TracTickets for help on using tickets.