Changeset 38814 for trunk/src/wp-includes/option.php
- Timestamp:
- 10/19/2016 04:46:14 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/option.php
r38687 r38814 1070 1070 * @see get_option() 1071 1071 * 1072 * @global wpdb $wpdb 1073 * @global object $current_site 1072 * @global wpdb $wpdb 1074 1073 * 1075 1074 * @param int $network_id ID of the network. Can be null to default to the current network ID. … … 1079 1078 */ 1080 1079 function get_network_option( $network_id, $option, $default = false ) { 1081 global $wpdb , $current_site;1080 global $wpdb; 1082 1081 1083 1082 if ( $network_id && ! is_numeric( $network_id ) ) { … … 1088 1087 1089 1088 // Fallback to the current network if a network ID is not specified. 1090 if ( ! $network_id && is_multisite()) {1091 $network_id = $current_site->id;1089 if ( ! $network_id ) { 1090 $network_id = get_current_network_id(); 1092 1091 } 1093 1092 … … 1187 1186 * @see add_option() 1188 1187 * 1189 * @global wpdb $wpdb 1190 * @global object $current_site 1188 * @global wpdb $wpdb 1191 1189 * 1192 1190 * @param int $network_id ID of the network. Can be null to default to the current network ID. … … 1196 1194 */ 1197 1195 function add_network_option( $network_id, $option, $value ) { 1198 global $wpdb , $current_site;1196 global $wpdb; 1199 1197 1200 1198 if ( $network_id && ! is_numeric( $network_id ) ) { … … 1205 1203 1206 1204 // Fallback to the current network if a network ID is not specified. 1207 if ( ! $network_id && is_multisite()) {1208 $network_id = $current_site->id;1205 if ( ! $network_id ) { 1206 $network_id = get_current_network_id(); 1209 1207 } 1210 1208 … … 1297 1295 * @see delete_option() 1298 1296 * 1299 * @global wpdb $wpdb 1300 * @global object $current_site 1297 * @global wpdb $wpdb 1301 1298 * 1302 1299 * @param int $network_id ID of the network. Can be null to default to the current network ID. … … 1305 1302 */ 1306 1303 function delete_network_option( $network_id, $option ) { 1307 global $wpdb , $current_site;1304 global $wpdb; 1308 1305 1309 1306 if ( $network_id && ! is_numeric( $network_id ) ) { … … 1314 1311 1315 1312 // Fallback to the current network if a network ID is not specified. 1316 if ( ! $network_id && is_multisite()) {1317 $network_id = $current_site->id;1313 if ( ! $network_id ) { 1314 $network_id = get_current_network_id(); 1318 1315 } 1319 1316 … … 1379 1376 * @see update_option() 1380 1377 * 1381 * @global wpdb $wpdb 1382 * @global object $current_site 1378 * @global wpdb $wpdb 1383 1379 * 1384 1380 * @param int $network_id ID of the network. Can be null to default to the current network ID. … … 1388 1384 */ 1389 1385 function update_network_option( $network_id, $option, $value ) { 1390 global $wpdb , $current_site;1386 global $wpdb; 1391 1387 1392 1388 if ( $network_id && ! is_numeric( $network_id ) ) { … … 1397 1393 1398 1394 // Fallback to the current network if a network ID is not specified. 1399 if ( ! $network_id && is_multisite()) {1400 $network_id = $current_site->id;1395 if ( ! $network_id ) { 1396 $network_id = get_current_network_id(); 1401 1397 } 1402 1398
Note: See TracChangeset
for help on using the changeset viewer.