PluginProbe
Autoptimize / 3.1.4
Autoptimize v3.1.4
2.2.2 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.5.0 2.5.1 2.6.0 2.6.1 2.6.2 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 All 107 releases
← All changes | classes/critcss-inc/admin_settings_explain.php +11 -3 2.7.33.1.4 View file →
@@ -17,17 +17,25 @@
17 17 <div class="ao_settings_div">
18 18 <?php
19 19 $ccss_explanation = '';
20 20
21 + if ( apply_filters( 'autoptimize_filter_ccss_rules_without_api', true ) ) {
22 + $_transient = 'ao3_ccss_explain';
23 + $_explain_html = 'https://misc.optimizingmatters.com/autoptimize_ccss_explain_ao30_i18n.html?ao_ver=';
24 + } else {
25 + $_transient = 'ao_ccss_explain';
26 + $_explain_html = 'https://misc.optimizingmatters.com/autoptimize_ccss_explain_i18n.html?ao_ver=';
27 + }
28 +
21 29 // get the HTML with the explanation of what critical CSS is.
22 30 if ( apply_filters( 'autoptimize_settingsscreen_remotehttp', true ) ) {
23 - $ccss_explanation = get_transient( 'ao_ccss_explain' );
31 + $ccss_explanation = get_transient( $_transient );
24 32 if ( empty( $ccss_explanation ) ) {
25 - $ccss_expl_resp = wp_remote_get( 'https://misc.optimizingmatters.com/autoptimize_ccss_explain_i18n.html?ao_ver=' . AUTOPTIMIZE_PLUGIN_VERSION );
33 + $ccss_expl_resp = wp_remote_get( $_explain_html . AUTOPTIMIZE_PLUGIN_VERSION );
26 34 if ( ! is_wp_error( $ccss_expl_resp ) ) {
27 35 if ( '200' == wp_remote_retrieve_response_code( $ccss_expl_resp ) ) {
28 36 $ccss_explanation = wp_kses_post( wp_remote_retrieve_body( $ccss_expl_resp ) );
29 - set_transient( 'ao_ccss_explain', $ccss_explanation, WEEK_IN_SECONDS );
37 + set_transient( 'ao3_ccss_explain', $ccss_explanation, WEEK_IN_SECONDS );
30 38 }
31 39 }
32 40 }
33 41 }