Breeze_Options_Reader::get_option_value( 'breeze-secure-api' ), 'breeze-api-token' => Breeze_Options_Reader::get_option_value( 'breeze-api-token' ), ); new Breeze_Api_Handler( $options ); } /** * Store files locally, First buffer controller to occur in this plugin */ add_action( 'init', function () { ob_start( 'breeze_ob_start_localfiles_callback' ); }, 5 ); // Compatibility with ShortPixel. require_once BREEZE_PLUGIN_DIR . 'inc/compatibility/class-breeze-shortpixel-compatibility.php'; require_once BREEZE_PLUGIN_DIR . 'inc/compatibility/class-breeze-avada-cache.php'; require_once BREEZE_PLUGIN_DIR . 'inc/compatibility/class-breeze-elementor-template.php'; /** * Buffer to work with the contents before any changes occured * * @param $buffer * * @return array|false|int|mixed|string|string[] */ function breeze_ob_start_localfiles_callback( $buffer ) { // Store Files Locally if ( class_exists( 'Breeze_Store_Files' ) ) { $enabled_options = array(); $options = array( 'breeze-store-googlefonts-locally', 'breeze-store-googleanalytics-locally', 'breeze-store-facebookpixel-locally', ); foreach ( $options as $option ) { $enabled_options[ $option ] = Breeze_Options_Reader::get_option_value( $option ); } $store_locally = new \Breeze_Store_Files(); $buffer = $store_locally->init( $buffer, $enabled_options ); } // Return content return $buffer; } // Call back ob start - stack function breeze_ob_start_callback( $buffer ) { if ( ! empty( $_SERVER ) && ! empty( $_SERVER['REQUEST_URI'] ) && strpos( $_SERVER['REQUEST_URI'], 'context=edit' ) ) { return $buffer; } // Get buffer from minify $buffer = apply_filters( 'breeze_minify_content_return', $buffer ); if ( ! empty( Breeze_Options_Reader::get_option_value( 'cdn-active' ) ) ) { // Get buffer after remove query strings $buffer = apply_filters( 'breeze_cdn_content_return', $buffer ); } // Return content return $buffer; } require_once BREEZE_PLUGIN_DIR . 'views/option-tabs-loader.php'; // Minify require_once BREEZE_PLUGIN_DIR . 'inc/minification/breeze-minify-main.php'; require_once BREEZE_PLUGIN_DIR . 'inc/minification/breeze-minification-cache.php'; add_action( 'init', function () { new Breeze_Minify(); }, 0 ); // CDN Integration if ( ! class_exists( 'Breeze_CDN_Integration' ) ) { require_once BREEZE_PLUGIN_DIR . 'inc/cdn-integration/breeze-cdn-integration.php'; require_once BREEZE_PLUGIN_DIR . 'inc/cdn-integration/breeze-cdn-rewrite.php'; add_action( 'init', function () { new Breeze_CDN_Integration(); }, 0 ); } // Refresh cache for ordered products. require_once BREEZE_PLUGIN_DIR . 'inc/class-breeze-woocommerce-product-cache.php'; // WP-CLI commands require_once BREEZE_PLUGIN_DIR . 'inc/wp-cli/class-breeze-wp-cli-core.php'; // Reset to default add_action( 'breeze_reset_default', array( 'Breeze_Admin', 'plugin_deactive_hook' ), 80 );