Make WordPress Core

Opened 11 years ago

Closed 10 years ago

#36382 closed enhancement (fixed)

Document both return values of get_current_screen

Reported by: screamingdev Owned by: DrewAPicture
Priority: normal Milestone: 4.6
Component: Administration Version: 4.4.2
Severity: normal Keywords: has-patch
Cc: Focuses: docs

Description

The documentation only shows the return type for success cases.
But it can also be null on failure.

Attachments (1)

get_current_screen.patch​ (478 bytes ) - added by screamingdev 11 years ago.
Enhanced documentation via doc comments

Download all attachments as: .zip

Change History (4)

@screamingdev
11 years ago

Enhanced documentation via doc comments

#1 @swissspidy
11 years ago

  • Keywords has-patch added
  • Milestone Awaiting Review → Future Release

#2 @ocean90
10 years ago

  • Component General → Administration
  • Milestone Future Release → 4.6
  • Owner set to DrewAPicture
  • Status new → reviewing

#3 @DrewAPicture
10 years ago

  • Resolution → fixed
  • Status reviewing → closed

In 37534:

Docs: Update the return notation for get_current_screen() to note that null can also be returned if the screen has not been defined.

Props screamingdev.
Fixes #36382.

Note: See TracTickets for help on using tickets.