WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 3 years ago

#36382 closed enhancement (fixed)

Document both return values of get_current_screen

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

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

Download all attachments as: .zip

Change History (4)

@screamingdev
4 years ago

Enhanced documentation via doc comments

#1 @swissspidy
4 years ago

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

#2 @ocean90
3 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
3 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.