default_site_option_

default_site_option_

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('default_site_option_') is found 2 times:

  • /wp-includes/option.php line 2044
    2040
    2041
    2042
    2043
    2044
    2045
    2046
    2047
    2048
    2049
    2050
    }
     
    if ( ! is_multisite() ) {
        /** This filter is documented in wp-includes/option.php */
        $default_value = apply_filters( 'default_site_option_' . $option, $default_value, $option, $network_id );
        $value         = get_option( $option, $default_value );
    } else {
        $cache_key = "$network_id:$option";
        $value     = wp_cache_get( $cache_key, 'site-options' );
     
        if ( ! isset( $value ) || false === $value ) {
  • /wp-includes/option.php line 2067
    2063
    2064
    2065
    2066
    2067
    2068
    2069
    2070
    2071
    2072
    2073
                $notoptions[ $option ] = true;
                wp_cache_set( $notoptions_key, $notoptions, 'site-options' );
     
                /** This filter is documented in wp-includes/option.php */
                $value = apply_filters( 'default_site_option_' . $option, $default_value, $option, $network_id );
            }
        }
    }
     
    if ( ! is_array( $notoptions ) ) {
        $notoptions = array();

See this hook used in plugins: