From 9d4123cee1867ee7199b06bdc92d40611f547ecc Mon Sep 17 00:00:00 2001 From: Zach van Rijn Date: Wed, 21 Jul 2021 14:54:07 -0500 Subject: Initial unmodified import from Astra (Version: 3.6.5) @ /wp-content/themes/astra/. --- .../class-astra-performance-configs.php | 95 ++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 inc/customizer/configurations/performance/class-astra-performance-configs.php (limited to 'inc/customizer/configurations/performance') diff --git a/inc/customizer/configurations/performance/class-astra-performance-configs.php b/inc/customizer/configurations/performance/class-astra-performance-configs.php new file mode 100644 index 0000000..844a4c2 --- /dev/null +++ b/inc/customizer/configurations/performance/class-astra-performance-configs.php @@ -0,0 +1,95 @@ + ASTRA_THEME_SETTINGS . '[load-google-fonts-locally]', + 'default' => astra_get_option( 'load-google-fonts-locally' ), + 'type' => 'control', + 'control' => 'ast-toggle-control', + 'transport' => 'postMessage', + 'title' => __( 'Load Google Fonts Locally', 'astra' ), + 'section' => 'section-performance', + 'priority' => 10, + ), + + /** + * Option: Preload local fonts. + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[preload-local-fonts]', + 'default' => astra_get_option( 'preload-local-fonts' ), + 'type' => 'control', + 'control' => 'ast-toggle-control', + 'title' => __( 'Preload Local Fonts', 'astra' ), + 'divider' => array( 'ast_class' => 'ast-top-divider ast-bottom-divider' ), + 'section' => 'section-performance', + 'transport' => 'postMessage', + 'priority' => 20, + 'context' => array( + array( + 'setting' => ASTRA_THEME_SETTINGS . '[load-google-fonts-locally]', + 'operator' => '==', + 'value' => true, + ), + ), + ), + + /** + * Option: Regenerate Font Files + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[flush-local-font-files]', + 'type' => 'control', + 'control' => 'ast-description', + 'section' => 'section-performance', + 'priority' => 30, + 'title' => __( 'Flush Local Fonts Cache', 'astra' ), + 'help' => '

' . __( 'Click the button to reset the local fonts cache.', 'astra' ) . '


', + 'settings' => array(), + 'context' => array( + array( + 'setting' => ASTRA_THEME_SETTINGS . '[load-google-fonts-locally]', + 'operator' => '==', + 'value' => true, + ), + ), + ), + ); + + return array_merge( $configurations, $_configs ); + } +} + +new Astra_Performance_Configs(); -- cgit v1.2.3-60-g2f50