Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 7 years ago

#26716 closed enhancement (fixed)

Add Boolean Return Values to `require_if_theme_supports`

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

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 13 years ago.
Patch to add boolean return values to require_if_theme_supports
26716.diff​ (897 bytes ) - added by DrewAPicture 13 years ago.
fixed docs

Download all attachments as: .zip

Change History (5)

#1 @SergeyBiryukov
13 years ago

  • Keywords has-patch added
  • Milestone Awaiting Review → 3.9
  • Version trunk → 3.8

@jeffsebring
13 years ago

Patch to add boolean return values to require_if_theme_supports

@DrewAPicture
13 years ago

fixed docs

#2 @DrewAPicture
13 years ago

  • Keywords commit added

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

#3 @SergeyBiryukov
13 years ago

  • Owner set to SergeyBiryukov
  • Resolution → fixed
  • Status new → 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.