Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#36382 closed enhancement (fixed)

Document both return values of get_current_screen

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


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 8 years ago.
Enhanced documentation via doc comments

Download all attachments as: .zip

Change History (4)

8 years ago

Enhanced documentation via doc comments

#1 @swissspidy
8 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to Future Release

#2 @ocean90
8 years ago

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

#3 @DrewAPicture
8 years ago

  • Resolution set to fixed
  • Status changed from reviewing to 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.