diff --git a/src/wp-includes/option.php b/src/wp-includes/option.php
index 3bccd29..2f63fab 100644
a
|
b
|
|
25 | 25 | * |
26 | 26 | * @param string $option Name of option to retrieve. Expected to not be SQL-escaped. |
27 | 27 | * @param mixed $default Optional. Default value to return if the option does not exist. |
| 28 | * @param mixed $autoloaded_only Optional. Skip not autoloaded. |
28 | 29 | * @return mixed Value set for the option. |
29 | 30 | */ |
30 | | function get_option( $option, $default = false ) { |
| 31 | function get_option( $option, $default = false, $autoloaded_only = false ) { |
31 | 32 | global $wpdb; |
32 | 33 | |
33 | 34 | $option = trim( $option ); |
… |
… |
function get_option( $option, $default = false ) { |
82 | 83 | } else { |
83 | 84 | $value = wp_cache_get( $option, 'options' ); |
84 | 85 | |
85 | | if ( false === $value ) { |
| 86 | if ( false === $value && !$autoloaded_only ) { |
86 | 87 | $row = $wpdb->get_row( $wpdb->prepare( "SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1", $option ) ); |
87 | 88 | |
88 | 89 | // Has to be get_row instead of get_var because of funkiness with 0, false, null values |