$option_value ) { if ( false === array_key_exists( $option_key, self::$options ) || empty( self::$options[ $option_key ] ) ) { self::$options[ $option_key ] = $option_value; } } } else { self::$options[ $group ] = $read_data; } } } if ( is_multisite() ) { self::$options['blog_id'] = get_current_blog_id(); } if ( isset( self::$options[ $option_name ] ) ) { return self::$options[ $option_name ]; } return null; } /** * Retrieve site options accounting for settings inheritance. * * @param string $option_name * @param bool $is_local * * @return array */ private static function read_the_option_data( $option_name, $is_local = false ) { $inherit = true; global $breeze_network_subsite_settings; if ( is_network_admin() && ! $breeze_network_subsite_settings ) { $is_local = false; } elseif ( ! breeze_does_inherit_settings() ) { $inherit = false; } if ( ! is_multisite() || $is_local || ! $inherit ) { $option = get_option( 'breeze_' . $option_name ); } else { $option = get_site_option( 'breeze_' . $option_name ); } if ( empty( $option ) || ! is_array( $option ) ) { $option = array(); } return $option; } public static function fetch_all_saved_settings( $is_root = false ) { self::$options = array(); if ( true === $is_root && ! defined( 'WP_NETWORK_ADMIN' ) ) { define( 'WP_NETWORK_ADMIN', true ); } self::get_option_value( 'all', false, $is_root ); return self::$options; } }