Ticket #43360: 43360.patch
File 43360.patch, 916 bytes (added by , 7 years ago) |
---|
-
option.php
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 bool $return_null Optional. Return default value if the option exist with empty string, empty array or null value. 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, $return_null = true ) { 31 32 global $wpdb; 32 33 33 34 $option = trim( $option ); … … 136 137 $value = untrailingslashit( $value ); 137 138 } 138 139 140 if(empty($value) && false === $return_null) 141 $value = $default; 139 142 /** 140 143 * Filters the value of an existing option. 141 144 *