WordPress.org

Make WordPress Core

Opened 4 months ago

Closed 8 weeks ago

#26716 closed enhancement (fixed)

Add Boolean Return Values to `require_if_theme_supports`

Reported by: jeffsebring Owned by: SergeyBiryukov
Milestone: 3.9 Priority: normal
Severity: normal Version: 3.8
Component: Themes Keywords: has-patch commit
Focuses: Cc:

Description

Boolean return values make this function much more useful, saving a call to current_theme_supports in some use cases.

Example:

if ( require_if_theme_supports( 'plugin-theme-magic', __DIR__ . '/includes/plugin-theme-magic.php' ) ) {
   // parents, children, plugins and core getting along really well
}

Attachments (2)

require_if_theme_supports+boolean.diff (958 bytes) - added by jeffsebring 4 months ago.
Patch to add boolean return values to require_if_theme_supports
26716.diff (897 bytes) - added by DrewAPicture 8 weeks ago.
fixed docs

Download all attachments as: .zip

Change History (5)

comment:1 SergeyBiryukov4 months ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 3.9
  • Version changed from trunk to 3.8

jeffsebring4 months ago

Patch to add boolean return values to require_if_theme_supports

DrewAPicture8 weeks ago

fixed docs

comment:2 DrewAPicture8 weeks ago

  • Keywords commit added

26716.diff fixes the docs slightly. Looks good to me.

comment:3 SergeyBiryukov8 weeks ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 27217:

Add boolean return values to require_if_theme_supports().

props jeffsebring, DrewAPicture.
fixes #26716.

Note: See TracTickets for help on using tickets.