From e6538f5e0058bee392a8fc1949e4ce83a98a0b8f Mon Sep 17 00:00:00 2001 From: "Drew Jaynes (DrewAPicture)" Date: Mon, 17 Nov 2014 17:07:19 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@30368 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/screen.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/includes/screen.php b/src/wp-admin/includes/screen.php index bbdb683fbc..e3ae1f6ef4 100644 --- a/src/wp-admin/includes/screen.php +++ b/src/wp-admin/includes/screen.php @@ -648,7 +648,8 @@ final class WP_Screen { * @since 3.3.0 * * @param string $option Option ID. - * @param mixed $key Optional. Specific array key for when the option is an array. + * @param string $key Optional. Specific array key for when the option is an array. Default false. + * @return mixed The option value if set, null otherwise. */ public function get_option( $option, $key = false ) { if ( ! isset( $this->_options[ $option ] ) )