From 32194797d5ed54ded222d9022e820a38f9befb99 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Sat, 9 Jan 2016 03:11:59 +0000 Subject: [PATCH] Clarify return types in `get_option()` documentation. The new note specifies that scalar values will always be returned as strings. Fixes #31820. git-svn-id: https://develop.svn.wordpress.org/trunk@36234 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/option.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wp-includes/option.php b/src/wp-includes/option.php index 6d9fe645c6..842981dd48 100644 --- a/src/wp-includes/option.php +++ b/src/wp-includes/option.php @@ -16,6 +16,9 @@ * * If the option was serialized then it will be unserialized when it is returned. * + * Any scalar values will be returned as strings. You may coerce the return type of a given option by registering a + * 'option_{$option}' filter callback. + * * @since 1.5.0 * * @global wpdb $wpdb WordPress database abstraction object.