Changeset 38815
- Timestamp:
- 10/19/2016 04:53:02 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/option.php
r38814 r38815 1101 1101 * @since 2.9.0 As 'pre_site_option_' . $key 1102 1102 * @since 3.0.0 1103 * @since 4.4.0 The `$option` parameter was added 1103 * @since 4.4.0 The `$option` parameter was added. 1104 * @since 4.7.0 The `$network_id` parameter was added. 1104 1105 * 1105 1106 * @param mixed $pre_option The default value to return if the option does not exist. 1106 1107 * @param string $option Option name. 1107 */ 1108 $pre = apply_filters( "pre_site_option_{$option}", false, $option ); 1108 * @param int $network_id ID of the network. 1109 */ 1110 $pre = apply_filters( "pre_site_option_{$option}", false, $option, $network_id ); 1109 1111 1110 1112 if ( false !== $pre ) { … … 1125 1127 * @since 3.4.0 1126 1128 * @since 4.4.0 The `$option` parameter was added. 1127 * 1128 * @param mixed $default The value to return if the site option does not exist 1129 * in the database. 1130 * @param string $option Option name. 1129 * @since 4.7.0 The `$network_id` parameter was added. 1130 * 1131 * @param mixed $default The value to return if the site option does not exist 1132 * in the database. 1133 * @param string $option Option name. 1134 * @param int $network_id ID of the network. 1131 1135 */ 1132 return apply_filters( "default_site_option_{$option}", $default, $option );1136 return apply_filters( "default_site_option_{$option}", $default, $option, $network_id ); 1133 1137 } 1134 1138 1135 1139 if ( ! is_multisite() ) { 1136 1140 /** This filter is documented in wp-includes/option.php */ 1137 $default = apply_filters( 'default_site_option_' . $option, $default, $option );1141 $default = apply_filters( 'default_site_option_' . $option, $default, $option, $network_id ); 1138 1142 $value = get_option( $option, $default ); 1139 1143 } else { … … 1157 1161 1158 1162 /** This filter is documented in wp-includes/option.php */ 1159 $value = apply_filters( 'default_site_option_' . $option, $default, $option );1163 $value = apply_filters( 'default_site_option_' . $option, $default, $option, $network_id ); 1160 1164 } 1161 1165 } … … 1169 1173 * @since 2.9.0 As 'site_option_' . $key 1170 1174 * @since 3.0.0 1171 * @since 4.4.0 The `$option` parameter was added 1172 * 1173 * @param mixed $value Value of network option. 1174 * @param string $option Option name. 1175 */ 1176 return apply_filters( "site_option_{$option}", $value, $option ); 1175 * @since 4.4.0 The `$option` parameter was added. 1176 * @since 4.7.0 The `$network_id` parameter was added. 1177 * 1178 * @param mixed $value Value of network option. 1179 * @param string $option Option name. 1180 * @param int $network_id ID of the network. 1181 */ 1182 return apply_filters( "site_option_{$option}", $value, $option, $network_id ); 1177 1183 } 1178 1184
Note: See TracChangeset
for help on using the changeset viewer.