Server : Apache System : Linux pod-100823:apache2_74:v0.5.7 5.4.0-1138-gcp #147~18.04.1-Ubuntu SMP Mon Oct 7 21:46:26 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33.7 Disable Function : apache_child_terminate,apache_get_modules,apache_get_version,apache_getenv,apache_note,apache_setenv,disk_free_space,disk_total_space,diskfreespace,dl,exec,fastcgi_finish_request,link,opcache_compile_file,opcache_get_configuration,opcache_invalidate,opcache_is_script_cached,opcache_reset,passthru,pclose,pcntl_exec,popen,posix_getpid,posix_getppid,posix_getpwuid,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_uname,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,realpath_cache_get,shell_exec,show_source,symlink,system Directory : /nas/content/live/attorneyexperi/wp-content/plugins/wp-rocket/inc/3rd-party/plugins/ |
<?php defined( 'ABSPATH' ) || exit; if ( class_exists( 'autoptimizeCache' ) ) : /** * Deactivate WP Rocket lazyload if Autoptimize lazyload is enabled * * @since 3.3.4 * * @param string $old_value Previous autoptimize option value. * @param string $value New autoptimize option value. * @return void */ function rocket_maybe_deactivate_lazyload( $old_value, $value ) { if ( empty( $old_value['autoptimize_imgopt_checkbox_field_3'] ) && ! empty( $value['autoptimize_imgopt_checkbox_field_3'] ) ) { update_rocket_option( 'lazyload', 0 ); } } add_action( 'update_option_autoptimize_imgopt_settings', 'rocket_maybe_deactivate_lazyload', 10, 2 ); /** * Improvement with Autoptimize: clear the cache when Autoptimize's cache is cleared * * @since 2.7 */ add_action( 'autoptimize_action_cachepurged', 'rocket_clean_domain' ); endif; if ( class_exists( 'autoptimizeConfig' ) ) : /** * Deactivate WP Rocket CSS Minification if Autoptimize CSS minification is enabled * * @since 2.9.5 * @author Remy Perona * * @param string $old_value Previous autoptimize option value. * @param string $value New autoptimize option value. */ function rocket_maybe_deactivate_minify_css( $old_value, $value ) { if ( $value !== $old_value && 'on' === $value ) { update_rocket_option( 'minify_css', 0 ); } } add_action( 'update_option_autoptimize_css', 'rocket_maybe_deactivate_minify_css', 10, 2 ); /** * Deactivate WP Rocket JS Minification if Autoptimize JS minification is enabled * * @since 2.9.5 * @author Remy Perona * * @param string $old_value Previous autoptimize option value. * @param string $value New autoptimize option value. */ function rocket_maybe_deactivate_minify_js( $old_value, $value ) { if ( $value !== $old_value && 'on' === $value ) { update_rocket_option( 'minify_js', 0 ); update_rocket_option( 'minify_concatenate_js', 0 ); } } add_action( 'update_option_autoptimize_js', 'rocket_maybe_deactivate_minify_js', 10, 2 ); /** * Deactivate WP Rocket async CSS if Autoptimize async CSS is enabled * * @since 2.10 * @author Remy Perona * * @param string $old_value Previous autoptimize option value. * @param string $value New autoptimize option value. */ function rocket_maybe_deactivate_css_defer( $old_value, $value ) { if ( $value !== $old_value && 'on' === $value ) { update_rocket_option( 'autoptimize_css_defer', 0 ); } } add_action( 'update_option_autoptimize_css_defer', 'rocket_maybe_deactivate_css_defer', 10, 2 ); endif; /** * Disable WP Rocket minification options when activating Autoptimize and values are already in the database. * * @since 2.9.5 * @author Remy Perona */ function rocket_activate_autoptimize() { if ( 'on' === get_option( 'autoptimize_css' ) ) { update_rocket_option( 'minify_css', 0 ); } if ( 'on' === get_option( 'autoptimize_js' ) ) { update_rocket_option( 'minify_js', 0 ); update_rocket_option( 'minify_concatenate_js', 0 ); } if ( 'on' === get_option( 'autoptimize_css_defer' ) ) { update_rocket_option( 'async_css', 0 ); } $lazyload = get_option( 'autoptimize_imgopt_settings' ); if ( ! empty( $lazyload['autoptimize_imgopt_checkbox_field_3'] ) ) { update_rocket_option( 'lazyload', 0 ); } } add_action( 'activate_autoptimize/autoptimize.php', 'rocket_activate_autoptimize', 11 ); /** * Disable WP Rocket lazyload fields if Autoptimize lazyload is enabled * * @since 3.3.4 * * @return bool */ function rocket_maybe_disable_lazyload() { $lazyload = get_option( 'autoptimize_imgopt_settings' ); if ( is_plugin_active( 'autoptimize/autoptimize.php' ) && ! empty( $lazyload['autoptimize_imgopt_checkbox_field_3'] ) ) { return true; } return false; } /** * Disable WP Rocket CSS minification field if Autoptimize CSS minification is enabled * * @since 2.9.5 * @author Remy Perona * * @return bool|null True if it is active */ function rocket_maybe_disable_minify_css() { if ( is_plugin_active( 'autoptimize/autoptimize.php' ) && 'on' === get_option( 'autoptimize_css' ) ) { return true; } } /** * Disable WP Rocket JS minification field if Autoptimize JS minification is enabled * * @since 2.9.5 * @author Remy Perona * * @return bool|null True if it is active */ function rocket_maybe_disable_minify_js() { if ( is_plugin_active( 'autoptimize/autoptimize.php' ) && 'on' === get_option( 'autoptimize_js' ) ) { return true; } } /** * Disable WP Rocket async CSS field if Autoptimize async CSS is enabled * * @since 2.10 * @author Remy Perona * * @return bool|null True if it is active */ function rocket_maybe_disable_async_css() { if ( is_plugin_active( 'autoptimize/autoptimize.php' ) && 'on' === get_option( 'autoptimize_css_defer' ) ) { return true; } }