wphooks.info - pre_site_option_{$option}

pre_site_option_{$option}

(trunk - 5.1-alpha-44286)

The hook occurs in the following file:

wp-includes/option.php:
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
	 *
	 * @param mixed  $pre_option The value to return instead of the option value. This differs from
	 *                           `$default`, which is used as the fallback value in the event the
	 *                           option doesn't exist elsewhere in get_network_option(). Default
	 *                           is false (to skip past the short-circuit).
	 * @param string $option     Option name.
	 * @param int    $network_id ID of the network.
	 * @param mixed  $default    The fallback value to return if the option does not exist.
	 *                           Default is false.
	 */
	$pre = apply_filters( "pre_site_option_{$option}", false, $option, $network_id, $default );

	if ( false !== $pre ) {
		return $pre;
	}

	// prevent non-existent options from triggering multiple queries
	$notoptions_key = "$network_id:notoptions";
	$notoptions     = wp_cache_get( $notoptions_key, 'site-options' );