From 92b8387b4ce3ec76aa015cbb636f3d5c8d312ae8 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 3 Jul 2021 11:31:00 +0000 Subject: [PATCH] Docs: Correct `@see` references for hooks in the `get_option()` description. Follow-up to [51050]. See #52628, #53461. git-svn-id: https://develop.svn.wordpress.org/trunk@51324 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/option.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/wp-includes/option.php b/src/wp-includes/option.php index 412a47dc8a..ec41b060ae 100644 --- a/src/wp-includes/option.php +++ b/src/wp-includes/option.php @@ -12,10 +12,10 @@ * If the option does not exist, and a default value is not provided, * boolean false is returned. This could be used to check whether you need * to initialize an option during installation of a plugin, however that - * can be done better by using {@see add_option} which will not overwrite + * can be done better by using add_option() which will not overwrite * existing options. * - * Not initializing an option and using the boolean false as a return value + * Not initializing an option and using boolean `false` as a return value * is a bad practice as it triggers an additional database query. * * The type of the returned value can be different from the type that was passed @@ -28,19 +28,19 @@ * as string equivalents. * * Exceptions: - * 1. When the option has not been saved in the database, the default value - * {@see get_option} is returned if provided. If not, boolean `false` is returned. - * 2. When one of the Options API filters is used: {@see pre_option_{$option}}, - * {@see default_option_{$option}}, and {@see option_{$option}}, the returned + * 1. When the option has not been saved in the database, the `$default` value + * is returned if provided. If not, boolean `false` is returned. + * 2. When one of the Options API filters is used: {@see 'pre_option_{$option}'}, + * {@see 'default_option_{$option}'}, or {@see 'option_{$option}'}, the returned * value may not match the expected type. - * 3. When the option has just been saved in the database, and {@see get_option} + * 3. When the option has just been saved in the database, and get_option() * is used right after, non-string scalar and null values are not converted to * string equivalents and the original type is returned. * * Examples: * * When adding options like this: `add_option( 'my_option_name', 'value' );` - * and then retrieving them with `get_option( 'my_option_name' )`, the returned + * and then retrieving them with `get_option( 'my_option_name' );`, the returned * values will be: * * `false` returns `string(0) ""`