Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 5 years ago

#26716 closed enhancement (fixed)

Add Boolean Return Values to `require_if_theme_supports`

Reported by: jeffsebring's profile jeffsebring Owned by: sergeybiryukov's profile 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 11 years ago.
Patch to add boolean return values to require_if_theme_supports
26716.diff (897 bytes) - added by DrewAPicture 11 years ago.
fixed docs

Download all attachments as: .zip

Change History (5)

#1 @SergeyBiryukov
11 years ago

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

@jeffsebring
11 years ago

Patch to add boolean return values to require_if_theme_supports

@DrewAPicture
11 years ago

fixed docs

#2 @DrewAPicture
11 years ago

  • Keywords commit added

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

#3 @SergeyBiryukov
11 years 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.