Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#30363 closed defect (bug) (fixed)

Add @return to DocBlock on WP_Screen->get_option()

Reported by: dustyf Owned by: DrewAPicture
Milestone: 4.1 Priority: normal
Severity: normal Version: 3.5
Component: Administration Keywords: has-patch
Focuses: docs Cc:


The PHPdoc docblock for WP_Screen->get_option() https://core.trac.wordpress.org/browser/tags/4.0/src/wp-admin/includes/screen.php#L646 should have an @return value declared.

The value returned can be mixed and is dependent on what is set as the screen option.

Attachments (1)

get_options_patch.diff (509 bytes) - added by zrothauser 7 years ago.
Patch to add return value for WP_Screen::get_options()

Download all attachments as: .zip

Change History (6)

7 years ago

Patch to add return value for WP_Screen::get_options()

#1 @dustyf
7 years ago

  • Keywords has-patch added

#2 @DrewAPicture
7 years ago

  • Milestone changed from Awaiting Review to 4.1
  • Version changed from trunk to 3.5

Thanks for the patch.

#3 @DrewAPicture
7 years ago

  • Owner set to DrewAPicture
  • Resolution set to fixed
  • Status changed from new to closed

In 30368:

Add a missing @return description for WP_Screen::get_option().

Also declare the default value for the $key parameter.

Props dustyf for the initial patch.
Fixes #30363.

#4 @DrewAPicture
7 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Whoops, looks like that should've been "props zrothauser" on [30368].

#5 @DrewAPicture
7 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 30369:

Fix parameter description syntax for WP_Screen::get_option().

Props zrothauser for the initial patch.
See [30368]. Fixes #30363.

Note: See TracTickets for help on using tickets.