diff --git a/inc/Engine/Admin/HealthCheck.php b/inc/Engine/Admin/HealthCheck.php new file mode 100644 index 0000000000..98edc7a4c9 --- /dev/null +++ b/inc/Engine/Admin/HealthCheck.php @@ -0,0 +1,149 @@ +options = $options; + $this->events = $this->get_events(); + } + + /** + * Returns an array of events that this subscriber wants to listen to. + * + * @return array + */ + public static function get_subscribed_events() { + return [ + 'admin_notices' => 'missed_cron', + ]; + } + + /** + * Display a warning notice if WP Rocket scheduled events are not running properly. + * + * @since 3.5.4 + */ + public function missed_cron() { + if ( ! $this->should_check() ) { + return; + } + + $delay = rocket_get_constant( 'DISABLE_WP_CRON' ) ? HOUR_IN_SECONDS : 5 * MINUTE_IN_SECONDS; + $list = ''; + $events = $this->events; + + foreach ( $this->events as $event => $description ) { + $timestamp = wp_next_scheduled( $event ); + + if ( + false === $timestamp + || + ( $timestamp + $delay - time() ) > 0 + ) { + unset( $events[ $event ] ); + continue; + } + + $list .= "
  • {$description}
  • "; + } + + if ( empty( $events ) ) { + return; + } + + $message = sprintf( + '

    %1$s

    + +

    %3$s

    ', + _n( + 'The following scheduled event failed to run. This may indicate the CRON system is not running properly, which can prevent some WP Rocket features from working as intended:', + 'The following scheduled events failed to run. This may indicate the CRON system is not running properly, which can prevent some WP Rocket features from working as intended:', + count( $events ), + 'rocket' + ), + $list, + __( 'Please contact your host to check if CRON is working.', 'rocket' ) + ); + + rocket_notice_html( + [ + 'status' => 'warning', + 'dismissible' => '', + 'message' => $message, + 'dismiss_button' => 'rocket_warning_cron', + ] + ); + } + + /** + * Checks if health check should run. + * + * @since 3.5.4 + * + * @return bool true when should do health check; else, false. + */ + protected function should_check() { + if ( ! current_user_can( 'rocket_manage_options' ) ) { + return false; + } + + if ( 'settings_page_wprocket' !== get_current_screen()->id ) { + return false; + } + + $dismissed = (array) get_user_meta( get_current_user_id(), 'rocket_boxes', true ); + if ( in_array( 'rocket_warning_cron', $dismissed, true ) ) { + return false; + } + + return ! ( + 0 === (int) $this->options->get( 'purge_cron_interval', 0 ) + && + 0 === (int) $this->options->get( 'async_css', 0 ) + && + 0 === (int) $this->options->get( 'manual_preload', 0 ) + && + 0 === (int) $this->options->get( 'schedule_automatic_cleanup', 0 ) + ); + } + + /** + * Gets an array of events with their descriptions. + * + * @since 3.5.4 + * + * @return array array of events => descriptions. + */ + protected function get_events() { + return [ + 'rocket_purge_time_event' => __( 'Scheduled Cache Purge', 'rocket' ), + 'rocket_database_optimization_time_event' => __( 'Scheduled Database Optimization', 'rocket' ), + 'rocket_database_optimization_cron_interval' => __( 'Database Optimization Process', 'rocket' ), + 'rocket_preload_cron_interval' => _x( 'Preload', 'noun', 'rocket' ), + 'rocket_critical_css_generation_cron_interval' => __( 'Critical Path CSS Generation Process', 'rocket' ), + ]; + } +} diff --git a/inc/Engine/Admin/ServiceProvider.php b/inc/Engine/Admin/ServiceProvider.php index 9bd9f3d3cd..bb231f9acc 100644 --- a/inc/Engine/Admin/ServiceProvider.php +++ b/inc/Engine/Admin/ServiceProvider.php @@ -25,6 +25,7 @@ class ServiceProvider extends AbstractServiceProvider { 'deactivation_intent_render', 'deactivation_intent_subscriber', 'hummingbird_subscriber', + 'health_check', ]; /** @@ -48,5 +49,7 @@ public function register() { ->withArgument( $options ); $this->getContainer()->share( 'hummingbird_subscriber', 'WP_Rocket\Subscriber\Third_Party\Plugins\Optimization\Hummingbird_Subscriber' ) ->withArgument( $options ); + $this->getContainer()->share( 'health_check', 'WP_Rocket\Engine\Admin\HealthCheck' ) + ->withArgument( $options ); } } diff --git a/inc/Engine/Optimization/AdminServiceProvider.php b/inc/Engine/Optimization/AdminServiceProvider.php new file mode 100644 index 0000000000..dc2d88d13e --- /dev/null +++ b/inc/Engine/Optimization/AdminServiceProvider.php @@ -0,0 +1,36 @@ +getContainer()->share( 'minify_css_admin_subscriber', 'WP_Rocket\Engine\Optimization\Minify\CSS\AdminSubscriber' ); + } +} diff --git a/inc/Engine/Optimization/Minify/CSS/AdminSubscriber.php b/inc/Engine/Optimization/Minify/CSS/AdminSubscriber.php new file mode 100644 index 0000000000..eab9e52dd5 --- /dev/null +++ b/inc/Engine/Optimization/Minify/CSS/AdminSubscriber.php @@ -0,0 +1,125 @@ + [ 'clean_minify', 10, 2 ], + "pre_update_option_{$slug}" => [ 'regenerate_minify_css_key', 10, 2 ], + ]; + } + + /** + * Clean minify CSS files when options change. + * + * @since 3.5.4 + * + * @param array $old An array of previous settings. + * @param array $new An array of submitted settings. + */ + public function clean_minify( $old, $new ) { + if ( ! is_array( $old ) || ! is_array( $new ) ) { + return; + } + + if ( ! $this->maybe_minify_regenerate( $new, $old ) ) { + return; + } + // Purge all minify cache files. + rocket_clean_minify( 'css' ); + } + + /** + * Regenerate the minify key if CSS files have been modified. + * + * @since 3.5.4 + * + * @param array $new An array of submitted settings. + * @param array $old An array of previous settings. + * + * @return array Updates 'minify_css_key' setting when regenerated; else, original submitted settings. + */ + public function regenerate_minify_css_key( $new, $old ) { + if ( ! is_array( $old ) || ! is_array( $new ) ) { + return $new; + } + + if ( ! $this->maybe_minify_regenerate( $new, $old ) ) { + return $new; + } + + $new['minify_css_key'] = create_rocket_uniqid(); + + return $new; + } + + /** + * Checks minify CSS condition when options change. + * + * @since 3.5.4 + * + * @param array $new An array of submitted settings. + * @param array $old An array of previous settings. + * + * @return bool true when should regenerate; else false. + */ + protected function maybe_minify_regenerate( array $new, array $old ) { + $settings_to_check = [ + 'minify_css', + 'exclude_css', + 'cdn', + ]; + + foreach ( $settings_to_check as $setting ) { + if ( $this->did_setting_change( $setting, $new, $old ) ) { + return true; + } + } + + return ( + array_key_exists( 'cdn', $new ) + && + 1 === (int) $new['cdn'] + && + $this->did_setting_change( 'cdn_cnames', $new, $old ) + ); + } + + /** + * Checks if the given setting's value changed. + * + * @since 3.5.4 + * + * @param string $setting The settings's value to check in the old and new values. + * @param array $new An array of submitted settings. + * @param array $old An array of previous settings. + * + * @return bool + */ + protected function did_setting_change( $setting, array $new, array $old ) { + return ( + array_key_exists( $setting, $old ) + && + array_key_exists( $setting, $new ) + && + $old[ $setting ] !== $new[ $setting ] + ); + } +} diff --git a/inc/Engine/Optimization/Minify/JS/Combine.php b/inc/Engine/Optimization/Minify/JS/Combine.php index 54ac7fa339..3fbf8c2000 100644 --- a/inc/Engine/Optimization/Minify/JS/Combine.php +++ b/inc/Engine/Optimization/Minify/JS/Combine.php @@ -634,6 +634,10 @@ protected function get_excluded_inline_content() { 'tarteaucitron', 'pw_brand_product_list', 'tminusCountDown', + 'pysWooSelectContentData', + 'wpvq_ans89733', + '_isp_version', + 'price_range_data', ]; $excluded_inline = array_merge( $defaults, $this->options->get( 'exclude_inline_js', [] ) ); @@ -722,6 +726,7 @@ protected function get_excluded_external_file_path() { 'cdn.jsdelivr.net/gh/AmauriC/', 'static.klaviyo.com/onsite/js/klaviyo.js', 'a.omappapi.com/app/js/api.min.js', + 'static.zdassets.com', ]; $excluded_external = array_merge( $defaults, $this->options->get( 'exclude_js', [] ) ); @@ -841,6 +846,7 @@ protected function get_move_after_inline_scripts() { 'tdbMenuItem', 'tdbSearchItem', 'best_seller_badge', + 'jQuery(\'#product-top-bar', ]; /** diff --git a/inc/admin/options.php b/inc/admin/options.php index 150a2aec83..34012c02f1 100644 --- a/inc/admin/options.php +++ b/inc/admin/options.php @@ -75,20 +75,21 @@ function rocket_after_save_options( $oldvalue, $value ) { ); } - // Purge all minify cache files. // phpcs:ignore WordPress.Security.NonceVerification.Missing - if ( ! empty( $_POST ) && ( $oldvalue['minify_css'] !== $value['minify_css'] || $oldvalue['exclude_css'] !== $value['exclude_css'] ) || ( isset( $oldvalue['cdn'] ) && ! isset( $value['cdn'] ) || ! isset( $oldvalue['cdn'] ) && isset( $value['cdn'] ) ) ) { - rocket_clean_minify( 'css' ); - } - - // phpcs:ignore WordPress.Security.NonceVerification.Missing - if ( ! empty( $_POST ) && ( $oldvalue['minify_js'] !== $value['minify_js'] || $oldvalue['exclude_js'] !== $value['exclude_js'] ) || ( isset( $oldvalue['cdn'] ) && ! isset( $value['cdn'] ) || ! isset( $oldvalue['cdn'] ) && isset( $value['cdn'] ) ) ) { + if ( ( array_key_exists( 'minify_js', $oldvalue ) && array_key_exists( 'minify_js', $value ) && $oldvalue['minify_js'] !== $value['minify_js'] ) + || + ( array_key_exists( 'exclude_js', $oldvalue ) && array_key_exists( 'exclude_js', $value ) && $oldvalue['exclude_js'] !== $value['exclude_js'] ) + || + ( array_key_exists( 'cdn', $oldvalue ) && array_key_exists( 'cdn', $value ) && $oldvalue['cdn'] !== $value['cdn'] ) + || + ( array_key_exists( 'cdn_cnames', $oldvalue ) && array_key_exists( 'cdn_cnames', $value ) && $oldvalue['cdn_cnames'] !== $value['cdn_cnames'] ) + ) { rocket_clean_minify( 'js' ); } // Purge all cache busting files. // phpcs:ignore WordPress.Security.NonceVerification.Missing - if ( ! empty( $_POST ) && ( $oldvalue['remove_query_strings'] !== $value['remove_query_strings'] ) ) { + if ( array_key_exists( 'remove_query_strings', $oldvalue ) && array_key_exists( 'remove_query_strings', $value ) && $oldvalue['remove_query_strings'] !== $value['remove_query_strings'] ) { rocket_clean_cache_busting(); } @@ -185,14 +186,6 @@ function( $excluded ) use ( $pattern_field, $label, $is_form_submit, &$errors ) } } - // Regenerate the minify key if CSS files have been modified. - if ( ( isset( $newvalue['minify_css'], $oldvalue['minify_css'] ) && $newvalue['minify_css'] !== $oldvalue['minify_css'] ) - || ( isset( $newvalue['exclude_css'], $oldvalue['exclude_css'] ) && $newvalue['exclude_css'] !== $oldvalue['exclude_css'] ) - || ( isset( $oldvalue['cdn'] ) && ! isset( $newvalue['cdn'] ) || ! isset( $oldvalue['cdn'] ) && isset( $newvalue['cdn'] ) ) - ) { - $newvalue['minify_css_key'] = create_rocket_uniqid(); - } - // Regenerate the minify key if JS files have been modified. if ( ( isset( $newvalue['minify_js'], $oldvalue['minify_js'] ) && $newvalue['minify_js'] !== $oldvalue['minify_js'] ) || ( isset( $newvalue['exclude_js'], $oldvalue['exclude_js'] ) && $newvalue['exclude_js'] !== $oldvalue['exclude_js'] ) diff --git a/inc/admin/ui/notices.php b/inc/admin/ui/notices.php index 0173f982a3..abb0f214e0 100755 --- a/inc/admin/ui/notices.php +++ b/inc/admin/ui/notices.php @@ -842,84 +842,6 @@ function rocket_clear_cache_notice() { } add_action( 'admin_notices', 'rocket_clear_cache_notice' ); -/** - * Display a warning notice if WP Rocket scheduled events are not running properly - * - * @since 3.3.7 - * @author Remy Perona - * - * @return void - */ -function rocket_warning_cron() { - $screen = get_current_screen(); - - // This filter is documented in inc/admin-bar.php. - if ( ! current_user_can( apply_filters( 'rocket_capacity', 'manage_options' ) ) ) { - return; - } - - if ( 'settings_page_wprocket' !== $screen->id ) { - return; - } - - $boxes = get_user_meta( get_current_user_id(), 'rocket_boxes', true ); - - if ( in_array( __FUNCTION__, (array) $boxes, true ) ) { - return; - } - - if ( 0 === (int) get_rocket_option( 'purge_cron_interval' ) && 0 === get_rocket_option( 'async_css' ) && 0 === get_rocket_option( 'manual_preload' ) && 0 === get_rocket_option( 'schedule_automatic_cleanup' ) ) { - return; - } - - $events = [ - 'rocket_purge_time_event' => 'Scheduled Cache Purge', - 'rocket_database_optimization_time_event' => 'Scheduled Database Optimization', - 'rocket_database_optimization_cron_interval' => 'Database Optimization Process', - 'rocket_preload_cron_interval' => 'Preload', - 'rocket_critical_css_generation_cron_interval' => 'Critical Path CSS Generation Process', - ]; - - foreach ( $events as $event => $description ) { - $timestamp = wp_next_scheduled( $event ); - - if ( false === $timestamp ) { - unset( $events[ $event ] ); - continue; - } - - if ( $timestamp - time() > 0 ) { - unset( $events[ $event ] ); - continue; - } - } - - if ( empty( $events ) ) { - return; - } - - $message = '

    ' . _n( 'The following scheduled event failed to run. This may indicate the CRON system is not running properly, which can prevent some WP Rocket features from working as intended:', 'The following scheduled events failed to run. This may indicate the CRON system is not running properly, which can prevent some WP Rocket features from working as intended:', count( $events ), 'rocket' ) . '

    '; - - $message .= ''; - $message .= '

    ' . __( 'Please contact your host to check if CRON is working.', 'rocket' ) . '

    '; - - rocket_notice_html( - [ - 'status' => 'warning', - 'dismissible' => '', - 'message' => $message, - 'dismiss_button' => __FUNCTION__, - ] - ); -} -add_action( 'admin_notices', 'rocket_warning_cron' ); - /** * Outputs notice HTML * @@ -987,7 +909,7 @@ function rocket_notice_html( $args ) {

    - +

    diff --git a/inc/classes/class-plugin.php b/inc/classes/class-plugin.php index b2b29038aa..9041b3cce9 100644 --- a/inc/classes/class-plugin.php +++ b/inc/classes/class-plugin.php @@ -87,6 +87,7 @@ function() { ); $this->container->addServiceProvider( 'WP_Rocket\ServiceProvider\Settings' ); $this->container->addServiceProvider( 'WP_Rocket\Engine\Admin\ServiceProvider' ); + $this->container->addServiceProvider( 'WP_Rocket\Engine\Optimization\AdminServiceProvider' ); $subscribers = [ 'beacon', @@ -96,6 +97,8 @@ function() { 'rocketcdn_admin_subscriber', 'rocketcdn_notices_subscriber', 'rocketcdn_data_manager_subscriber', + 'health_check', + 'minify_css_admin_subscriber', ]; } elseif ( \rocket_valid_key() ) { $this->container->addServiceProvider( 'WP_Rocket\Engine\Optimization\ServiceProvider' ); diff --git a/inc/deprecated/3.5.php b/inc/deprecated/3.5.php index 0579c94b6a..d7afbb8266 100644 --- a/inc/deprecated/3.5.php +++ b/inc/deprecated/3.5.php @@ -792,3 +792,81 @@ function rocket_varnish_http_purge( $url ) { ); } +/** + * Display a warning notice if WP Rocket scheduled events are not running properly + * + * @since 3.5.4 deprecated + * @since 3.3.7 + * @author Remy Perona + * + * @return void + */ +function rocket_warning_cron() { + _deprecated_function( __FUNCTION__ . '()', '3.5.4', 'WP_Rocket\Engine\Admin\HealthCheck::missed_cron()' ); + $screen = get_current_screen(); + + // This filter is documented in inc/admin-bar.php. + if ( ! current_user_can( apply_filters( 'rocket_capacity', 'manage_options' ) ) ) { + return; + } + + if ( 'settings_page_wprocket' !== $screen->id ) { + return; + } + + $boxes = get_user_meta( get_current_user_id(), 'rocket_boxes', true ); + + if ( in_array( __FUNCTION__, (array) $boxes, true ) ) { + return; + } + + if ( 0 === (int) get_rocket_option( 'purge_cron_interval' ) && 0 === get_rocket_option( 'async_css' ) && 0 === get_rocket_option( 'manual_preload' ) && 0 === get_rocket_option( 'schedule_automatic_cleanup' ) ) { + return; + } + + $events = [ + 'rocket_purge_time_event' => 'Scheduled Cache Purge', + 'rocket_database_optimization_time_event' => 'Scheduled Database Optimization', + 'rocket_database_optimization_cron_interval' => 'Database Optimization Process', + 'rocket_preload_cron_interval' => 'Preload', + 'rocket_critical_css_generation_cron_interval' => 'Critical Path CSS Generation Process', + ]; + + foreach ( $events as $event => $description ) { + $timestamp = wp_next_scheduled( $event ); + + if ( false === $timestamp ) { + unset( $events[ $event ] ); + continue; + } + + if ( $timestamp - time() > 0 ) { + unset( $events[ $event ] ); + continue; + } + } + + if ( empty( $events ) ) { + return; + } + + $message = '

    ' . _n( 'The following scheduled event failed to run. This may indicate the CRON system is not running properly, which can prevent some WP Rocket features from working as intended:', 'The following scheduled events failed to run. This may indicate the CRON system is not running properly, which can prevent some WP Rocket features from working as intended:', count( $events ), 'rocket' ) . '

    '; + + $message .= ''; + $message .= '

    ' . __( 'Please contact your host to check if CRON is working.', 'rocket' ) . '

    '; + + rocket_notice_html( + [ + 'status' => 'warning', + 'dismissible' => '', + 'message' => $message, + 'dismiss_button' => __FUNCTION__, + ] + ); +} diff --git a/inc/functions/files.php b/inc/functions/files.php index e11114c0c8..83a05822da 100755 --- a/inc/functions/files.php +++ b/inc/functions/files.php @@ -421,77 +421,80 @@ function set_rocket_wp_cache_define( $turn_it_on ) { // phpcs:ignore WordPress.N } /** - * Delete all minify cache files + * Delete all minify cache files. * + * @since 3.5.3 Replaces glob. * @since 2.1 * - * @param string|array $extensions (default: array('js','css') File extensions to minify. - * @return void + * @param string|array $extensions Optional. File extensions to minify. Default: js and css. */ function rocket_clean_minify( $extensions = [ 'js', 'css' ] ) { - $extensions = is_string( $extensions ) ? (array) $extensions : $extensions; - - try { - $dir = new RecursiveDirectoryIterator( WP_ROCKET_MINIFY_CACHE_PATH . get_current_blog_id(), FilesystemIterator::SKIP_DOTS ); - } catch ( \UnexpectedValueException $e ) { - // No logging yet. + // Bails out if there are no extensions to target. + if ( empty( $extensions ) ) { return; } - try { - $iterator = new RecursiveIteratorIterator( $dir, RecursiveIteratorIterator::CHILD_FIRST ); - } catch ( \Exception $e ) { - // No logging yet. + if ( is_string( $extensions ) ) { + $extensions = (array) $extensions; + } + + $min_cache_path = rocket_get_constant( 'WP_ROCKET_MINIFY_CACHE_PATH' ); + $min_path = $min_cache_path . get_current_blog_id() . '/'; + $iterator = _rocket_get_cache_path_iterator( $min_path ); + if ( false === $iterator ) { return; } + $filesystem = rocket_direct_filesystem(); + $min_path_regex = str_replace( '/', '\/', $min_path ); + foreach ( $extensions as $ext ) { /** - * Fires before the minify cache files are deleted + * Fires before the minify cache files are deleted. * * @since 2.1 * * @param string $ext File extensions to minify. - */ + */ do_action( 'before_rocket_clean_minify', $ext ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals try { - $files = new RegexIterator( $iterator, '#.*\.' . $ext . '#', RegexIterator::GET_MATCH ); - foreach ( $files as $file ) { - rocket_direct_filesystem()->delete( $file[0] ); - } - } catch ( \InvalidArgumentException $e ) { - // No logging yet. + $entries = new RegexIterator( $iterator, "/{$min_path_regex}.*\.{$ext}/" ); + } catch ( Exception $e ) { return; } + foreach ( $entries as $entry ) { + $filesystem->delete( $entry->getPathname() ); + } + /** - * Fires after the minify cache files was deleted + * Fires after the minify cache files was deleted. * * @since 2.1 * * @param string $ext File extensions to minify. - */ + */ do_action( 'after_rocket_clean_minify', $ext ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals } + // Delete any directories. foreach ( $iterator as $item ) { - if ( rocket_direct_filesystem()->is_dir( $item ) ) { - rocket_direct_filesystem()->delete( $item ); + if ( $filesystem->is_dir( $item ) ) { + $filesystem->delete( $item ); } } - $third_party = WP_ROCKET_MINIFY_CACHE_PATH . '3rd-party'; - + // Clean the cache/min/3rd-party items. try { - $files = new FilesystemIterator( $third_party ); + $files = new FilesystemIterator( "{$min_cache_path}3rd-party" ); foreach ( $files as $file ) { - if ( rocket_direct_filesystem()->is_file( $file ) ) { - rocket_direct_filesystem()->delete( $file ); + if ( $filesystem->is_file( $file ) ) { + $filesystem->delete( $file ); } } - } catch ( \UnexpectedValueException $e ) { + } catch ( UnexpectedValueException $e ) { // No logging yet. return; } @@ -591,6 +594,7 @@ function rocket_clean_cache_busting( $extensions = [ 'js', 'css' ] ) { /** * Delete one or several cache files. * + * @since 3.5.4 Replaces glob and optimizes. * @since 2.0 Delete cache files for all users. * @since 1.1.0 Add filter rocket_clean_files. * @since 1.0 @@ -607,22 +611,30 @@ function rocket_clean_files( $urls ) { * @since 1.1.0 * * @param array URLs that will be returned. - */ - $urls = apply_filters( 'rocket_clean_files', $urls ); - $urls = array_filter( (array) $urls ); + */ + $urls = (array) apply_filters( 'rocket_clean_files', $urls ); + $urls = array_filter( $urls ); + if ( empty( $urls ) ) { + return; + } - if ( ! $urls ) { + $cache_path = rocket_get_constant( 'WP_ROCKET_CACHE_PATH' ); + $iterator = _rocket_get_cache_path_iterator( $cache_path ); + if ( false === $iterator ) { return; } + /** This filter is documented in inc/front/htaccess.php */ + $url_no_dots = (bool) apply_filters( 'rocket_url_no_dots', false ); + $cache_path_regex = str_replace( '/', '\/', $cache_path ); + /** * Fires before all cache files are deleted. * * @since 3.2.2 - * @author Grégory Viguier * * @param array $urls The URLs corresponding to the deleted cache files. - */ + */ do_action( 'before_rocket_clean_files', $urls ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals foreach ( $urls as $url ) { @@ -632,20 +644,15 @@ function rocket_clean_files( $urls ) { * @since 1.0 * * @param string $url The URL that the cache file to be deleted. - */ + */ do_action( 'before_rocket_clean_file', $url ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals - /** This filter is documented in inc/front/htaccess.php */ - if ( apply_filters( 'rocket_url_no_dots', false ) ) { + if ( $url_no_dots ) { $url = str_replace( '.', '_', $url ); } - $dirs = glob( WP_ROCKET_CACHE_PATH . rocket_remove_url_protocol( $url ), GLOB_NOSORT ); - - if ( $dirs ) { - foreach ( $dirs as $dir ) { - rocket_rrmdir( $dir ); - } + foreach ( _rocket_get_entries_regex( $iterator, $url, $cache_path_regex ) as $entry ) { + rocket_rrmdir( $entry->getPathname() ); } /** @@ -654,7 +661,7 @@ function rocket_clean_files( $urls ) { * @since 1.0 * * @param string $url The URL that the cache file was deleted. - */ + */ do_action( 'after_rocket_clean_file', $url ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals } @@ -662,10 +669,9 @@ function rocket_clean_files( $urls ) { * Fires after all cache files are deleted. * * @since 3.2.2 - * @author Grégory Viguier * * @param array $urls The URLs corresponding to the deleted cache files. - */ + */ do_action( 'after_rocket_clean_files', $urls ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals } @@ -820,30 +826,25 @@ function rocket_clean_domain( $lang = '' ) { $urls = (array) apply_filters( 'rocket_clean_domain_urls', $urls, $lang ); $urls = array_filter( $urls ); - $cache_path = rocket_get_constant( 'WP_ROCKET_CACHE_PATH' ); + $cache_path = rocket_get_constant( 'WP_ROCKET_CACHE_PATH' ); + $iterator = _rocket_get_cache_path_iterator( $cache_path ); + if ( false === $iterator ) { + return; + } + + $cache_path_regex = str_replace( '/', '\/', $cache_path ); $dirs_to_preserve = get_rocket_i18n_to_preserve( $lang ); /** This filter is documented in inc/front/htaccess.php */ $url_no_dots = (bool) apply_filters( 'rocket_url_no_dots', false ); - try { - $iterator = new RecursiveIteratorIterator( - new RecursiveDirectoryIterator( $cache_path ), - RecursiveIteratorIterator::SELF_FIRST, - RecursiveIteratorIterator::CATCH_GET_CHILD - ); - } catch ( Exception $e ) { - // No logging yet. - return; - } - foreach ( $urls as $url ) { - $file = get_rocket_parse_url( $url ); + $parsed_url = get_rocket_parse_url( $url ); if ( $url_no_dots ) { - $file['host'] = str_replace( '.', '_', $file['host'] ); + $parsed_url['host'] = str_replace( '.', '_', $parsed_url['host'] ); } - $root = $cache_path . $file['host'] . $file['path']; + $root = $cache_path . $parsed_url['host'] . $parsed_url['path']; /** * Fires before all cache files are deleted. @@ -856,24 +857,8 @@ function rocket_clean_domain( $lang = '' ) { */ do_action( 'before_rocket_clean_domain', $root, $lang, $url ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals - if ( ! empty( $file['path'] ) ) { - $regex = "/({$file['host']})*\/" . trim( $file['path'], '/' ) . '/i'; - $depth = 1; - } else { - $regex = "/{$file['host']}*/i"; - $depth = 0; - } - - try { - $iterator->setMaxDepth( $depth ); - $files = new RegexIterator( $iterator, $regex ); - } catch ( InvalidArgumentException $e ) { - // No logging yet. - return; - } - - foreach ( $files as $file ) { - rocket_rrmdir( $file->getPathname(), $dirs_to_preserve ); + foreach ( _rocket_get_entries_regex( $iterator, $parsed_url, $cache_path_regex ) as $entry ) { + rocket_rrmdir( $entry->getPathname(), $dirs_to_preserve ); } /** @@ -1357,3 +1342,72 @@ function rocket_find_wpconfig_path() { // No writable file found. return false; } + +/** + * Get the recursive iterator for the cache path. + * + * @since 3.5.4 + * @access private + * + * @param string $cache_path Path to the cache directory. + * + * @return bool|RecursiveIteratorIterator Iterator on success; else false; + */ +function _rocket_get_cache_path_iterator( $cache_path ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound + try { + return new RecursiveIteratorIterator( + new RecursiveDirectoryIterator( $cache_path ), + RecursiveIteratorIterator::SELF_FIRST, + RecursiveIteratorIterator::CATCH_GET_CHILD + ); + } catch ( Exception $e ) { + // No logging yet. + return false; + } +} + +/** + * Gets the entries from the URL using RegexIterator. + * + * @since 3.5.4 + * @access private + * + * @param Iterator $iterator Instance of the iterator. + * @param string|array $url URL or parsed URL to convert into filesystem path regex to get entries. + * @param string $cache_path Optional. Filesystem path to rocket's cache. + * + * @return array|RegexIterator when successful, returns iterator; else an empty array. + */ +function _rocket_get_entries_regex( Iterator $iterator, $url, $cache_path = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound + if ( empty( $cache_path ) ) { + $cache_path = str_replace( '/', '\/', rocket_get_constant( 'WP_ROCKET_CACHE_PATH' ) ); + } + + $parsed_url = is_array( $url ) ? $url : get_rocket_parse_url( $url ); + $host = $cache_path . rtrim( $parsed_url['host'], '*' ); + + if ( '' !== $parsed_url['path'] && '/' !== $parsed_url['path'] ) { + $path = trim( $parsed_url['path'], '/' ); + + // Count the hierarchy to determine the depth. + $depth = substr_count( $path, '/' ) + 1; + + // Prepare the paths' separator for regex. + if ( $depth > 1 ) { + $path = str_replace( '/', '\/', $path ); + } + + $regex = "/{$host}(.*)\/{$path}/i"; + } else { + $regex = "/{$host}(.*)/i"; + $depth = 0; + } + + try { + $iterator->setMaxDepth( $depth ); + + return new RegexIterator( $iterator, $regex ); + } catch ( Exception $e ) { + return []; + } +} diff --git a/inc/functions/formatting.php b/inc/functions/formatting.php index cf54bc356a..bf99bc4dda 100755 --- a/inc/functions/formatting.php +++ b/inc/functions/formatting.php @@ -259,22 +259,29 @@ function rocket_remove_url_protocol( $url, $no_dots = false ) { } /** - * Add HTTP protocol to an url that does not have + * Add HTTP protocol to an url that does not have it. * * @since 2.2.1 * * @param string $url The URL to parse. - * @return string $url The URL with protocol + * + * @return string $url The URL with protocol. */ function rocket_add_url_protocol( $url ) { + // Bail out if the URL starts with http:// or https://. + if ( + strpos( $url, 'http://' ) !== false + || + strpos( $url, 'https://' ) !== false + ) { + return $url; + } - if ( strpos( $url, 'http://' ) === false && strpos( $url, 'https://' ) === false ) { - if ( substr( $url, 0, 2 ) !== '//' ) { - $url = '//' . $url; - } - $url = set_url_scheme( $url ); + if ( substr( $url, 0, 2 ) !== '//' ) { + $url = '//' . $url; } - return $url; + + return set_url_scheme( $url ); } /** diff --git a/languages/rocket-fr_CA.mo b/languages/rocket-fr_CA.mo index 80efc2cfab..456112ee1b 100644 Binary files a/languages/rocket-fr_CA.mo and b/languages/rocket-fr_CA.mo differ diff --git a/languages/rocket-fr_CA.po b/languages/rocket-fr_CA.po index f54cccd5c2..fd1aefdedd 100644 --- a/languages/rocket-fr_CA.po +++ b/languages/rocket-fr_CA.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: WP Rocket 3.4\n" "Report-Msgid-Bugs-To: http://wp-rocket.me/\n" -"POT-Creation-Date: 2020-03-02 09:37-0500\n" +"POT-Creation-Date: 2020-04-16 16:26-0400\n" "PO-Revision-Date: 2019-08-26 15:14+0000\n" "Last-Translator: Jean-Francois Arseneault , 2020\n" "Language-Team: French (Canada) (https://www.transifex.com/wp-media/teams/18133/fr_CA/)\n" @@ -30,11 +30,11 @@ msgstr "" "X-Poedit-SourceCharset: UTF-8\n" "X-Textdomain-Support: yes\n" -#: inc/3rd-party/hosting/flywheel.php:19 inc/3rd-party/hosting/godaddy.php:22 -#: inc/3rd-party/hosting/o2switch.php:21 -#: inc/3rd-party/hosting/pressidium.php:18 inc/3rd-party/hosting/savvii.php:22 -#: inc/3rd-party/hosting/wp-serveur.php:31 -#: inc/3rd-party/hosting/wpengine.php:22 +#: inc/3rd-party/hosting/flywheel.php:18 inc/3rd-party/hosting/godaddy.php:18 +#: inc/3rd-party/hosting/o2switch.php:17 +#: inc/3rd-party/hosting/pressidium.php:18 inc/3rd-party/hosting/savvii.php:18 +#: inc/3rd-party/hosting/wp-serveur.php:27 +#: inc/3rd-party/hosting/wpengine.php:18 #, php-format msgid "" "Your site is hosted on %s, we have enabled Varnish auto-purge for " @@ -43,7 +43,7 @@ msgstr "" "Votre site est hébergé chez %s, nous avons activé la purge automatisée de " "Varnish pour la compatibilité." -#: inc/3rd-party/hosting/kinsta.php:165 +#: inc/3rd-party/hosting/kinsta.php:161 #, php-format msgid "" "Your installation seems to be missing core Kinsta files managing Cache " @@ -98,34 +98,36 @@ msgstr "Le sitemap XML de The SEO Framework" msgid "Yoast SEO XML sitemap" msgstr "Sitemap XML Yoast SEO" -#: inc/Addon/Cloudflare/Cloudflare.php:95 inc/deprecated/3.5.php:22 -#: inc/deprecated/3.5.php:146 -msgid "" -"Curl is disabled on your server. Please ask your host to enable it. This is " -"required for the Cloudflare Add-on to work correctly." +#: inc/Addon/Cloudflare/APIClient.php:309 +msgid "Ops Cloudflare did not provide any reply. Please try again later." msgstr "" -"CURL est désactivé sur votre serveur. Veuillez demander à votre hébergeur de" -" l'activer. Ceci est requis pour que l'ajout Cloudflare fonctionne " -"correctement." +"Oups, Cloudflare n'a pas répondu. Veuillez essayer de nouveau plus tard." -#: inc/Addon/Cloudflare/Cloudflare.php:103 +#: inc/Addon/Cloudflare/APIClient.php:318 inc/deprecated/3.5.php:107 +#: inc/deprecated/3.5.php:164 +msgid "Incorrect Cloudflare email address or API key." +msgstr "Courriel et clé d’API Cloudflare incorrects." + +#: inc/Addon/Cloudflare/APIClient.php:322 +#: inc/Addon/Cloudflare/APIClient.php:335 +#: inc/Addon/Cloudflare/Cloudflare.php:112 +#: inc/Addon/Cloudflare/Cloudflare.php:144 +#: inc/classes/subscriber/Tools/class-detect-missing-tags-subscriber.php:157 +#: inc/deprecated/3.5.php:87 inc/deprecated/3.5.php:111 +#: inc/deprecated/3.5.php:124 inc/deprecated/3.5.php:152 +#: inc/deprecated/3.5.php:168 #, php-format -msgid "" -"Cloudflare email and/or API key are not set. Read the %1$sdocumentation%2$s " -"for further guidance." -msgstr "" -"Le courriel ou la clé d'API de Cloudflare ne sont pas configurés. Lire la " -"%1$sdocumentation%2$s pour plus d'information." +msgid "Read the %1$sdocumentation%2$s for further guidance." +msgstr "Lisez la %1$sdocumentation%2$s pour de l’aide additionnelle." -#: inc/Addon/Cloudflare/Cloudflare.php:105 -#: inc/Addon/Cloudflare/Cloudflare.php:118 -#: inc/Addon/Cloudflare/Cloudflare.php:139 -#: inc/Addon/Cloudflare/Cloudflare.php:153 -#: inc/Addon/Cloudflare/Cloudflare.php:181 -#: inc/Addon/Cloudflare/Cloudflare.php:195 inc/deprecated/3.5.php:32 -#: inc/deprecated/3.5.php:45 inc/deprecated/3.5.php:69 -#: inc/deprecated/3.5.php:82 inc/deprecated/3.5.php:110 -#: inc/deprecated/3.5.php:126 inc/deprecated/3.5.php:159 +#: inc/Addon/Cloudflare/APIClient.php:324 +#: inc/Addon/Cloudflare/APIClient.php:337 +#: inc/Addon/Cloudflare/Cloudflare.php:101 +#: inc/Addon/Cloudflare/Cloudflare.php:114 +#: inc/Addon/Cloudflare/Cloudflare.php:146 inc/deprecated/3.5.php:76 +#: inc/deprecated/3.5.php:89 inc/deprecated/3.5.php:113 +#: inc/deprecated/3.5.php:126 inc/deprecated/3.5.php:154 +#: inc/deprecated/3.5.php:170 inc/deprecated/3.5.php:203 msgid "" "https://docs.wp-rocket.me/article/18-using-wp-rocket-with-" "cloudflare/?utm_source=wp_plugin&utm_medium=wp_rocket#add-on" @@ -133,116 +135,283 @@ msgstr "" "https://docs.wp-rocket.me/article/18-using-wp-rocket-with-" "cloudflare/?utm_source=wp_plugin&utm_medium=wp_rocket#add-on" -#: inc/Addon/Cloudflare/Cloudflare.php:112 inc/deprecated/3.5.php:39 -msgid "Missing Cloudflare Zone ID." -msgstr "Zone ID de Cloudflare manquant." +#: inc/Addon/Cloudflare/APIClient.php:331 inc/deprecated/3.5.php:120 +msgid "Incorrect Cloudflare Zone ID." +msgstr "Zone iD de Cloudflare incorrecte." -#: inc/Addon/Cloudflare/Cloudflare.php:116 -#: inc/Addon/Cloudflare/Cloudflare.php:137 -#: inc/Addon/Cloudflare/Cloudflare.php:151 -#: inc/Addon/Cloudflare/Cloudflare.php:179 -#: inc/Addon/Cloudflare/Cloudflare.php:193 -#: inc/classes/subscriber/Tools/class-detect-missing-tags-subscriber.php:157 -#: inc/deprecated/3.5.php:43 inc/deprecated/3.5.php:67 -#: inc/deprecated/3.5.php:80 inc/deprecated/3.5.php:108 -#: inc/deprecated/3.5.php:124 +#: inc/Addon/Cloudflare/Cloudflare.php:99 #, php-format -msgid "Read the %1$sdocumentation%2$s for further guidance." -msgstr "Lisez la %1$sdocumentation%2$s pour de l’aide additionnelle." - -#: inc/Addon/Cloudflare/Cloudflare.php:133 -#: inc/Addon/Cloudflare/Cloudflare.php:190 inc/deprecated/3.5.php:63 -#: inc/deprecated/3.5.php:120 -msgid "Incorrect Cloudflare email address or API key." -msgstr "Courriel et clé d’API Cloudflare incorrects." +msgid "" +"Cloudflare email and/or API key are not set. Read the %1$sdocumentation%2$s " +"for further guidance." +msgstr "" +"Le courriel ou la clé d'API de Cloudflare ne sont pas configurés. Lire la " +"%1$sdocumentation%2$s pour plus d'information." -#: inc/Addon/Cloudflare/Cloudflare.php:147 inc/deprecated/3.5.php:76 -msgid "Incorrect Cloudflare Zone ID." -msgstr "Zone iD de Cloudflare incorrecte." +#: inc/Addon/Cloudflare/Cloudflare.php:108 inc/deprecated/3.5.php:83 +msgid "Missing Cloudflare Zone ID." +msgstr "Zone ID de Cloudflare manquant." -#: inc/Addon/Cloudflare/Cloudflare.php:175 inc/deprecated/3.5.php:104 +#: inc/Addon/Cloudflare/Cloudflare.php:140 inc/deprecated/3.5.php:148 msgid "It looks like your domain is not set up on Cloudflare." msgstr "On dirait que votre domaine n'est pas configuré dans Cloudflare." -#: inc/Addon/Cloudflare/Subscriber.php:215 inc/deprecated/3.5.php:538 +#: inc/Addon/Cloudflare/Subscriber.php:215 inc/deprecated/3.5.php:582 #, php-format msgid "WP Rocket: %s" msgstr "WP Rocket : %s" -#: inc/Addon/Cloudflare/Subscriber.php:220 inc/deprecated/3.5.php:543 +#: inc/Addon/Cloudflare/Subscriber.php:220 inc/deprecated/3.5.php:587 msgid "WP Rocket: Cloudflare cache successfully purged." msgstr "WP Rocket: Cache de Cloudflare purgé avec succès." -#: inc/Addon/Cloudflare/Subscriber.php:375 -#: inc/Addon/Cloudflare/Subscriber.php:388 -#: inc/Addon/Cloudflare/Subscriber.php:394 -#: inc/Addon/Cloudflare/Subscriber.php:411 -#: inc/Addon/Cloudflare/Subscriber.php:421 -#: inc/Addon/Cloudflare/Subscriber.php:433 -#: inc/Addon/Cloudflare/Subscriber.php:439 +#: inc/Addon/Cloudflare/Subscriber.php:364 +#: inc/Addon/Cloudflare/Subscriber.php:370 +#: inc/Addon/Cloudflare/Subscriber.php:390 +#: inc/Addon/Cloudflare/Subscriber.php:401 +#: inc/Addon/Cloudflare/Subscriber.php:420 +#: inc/Addon/Cloudflare/Subscriber.php:426 +#: inc/Addon/Cloudflare/Subscriber.php:445 #: inc/Addon/Cloudflare/Subscriber.php:451 -#: inc/Addon/Cloudflare/Subscriber.php:457 -#: inc/Addon/Cloudflare/Subscriber.php:469 -#: inc/Addon/Cloudflare/Subscriber.php:475 inc/admin/options.php:176 +#: inc/Addon/Cloudflare/Subscriber.php:470 +#: inc/Addon/Cloudflare/Subscriber.php:476 +#: inc/Addon/Cloudflare/Subscriber.php:558 inc/admin/options.php:176 #: inc/classes/subscriber/Tools/class-detect-missing-tags-subscriber.php:148 msgid "WP Rocket: " msgstr "WP Rocket : " -#: inc/Addon/Cloudflare/Subscriber.php:388 +#: inc/Addon/Cloudflare/Subscriber.php:364 #, php-format msgid "Cloudflare development mode error: %s" msgstr "Erreur du mode développement de Cloudflare : %s" -#: inc/Addon/Cloudflare/Subscriber.php:394 +#: inc/Addon/Cloudflare/Subscriber.php:370 #, php-format msgid "Cloudflare development mode %s" msgstr "Mode développement de Cloudflare %s" -#: inc/Addon/Cloudflare/Subscriber.php:411 +#: inc/Addon/Cloudflare/Subscriber.php:390 #, php-format msgid "Cloudflare cache level error: %s" msgstr "Erreur du niveau de cache de Cloudflare : %s" -#: inc/Addon/Cloudflare/Subscriber.php:415 +#: inc/Addon/Cloudflare/Subscriber.php:395 msgctxt "Cloudflare caching level" msgid "Standard" msgstr "Standard" -#: inc/Addon/Cloudflare/Subscriber.php:421 +#: inc/Addon/Cloudflare/Subscriber.php:401 #, php-format msgid "Cloudflare cache level set to %s" msgstr "Niveau de cache de Cloudflare défini à %s" -#: inc/Addon/Cloudflare/Subscriber.php:433 +#: inc/Addon/Cloudflare/Subscriber.php:420 #, php-format msgid "Cloudflare minification error: %s" msgstr "Erreur de la minification Cloudflare : %s" -#: inc/Addon/Cloudflare/Subscriber.php:439 +#: inc/Addon/Cloudflare/Subscriber.php:426 #, php-format msgid "Cloudflare minification %s" msgstr "Minification Cloudflare %s" -#: inc/Addon/Cloudflare/Subscriber.php:451 +#: inc/Addon/Cloudflare/Subscriber.php:445 #, php-format msgid "Cloudflare rocket loader error: %s" msgstr "Erreur du Rocket Loader de Cloudflare : %s" -#: inc/Addon/Cloudflare/Subscriber.php:457 +#: inc/Addon/Cloudflare/Subscriber.php:451 #, php-format msgid "Cloudflare rocket loader %s" msgstr "Rocket Loader de Cloudflare %s" -#: inc/Addon/Cloudflare/Subscriber.php:469 +#: inc/Addon/Cloudflare/Subscriber.php:470 #, php-format msgid "Cloudflare browser cache error: %s" msgstr "Erreur du cache navigateur Cloudflare : %s" -#: inc/Addon/Cloudflare/Subscriber.php:475 +#: inc/Addon/Cloudflare/Subscriber.php:476 #, php-format msgid "Cloudflare browser cache set to %s seconds" msgstr "Cache navigateur de Cloudflare défini à %s secondes" +#: inc/Engine/Preload/Homepage.php:153 +#, php-format +msgid "" +"Preload encountered an error. Could not gather links on %1$s because of the " +"following error: %2$s. %3$sLearn more%4$s." +msgstr "" +"Le pré-chargement a rencontré une erreur. Impossible de récupérer les liens " +"de %1$s dû à l'erreur suivante : %2$s. %3$sPlus d'info%4$s." + +#: inc/Engine/Preload/Homepage.php:166 +#, php-format +msgid "" +"Preload encountered an error. %1$s is not accessible to due to the following" +" response code: %2$s. Security measures could be preventing access. " +"%3$sLearn more%4$s." +msgstr "" +"Le pré-chargement a rencontré une erreur. %1$s n'est pas accessible dû au " +"code de réponse suivant : %2$s. Des mesures de sécurité pourraient prévénir " +"l'accès. %3$sPlus d'info%4$s." + +#: inc/Engine/Preload/Homepage.php:172 +#, php-format +msgid "" +"Preload encountered an error. %1$s is not accessible to due to the following" +" response code: 404. Please make sure your homepage is accessible in your " +"browser. %2$sLearn more%3$s." +msgstr "" +"Le pré-chargement a rencontré une erreur. %1$s n'est pas accessible dû au " +"code de réponse suivant : 404. Veuillez vous assurer que la page d'Accueil " +"est accessible à partir de votre navigateur. %2$sPlus d'info%3$s." + +#: inc/Engine/Preload/Homepage.php:178 +#, php-format +msgid "" +"Preload encountered an error. %1$s is not accessible to due to the following" +" response code: 500. Please check with your web host about server access. " +"%2$sLearn more%3$s." +msgstr "" +"Le pré-chargement a rencontré une erreur. %1$s n'est pas accessible dû au " +"code de réponse suivant : 500. Veuillez vérifier avec votre hébergeur web " +"concernant l'accès à votre serveur. %2$sPlus d'info%3$s." + +#: inc/Engine/Preload/Homepage.php:184 +#, php-format +msgid "" +"Preload encountered an error. Could not gather links on %1$s because it " +"returned the following response code: %2$s. %3$sLearn more%4$s." +msgstr "" +"Le pré-chargement a rencontré une erreur. Impossible de récupérer les liens " +"sur %1$s parce que le code d'erreur suivant a été retourné : %2$s. %3$sPlus " +"d'info%4$s." + +#: inc/Engine/Preload/PreloadSubscriber.php:237 +msgid "Preload: WP Rocket has started preloading your website." +msgstr "Pré-chargement : WP Rocket a démarré le pré-chargement de votre site" + +#: inc/Engine/Preload/PreloadSubscriber.php:242 +#: inc/classes/subscriber/Optimization/class-critical-css-subscriber.php:107 +#, php-format +msgid "Go to the %1$sWP Rocket settings%2$s page to track progress." +msgstr "" +"Allez à la page des %1$sparamètres WP Rocket %2$s afin d'en suivre " +"l'évolution." + +#: inc/Engine/Preload/PreloadSubscriber.php:283 +#, php-format +msgid "" +"Preload: %1$s uncached page has now been preloaded. (refresh to see " +"progress)" +msgid_plural "" +"Preload: %1$s uncached pages have now been preloaded. (refresh to see " +"progress)" +msgstr[0] "" +"Préchargement : %1$s page n'étant pas dans le cache a maintenant été " +"préchargée. (rafraîchir pour constater le progrès)" +msgstr[1] "" +"Préchargement : %1$s pages n'étant pas dans le cache on maintenant été " +"préchargées. (rafraîchir pour constater le progrès)" + +#: inc/Engine/Preload/PreloadSubscriber.php:292 +msgid "The following error happened during gathering of the URLs to preload:" +msgid_plural "" +"The following errors happened during gathering of the URLs to preload:" +msgstr[0] "" +"L'erreur suivante est survenue lors de la collecte des URLs à précharger :" +msgstr[1] "" +"Les erreurs suivantes sont survenues lors de la collecte des URLs à " +"précharger :" + +#: inc/Engine/Preload/PreloadSubscriber.php:344 +#, php-format +msgid "Preload complete: %d pages have been cached." +msgstr "Pré-chargement complété : %d pages ont été mises en cache." + +#: inc/Engine/Preload/Sitemap.php:150 +#, php-format +msgid "" +"Sitemap preload encountered an error. Could not gather links on %1$s because" +" of the following error: %2$s. %3$sLearn more%4$s." +msgstr "" +"Le chargement du sitemap a rencontré une erreur. Impossible de récupérer les" +" liens sur %1$s à cause de l'erreur suivante : %2$s. %3$sPlus d'info%4$s." + +#: inc/Engine/Preload/Sitemap.php:165 +#, php-format +msgid "" +"Sitemap preload encountered an error. %1$s is not accessible to due to the " +"following response code: %2$s. Security measures could be preventing access." +" %3$sLearn more%4$s." +msgstr "" +"Le chargement du sitemap a rencontré une erreur. %1$s n'est pas accessible " +"dû au messag d'erreur suivant : %2$s. Des mesures de sécurité pourraient " +"empêche l'accès. %3$sPlus d'info%4$s." + +#: inc/Engine/Preload/Sitemap.php:170 +#, php-format +msgid "" +"Sitemap preload encountered an error. %1$s is not accessible to due to the " +"following response code: 404. Please make sure you entered the correct " +"sitemap URL and it is accessible in your browser. %2$sLearn more%3$s." +msgstr "" +"Le chargement du sitemap a rencontré une erreur. %1$s n'est pas accessible " +"dû au code d'erreur suivant : 404. Veuillez vous assurrer que vous avec " +"entré le bon URL pour le sitemap et qu'il est accessible à partir de votre " +"navigateur. %2$sPlus d'info%3$s." + +#: inc/Engine/Preload/Sitemap.php:175 +#, php-format +msgid "" +"Sitemap preload encountered an error. %1$s is not accessible to due to the " +"following response code: 500. Please check with your web host about server " +"access. %2$sLearn more%3$s." +msgstr "" +"Le chargement du sitemap a rencontré une erreur. %1$s n'est pas accessible " +"dû au code d'erreur suivant : 500. Veuillez vérifier avec votre hébergeur " +"web concernant l'accès à votre serveur. %2$sPlus d'info%3$s." + +#: inc/Engine/Preload/Sitemap.php:180 +#, php-format +msgid "" +"Sitemap preload encountered an error. Could not gather links on %1$s because" +" it returned the following response code: %2$s. %3$sLearn more%4$s." +msgstr "" +"Le chargement du sitemap a rencontré une erreur. Impossible de récupérer les" +" liens sur %1$s parce que le code d'erreur suivant a été retourné : %2$s. " +"%3$sPlus d'info%4$s." + +#: inc/Engine/Preload/Sitemap.php:196 +#, php-format +msgid "" +"Sitemap preload encountered an error. Could not collect links from %1$s " +"because the file is empty. %2$sLearn more%3$s." +msgstr "" +"Le chargement du sitemap a rencontré une erreur. Impossible de récupérer les" +" liens sur %1$s parce que le fichier est vide. %2$sPlus d'info%3$s." + +#: inc/Engine/Preload/Sitemap.php:217 +#, php-format +msgid "" +"Sitemap preload encountered an error. Could not collect links from %1$s " +"because of an error during the XML sitemap parsing. %2$sLearn more%3$s." +msgstr "" +"Le chargement du sitemap a rencontré une erreur. Impossible de récupérer les" +" liens sur %1$s à cause d'une erreur durant la lecture du sitemap XML. " +"%2$sPlus d'info%3$s." + +#: inc/Engine/Preload/SitemapPreloadSubscriber.php:120 +#, php-format +msgid "" +"%1$sSimpleXML PHP extension%2$s is not enabled on your server. Please " +"contact your host to enable it before running sitemap-based cache " +"preloading." +msgstr "" +"%1$sL'extension PHP SimpleXML%2$s n'est pas activée sur votre serveur. " +"Veuillez contacter votre hébergeur afin qu'il l'active avant de pouvoir " +"utiliser le pré-chargement du cache par sitemap." + #: inc/admin/admin.php:18 inc/common/admin-bar.php:377 #: inc/deprecated/deprecated.php:1787 msgid "Support" @@ -307,31 +476,31 @@ msgstr "Échec de l'import des réglages : contenu du fichier incorrect." msgid "Settings imported and saved." msgstr "Réglages importés et sauvegardés." -#: inc/admin/options.php:135 inc/classes/admin/settings/class-page.php:701 +#: inc/admin/options.php:135 inc/classes/admin/settings/class-page.php:700 msgid "Excluded CSS Files" msgstr "Fichiers CSS à exclure" -#: inc/admin/options.php:136 inc/classes/admin/settings/class-page.php:803 +#: inc/admin/options.php:136 inc/classes/admin/settings/class-page.php:802 msgid "Excluded Inline JavaScript" msgstr "JavaScript inline exclu" -#: inc/admin/options.php:137 inc/classes/admin/settings/class-page.php:821 +#: inc/admin/options.php:137 inc/classes/admin/settings/class-page.php:820 msgid "Excluded JavaScript Files" msgstr "Fichiers JavaScript exclus" -#: inc/admin/options.php:138 inc/classes/admin/settings/class-page.php:1207 +#: inc/admin/options.php:138 inc/classes/admin/settings/class-page.php:1206 msgid "Never Cache URL(s)" msgstr "Ne jamais mettre en cache ces URL(s)" -#: inc/admin/options.php:139 inc/classes/admin/settings/class-page.php:1223 +#: inc/admin/options.php:139 inc/classes/admin/settings/class-page.php:1222 msgid "Never Cache User Agent(s)" msgstr "Ne jamais mettre en cache ces agents utilisateurs" -#: inc/admin/options.php:140 inc/classes/admin/settings/class-page.php:1228 +#: inc/admin/options.php:140 inc/classes/admin/settings/class-page.php:1227 msgid "Always Purge URL(s)" msgstr "Toujours purger ces URL(s)" -#: inc/admin/options.php:141 inc/classes/admin/settings/class-page.php:1522 +#: inc/admin/options.php:141 inc/classes/admin/settings/class-page.php:1521 msgid "Exclude files from CDN" msgstr "Exclure des fichiers du CDN" @@ -373,7 +542,7 @@ msgid "LazyLoad for iframes/videos" msgstr "Chargement différé des iframes et vidéos" #: inc/admin/ui/meta-boxes.php:74 -#: inc/classes/admin/settings/class-page.php:624 +#: inc/classes/admin/settings/class-page.php:622 msgid "Minify HTML" msgstr "Minifier le HTML" @@ -386,8 +555,8 @@ msgid "Minify/combine JS" msgstr "Minifier / combiner le JS" #: inc/admin/ui/meta-boxes.php:77 -#: inc/classes/admin/settings/class-page.php:1492 -#: inc/classes/admin/settings/class-page.php:1503 +#: inc/classes/admin/settings/class-page.php:1491 +#: inc/classes/admin/settings/class-page.php:1502 #: inc/deprecated/deprecated.php:1773 msgid "CDN" msgstr "CDN" @@ -691,32 +860,32 @@ msgid "RocketCDN cache purge successful." msgstr "La purge du cache de RocketCDN a été effectuée avec succès." #: inc/classes/admin/Database/class-optimization.php:41 -#: inc/classes/admin/settings/class-page.php:1368 +#: inc/classes/admin/settings/class-page.php:1367 msgid "Revisions" msgstr "Révisions" #: inc/classes/admin/Database/class-optimization.php:42 -#: inc/classes/admin/settings/class-page.php:1378 +#: inc/classes/admin/settings/class-page.php:1377 msgid "Auto Drafts" msgstr "Brouillons automatiques" #: inc/classes/admin/Database/class-optimization.php:43 -#: inc/classes/admin/settings/class-page.php:1388 +#: inc/classes/admin/settings/class-page.php:1387 msgid "Trashed Posts" msgstr "Contenus dans la corbeille" #: inc/classes/admin/Database/class-optimization.php:44 -#: inc/classes/admin/settings/class-page.php:1398 +#: inc/classes/admin/settings/class-page.php:1397 msgid "Spam Comments" msgstr "Commentaires indésirables" #: inc/classes/admin/Database/class-optimization.php:45 -#: inc/classes/admin/settings/class-page.php:1408 +#: inc/classes/admin/settings/class-page.php:1407 msgid "Trashed Comments" msgstr "Commentaires à la corbeille" #: inc/classes/admin/Database/class-optimization.php:46 -#: inc/classes/admin/settings/class-page.php:1418 +#: inc/classes/admin/settings/class-page.php:1417 msgid "Expired transients" msgstr "Transients expirés" @@ -732,58 +901,58 @@ msgstr "Tables" msgid "The debug file could not be deleted." msgstr "Le fichier de debug n'a pu être effacé." -#: inc/classes/admin/settings/class-page.php:189 +#: inc/classes/admin/settings/class-page.php:188 msgid "Save Changes" msgstr "Enregistrer les modifications" -#: inc/classes/admin/settings/class-page.php:189 +#: inc/classes/admin/settings/class-page.php:188 msgid "Validate License" msgstr "Valider la licence" +#: inc/classes/admin/settings/class-page.php:219 #: inc/classes/admin/settings/class-page.php:220 -#: inc/classes/admin/settings/class-page.php:221 msgid "Unavailable" msgstr "Indisponible" -#: inc/classes/admin/settings/class-page.php:335 +#: inc/classes/admin/settings/class-page.php:332 #: inc/deprecated/deprecated.php:1789 #: views/settings/page-sections/dashboard.php:73 msgid "License" msgstr "Licence" -#: inc/classes/admin/settings/class-page.php:352 +#: inc/classes/admin/settings/class-page.php:349 msgid "API key" msgstr "Clé d’API" -#: inc/classes/admin/settings/class-page.php:367 +#: inc/classes/admin/settings/class-page.php:364 msgid "Email address" msgstr "Adresse courriel" -#: inc/classes/admin/settings/class-page.php:396 +#: inc/classes/admin/settings/class-page.php:393 msgid "Dashboard" msgstr "Tableau de bord" -#: inc/classes/admin/settings/class-page.php:397 +#: inc/classes/admin/settings/class-page.php:394 msgid "Get help, account info" msgstr "Aide, info du compte" -#: inc/classes/admin/settings/class-page.php:406 +#: inc/classes/admin/settings/class-page.php:403 msgid "My Status" msgstr "Ma situation" -#: inc/classes/admin/settings/class-page.php:416 views/settings/page.php:71 +#: inc/classes/admin/settings/class-page.php:413 views/settings/page.php:72 msgid "Rocket Tester" msgstr "Testeur Rocket" -#: inc/classes/admin/settings/class-page.php:417 +#: inc/classes/admin/settings/class-page.php:414 msgid "I am part of the WP Rocket Beta Testing Program." msgstr "Je participe au Beta Testing de WP Rocket." -#: inc/classes/admin/settings/class-page.php:425 views/settings/page.php:89 +#: inc/classes/admin/settings/class-page.php:422 views/settings/page.php:90 msgid "Rocket Analytics" msgstr "Analytiques Rocket" -#: inc/classes/admin/settings/class-page.php:427 +#: inc/classes/admin/settings/class-page.php:424 #, php-format msgid "" "I agree to share anonymous data with the development team to help improve WP" @@ -793,23 +962,23 @@ msgstr "" "pour aider à améliorer WP Rocket. %1$sQuelles informations recueillerons-" "nous?%2$s" -#: inc/classes/admin/settings/class-page.php:454 +#: inc/classes/admin/settings/class-page.php:451 msgid "Cache" msgstr "Cache" -#: inc/classes/admin/settings/class-page.php:455 +#: inc/classes/admin/settings/class-page.php:452 msgid "Basic cache options" msgstr "Options de base de la cache" -#: inc/classes/admin/settings/class-page.php:462 +#: inc/classes/admin/settings/class-page.php:459 msgid "Mobile Cache" msgstr "Cache mobile" -#: inc/classes/admin/settings/class-page.php:464 +#: inc/classes/admin/settings/class-page.php:461 msgid "Speed up your site for mobile visitors." msgstr "Accélérez votre site pour vos visiteurs mobile." -#: inc/classes/admin/settings/class-page.php:469 +#: inc/classes/admin/settings/class-page.php:466 msgid "" "We detected you use a plugin that requires a separate cache for mobile, and " "automatically enabled this option for compatibility." @@ -818,11 +987,11 @@ msgstr "" "séparé pour mobile, et avons automatiquement activé cette option pour " "assurer la compatibilité." -#: inc/classes/admin/settings/class-page.php:473 +#: inc/classes/admin/settings/class-page.php:470 msgid "User Cache" msgstr "Cache utilisateur" -#: inc/classes/admin/settings/class-page.php:476 +#: inc/classes/admin/settings/class-page.php:473 #, php-format msgid "" "%1$sUser cache%2$s is great when you have user-specific or restricted " @@ -831,11 +1000,11 @@ msgstr "" "%1$sLe cache utilisateur%2$s est parfait si vous avez du contenu spécifique " "ou restreint pour vos utilisateurs sur votre site." -#: inc/classes/admin/settings/class-page.php:484 +#: inc/classes/admin/settings/class-page.php:481 msgid "Cache Lifespan" msgstr "Délai de nettoyage du cache" -#: inc/classes/admin/settings/class-page.php:487 +#: inc/classes/admin/settings/class-page.php:484 #, php-format msgid "" "Cache files older than the specified lifespan will be deleted.
    Enable " @@ -846,19 +1015,19 @@ msgstr "" "effacés.
    Activer %1$spré-chargement %2$s pour que le cache soit généré de" " nouveau automatiquement après l'expiration de la durée de vie." -#: inc/classes/admin/settings/class-page.php:501 +#: inc/classes/admin/settings/class-page.php:498 msgid "Enable caching for logged-in WordPress users" msgstr "Activer la mise en cache pour les utilisateurs WordPress connectés" -#: inc/classes/admin/settings/class-page.php:509 +#: inc/classes/admin/settings/class-page.php:506 msgid "Enable caching for mobile devices" msgstr "Activer la mise en cache pour les appareils mobiles" -#: inc/classes/admin/settings/class-page.php:524 +#: inc/classes/admin/settings/class-page.php:521 msgid "Separate cache files for mobile devices" msgstr "Créer un fichier de cache distinct pour les appareils mobiles" -#: inc/classes/admin/settings/class-page.php:526 +#: inc/classes/admin/settings/class-page.php:523 #, php-format msgid "" "Most modern themes are responsive and should work without a separate cache. " @@ -869,14 +1038,14 @@ msgstr "" "séparée. Activer ceci seulement si vous avez un thème mobile dédié ou une " "extension. %1$sPlus d'info%2$s" -#: inc/classes/admin/settings/class-page.php:542 +#: inc/classes/admin/settings/class-page.php:539 msgid "" "Specify time after which the global cache is cleared
    (0 = unlimited )" msgstr "" "Indiquez le nombre d’heures après quoi le cache global doit être vidé
    (0 " "= illimité)" -#: inc/classes/admin/settings/class-page.php:544 +#: inc/classes/admin/settings/class-page.php:541 #, php-format msgid "" "Reduce lifespan to 10 hours or less if you notice issues that seem to appear" @@ -885,34 +1054,34 @@ msgstr "" "Réduisez le délai à 10 heures ou moins si vous remarquez des problèmes " "apparaissant de façon intermittente. %1$sPourquoi ?%2$s" -#: inc/classes/admin/settings/class-page.php:550 +#: inc/classes/admin/settings/class-page.php:547 msgid "Minutes" msgstr "Minutes" -#: inc/classes/admin/settings/class-page.php:551 +#: inc/classes/admin/settings/class-page.php:548 msgid "Hours" msgstr "Heures" -#: inc/classes/admin/settings/class-page.php:552 +#: inc/classes/admin/settings/class-page.php:549 msgid "Days" msgstr "Jours" -#: inc/classes/admin/settings/class-page.php:580 +#: inc/classes/admin/settings/class-page.php:578 #: views/settings/page-sections/tutorials.php:22 msgid "File Optimization" msgstr "Optimisation des fichiers" -#: inc/classes/admin/settings/class-page.php:581 +#: inc/classes/admin/settings/class-page.php:579 msgid "Optimize CSS & JS" msgstr "Optimiser le CSS et le JS" -#: inc/classes/admin/settings/class-page.php:588 +#: inc/classes/admin/settings/class-page.php:586 msgid "Basic Settings" msgstr "Options de base" -#: inc/classes/admin/settings/class-page.php:595 -#: inc/classes/admin/settings/class-page.php:605 -#: inc/classes/admin/settings/class-page.php:615 +#: inc/classes/admin/settings/class-page.php:593 +#: inc/classes/admin/settings/class-page.php:603 +#: inc/classes/admin/settings/class-page.php:613 #, php-format msgid "" "%1$s Minification is currently activated in Autoptimize. If" @@ -922,33 +1091,38 @@ msgstr "" "Autoptimize. Si vous souhaitez utiliser la minification de " "%2$s, désactivez ces options dans Autoptimize." -#: inc/classes/admin/settings/class-page.php:598 +#: inc/classes/admin/settings/class-page.php:596 msgid "CSS Files" msgstr "Fichiers CSS" -#: inc/classes/admin/settings/class-page.php:608 +#: inc/classes/admin/settings/class-page.php:606 msgid "JavaScript Files" msgstr "Fichiers JavaScript" -#: inc/classes/admin/settings/class-page.php:628 +#: inc/classes/admin/settings/class-page.php:626 msgid "Minifying HTML removes whitespace and comments to reduce the size." msgstr "" "Minifier le HTML supprime les espaces et les commentaires afin de réduire le" " poids." -#: inc/classes/admin/settings/class-page.php:639 -msgid "Combine Google Fonts files" -msgstr "Combiner les fichiers Google Fonts" +#: inc/classes/admin/settings/class-page.php:637 +msgid "Optimize Google Fonts" +msgstr "Optimiser Google Fonts" -#: inc/classes/admin/settings/class-page.php:640 -msgid "Combining Google Fonts will reduce the number of HTTP requests." -msgstr "Combiner les Google Fonts réduira le nombre de requêtes HTTP." +#: inc/classes/admin/settings/class-page.php:639 +#, php-format +msgid "" +"Improves font performance and combines multiple font requests to reduce the " +"number of HTTP requests. %1$sMore info%2$s" +msgstr "" +"Améliore la performance des fontes et combine plusieurs requêtes de fontes " +"pour réduire le nobre d'appels HTTP. %1$sPlus d'info%2$s" -#: inc/classes/admin/settings/class-page.php:648 +#: inc/classes/admin/settings/class-page.php:647 msgid "Remove query strings from static resources" msgstr "Supprimer les “query strings” des ressources statiques" -#: inc/classes/admin/settings/class-page.php:650 +#: inc/classes/admin/settings/class-page.php:649 #, php-format msgid "" "Removes the version query string from static files (e.g. style.css?ver=1.0) " @@ -959,27 +1133,27 @@ msgstr "" "style.css?ver=1.0) et les encode dans le nom de la ressource à la place (ex." " style-1-0.css). Peut améliorer votre score GTMetrix. %1$sPlus d'info%2$s" -#: inc/classes/admin/settings/class-page.php:658 +#: inc/classes/admin/settings/class-page.php:657 msgid "Minify CSS files" msgstr "Minifier les fichiers CSS" -#: inc/classes/admin/settings/class-page.php:659 +#: inc/classes/admin/settings/class-page.php:658 msgid "Minify CSS removes whitespace and comments to reduce the file size." msgstr "" "Minifier le CSS supprime les espaces et les commentaires afin de réduire le " "poids des fichiers." +#: inc/classes/admin/settings/class-page.php:671 +#: inc/classes/admin/settings/class-page.php:693 +#: inc/classes/admin/settings/class-page.php:773 +#: inc/classes/admin/settings/class-page.php:795 +msgid "This could break things!" +msgstr "Ceci pourrait briser des choses!" + #: inc/classes/admin/settings/class-page.php:672 #: inc/classes/admin/settings/class-page.php:694 #: inc/classes/admin/settings/class-page.php:774 #: inc/classes/admin/settings/class-page.php:796 -msgid "This could break things!" -msgstr "Ceci pourrait briser des choses!" - -#: inc/classes/admin/settings/class-page.php:673 -#: inc/classes/admin/settings/class-page.php:695 -#: inc/classes/admin/settings/class-page.php:775 -#: inc/classes/admin/settings/class-page.php:797 msgid "" "If you notice any errors on your website after having activated this " "setting, just deactivate it again, and your site will be back to normal." @@ -988,17 +1162,17 @@ msgstr "" "option, il vous suffit de la désactiver et votre site sera de retour à la " "normale." -#: inc/classes/admin/settings/class-page.php:674 +#: inc/classes/admin/settings/class-page.php:673 msgid "Activate minify CSS" msgstr "Activer la minification CSS" -#: inc/classes/admin/settings/class-page.php:679 +#: inc/classes/admin/settings/class-page.php:678 msgid "Combine CSS files (Enable Minify CSS files to select)" msgstr "" "Combiner les fichiers CSS (activez la minification CSS pour " "sélectionner)" -#: inc/classes/admin/settings/class-page.php:681 +#: inc/classes/admin/settings/class-page.php:680 #, php-format msgid "" "Combine CSS merges all your files into 1, reducing HTTP requests. Not " @@ -1008,11 +1182,11 @@ msgstr "" "de requêtes HTTP. Ces réglages ne sont pas recommandés si votre site utilise" " HTTP/2. %1$sPlus d'infos%2$s" -#: inc/classes/admin/settings/class-page.php:696 +#: inc/classes/admin/settings/class-page.php:695 msgid "Activate combine CSS" msgstr "Activer la combinaison CSS" -#: inc/classes/admin/settings/class-page.php:702 +#: inc/classes/admin/settings/class-page.php:701 msgid "" "Specify URLs of CSS files to be excluded from minification and concatenation" " (one per line)." @@ -1020,7 +1194,7 @@ msgstr "" "Indiquez l’URL des fichiers CSS à exclure de la minification et de la " "concaténation (une par ligne)" -#: inc/classes/admin/settings/class-page.php:703 +#: inc/classes/admin/settings/class-page.php:702 msgid "" "The domain part of the URL will be stripped automatically.
    Use (.*).css " "wildcards to exclude all CSS files located at a specific path." @@ -1029,11 +1203,11 @@ msgstr "" "expressions régulières (.*).css pour exclure tous les fichiers CSS pour un " "chemin donné." -#: inc/classes/admin/settings/class-page.php:716 +#: inc/classes/admin/settings/class-page.php:715 msgid "Optimize CSS delivery" msgstr "Optimiser le chargement du CSS" -#: inc/classes/admin/settings/class-page.php:723 +#: inc/classes/admin/settings/class-page.php:722 #, php-format msgctxt "WP Critical CSS compatibility" msgid "" @@ -1044,7 +1218,7 @@ msgstr "" "l'extension %1$s. Si vous désirez utiliser l'option d'optimisation de " "chargement de CSS de WP Rocket, veuilez désactiver l'extension %1$s." -#: inc/classes/admin/settings/class-page.php:725 +#: inc/classes/admin/settings/class-page.php:724 #, php-format msgid "" "Optimize CSS delivery eliminates render-blocking CSS on your website for " @@ -1053,11 +1227,11 @@ msgstr "" "Élimine le CSS bloquant l’affichage de votre site pour un temps perçu de " "chargement plus rapide. %1$sPlus d'infos%2$s" -#: inc/classes/admin/settings/class-page.php:736 +#: inc/classes/admin/settings/class-page.php:735 msgid "Fallback critical CSS" msgstr "CSS critique de secours" -#: inc/classes/admin/settings/class-page.php:741 +#: inc/classes/admin/settings/class-page.php:740 #, php-format msgid "" "Provides a fallback if auto-generated critical path CSS is incomplete. " @@ -1066,11 +1240,11 @@ msgstr "" "Fournit une option de secours si le CSS critique auto-généré est " "incomplet.%1$sPlus d'infos%2$s" -#: inc/classes/admin/settings/class-page.php:750 +#: inc/classes/admin/settings/class-page.php:749 msgid "Remove jQuery Migrate" msgstr "Enlever jQuery Migrate" -#: inc/classes/admin/settings/class-page.php:752 +#: inc/classes/admin/settings/class-page.php:751 #, php-format msgid "" "Remove jQuery Migrate eliminates a JS file and can improve load time. " @@ -1079,29 +1253,29 @@ msgstr "" "Enlever jQuery Migrate peut éliminer un fichier JS et peut améliorer le " "temps de chargement. %1$s Plus d'info %2$s" -#: inc/classes/admin/settings/class-page.php:760 +#: inc/classes/admin/settings/class-page.php:759 msgid "Minify JavaScript files" msgstr "Minifier les fichiers JS" -#: inc/classes/admin/settings/class-page.php:761 +#: inc/classes/admin/settings/class-page.php:760 msgid "" "Minify JavaScript removes whitespace and comments to reduce the file size." msgstr "" "Minifier le JavaScript supprime les espace et les commentaires afin de " "réduire le poids des fichiers." -#: inc/classes/admin/settings/class-page.php:776 +#: inc/classes/admin/settings/class-page.php:775 msgid "Activate minify JavaScript" msgstr "Activer la minification JavaScript" -#: inc/classes/admin/settings/class-page.php:781 +#: inc/classes/admin/settings/class-page.php:780 msgid "" "Combine JavaScript files (Enable Minify JavaScript files to select)" msgstr "" "Combiner les fichiers JavaScript (activez la minification JavaScript " "pour sélectionner)" -#: inc/classes/admin/settings/class-page.php:783 +#: inc/classes/admin/settings/class-page.php:782 #, php-format msgid "" "Combine JavaScript files combines your site’s internal, 3rd party and inline" @@ -1112,11 +1286,11 @@ msgstr "" "seul fichier, réduisant le nombre de requêtes HTTP. Ces réglages ne sont pas" " recommandés si votre site utilise HTTP/2.%1$sPlus d'infos%2$s" -#: inc/classes/admin/settings/class-page.php:798 +#: inc/classes/admin/settings/class-page.php:797 msgid "Activate combine JavaScript" msgstr "Activer la combinaison JavaScript" -#: inc/classes/admin/settings/class-page.php:805 +#: inc/classes/admin/settings/class-page.php:804 #, php-format msgid "" "Specify patterns of inline JavaScript to be excluded from concatenation (one" @@ -1125,7 +1299,7 @@ msgstr "" "Indiquez les patterns du code JavaScript inline à exclure de la " "concaténation (un par ligne).%1$sMore info%2$s" -#: inc/classes/admin/settings/class-page.php:822 +#: inc/classes/admin/settings/class-page.php:821 msgid "" "Specify URLs of JavaScript files to be excluded from minification and " "concatenation (one per line)." @@ -1133,7 +1307,7 @@ msgstr "" "Indiquez l’URL des fichiers JavaScript à exclure de la minification et de la" " concaténation (une par ligne)" -#: inc/classes/admin/settings/class-page.php:823 +#: inc/classes/admin/settings/class-page.php:822 msgid "" "Internal: The domain part of the URL will be stripped " "automatically. Use (.*).js wildcards to exclude all JS files located at a " @@ -1143,7 +1317,7 @@ msgstr "" " l’URL. Utilisez les expressions régulières (.*).js afin d’exclure tous les " "fichiers JS pour un chemin donné." -#: inc/classes/admin/settings/class-page.php:825 +#: inc/classes/admin/settings/class-page.php:824 #, php-format msgid "" "3rd Party: Use either the full URL path or only the domain " @@ -1152,11 +1326,11 @@ msgstr "" "Tierce-partie : Utilisez soit l'URL complet ou seulement le" " nom de domaine afin d'exclure le JS externe. %1$sPlus d'info%2$s" -#: inc/classes/admin/settings/class-page.php:841 +#: inc/classes/admin/settings/class-page.php:840 msgid "Load JavaScript deferred" msgstr "Charger les fichiers JavaScript en différé" -#: inc/classes/admin/settings/class-page.php:843 +#: inc/classes/admin/settings/class-page.php:842 #, php-format msgid "" "Load JavaScript deferred eliminates render-blocking JS on your site and can " @@ -1166,11 +1340,11 @@ msgstr "" " de votre site dû au JS et peux améliorer le temps de chargement perçu. " "%1$sPlus d'infos%2$s" -#: inc/classes/admin/settings/class-page.php:854 +#: inc/classes/admin/settings/class-page.php:853 msgid "Safe Mode for jQuery (recommended)" msgstr "Mode sécuritaire pour jQuery (recommandé)" -#: inc/classes/admin/settings/class-page.php:855 +#: inc/classes/admin/settings/class-page.php:854 msgid "" "Safe mode for jQuery for deferred JS ensures support for inline jQuery " "references from themes and plugins by loading jQuery at the top of the " @@ -1183,23 +1357,23 @@ msgstr "" "l’affichage.
    Sa désactivation peut entraîner des problèmes " "fonctionnels, à tester soigneusement!" -#: inc/classes/admin/settings/class-page.php:887 +#: inc/classes/admin/settings/class-page.php:886 msgid "Media" msgstr "Média" -#: inc/classes/admin/settings/class-page.php:888 +#: inc/classes/admin/settings/class-page.php:887 msgid "LazyLoad, emojis, embeds, WebP" msgstr "LazyLoad, emojis, embeds, WebP" -#: inc/classes/admin/settings/class-page.php:894 +#: inc/classes/admin/settings/class-page.php:893 msgid "Autoptimize" msgstr "Autoptimize" -#: inc/classes/admin/settings/class-page.php:911 +#: inc/classes/admin/settings/class-page.php:910 msgid "LazyLoad" msgstr "Chargement différé" -#: inc/classes/admin/settings/class-page.php:914 +#: inc/classes/admin/settings/class-page.php:913 #, php-format msgid "" "It can improve actual and perceived loading time as images, iframes, and " @@ -1211,7 +1385,7 @@ msgstr "" "point d'entrer) dans la zone visible. Réduit le nombre de requêtes HTTP. " "%1$sPlus d'informations.%2$s" -#: inc/classes/admin/settings/class-page.php:921 +#: inc/classes/admin/settings/class-page.php:920 #, php-format msgid "" "Lazyload is currently activated in %2$s. If you want to use" @@ -1220,11 +1394,11 @@ msgstr "" "Lazyload est présentement activé dans %2$s. Si vous désirez" " utiliser le lazyload de %1$s, désactiver cette option dans %2$s." -#: inc/classes/admin/settings/class-page.php:924 +#: inc/classes/admin/settings/class-page.php:923 msgid "Emoji 👻" msgstr "Emoji 👻" -#: inc/classes/admin/settings/class-page.php:926 +#: inc/classes/admin/settings/class-page.php:925 msgid "" "Use default emoji of visitor's browser instead of loading emoji from " "WordPress.org" @@ -1232,11 +1406,11 @@ msgstr "" "Utiliser les emoji du navigateur de vos visiteurs au lieu de charger celles " "de WordPress.org" -#: inc/classes/admin/settings/class-page.php:930 +#: inc/classes/admin/settings/class-page.php:929 msgid "Embeds" msgstr "Insertions" -#: inc/classes/admin/settings/class-page.php:932 +#: inc/classes/admin/settings/class-page.php:931 msgid "" "Prevents others from embedding content from your site, prevents you from " "embedding content from other (non-whitelisted) sites, and removes JavaScript" @@ -1247,11 +1421,11 @@ msgstr "" "liste blanche) et retire les requêtes JavaScript liées aux insertions " "WordPress" -#: inc/classes/admin/settings/class-page.php:936 +#: inc/classes/admin/settings/class-page.php:935 msgid "WebP compatibility" msgstr "Compatibilité WebP" -#: inc/classes/admin/settings/class-page.php:940 +#: inc/classes/admin/settings/class-page.php:939 #, php-format msgid "" "Enable this option if you would like WP Rocket to serve WebP images to " @@ -1264,11 +1438,11 @@ msgstr "" "d'images WebP pour vous. Pour créez des images WebP nous recommandons " "%1$sImagify%2$s. %3$sPlus d'info %2$s" -#: inc/classes/admin/settings/class-page.php:968 +#: inc/classes/admin/settings/class-page.php:967 msgid "Enable for images" msgstr "Activer pour les images" -#: inc/classes/admin/settings/class-page.php:979 +#: inc/classes/admin/settings/class-page.php:978 msgctxt "Avada" msgid "" "Lazyload for images is currently activated in Avada. If you want to use WP " @@ -1278,15 +1452,15 @@ msgstr "" " vous voulez utiliser le chargement différé de WP Rocket, veuillez " "désactiver cette option dans Avada." -#: inc/classes/admin/settings/class-page.php:987 +#: inc/classes/admin/settings/class-page.php:986 msgid "Enable for iframes and videos" msgstr "Activer pour les iframes et vidéos" -#: inc/classes/admin/settings/class-page.php:1002 +#: inc/classes/admin/settings/class-page.php:1001 msgid "Replace YouTube iframe with preview image" msgstr "Remplacer l'iframe YouTube par une image d'aperçu" -#: inc/classes/admin/settings/class-page.php:1003 +#: inc/classes/admin/settings/class-page.php:1002 msgid "" "This can significantly improve your loading time if you have a lot of " "YouTube videos on a page." @@ -1294,35 +1468,35 @@ msgstr "" "Ceci peut considérablement améliorer votre vitesse de chargement si vous " "avez beaucoup de vidéos YouTube sur une page." -#: inc/classes/admin/settings/class-page.php:1015 +#: inc/classes/admin/settings/class-page.php:1014 msgid "Disable Emoji" msgstr "Désactiver les emojis" -#: inc/classes/admin/settings/class-page.php:1016 +#: inc/classes/admin/settings/class-page.php:1015 msgid "Disable Emoji will reduce the number of external HTTP requests." msgstr "Réduit le nombre de requêtes HTTP externes" -#: inc/classes/admin/settings/class-page.php:1024 +#: inc/classes/admin/settings/class-page.php:1023 msgid "Disable WordPress embeds" msgstr "Désactiver les insertions de WordPress" -#: inc/classes/admin/settings/class-page.php:1034 +#: inc/classes/admin/settings/class-page.php:1033 #: inc/classes/subscriber/Media/class-webp-subscriber.php:362 msgid "Enable WebP caching" msgstr "Activer le caching WebP" -#: inc/classes/admin/settings/class-page.php:1057 -#: inc/classes/admin/settings/class-page.php:1067 +#: inc/classes/admin/settings/class-page.php:1056 +#: inc/classes/admin/settings/class-page.php:1066 #: inc/deprecated/deprecated.php:1776 #: views/settings/page-sections/tutorials.php:30 msgid "Preload" msgstr "Préchargement" -#: inc/classes/admin/settings/class-page.php:1058 +#: inc/classes/admin/settings/class-page.php:1057 msgid "Generate cache files" msgstr "Générer les fichiers du cache" -#: inc/classes/admin/settings/class-page.php:1070 +#: inc/classes/admin/settings/class-page.php:1069 #, php-format msgid "" "When you enable preloading WP Rocket will generate the cache starting with " @@ -1338,11 +1512,11 @@ msgstr "" "manuellement activé à partir de la barre d'administration ou à partir du " "%1$stableau de bord WP Rocket%2$s." -#: inc/classes/admin/settings/class-page.php:1078 +#: inc/classes/admin/settings/class-page.php:1077 msgid "Prefetch DNS Requests" msgstr "Préchargement des requêtes DNS" -#: inc/classes/admin/settings/class-page.php:1080 +#: inc/classes/admin/settings/class-page.php:1079 msgid "" "DNS prefetching can make external files load faster, especially on mobile " "networks" @@ -1350,27 +1524,27 @@ msgstr "" "Le préchargement des requêtes DNS peut permettre aux ressources externes de " "charger plus rapidement, surtout sur les réseaux mobiles." -#: inc/classes/admin/settings/class-page.php:1094 +#: inc/classes/admin/settings/class-page.php:1093 msgid "Activate Preloading" msgstr "Activer le pré-chargement" -#: inc/classes/admin/settings/class-page.php:1113 +#: inc/classes/admin/settings/class-page.php:1112 msgid "Activate sitemap-based cache preloading" msgstr "Activer le préchargement du sitemap selon votre sitemap" -#: inc/classes/admin/settings/class-page.php:1132 +#: inc/classes/admin/settings/class-page.php:1131 msgid "Sitemaps for preloading" msgstr "Sitemap pour le préchargement" -#: inc/classes/admin/settings/class-page.php:1136 +#: inc/classes/admin/settings/class-page.php:1135 msgid "Specify XML sitemap(s) to be used for preloading" msgstr "Indiquez la ou les sitemap(s) XML à utiliser pour le préchargemen" -#: inc/classes/admin/settings/class-page.php:1146 +#: inc/classes/admin/settings/class-page.php:1145 msgid "URLs to prefetch" msgstr "URLs à précharger" -#: inc/classes/admin/settings/class-page.php:1147 +#: inc/classes/admin/settings/class-page.php:1146 msgid "" "Specify external hosts to be prefetched (no http:, one per " "line)" @@ -1378,47 +1552,47 @@ msgstr "" "Indiquez les hôtes externes à précharger (sans http:, un par " "ligne)" -#: inc/classes/admin/settings/class-page.php:1170 +#: inc/classes/admin/settings/class-page.php:1169 msgid "Advanced Rules" msgstr "Règles avancées" -#: inc/classes/admin/settings/class-page.php:1171 +#: inc/classes/admin/settings/class-page.php:1170 msgid "Fine-tune cache rules" msgstr "Affiner les règles du cache" -#: inc/classes/admin/settings/class-page.php:1180 +#: inc/classes/admin/settings/class-page.php:1179 msgid "" "Sensitive pages like custom login/logout URLs should be excluded from cache." msgstr "" "Les pages sensibles telles que les URLs de connexion / déconnexion " "personnalisés doivent être exclus du cache." -#: inc/classes/admin/settings/class-page.php:1183 +#: inc/classes/admin/settings/class-page.php:1182 msgctxt "plugin name" msgid "WooCommerce" msgstr "WooCommerce" -#: inc/classes/admin/settings/class-page.php:1185 +#: inc/classes/admin/settings/class-page.php:1184 msgctxt "plugin name" msgid "Easy Digital Downloads" msgstr "Easy Digital Downloads" -#: inc/classes/admin/settings/class-page.php:1187 +#: inc/classes/admin/settings/class-page.php:1186 msgctxt "plugin name" msgid "iThemes Exchange" msgstr "iThemes Exchange" -#: inc/classes/admin/settings/class-page.php:1189 +#: inc/classes/admin/settings/class-page.php:1188 msgctxt "plugin name" msgid "Jigoshop" msgstr "Jigoshop" -#: inc/classes/admin/settings/class-page.php:1191 +#: inc/classes/admin/settings/class-page.php:1190 msgctxt "plugin name" msgid "WP-Shop" msgstr "WP-Shop" -#: inc/classes/admin/settings/class-page.php:1197 +#: inc/classes/admin/settings/class-page.php:1196 #, php-format msgid "" "
    Cart, checkout and \"my account\" pages set in " @@ -1428,15 +1602,15 @@ msgstr "" "%1$s%2$s%3$s seront automatiquement détectées et exclues du" " cache par défaut." -#: inc/classes/admin/settings/class-page.php:1218 +#: inc/classes/admin/settings/class-page.php:1217 msgid "Never Cache Cookies" msgstr "Ne jamais mettre en cache ces témoins" -#: inc/classes/admin/settings/class-page.php:1237 +#: inc/classes/admin/settings/class-page.php:1236 msgid "Cache Query String(s)" msgstr "Cacher les “Query String(s)”" -#: inc/classes/admin/settings/class-page.php:1240 +#: inc/classes/admin/settings/class-page.php:1239 #, php-format msgid "" "%1$sCache for query strings%2$s enables you to force caching for specific " @@ -1445,15 +1619,15 @@ msgstr "" "%1$sCacher les “Query Strings”%2$s vous permet de forcer la mise en cache de" " paramètres GET spécifiques." -#: inc/classes/admin/settings/class-page.php:1254 +#: inc/classes/admin/settings/class-page.php:1253 msgid "" "Specify URLs of pages or posts that should never be cached (one per line)" msgstr "" "Indiquez les URLs des pages ou articles qui doivent être exclus de la mise " "en cache (un par ligne)" -#: inc/classes/admin/settings/class-page.php:1255 -#: inc/classes/admin/settings/class-page.php:1283 +#: inc/classes/admin/settings/class-page.php:1254 +#: inc/classes/admin/settings/class-page.php:1282 msgid "" "The domain part of the URL will be stripped automatically.
    Use (.*) " "wildcards to address multiple URLs under a given path." @@ -1462,7 +1636,7 @@ msgstr "" "expressions régulières (.*) pour exclure plusieurs URLs pour un chemin " "donné." -#: inc/classes/admin/settings/class-page.php:1264 +#: inc/classes/admin/settings/class-page.php:1263 msgid "" "Specify the IDs of cookies that, when set in the visitor's browser, should " "prevent a page from getting cached (one per line)" @@ -1471,20 +1645,20 @@ msgstr "" "navigateur du visiteur, devraient empêcher la mise en cache de la page (un " "par ligne)" -#: inc/classes/admin/settings/class-page.php:1272 +#: inc/classes/admin/settings/class-page.php:1271 msgid "" "Specify user agent strings that should never see cached pages (one per line)" msgstr "" "Indiquez les chaînes des agents utilisateurs qui ne devraient jamais voir " "les pages mises en cache (une par ligne)" -#: inc/classes/admin/settings/class-page.php:1273 +#: inc/classes/admin/settings/class-page.php:1272 msgid "Use (.*) wildcards to detect parts of UA strings." msgstr "" "Utilisez les expressions régulières (.*) pour détecter les parties des " "chaînes des agents utilisateurs." -#: inc/classes/admin/settings/class-page.php:1282 +#: inc/classes/admin/settings/class-page.php:1281 msgid "" "Specify URLs you always want purged from cache whenever you update any post " "or page (one per line)" @@ -1492,25 +1666,25 @@ msgstr "" "Indiquez les URLs dont vous voulez systématiquement vider le cache lorsque " "vous mettez à jour n'importe quel article ou page (une par ligne)" -#: inc/classes/admin/settings/class-page.php:1291 +#: inc/classes/admin/settings/class-page.php:1290 msgid "Specify query strings for caching (one per line)" msgstr "" "Indiquez les “query strings” qui peuvent être mises en cache (une par ligne)" -#: inc/classes/admin/settings/class-page.php:1319 +#: inc/classes/admin/settings/class-page.php:1318 #: inc/deprecated/deprecated.php:1775 msgid "Database" msgstr "Base de données" -#: inc/classes/admin/settings/class-page.php:1320 +#: inc/classes/admin/settings/class-page.php:1319 msgid "Optimize, reduce bloat" msgstr "Optimiser & nettoyer" -#: inc/classes/admin/settings/class-page.php:1329 +#: inc/classes/admin/settings/class-page.php:1328 msgid "Post Cleanup" msgstr "Nettoyage des contenus" -#: inc/classes/admin/settings/class-page.php:1331 +#: inc/classes/admin/settings/class-page.php:1330 msgid "" "Post revisions and drafts will be permanently deleted. Do not use this " "option if you need to retain revisions or drafts." @@ -1518,19 +1692,19 @@ msgstr "" "Les révisions et les brouillons seront supprimés définitivement. N'utilisez " "pas cette option si vous devez conserver vos révisions et brouillons." -#: inc/classes/admin/settings/class-page.php:1339 +#: inc/classes/admin/settings/class-page.php:1338 msgid "Comments Cleanup" msgstr "Nettoyage des commentaires" -#: inc/classes/admin/settings/class-page.php:1341 +#: inc/classes/admin/settings/class-page.php:1340 msgid "Spam and trashed comments will be permanently deleted." msgstr "Les Spams et les commentaires mis à la corbeille seront supprimés" -#: inc/classes/admin/settings/class-page.php:1345 +#: inc/classes/admin/settings/class-page.php:1344 msgid "Transients Cleanup" msgstr "Nettoyage des transients" -#: inc/classes/admin/settings/class-page.php:1347 +#: inc/classes/admin/settings/class-page.php:1346 msgid "" "Transients are temporary options; they are safe to remove. They will be " "automatically regenerated as your plugins require them." @@ -1539,107 +1713,107 @@ msgstr "" "danger. Elles seront automatiquement régénérées si vos extensions en ont " "besoin." -#: inc/classes/admin/settings/class-page.php:1351 +#: inc/classes/admin/settings/class-page.php:1350 msgid "Database Cleanup" msgstr "Nettoyage de la base de données" -#: inc/classes/admin/settings/class-page.php:1353 +#: inc/classes/admin/settings/class-page.php:1352 msgid "Reduces overhead of database tables" msgstr "Récupère l’espace inutilisé des tables de la base de données" -#: inc/classes/admin/settings/class-page.php:1357 +#: inc/classes/admin/settings/class-page.php:1356 msgid "Automatic cleanup" msgstr "Nettoyage automatique" -#: inc/classes/admin/settings/class-page.php:1370 +#: inc/classes/admin/settings/class-page.php:1369 #, php-format msgid "%s revision in your database." msgid_plural "%s revisions in your database." msgstr[0] "%s révision dans votre base de données." msgstr[1] "%s révisions dans votre base de données." -#: inc/classes/admin/settings/class-page.php:1380 +#: inc/classes/admin/settings/class-page.php:1379 #, php-format msgid "%s draft in your database." msgid_plural "%s drafts in your database." msgstr[0] "%s brouillon dans votre base de données." msgstr[1] "%s brouillons dans votre base de données." -#: inc/classes/admin/settings/class-page.php:1390 +#: inc/classes/admin/settings/class-page.php:1389 #, php-format msgid "%s trashed post in your database." msgid_plural "%s trashed posts in your database." msgstr[0] "%s articles à la corbeille dans votre base de données." msgstr[1] "%sarticles à la corbeille dans votre base de données." -#: inc/classes/admin/settings/class-page.php:1400 +#: inc/classes/admin/settings/class-page.php:1399 #, php-format msgid "%s spam comment in your database." msgid_plural "%s spam comments in your database." msgstr[0] "%s commentaire de SPAM dans votre base de données." msgstr[1] "%s commentaires de SPAM dans votre base de données." -#: inc/classes/admin/settings/class-page.php:1410 +#: inc/classes/admin/settings/class-page.php:1409 #, php-format msgid "%s trashed comment in your database." msgid_plural "%s trashed comments in your database." msgstr[0] "%s commentaire à la corbeille dans votre base de données." msgstr[1] "%s commentaires à la corbeille dans votre base de données." -#: inc/classes/admin/settings/class-page.php:1420 +#: inc/classes/admin/settings/class-page.php:1419 #, php-format msgid "%s expired transient in your database." msgid_plural "%s expired transients in your database." msgstr[0] "%s transient expiré dans votre base de données." msgstr[1] "%s transients expirés dans votre base de données." -#: inc/classes/admin/settings/class-page.php:1428 +#: inc/classes/admin/settings/class-page.php:1427 msgid "All transients" msgstr "Tous les transients" -#: inc/classes/admin/settings/class-page.php:1430 +#: inc/classes/admin/settings/class-page.php:1429 #, php-format msgid "%s transient in your database." msgid_plural "%s transients in your database." msgstr[0] "%s transient dans votre base de données." msgstr[1] "%s transients dans votre base de données." -#: inc/classes/admin/settings/class-page.php:1438 +#: inc/classes/admin/settings/class-page.php:1437 msgid "Optimize Tables" msgstr "Optimiser les tables" -#: inc/classes/admin/settings/class-page.php:1440 +#: inc/classes/admin/settings/class-page.php:1439 #, php-format msgid "%s table to optimize in your database." msgid_plural "%s tables to optimize in your database." msgstr[0] "%s table à optimiser dans votre base de données." msgstr[1] "%s tables à optimiser dans votre base de données." -#: inc/classes/admin/settings/class-page.php:1451 +#: inc/classes/admin/settings/class-page.php:1450 msgid "Schedule Automatic Cleanup" msgstr "Planifier le nettoyage automatique" -#: inc/classes/admin/settings/class-page.php:1463 +#: inc/classes/admin/settings/class-page.php:1462 msgid "Frequency" msgstr "Fréquence" -#: inc/classes/admin/settings/class-page.php:1471 +#: inc/classes/admin/settings/class-page.php:1470 msgid "Daily" msgstr "Quotidien" -#: inc/classes/admin/settings/class-page.php:1472 +#: inc/classes/admin/settings/class-page.php:1471 msgid "Weekly" msgstr "Hebdomadaire" -#: inc/classes/admin/settings/class-page.php:1473 +#: inc/classes/admin/settings/class-page.php:1472 msgid "Monthly" msgstr "Mensuel" -#: inc/classes/admin/settings/class-page.php:1493 +#: inc/classes/admin/settings/class-page.php:1492 msgid "Integrate your CDN" msgstr "Intégrer votre CDN" -#: inc/classes/admin/settings/class-page.php:1505 +#: inc/classes/admin/settings/class-page.php:1504 msgid "" "All URLs of static files (CSS, JS, images) will be rewritten to the CNAME(s)" " you provide." @@ -1647,7 +1821,7 @@ msgstr "" "Tous les URLs de vos fichiers statiques (CSS, JS, images) seront ré-écrits " "avec le CNAME fourni." -#: inc/classes/admin/settings/class-page.php:1507 +#: inc/classes/admin/settings/class-page.php:1506 #, php-format msgid "" "Not required for services like Cloudflare and Sucuri. Please see our " @@ -1656,7 +1830,7 @@ msgstr "" "Non requis pour les services tels que Cloudflare et Sucuri. Veuillez " "consulter nos %1$sAjouts%2$s disponibles." -#: inc/classes/admin/settings/class-page.php:1548 +#: inc/classes/admin/settings/class-page.php:1547 #, php-format msgid "" "%1$s%2$s Add-on%3$s is currently enabled. Configuration of the CDN settings " @@ -1671,28 +1845,28 @@ msgstr[1] "" "%1$s%2$s Des ajouts%3$s sont présentement activés. La configuration des " "réglages du CDN n'est pas requise pour que %2$s fonctionne sur votre site." -#: inc/classes/admin/settings/class-page.php:1573 +#: inc/classes/admin/settings/class-page.php:1572 msgid "Enable Content Delivery Network" msgstr "Activer le Content Delivery Network." -#: inc/classes/admin/settings/class-page.php:1582 +#: inc/classes/admin/settings/class-page.php:1581 #: inc/classes/subscriber/CDN/RocketCDN/AdminPageSubscriber.php:147 msgid "CDN CNAME(s)" msgstr "CNAME(s) du CDN" -#: inc/classes/admin/settings/class-page.php:1583 +#: inc/classes/admin/settings/class-page.php:1582 #: inc/classes/subscriber/CDN/RocketCDN/AdminPageSubscriber.php:148 msgid "Specify the CNAME(s) below" msgstr "Indiquez le(s) CNAME(s) ci-dessous" -#: inc/classes/admin/settings/class-page.php:1590 +#: inc/classes/admin/settings/class-page.php:1589 msgid "" "Specify URL(s) of files that should not get served via CDN (one per line)." msgstr "" "Indiquez les URLs des fichiers qui ne doivent pas être servies par le CDN " "(une par ligne)." -#: inc/classes/admin/settings/class-page.php:1591 +#: inc/classes/admin/settings/class-page.php:1590 msgid "" "The domain part of the URL will be stripped automatically.
    Use (.*) " "wildcards to exclude all files of a given file type located at a specific " @@ -1702,16 +1876,16 @@ msgstr "" "expressions régulières (.*) pour exclure plusieurs URLs pour un chemin " "donné." -#: inc/classes/admin/settings/class-page.php:1615 -#: inc/classes/admin/settings/class-page.php:1623 +#: inc/classes/admin/settings/class-page.php:1614 +#: inc/classes/admin/settings/class-page.php:1622 msgid "Heartbeat" msgstr "Battement de coeur" -#: inc/classes/admin/settings/class-page.php:1616 +#: inc/classes/admin/settings/class-page.php:1615 msgid "Control WordPress Heartbeat API" msgstr "Contrôler l'API du battement de coeur de WordPress" -#: inc/classes/admin/settings/class-page.php:1624 +#: inc/classes/admin/settings/class-page.php:1623 msgid "" "Reducing or disabling the Heartbeat API’s activity can help save some of " "your server’s resources." @@ -1719,11 +1893,11 @@ msgstr "" "Réduire ou désactiver l'API du signal de battement de coeur peut aider à " "économier des ressources serveur." -#: inc/classes/admin/settings/class-page.php:1633 +#: inc/classes/admin/settings/class-page.php:1632 msgid "Reduce or disable Heartbeat activity" msgstr "Réduire ou désactiver le signal de battement de coeur" -#: inc/classes/admin/settings/class-page.php:1634 +#: inc/classes/admin/settings/class-page.php:1633 msgid "" "Reducing activity will change Heartbeat frequency from one hit each minute " "to one hit every 2 minutes." @@ -1731,55 +1905,55 @@ msgstr "" "Réduire l'activité changera la fréquence de battement de coeur de une " "pulsation par minute à une pulsation aux 2 minutes." -#: inc/classes/admin/settings/class-page.php:1634 +#: inc/classes/admin/settings/class-page.php:1633 msgid "" "Disabling Heartbeat entirely may break plugins and themes using this API." msgstr "" "Désactiver le battement de coeur complètement peut briser les extensions et " "thèmes utilisant cet API." -#: inc/classes/admin/settings/class-page.php:1648 +#: inc/classes/admin/settings/class-page.php:1647 msgid "Do not limit" msgstr "Ne pas limiter" -#: inc/classes/admin/settings/class-page.php:1649 +#: inc/classes/admin/settings/class-page.php:1648 msgid "Reduce activity" msgstr "Réduire l'activité" -#: inc/classes/admin/settings/class-page.php:1650 +#: inc/classes/admin/settings/class-page.php:1649 msgid "Disable" msgstr "Désactiver" -#: inc/classes/admin/settings/class-page.php:1658 +#: inc/classes/admin/settings/class-page.php:1657 msgid "Control Heartbeat" msgstr "Contrôler le battement de coeur" -#: inc/classes/admin/settings/class-page.php:1667 +#: inc/classes/admin/settings/class-page.php:1666 msgid "Behavior in backend" msgstr "Comportement dans le tableau de bord" -#: inc/classes/admin/settings/class-page.php:1674 +#: inc/classes/admin/settings/class-page.php:1673 msgid "Behavior in post editor" msgstr "Comportement dans l'éditeur" -#: inc/classes/admin/settings/class-page.php:1680 +#: inc/classes/admin/settings/class-page.php:1679 msgid "Behavior in frontend" msgstr "Comportement sur le site" -#: inc/classes/admin/settings/class-page.php:1699 +#: inc/classes/admin/settings/class-page.php:1698 #: views/settings/page-sections/tutorials.php:36 msgid "Add-ons" msgstr "Ajouts" -#: inc/classes/admin/settings/class-page.php:1700 +#: inc/classes/admin/settings/class-page.php:1699 msgid "Add more features" msgstr "Ajouter des fonctionnalités" -#: inc/classes/admin/settings/class-page.php:1707 +#: inc/classes/admin/settings/class-page.php:1706 msgid "One-click Rocket Add-ons" msgstr "Ajouts Rockets en un clic" -#: inc/classes/admin/settings/class-page.php:1708 +#: inc/classes/admin/settings/class-page.php:1707 msgid "" "One-Click Add-ons are features extending available options without " "configuration needed. Switch the option \"on\" to enable from this screen." @@ -1788,25 +1962,25 @@ msgstr "" "augmentant les options déjà disponibles sans besoin de configuration. Mettez" " l'option à \"ON\" pour l'activer depuis cet écran." -#: inc/classes/admin/settings/class-page.php:1718 +#: inc/classes/admin/settings/class-page.php:1717 msgid "Rocket Add-ons" msgstr "Ajouts Rocket" -#: inc/classes/admin/settings/class-page.php:1719 +#: inc/classes/admin/settings/class-page.php:1718 msgid "Rocket Add-ons are complementary features extending available options." msgstr "" "Les ajouts Rockets offrent des fonctionnalités complémentaires augmentant " "les options déjà disponibles." -#: inc/classes/admin/settings/class-page.php:1732 +#: inc/classes/admin/settings/class-page.php:1731 msgid "Google Tracking" msgstr "Suivi Google" -#: inc/classes/admin/settings/class-page.php:1738 +#: inc/classes/admin/settings/class-page.php:1737 msgid "Improve browser caching for Google Analytics" msgstr "Améliore le cache navigateur pour Google Analytics" -#: inc/classes/admin/settings/class-page.php:1740 +#: inc/classes/admin/settings/class-page.php:1739 #, php-format msgid "" "WP Rocket will host these Google scripts locally on your server to help " @@ -1817,15 +1991,15 @@ msgstr "" "aider à satisfaire la recommandation de PageSpeed ​​pour Exploiter la " "mise en cache du navigateur.
    %1$sEn savoir plus%2$s" -#: inc/classes/admin/settings/class-page.php:1755 +#: inc/classes/admin/settings/class-page.php:1754 msgid "Facebook Pixel" msgstr "Pixel Facebook" -#: inc/classes/admin/settings/class-page.php:1761 +#: inc/classes/admin/settings/class-page.php:1760 msgid "Improve browser caching for Facebook Pixel" msgstr "Améliorer le caching pour le pixel Facebook" -#: inc/classes/admin/settings/class-page.php:1763 +#: inc/classes/admin/settings/class-page.php:1762 #, php-format msgid "" "WP Rocket will host these Facebook Pixels locally on your server to help " @@ -1836,16 +2010,16 @@ msgstr "" " satisfaire aux recommendations de PageSpeed pour Leverage browser " "caching.
    %1$sPlus d'info%2$s" -#: inc/classes/admin/settings/class-page.php:1776 -#: inc/classes/admin/settings/class-page.php:1880 +#: inc/classes/admin/settings/class-page.php:1775 +#: inc/classes/admin/settings/class-page.php:1879 msgid "Cloudflare" msgstr "Cloudflare" -#: inc/classes/admin/settings/class-page.php:1782 +#: inc/classes/admin/settings/class-page.php:1781 msgid "Integrate your Cloudflare account with this add-on." msgstr "Intégrez votre compte Cloudflare avec cet add-on" -#: inc/classes/admin/settings/class-page.php:1783 +#: inc/classes/admin/settings/class-page.php:1782 msgid "" "Provide your account email, global API key, and domain to use options such " "as clearing the Cloudflare cache and enabling optimal settings with WP " @@ -1855,15 +2029,15 @@ msgstr "" "compte Cloudflare afin d’ajouter l’option de purger le cache Cloudflare et " "activer les réglages optimaux pour fonctionner avec WP Rocket." -#: inc/classes/admin/settings/class-page.php:1817 +#: inc/classes/admin/settings/class-page.php:1816 msgid "Varnish" msgstr "Varnish" -#: inc/classes/admin/settings/class-page.php:1823 +#: inc/classes/admin/settings/class-page.php:1822 msgid "If Varnish runs on your server, you must activate this add-on." msgstr "Si votre serveur utilise Varnish, vous devez activer cet add-on" -#: inc/classes/admin/settings/class-page.php:1825 +#: inc/classes/admin/settings/class-page.php:1824 #, php-format msgid "" "Varnish cache will be purged each time WP Rocket clears its cache to ensure " @@ -1873,11 +2047,11 @@ msgstr "" "pour vous assurer que le contenu soit toujours à jour.
    %1$sEn savoir " "plus%2$s" -#: inc/classes/admin/settings/class-page.php:1839 +#: inc/classes/admin/settings/class-page.php:1838 msgid "Clear the Sucuri cache when WP Rocket’s cache is cleared." msgstr "Vider le cache Sucuri quand le cache de WP Rocket est vidé." -#: inc/classes/admin/settings/class-page.php:1842 +#: inc/classes/admin/settings/class-page.php:1841 msgid "" "Provide your API key to clear the Sucuri cache when WP Rocket’s cache is " "cleared." @@ -1885,48 +2059,48 @@ msgstr "" "Fournir votre clé d'API afin de vider le cache Sucuri quand le cache de WP " "Rocket sera vidé." -#: inc/classes/admin/settings/class-page.php:1850 -#: inc/classes/admin/settings/class-page.php:2000 +#: inc/classes/admin/settings/class-page.php:1849 +#: inc/classes/admin/settings/class-page.php:1999 msgid "Sucuri" msgstr "Sucuri" -#: inc/classes/admin/settings/class-page.php:1856 +#: inc/classes/admin/settings/class-page.php:1855 msgid "Synchronize Sucuri cache with this add-on." msgstr "Synchronisez le cache Sucuri avec cet add-on." -#: inc/classes/admin/settings/class-page.php:1897 +#: inc/classes/admin/settings/class-page.php:1896 msgid "Cloudflare credentials" msgstr "Accès Cloudflare" -#: inc/classes/admin/settings/class-page.php:1906 +#: inc/classes/admin/settings/class-page.php:1905 msgid "Cloudflare settings" msgstr "Réglages Cloudflare" -#: inc/classes/admin/settings/class-page.php:1920 +#: inc/classes/admin/settings/class-page.php:1919 msgctxt "Cloudflare" msgid "Global API key:" msgstr "Clé d’API globale :" -#: inc/classes/admin/settings/class-page.php:1921 +#: inc/classes/admin/settings/class-page.php:1920 msgctxt "Cloudflare" msgid "Find your API key" msgstr "Trouver votre clé d’API" -#: inc/classes/admin/settings/class-page.php:1933 +#: inc/classes/admin/settings/class-page.php:1932 msgctxt "Cloudflare" msgid "Account email" msgstr "Courriel du compte" -#: inc/classes/admin/settings/class-page.php:1942 +#: inc/classes/admin/settings/class-page.php:1941 msgctxt "Cloudflare" msgid "Zone ID" msgstr "Identifiant de zone" -#: inc/classes/admin/settings/class-page.php:1952 +#: inc/classes/admin/settings/class-page.php:1951 msgid "Development mode" msgstr "Mode développement" -#: inc/classes/admin/settings/class-page.php:1954 +#: inc/classes/admin/settings/class-page.php:1953 #, php-format msgid "" "Temporarily activate development mode on your website. This setting will " @@ -1935,11 +2109,11 @@ msgstr "" "Active temporairement le mode développement sur votre site. Ce réglage se " "désactivera automatiquement après 3 heures. %1$sEn savoir plus%2$s" -#: inc/classes/admin/settings/class-page.php:1962 +#: inc/classes/admin/settings/class-page.php:1961 msgid "Optimal settings" msgstr "Réglages optimaux" -#: inc/classes/admin/settings/class-page.php:1963 +#: inc/classes/admin/settings/class-page.php:1962 msgid "" "Automatically enhances your Cloudflare configuration for speed, performance " "grade and compatibility." @@ -1947,11 +2121,11 @@ msgstr "" "Améliore automatiquement votre configuration Cloudflare pour la rapidité de " "chargement, les notes de performance et la compatibilité." -#: inc/classes/admin/settings/class-page.php:1971 +#: inc/classes/admin/settings/class-page.php:1970 msgid "Relative protocol" msgstr "Relatif au protocole" -#: inc/classes/admin/settings/class-page.php:1972 +#: inc/classes/admin/settings/class-page.php:1971 msgid "" "Should only be used with Cloudflare's flexible SSL feature. URLs of static " "files (CSS, JS, images) will be rewritten to use // instead of http:// or " @@ -1961,11 +2135,11 @@ msgstr "" "URLs de vos fichiers statiques (CSS, JS, images) seront ré-écrits pour " "utiliser // au lieu de http:// ou https://." -#: inc/classes/admin/settings/class-page.php:2013 +#: inc/classes/admin/settings/class-page.php:2012 msgid "Sucuri credentials" msgstr "Accès Sucuri" -#: inc/classes/admin/settings/class-page.php:2026 +#: inc/classes/admin/settings/class-page.php:2025 msgctxt "Sucuri" msgid "" "Firewall API key (for plugin), must be in format {32 characters}/{32 " @@ -1974,7 +2148,7 @@ msgstr "" "La clé d'API du pare-feu (pour cette extension) doit être au format " "{32 caractères}/{32 caractères}:" -#: inc/classes/admin/settings/class-page.php:2027 +#: inc/classes/admin/settings/class-page.php:2026 msgctxt "Sucuri" msgid "Find your API key" msgstr "Trouver votre clé d’API" @@ -1984,7 +2158,7 @@ msgstr "Trouver votre clé d’API" msgid "Upload file and import settings" msgstr "Envoyer le fichier et importer les réglages" -#: inc/classes/admin/settings/class-settings.php:387 +#: inc/classes/admin/settings/class-settings.php:381 msgid "" "Sucuri Add-on: The API key for the Sucuri firewall must be in format " "{32 characters}/{32 characters}." @@ -1992,7 +2166,7 @@ msgstr "" "Ajout Sucuri : la clé d'API pour le pare-feu Sucuri doit être au format " "{32 caractères}/{32 caractères}." -#: inc/classes/admin/settings/class-settings.php:478 +#: inc/classes/admin/settings/class-settings.php:472 #: inc/deprecated/deprecated.php:1245 msgid "Settings saved." msgstr "Réglages sauvegardés." @@ -2078,130 +2252,6 @@ msgstr "" msgid "Critical CSS for %s generated." msgstr "Le CSS critique pour %s a été généré." -#: inc/classes/preload/class-homepage.php:152 -#, php-format -msgid "" -"Preload encountered an error. Could not gather links on %1$s because of the " -"following error: %2$s. %3$sLearn more%4$s." -msgstr "" -"Le pré-chargement a rencontré une erreur. Impossible de récupérer les liens " -"de %1$s dû à l'erreur suivante : %2$s. %3$sPlus d'info%4$s." - -#: inc/classes/preload/class-homepage.php:165 -#, php-format -msgid "" -"Preload encountered an error. %1$s is not accessible to due to the following" -" response code: %2$s. Security measures could be preventing access. " -"%3$sLearn more%4$s." -msgstr "" -"Le pré-chargement a rencontré une erreur. %1$s n'est pas accessible dû au " -"code de réponse suivant : %2$s. Des mesures de sécurité pourraient prévénir " -"l'accès. %3$sPlus d'info%4$s." - -#: inc/classes/preload/class-homepage.php:171 -#, php-format -msgid "" -"Preload encountered an error. %1$s is not accessible to due to the following" -" response code: 404. Please make sure your homepage is accessible in your " -"browser. %2$sLearn more%3$s." -msgstr "" -"Le pré-chargement a rencontré une erreur. %1$s n'est pas accessible dû au " -"code de réponse suivant : 404. Veuillez vous assurer que la page d'Accueil " -"est accessible à partir de votre navigateur. %2$sPlus d'info%3$s." - -#: inc/classes/preload/class-homepage.php:177 -#, php-format -msgid "" -"Preload encountered an error. %1$s is not accessible to due to the following" -" response code: 500. Please check with your web host about server access. " -"%2$sLearn more%3$s." -msgstr "" -"Le pré-chargement a rencontré une erreur. %1$s n'est pas accessible dû au " -"code de réponse suivant : 500. Veuillez vérifier avec votre hébergeur web " -"concernant l'accès à votre serveur. %2$sPlus d'info%3$s." - -#: inc/classes/preload/class-homepage.php:183 -#, php-format -msgid "" -"Preload encountered an error. Could not gather links on %1$s because it " -"returned the following response code: %2$s. %3$sLearn more%4$s." -msgstr "" -"Le pré-chargement a rencontré une erreur. Impossible de récupérer les liens " -"sur %1$s parce que le code d'erreur suivant a été retourné : %2$s. %3$sPlus " -"d'info%4$s." - -#: inc/classes/preload/class-sitemap.php:149 -#, php-format -msgid "" -"Sitemap preload encountered an error. Could not gather links on %1$s because" -" of the following error: %2$s. %3$sLearn more%4$s." -msgstr "" -"Le chargement du sitemap a rencontré une erreur. Impossible de récupérer les" -" liens sur %1$s à cause de l'erreur suivante : %2$s. %3$sPlus d'info%4$s." - -#: inc/classes/preload/class-sitemap.php:164 -#, php-format -msgid "" -"Sitemap preload encountered an error. %1$s is not accessible to due to the " -"following response code: %2$s. Security measures could be preventing access." -" %3$sLearn more%4$s." -msgstr "" -"Le chargement du sitemap a rencontré une erreur. %1$s n'est pas accessible " -"dû au messag d'erreur suivant : %2$s. Des mesures de sécurité pourraient " -"empêche l'accès. %3$sPlus d'info%4$s." - -#: inc/classes/preload/class-sitemap.php:169 -#, php-format -msgid "" -"Sitemap preload encountered an error. %1$s is not accessible to due to the " -"following response code: 404. Please make sure you entered the correct " -"sitemap URL and it is accessible in your browser. %2$sLearn more%3$s." -msgstr "" -"Le chargement du sitemap a rencontré une erreur. %1$s n'est pas accessible " -"dû au code d'erreur suivant : 404. Veuillez vous assurrer que vous avec " -"entré le bon URL pour le sitemap et qu'il est accessible à partir de votre " -"navigateur. %2$sPlus d'info%3$s." - -#: inc/classes/preload/class-sitemap.php:174 -#, php-format -msgid "" -"Sitemap preload encountered an error. %1$s is not accessible to due to the " -"following response code: 500. Please check with your web host about server " -"access. %2$sLearn more%3$s." -msgstr "" -"Le chargement du sitemap a rencontré une erreur. %1$s n'est pas accessible " -"dû au code d'erreur suivant : 500. Veuillez vérifier avec votre hébergeur " -"web concernant l'accès à votre serveur. %2$sPlus d'info%3$s." - -#: inc/classes/preload/class-sitemap.php:179 -#, php-format -msgid "" -"Sitemap preload encountered an error. Could not gather links on %1$s because" -" it returned the following response code: %2$s. %3$sLearn more%4$s." -msgstr "" -"Le chargement du sitemap a rencontré une erreur. Impossible de récupérer les" -" liens sur %1$s parce que le code d'erreur suivant a été retourné : %2$s. " -"%3$sPlus d'info%4$s." - -#: inc/classes/preload/class-sitemap.php:195 -#, php-format -msgid "" -"Sitemap preload encountered an error. Could not collect links from %1$s " -"because the file is empty. %2$sLearn more%3$s." -msgstr "" -"Le chargement du sitemap a rencontré une erreur. Impossible de récupérer les" -" liens sur %1$s parce que le fichier est vide. %2$sPlus d'info%3$s." - -#: inc/classes/preload/class-sitemap.php:216 -#, php-format -msgid "" -"Sitemap preload encountered an error. Could not collect links from %1$s " -"because of an error during the XML sitemap parsing. %2$sLearn more%3$s." -msgstr "" -"Le chargement du sitemap a rencontré une erreur. Impossible de récupérer les" -" liens sur %1$s à cause d'une erreur durant la lecture du sitemap XML. " -"%2$sPlus d'info%3$s." - #: inc/classes/subscriber/CDN/RocketCDN/AdminPageSubscriber.php:81 msgid "Next Billing Date" msgstr "Prochaine date de facturation" @@ -2335,19 +2385,11 @@ msgstr "" "WP Rocket va créer des fichier de cache séparés afin de servir vos images " "WebP" -#: inc/classes/subscriber/Optimization/class-critical-css-subscriber.php:82 +#: inc/classes/subscriber/Optimization/class-critical-css-subscriber.php:102 msgid "Critical CSS generation is currently running." msgstr "La génération du CSS critique est en cours." -#: inc/classes/subscriber/Optimization/class-critical-css-subscriber.php:87 -#: inc/classes/subscriber/preload/class-preload-subscriber.php:242 -#, php-format -msgid "Go to the %1$sWP Rocket settings%2$s page to track progress." -msgstr "" -"Allez à la page des %1$sparamètres WP Rocket %2$s afin d'en suivre " -"l'évolution." - -#: inc/classes/subscriber/Optimization/class-critical-css-subscriber.php:191 +#: inc/classes/subscriber/Optimization/class-critical-css-subscriber.php:223 #, php-format msgid "" "Critical CSS generation is currently running: %1$d of %2$d page types " @@ -2356,18 +2398,18 @@ msgstr "" "La génération du CSS critique est en cours : %1$d de %2$d de types de " "contenus complétés. (Rafraîchir pour voir la progression)" -#: inc/classes/subscriber/Optimization/class-critical-css-subscriber.php:242 +#: inc/classes/subscriber/Optimization/class-critical-css-subscriber.php:274 #, php-format msgid "Critical CSS generation finished for %1$d of %2$d page types." msgstr "" "La génération du CSS critique est terminée pour %1$d des %2$d types de " "contenus." -#: inc/classes/subscriber/Optimization/class-critical-css-subscriber.php:256 +#: inc/classes/subscriber/Optimization/class-critical-css-subscriber.php:288 msgid "Critical CSS generation encountered one or more errors." msgstr "La génération du CSS critique a rencontré une ou plusieurs erreur(s)." -#: inc/classes/subscriber/Optimization/class-critical-css-subscriber.php:256 +#: inc/classes/subscriber/Optimization/class-critical-css-subscriber.php:288 msgid "Learn more." msgstr "En savoir plus." @@ -2451,51 +2493,6 @@ msgstr "Tutoriels" msgid "Getting started and how to videos" msgstr "Bien démarrer et vidéos d'assistance" -#: inc/classes/subscriber/preload/class-preload-subscriber.php:237 -msgid "Preload: WP Rocket has started preloading your website." -msgstr "Pré-chargement : WP Rocket a démarré le pré-chargement de votre site" - -#: inc/classes/subscriber/preload/class-preload-subscriber.php:281 -#, php-format -msgid "" -"Preload: %1$s uncached page has now been preloaded. (refresh to see " -"progress)" -msgid_plural "" -"Preload: %1$s uncached pages have now been preloaded. (refresh to see " -"progress)" -msgstr[0] "" -"Préchargement : %1$s page n'étant pas dans le cache a maintenant été " -"préchargée. (rafraîchir pour constater le progrès)" -msgstr[1] "" -"Préchargement : %1$s pages n'étant pas dans le cache on maintenant été " -"préchargées. (rafraîchir pour constater le progrès)" - -#: inc/classes/subscriber/preload/class-preload-subscriber.php:290 -msgid "The following error happened during gathering of the URLs to preload:" -msgid_plural "" -"The following errors happened during gathering of the URLs to preload:" -msgstr[0] "" -"L'erreur suivante est survenue lors de la collecte des URLs à précharger :" -msgstr[1] "" -"Les erreurs suivantes sont survenues lors de la collecte des URLs à " -"précharger :" - -#: inc/classes/subscriber/preload/class-preload-subscriber.php:342 -#, php-format -msgid "Preload complete: %d pages have been cached." -msgstr "Pré-chargement complété : %d pages ont été mises en cache." - -#: inc/classes/subscriber/preload/class-sitemap-preload-subscriber.php:119 -#, php-format -msgid "" -"%1$sSimpleXML PHP extension%2$s is not enabled on your server. Please " -"contact your host to enable it before running sitemap-based cache " -"preloading." -msgstr "" -"%1$sL'extension PHP SimpleXML%2$s n'est pas activée sur votre serveur. " -"Veuillez contacter votre hébergeur afin qu'il l'active avant de pouvoir " -"utiliser le pré-chargement du cache par sitemap." - #: inc/classes/subscriber/third-party/plugins/Optimization/class-hummingbird-subscriber.php:77 #, php-format msgctxt "Hummingbird notice" @@ -2729,7 +2726,16 @@ msgstr "Choisissez un domaine dans la liste" msgid "No domain available in your Cloudflare account" msgstr "Aucun domaine disponible dans votre compte Cloudflare" -#: inc/deprecated/3.5.php:30 +#: inc/deprecated/3.5.php:66 inc/deprecated/3.5.php:190 +msgid "" +"Curl is disabled on your server. Please ask your host to enable it. This is " +"required for the Cloudflare Add-on to work correctly." +msgstr "" +"CURL est désactivé sur votre serveur. Veuillez demander à votre hébergeur de" +" l'activer. Ceci est requis pour que l'ajout Cloudflare fonctionne " +"correctement." + +#: inc/deprecated/3.5.php:74 #, php-format msgid "" "Cloudflare email, API key and Zone ID are not set. Read the " @@ -2738,7 +2744,7 @@ msgstr "" "Le courriel, la clé d'API et le Zone ID de Cloudflare de sont pas définis. " "Lisez la %1$sdocumentation%2$s pour plus d'assistance." -#: inc/deprecated/3.5.php:157 +#: inc/deprecated/3.5.php:201 #, php-format msgid "" "Cloudflare email and API key are not set. Read the %1$sdocumentation%2$s for" @@ -2747,7 +2753,7 @@ msgstr "" "Le courriel et la clé d'API de Cloudflare ne sont pas configurés. Lisez la " "%1$sdocumentation%2$s pour plus d'assistance." -#: inc/deprecated/3.5.php:222 +#: inc/deprecated/3.5.php:266 msgid "Connection to Cloudflare failed" msgstr "La connexion à Cloudflare a échoué" @@ -2923,7 +2929,7 @@ msgstr "Réglages de WP Rocket anonymisés :" msgid "Which WP Rocket settings are active" msgstr "Quels sont les réglages activés de WP Rocket" -#: inc/functions/options.php:540 inc/functions/options.php:579 +#: inc/functions/options.php:544 inc/functions/options.php:583 msgid "" "License validation failed. Our server could not resolve the request from " "your website." @@ -2931,7 +2937,7 @@ msgstr "" "Échec de la validation de la licence. Notre serveur ne peut compléter la " "requête de votre site web." -#: inc/functions/options.php:540 inc/functions/options.php:579 +#: inc/functions/options.php:544 inc/functions/options.php:583 #, php-format msgid "" "Try clicking %1$sSave Changes%2$s below. If the error persists, follow " @@ -2940,7 +2946,7 @@ msgstr "" "Essayez de cliquer %1$sSauvegarder les changements%2$s ci-dessous. Si " "l'erreur persiste, suivez %3$sce guide%4$s." -#: inc/functions/options.php:556 +#: inc/functions/options.php:560 msgid "" "License validation failed. You may be using a nulled version of the plugin. " "Please do the following:" @@ -2948,63 +2954,63 @@ msgstr "" "La validation de votre licence a échoué. Vous utilisez peut-être une version" " piratée de cette extension. Veuillez suivre les points suivants :" -#: inc/functions/options.php:556 inc/functions/options.php:598 +#: inc/functions/options.php:560 inc/functions/options.php:602 #, php-format msgid "Login to your WP Rocket %1$saccount%2$s" msgstr "Connectez-vous à votre %1$scompte%2$s WP Rocket" -#: inc/functions/options.php:556 inc/functions/options.php:598 +#: inc/functions/options.php:560 inc/functions/options.php:602 msgid "Download the zip file" msgstr "Télécharger le fichier ZIP" -#: inc/functions/options.php:556 inc/functions/options.php:598 +#: inc/functions/options.php:560 inc/functions/options.php:602 msgid "Reinstall" msgstr "Réinstaller" -#: inc/functions/options.php:556 +#: inc/functions/options.php:560 #, php-format msgid "" "If you do not have a WP Rocket account, please %1$spurchase a license%2$s." msgstr "" "Si vous n'avez pas de compte WP Rocket, svp %1$sacheter une licence%2$s." -#: inc/functions/options.php:564 +#: inc/functions/options.php:568 msgid "" "License validation failed. This user account does not exist in our database." msgstr "" "Échec de validation de la licence. Le compte d'usager n'existe pas dans " "notre base de données." -#: inc/functions/options.php:564 +#: inc/functions/options.php:568 msgid "To resolve, please contact support." msgstr "Pour résoudre, svp contacter le soutien technique." -#: inc/functions/options.php:572 +#: inc/functions/options.php:576 msgid "License validation failed. This user account is blacklisted." msgstr "" "Échec de validation de la licence. Ce compte usager est sur notre liste " "noire." -#: inc/functions/options.php:572 +#: inc/functions/options.php:576 #, php-format msgid "Please see %1$sthis guide%2$s for more info." msgstr "Veuillez consulter %1$sce guide%2$s pour plus d'info." -#: inc/functions/options.php:592 +#: inc/functions/options.php:596 msgid "Your license is not valid." msgstr "Votre licence n’est pas valide." -#: inc/functions/options.php:592 +#: inc/functions/options.php:596 #, php-format msgid "Make sure you have an active %1$sWP Rocket license%2$s." msgstr "Assurez-vous d'avoir une licence %1$sactive de WP Rocket %2$s." -#: inc/functions/options.php:594 +#: inc/functions/options.php:598 msgid "You have added as many sites as your current license allows." msgstr "" "Vous avez ajouté autant de sites que votre licence actuelle le permet." -#: inc/functions/options.php:594 +#: inc/functions/options.php:598 #, php-format msgid "" "Upgrade your %1$saccount%2$s or %3$stransfer your license%2$s to this " @@ -3013,25 +3019,25 @@ msgstr "" "Rehausser votre %1$scompte%2$s ou %3$stransférer votre licence%2$s à ce " "domaine." -#: inc/functions/options.php:596 +#: inc/functions/options.php:600 msgid "This website is not allowed." msgstr "Ce site n'est pas autorisé." -#: inc/functions/options.php:596 +#: inc/functions/options.php:600 #, php-format msgid "Please %1$scontact support%2$s." msgstr "Svp %1$scontacter le soutien technique%2$s." -#: inc/functions/options.php:598 +#: inc/functions/options.php:602 msgid "This license key is not recognized." msgstr "La clé de licence n'est pas reconnue." -#: inc/functions/options.php:598 +#: inc/functions/options.php:602 #, php-format msgid "If the issue persists, please %1$scontact support%2$s." msgstr "Si le problème persiste, svp %1$scontacter le soutien technique%2$s." -#: inc/functions/options.php:604 +#: inc/functions/options.php:608 #, php-format msgid "License validation failed: %s" msgstr "Échec de validation de la licence : %s" @@ -3327,7 +3333,7 @@ msgstr "On" #: views/settings/fields/one-click-addon.php:41 #: views/settings/fields/rocket-addon.php:32 -#: views/settings/fields/sliding-checkbox.php:26 views/settings/page.php:55 +#: views/settings/fields/sliding-checkbox.php:26 views/settings/page.php:56 msgctxt "Inactive state of checkbox" msgid "Off" msgstr "Off" @@ -3662,16 +3668,16 @@ msgstr "Réglages de WP Rocket" msgid "version %s" msgstr "version %s" -#: views/settings/page.php:56 +#: views/settings/page.php:57 msgid "Show Sidebar" msgstr "Afficher la colonne latérale" -#: views/settings/page.php:75 +#: views/settings/page.php:76 msgid "Thanks for choosing to participate in the WP Rocket beta program!" msgstr "" "Merci d'avoir choisi de participer dans le programme beta de WP Rocket!" -#: views/settings/page.php:76 +#: views/settings/page.php:77 msgid "" "A beta version is usually one that has new features and improvements, but we" " want to test it a little more before full launch." @@ -3680,7 +3686,7 @@ msgstr "" "améliorations, mais nous désirons la tester un peu plus avant le lancement " "officiel." -#: views/settings/page.php:77 +#: views/settings/page.php:78 msgid "" "We’d love it if you took our beta versions for a ride, but please keep in " "mind that it might be less stable than our other releases. Don’t worry, you " @@ -3690,7 +3696,7 @@ msgstr "" "tête que ceci pourrait être moins stable que nos autres versions. Aucune " "inquiétude, vous pouvez revenir à une version stable à tout moment." -#: views/settings/page.php:78 +#: views/settings/page.php:79 msgid "" "Your mission: please send all feedback about our beta versions, including " "bug reports, to support@wp-rocket.me" @@ -3698,17 +3704,17 @@ msgstr "" "Votre mission : veuillez nous rapporter vos commentaires à propos de nos " "versions beta, incluant les bogues trouvés, à support@wp-rocket.me" -#: views/settings/page.php:80 +#: views/settings/page.php:81 msgid "If you don’t want to join the beta program, simply close this window." msgstr "" "Si vous ne désirez pas joindre le programme beta, simplement fermer cette " "fenêtre." -#: views/settings/page.php:82 +#: views/settings/page.php:83 msgid "Activate Rocket Tester" msgstr "Activer Rocket Tester" -#: views/settings/page.php:93 +#: views/settings/page.php:94 msgid "" "Below is a detailed view of all data WP Rocket will collect if " "granted permission." @@ -3716,7 +3722,7 @@ msgstr "" "Vous trouverez ci-dessous une vue détaillée des données que WP Rocket " "recueillera si l'autorisation lui est accordée." -#: views/settings/page.php:96 +#: views/settings/page.php:97 msgid "" "WP Rocket will never transmit any domain names or email addresses (except " "for license validation), IP addresses, or third-party API keys." @@ -3725,7 +3731,7 @@ msgstr "" "(sauf pour la validation de licence), d'adresses IP ou de clés d’API tierce-" "partie." -#: views/settings/page.php:98 +#: views/settings/page.php:99 msgid "Activate Rocket analytics" msgstr "Activer analytiques de Rocket" diff --git a/languages/rocket-pt_BR.mo b/languages/rocket-pt_BR.mo index b2161b38c4..89cbc62e2a 100644 Binary files a/languages/rocket-pt_BR.mo and b/languages/rocket-pt_BR.mo differ diff --git a/languages/rocket-pt_BR.po b/languages/rocket-pt_BR.po index 07a1893a72..a872bb8049 100644 --- a/languages/rocket-pt_BR.po +++ b/languages/rocket-pt_BR.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: WP Rocket 3.4\n" "Report-Msgid-Bugs-To: http://wp-rocket.me/\n" -"POT-Creation-Date: 2020-03-02 09:37-0500\n" +"POT-Creation-Date: 2020-04-16 16:26-0400\n" "PO-Revision-Date: 2019-08-26 15:14+0000\n" "Last-Translator: Fabio Fava , 2020\n" "Language-Team: Portuguese (Brazil) (https://www.transifex.com/wp-media/teams/18133/pt_BR/)\n" @@ -34,11 +34,11 @@ msgstr "" "X-Poedit-SourceCharset: UTF-8\n" "X-Textdomain-Support: yes\n" -#: inc/3rd-party/hosting/flywheel.php:19 inc/3rd-party/hosting/godaddy.php:22 -#: inc/3rd-party/hosting/o2switch.php:21 -#: inc/3rd-party/hosting/pressidium.php:18 inc/3rd-party/hosting/savvii.php:22 -#: inc/3rd-party/hosting/wp-serveur.php:31 -#: inc/3rd-party/hosting/wpengine.php:22 +#: inc/3rd-party/hosting/flywheel.php:18 inc/3rd-party/hosting/godaddy.php:18 +#: inc/3rd-party/hosting/o2switch.php:17 +#: inc/3rd-party/hosting/pressidium.php:18 inc/3rd-party/hosting/savvii.php:18 +#: inc/3rd-party/hosting/wp-serveur.php:27 +#: inc/3rd-party/hosting/wpengine.php:18 #, php-format msgid "" "Your site is hosted on %s, we have enabled Varnish auto-purge for " @@ -47,7 +47,7 @@ msgstr "" "Seu site está hospedado em %s, habilitamos a auto-limpeza do Varnish para " "compatibilidade." -#: inc/3rd-party/hosting/kinsta.php:165 +#: inc/3rd-party/hosting/kinsta.php:161 #, php-format msgid "" "Your installation seems to be missing core Kinsta files managing Cache " @@ -102,34 +102,36 @@ msgstr "Sitemap XML do The SEO Framework" msgid "Yoast SEO XML sitemap" msgstr "Sitemap XML do Yoast SEO" -#: inc/Addon/Cloudflare/Cloudflare.php:95 inc/deprecated/3.5.php:22 -#: inc/deprecated/3.5.php:146 -msgid "" -"Curl is disabled on your server. Please ask your host to enable it. This is " -"required for the Cloudflare Add-on to work correctly." +#: inc/Addon/Cloudflare/APIClient.php:309 +msgid "Ops Cloudflare did not provide any reply. Please try again later." msgstr "" -"O Curl está desativado no seu servidor. Peça ao seu provedor para ativá-lo. " -"Isso é necessário para que o complemento do Cloudflare funcione " -"corretamente." +"O Cloudflare não forneceu nenhuma resposta. Tente novamente mais tarde." -#: inc/Addon/Cloudflare/Cloudflare.php:103 +#: inc/Addon/Cloudflare/APIClient.php:318 inc/deprecated/3.5.php:107 +#: inc/deprecated/3.5.php:164 +msgid "Incorrect Cloudflare email address or API key." +msgstr "Endereço de e-mail ou chave da API incorretos do Cloudflare" + +#: inc/Addon/Cloudflare/APIClient.php:322 +#: inc/Addon/Cloudflare/APIClient.php:335 +#: inc/Addon/Cloudflare/Cloudflare.php:112 +#: inc/Addon/Cloudflare/Cloudflare.php:144 +#: inc/classes/subscriber/Tools/class-detect-missing-tags-subscriber.php:157 +#: inc/deprecated/3.5.php:87 inc/deprecated/3.5.php:111 +#: inc/deprecated/3.5.php:124 inc/deprecated/3.5.php:152 +#: inc/deprecated/3.5.php:168 #, php-format -msgid "" -"Cloudflare email and/or API key are not set. Read the %1$sdocumentation%2$s " -"for further guidance." -msgstr "" -"O e-mail e/ou chave da API do Cloudflare não estão definidos. Leia a " -"%1$sdocumentação%2$s para maior orientação." +msgid "Read the %1$sdocumentation%2$s for further guidance." +msgstr "Leia a %1$sdocumentação%2$s para orientações adicionais." -#: inc/Addon/Cloudflare/Cloudflare.php:105 -#: inc/Addon/Cloudflare/Cloudflare.php:118 -#: inc/Addon/Cloudflare/Cloudflare.php:139 -#: inc/Addon/Cloudflare/Cloudflare.php:153 -#: inc/Addon/Cloudflare/Cloudflare.php:181 -#: inc/Addon/Cloudflare/Cloudflare.php:195 inc/deprecated/3.5.php:32 -#: inc/deprecated/3.5.php:45 inc/deprecated/3.5.php:69 -#: inc/deprecated/3.5.php:82 inc/deprecated/3.5.php:110 -#: inc/deprecated/3.5.php:126 inc/deprecated/3.5.php:159 +#: inc/Addon/Cloudflare/APIClient.php:324 +#: inc/Addon/Cloudflare/APIClient.php:337 +#: inc/Addon/Cloudflare/Cloudflare.php:101 +#: inc/Addon/Cloudflare/Cloudflare.php:114 +#: inc/Addon/Cloudflare/Cloudflare.php:146 inc/deprecated/3.5.php:76 +#: inc/deprecated/3.5.php:89 inc/deprecated/3.5.php:113 +#: inc/deprecated/3.5.php:126 inc/deprecated/3.5.php:154 +#: inc/deprecated/3.5.php:170 inc/deprecated/3.5.php:203 msgid "" "https://docs.wp-rocket.me/article/18-using-wp-rocket-with-" "cloudflare/?utm_source=wp_plugin&utm_medium=wp_rocket#add-on" @@ -137,117 +139,279 @@ msgstr "" "https://docs.wp-rocket.me/article/18-using-wp-rocket-with-" "cloudflare/?utm_source=wp_plugin&utm_medium=wp_rocket#add-on" -#: inc/Addon/Cloudflare/Cloudflare.php:112 inc/deprecated/3.5.php:39 -msgid "Missing Cloudflare Zone ID." -msgstr "Falta o ID da Zona do Cloudflare" +#: inc/Addon/Cloudflare/APIClient.php:331 inc/deprecated/3.5.php:120 +msgid "Incorrect Cloudflare Zone ID." +msgstr "ID incorreto da Zona do Cloudflare" -#: inc/Addon/Cloudflare/Cloudflare.php:116 -#: inc/Addon/Cloudflare/Cloudflare.php:137 -#: inc/Addon/Cloudflare/Cloudflare.php:151 -#: inc/Addon/Cloudflare/Cloudflare.php:179 -#: inc/Addon/Cloudflare/Cloudflare.php:193 -#: inc/classes/subscriber/Tools/class-detect-missing-tags-subscriber.php:157 -#: inc/deprecated/3.5.php:43 inc/deprecated/3.5.php:67 -#: inc/deprecated/3.5.php:80 inc/deprecated/3.5.php:108 -#: inc/deprecated/3.5.php:124 +#: inc/Addon/Cloudflare/Cloudflare.php:99 #, php-format -msgid "Read the %1$sdocumentation%2$s for further guidance." -msgstr "Leia a %1$sdocumentação%2$s para orientações adicionais." - -#: inc/Addon/Cloudflare/Cloudflare.php:133 -#: inc/Addon/Cloudflare/Cloudflare.php:190 inc/deprecated/3.5.php:63 -#: inc/deprecated/3.5.php:120 -msgid "Incorrect Cloudflare email address or API key." -msgstr "Endereço de e-mail ou chave da API incorretos do Cloudflare" +msgid "" +"Cloudflare email and/or API key are not set. Read the %1$sdocumentation%2$s " +"for further guidance." +msgstr "" +"O e-mail e/ou chave da API do Cloudflare não estão definidos. Leia a " +"%1$sdocumentação%2$s para maior orientação." -#: inc/Addon/Cloudflare/Cloudflare.php:147 inc/deprecated/3.5.php:76 -msgid "Incorrect Cloudflare Zone ID." -msgstr "ID incorreto da Zona do Cloudflare" +#: inc/Addon/Cloudflare/Cloudflare.php:108 inc/deprecated/3.5.php:83 +msgid "Missing Cloudflare Zone ID." +msgstr "Falta o ID da Zona do Cloudflare" -#: inc/Addon/Cloudflare/Cloudflare.php:175 inc/deprecated/3.5.php:104 +#: inc/Addon/Cloudflare/Cloudflare.php:140 inc/deprecated/3.5.php:148 msgid "It looks like your domain is not set up on Cloudflare." msgstr "Parece que o seu domínio não está configurado no Cloudflare" -#: inc/Addon/Cloudflare/Subscriber.php:215 inc/deprecated/3.5.php:538 +#: inc/Addon/Cloudflare/Subscriber.php:215 inc/deprecated/3.5.php:582 #, php-format msgid "WP Rocket: %s" msgstr "WP Rocket: %s" -#: inc/Addon/Cloudflare/Subscriber.php:220 inc/deprecated/3.5.php:543 +#: inc/Addon/Cloudflare/Subscriber.php:220 inc/deprecated/3.5.php:587 msgid "WP Rocket: Cloudflare cache successfully purged." msgstr "" "WP Rocket: O cache do Cloudflare foi limpo com sucesso." -#: inc/Addon/Cloudflare/Subscriber.php:375 -#: inc/Addon/Cloudflare/Subscriber.php:388 -#: inc/Addon/Cloudflare/Subscriber.php:394 -#: inc/Addon/Cloudflare/Subscriber.php:411 -#: inc/Addon/Cloudflare/Subscriber.php:421 -#: inc/Addon/Cloudflare/Subscriber.php:433 -#: inc/Addon/Cloudflare/Subscriber.php:439 +#: inc/Addon/Cloudflare/Subscriber.php:364 +#: inc/Addon/Cloudflare/Subscriber.php:370 +#: inc/Addon/Cloudflare/Subscriber.php:390 +#: inc/Addon/Cloudflare/Subscriber.php:401 +#: inc/Addon/Cloudflare/Subscriber.php:420 +#: inc/Addon/Cloudflare/Subscriber.php:426 +#: inc/Addon/Cloudflare/Subscriber.php:445 #: inc/Addon/Cloudflare/Subscriber.php:451 -#: inc/Addon/Cloudflare/Subscriber.php:457 -#: inc/Addon/Cloudflare/Subscriber.php:469 -#: inc/Addon/Cloudflare/Subscriber.php:475 inc/admin/options.php:176 +#: inc/Addon/Cloudflare/Subscriber.php:470 +#: inc/Addon/Cloudflare/Subscriber.php:476 +#: inc/Addon/Cloudflare/Subscriber.php:558 inc/admin/options.php:176 #: inc/classes/subscriber/Tools/class-detect-missing-tags-subscriber.php:148 msgid "WP Rocket: " msgstr "WP Rocket: " -#: inc/Addon/Cloudflare/Subscriber.php:388 +#: inc/Addon/Cloudflare/Subscriber.php:364 #, php-format msgid "Cloudflare development mode error: %s" msgstr "Erro no modo de desenvolvimento do Cloudflare: %s" -#: inc/Addon/Cloudflare/Subscriber.php:394 +#: inc/Addon/Cloudflare/Subscriber.php:370 #, php-format msgid "Cloudflare development mode %s" msgstr "Modo de desenvolvimento do Cloudflare %s" -#: inc/Addon/Cloudflare/Subscriber.php:411 +#: inc/Addon/Cloudflare/Subscriber.php:390 #, php-format msgid "Cloudflare cache level error: %s" msgstr "Erro no nível de Cache do Cloudflare: %s" -#: inc/Addon/Cloudflare/Subscriber.php:415 +#: inc/Addon/Cloudflare/Subscriber.php:395 msgctxt "Cloudflare caching level" msgid "Standard" msgstr "Padrão" -#: inc/Addon/Cloudflare/Subscriber.php:421 +#: inc/Addon/Cloudflare/Subscriber.php:401 #, php-format msgid "Cloudflare cache level set to %s" msgstr "Nível de cache do Cloudflare definido para %s" -#: inc/Addon/Cloudflare/Subscriber.php:433 +#: inc/Addon/Cloudflare/Subscriber.php:420 #, php-format msgid "Cloudflare minification error: %s" msgstr "Erro de minificação do Cloudflare: %s" -#: inc/Addon/Cloudflare/Subscriber.php:439 +#: inc/Addon/Cloudflare/Subscriber.php:426 #, php-format msgid "Cloudflare minification %s" msgstr "Minificação do Cloudflare %s" -#: inc/Addon/Cloudflare/Subscriber.php:451 +#: inc/Addon/Cloudflare/Subscriber.php:445 #, php-format msgid "Cloudflare rocket loader error: %s" msgstr "Erro no rocket loader do Cloudflare: %s" -#: inc/Addon/Cloudflare/Subscriber.php:457 +#: inc/Addon/Cloudflare/Subscriber.php:451 #, php-format msgid "Cloudflare rocket loader %s" msgstr "Rocket loader do Cloudflare %s" -#: inc/Addon/Cloudflare/Subscriber.php:469 +#: inc/Addon/Cloudflare/Subscriber.php:470 #, php-format msgid "Cloudflare browser cache error: %s" msgstr "Erro do cache de navegador no Cloudflare: %s" -#: inc/Addon/Cloudflare/Subscriber.php:475 +#: inc/Addon/Cloudflare/Subscriber.php:476 #, php-format msgid "Cloudflare browser cache set to %s seconds" msgstr "Cache de navegador do Cloudflare definido para %s segundos" +#: inc/Engine/Preload/Homepage.php:153 +#, php-format +msgid "" +"Preload encountered an error. Could not gather links on %1$s because of the " +"following error: %2$s. %3$sLearn more%4$s." +msgstr "" +"O pré-carregamento encontrou um erro. Não foi possível obter os links em " +"%1$s devido ao seguinte erro: %2$s. %3$sSaiba mais%4$s." + +#: inc/Engine/Preload/Homepage.php:166 +#, php-format +msgid "" +"Preload encountered an error. %1$s is not accessible to due to the following" +" response code: %2$s. Security measures could be preventing access. " +"%3$sLearn more%4$s." +msgstr "" +"O pré-carregamento encontrou um erro: %1$s não está acessível devido ao " +"seguinte código de resposta: %2$s. Medidas de segurança podem estar " +"impedindo o acesso. %3$sSaiba mais%4$s." + +#: inc/Engine/Preload/Homepage.php:172 +#, php-format +msgid "" +"Preload encountered an error. %1$s is not accessible to due to the following" +" response code: 404. Please make sure your homepage is accessible in your " +"browser. %2$sLearn more%3$s." +msgstr "" +"O pré-carregamento encontrou um erro. %1$s não está acessível devido ao " +"seguinte código de resposta: 404. Por favor certifique-se que sua homepage " +"está acessível no seu navegador. %2$sSaiba mais%3$s." + +#: inc/Engine/Preload/Homepage.php:178 +#, php-format +msgid "" +"Preload encountered an error. %1$s is not accessible to due to the following" +" response code: 500. Please check with your web host about server access. " +"%2$sLearn more%3$s." +msgstr "" +"O pré-carregamento encontrou um erro. %1$s não está acessível devido ao " +"seguinte código de resposta: 500. Por favor verifique com seu host web sobre" +" o acesso ao servidor. %2$sSaiba mais%3$s." + +#: inc/Engine/Preload/Homepage.php:184 +#, php-format +msgid "" +"Preload encountered an error. Could not gather links on %1$s because it " +"returned the following response code: %2$s. %3$sLearn more%4$s." +msgstr "" +"O pré-carregamento encontrou um erro: Não foi possível obter os links em " +"%1$s pois retornou o seguinte código de resposta: %2$s. %3$sSaiba mais%4$s." + +#: inc/Engine/Preload/PreloadSubscriber.php:237 +msgid "Preload: WP Rocket has started preloading your website." +msgstr "Pré-carregamento: o WP Rocket começou a pré-carregar o seu website." + +#: inc/Engine/Preload/PreloadSubscriber.php:242 +#: inc/classes/subscriber/Optimization/class-critical-css-subscriber.php:107 +#, php-format +msgid "Go to the %1$sWP Rocket settings%2$s page to track progress." +msgstr "" +"Vá até as %1$sConfigurações do WP Rocket%2$s para acompanhar o progresso." + +#: inc/Engine/Preload/PreloadSubscriber.php:283 +#, php-format +msgid "" +"Preload: %1$s uncached page has now been preloaded. (refresh to see " +"progress)" +msgid_plural "" +"Preload: %1$s uncached pages have now been preloaded. (refresh to see " +"progress)" +msgstr[0] "" +"Pré-carregamento: %1$s página sem cache foi pré-carregada. (atualize a " +"página para ver o progresso)" +msgstr[1] "" +"Pré-carregamento: %1$s páginas sem cache foram pré-carregadas. (atualize a " +"página para ver o progresso)" + +#: inc/Engine/Preload/PreloadSubscriber.php:292 +msgid "The following error happened during gathering of the URLs to preload:" +msgid_plural "" +"The following errors happened during gathering of the URLs to preload:" +msgstr[0] "Ocorreu o seguinte erro obtendo os URLs a pré-carregar:" +msgstr[1] "Ocorreram os seguintes erros obtendo os URLs a pré-carregar:" + +#: inc/Engine/Preload/PreloadSubscriber.php:344 +#, php-format +msgid "Preload complete: %d pages have been cached." +msgstr "Pré-carregamento concluído: %d páginas foram armazenadas em cache." + +#: inc/Engine/Preload/Sitemap.php:150 +#, php-format +msgid "" +"Sitemap preload encountered an error. Could not gather links on %1$s because" +" of the following error: %2$s. %3$sLearn more%4$s." +msgstr "" +"O pré-carregamento do sitemap encontrou um erro. Não foi possível obter os " +"links em %1$s devido ao seguinte erro: %2$s. %3$sSaiba mais%4$s." + +#: inc/Engine/Preload/Sitemap.php:165 +#, php-format +msgid "" +"Sitemap preload encountered an error. %1$s is not accessible to due to the " +"following response code: %2$s. Security measures could be preventing access." +" %3$sLearn more%4$s." +msgstr "" +"O pré-carregamento do sitemap encontrou um erro. %1$s não está acessível " +"devido ao seguinte código de resposta: %2$s. Medidas de segurança podem " +"estar impedindo o acesso. %3$sSaiba mais%4$s." + +#: inc/Engine/Preload/Sitemap.php:170 +#, php-format +msgid "" +"Sitemap preload encountered an error. %1$s is not accessible to due to the " +"following response code: 404. Please make sure you entered the correct " +"sitemap URL and it is accessible in your browser. %2$sLearn more%3$s." +msgstr "" +"O pré-carregamento do sitemap encontrou um erro: %1$s não está acessível " +"devido ao seguinte código de resposta: 404. Por favor certifique-se de ter " +"inserido corretamente o URL do sitemap e que ela está acessível no seu " +"navegador. %2$sSaiba mais%3$s." + +#: inc/Engine/Preload/Sitemap.php:175 +#, php-format +msgid "" +"Sitemap preload encountered an error. %1$s is not accessible to due to the " +"following response code: 500. Please check with your web host about server " +"access. %2$sLearn more%3$s." +msgstr "" +"O pré-carregameto do sitemap encontrou um erro. %1$s não está acessível " +"devido ao seguinte código de resposta: 500. Por favor verifique com seu host" +" web sobre o acesso ao servidor. %2$sSaiba mais%3$s." + +#: inc/Engine/Preload/Sitemap.php:180 +#, php-format +msgid "" +"Sitemap preload encountered an error. Could not gather links on %1$s because" +" it returned the following response code: %2$s. %3$sLearn more%4$s." +msgstr "" +"O pré-carregamento do sitemap encontrou um erro. Não foi possível obter os " +"links em %1$s porque retornou o seguinte código de resposta: %2$s. %3$sSaiba" +" mais%4$s." + +#: inc/Engine/Preload/Sitemap.php:196 +#, php-format +msgid "" +"Sitemap preload encountered an error. Could not collect links from %1$s " +"because the file is empty. %2$sLearn more%3$s." +msgstr "" +"O pré-carregamento do sitemap encontrou um erro. Não foi possível coletar os" +" links de %1$s porque o arquivo está vazio. %2$sSaiba mais%3$s." + +#: inc/Engine/Preload/Sitemap.php:217 +#, php-format +msgid "" +"Sitemap preload encountered an error. Could not collect links from %1$s " +"because of an error during the XML sitemap parsing. %2$sLearn more%3$s." +msgstr "" +"O pré-carregamento do sitemap encontrou um erro. Não foi possível coletar os" +" links de %1$s devido a um erro durante a análise do sitemap XML. %2$sSaiba " +"mais%3$s." + +#: inc/Engine/Preload/SitemapPreloadSubscriber.php:120 +#, php-format +msgid "" +"%1$sSimpleXML PHP extension%2$s is not enabled on your server. Please " +"contact your host to enable it before running sitemap-based cache " +"preloading." +msgstr "" +"A %1$sextensão SimpleXML do PHP%2$s não está ativa no seu servidor. Por " +"favor entre em contato com o seu host e ative-a antes de executar o pré-" +"carregamento do cache baseado no sitemap." + #: inc/admin/admin.php:18 inc/common/admin-bar.php:377 #: inc/deprecated/deprecated.php:1787 msgid "Support" @@ -312,31 +476,31 @@ msgstr "" msgid "Settings imported and saved." msgstr "Configurações importadas e salvas." -#: inc/admin/options.php:135 inc/classes/admin/settings/class-page.php:701 +#: inc/admin/options.php:135 inc/classes/admin/settings/class-page.php:700 msgid "Excluded CSS Files" msgstr "Arquivos CSS Excluídos" -#: inc/admin/options.php:136 inc/classes/admin/settings/class-page.php:803 +#: inc/admin/options.php:136 inc/classes/admin/settings/class-page.php:802 msgid "Excluded Inline JavaScript" msgstr "JavaScript Inline Excluído" -#: inc/admin/options.php:137 inc/classes/admin/settings/class-page.php:821 +#: inc/admin/options.php:137 inc/classes/admin/settings/class-page.php:820 msgid "Excluded JavaScript Files" msgstr "Arquivos JavaScript Excluídos" -#: inc/admin/options.php:138 inc/classes/admin/settings/class-page.php:1207 +#: inc/admin/options.php:138 inc/classes/admin/settings/class-page.php:1206 msgid "Never Cache URL(s)" msgstr "URL(s) Jamais em Cache" -#: inc/admin/options.php:139 inc/classes/admin/settings/class-page.php:1223 +#: inc/admin/options.php:139 inc/classes/admin/settings/class-page.php:1222 msgid "Never Cache User Agent(s)" msgstr "User Agent(s) Jamais em Cache" -#: inc/admin/options.php:140 inc/classes/admin/settings/class-page.php:1228 +#: inc/admin/options.php:140 inc/classes/admin/settings/class-page.php:1227 msgid "Always Purge URL(s)" msgstr "Sempre Esvaziar URL(s)" -#: inc/admin/options.php:141 inc/classes/admin/settings/class-page.php:1522 +#: inc/admin/options.php:141 inc/classes/admin/settings/class-page.php:1521 msgid "Exclude files from CDN" msgstr "Excluir arquivos da CDN" @@ -378,7 +542,7 @@ msgid "LazyLoad for iframes/videos" msgstr "LazyLoad para iframes/vídeos" #: inc/admin/ui/meta-boxes.php:74 -#: inc/classes/admin/settings/class-page.php:624 +#: inc/classes/admin/settings/class-page.php:622 msgid "Minify HTML" msgstr "Minificar o HTML" @@ -391,8 +555,8 @@ msgid "Minify/combine JS" msgstr "Minificar/combinar o JS" #: inc/admin/ui/meta-boxes.php:77 -#: inc/classes/admin/settings/class-page.php:1492 -#: inc/classes/admin/settings/class-page.php:1503 +#: inc/classes/admin/settings/class-page.php:1491 +#: inc/classes/admin/settings/class-page.php:1502 #: inc/deprecated/deprecated.php:1773 msgid "CDN" msgstr "CDN" @@ -692,32 +856,32 @@ msgid "RocketCDN cache purge successful." msgstr "O cache da RocketCDN foi esvaziado com suesso." #: inc/classes/admin/Database/class-optimization.php:41 -#: inc/classes/admin/settings/class-page.php:1368 +#: inc/classes/admin/settings/class-page.php:1367 msgid "Revisions" msgstr "Revisões" #: inc/classes/admin/Database/class-optimization.php:42 -#: inc/classes/admin/settings/class-page.php:1378 +#: inc/classes/admin/settings/class-page.php:1377 msgid "Auto Drafts" msgstr "Rascunhos Automáticos" #: inc/classes/admin/Database/class-optimization.php:43 -#: inc/classes/admin/settings/class-page.php:1388 +#: inc/classes/admin/settings/class-page.php:1387 msgid "Trashed Posts" msgstr "Posts na Lixeira" #: inc/classes/admin/Database/class-optimization.php:44 -#: inc/classes/admin/settings/class-page.php:1398 +#: inc/classes/admin/settings/class-page.php:1397 msgid "Spam Comments" msgstr "Comentários Spam" #: inc/classes/admin/Database/class-optimization.php:45 -#: inc/classes/admin/settings/class-page.php:1408 +#: inc/classes/admin/settings/class-page.php:1407 msgid "Trashed Comments" msgstr "Comentários na Lixeira" #: inc/classes/admin/Database/class-optimization.php:46 -#: inc/classes/admin/settings/class-page.php:1418 +#: inc/classes/admin/settings/class-page.php:1417 msgid "Expired transients" msgstr "Transientes expirados" @@ -733,58 +897,58 @@ msgstr "Tabelas" msgid "The debug file could not be deleted." msgstr "Não foi possível excluir o arquivo de depuração." -#: inc/classes/admin/settings/class-page.php:189 +#: inc/classes/admin/settings/class-page.php:188 msgid "Save Changes" msgstr "Salvar Alterações" -#: inc/classes/admin/settings/class-page.php:189 +#: inc/classes/admin/settings/class-page.php:188 msgid "Validate License" msgstr "Validar a licensa" +#: inc/classes/admin/settings/class-page.php:219 #: inc/classes/admin/settings/class-page.php:220 -#: inc/classes/admin/settings/class-page.php:221 msgid "Unavailable" msgstr "Indisponível" -#: inc/classes/admin/settings/class-page.php:335 +#: inc/classes/admin/settings/class-page.php:332 #: inc/deprecated/deprecated.php:1789 #: views/settings/page-sections/dashboard.php:73 msgid "License" msgstr "Licença" -#: inc/classes/admin/settings/class-page.php:352 +#: inc/classes/admin/settings/class-page.php:349 msgid "API key" msgstr "Chave da API" -#: inc/classes/admin/settings/class-page.php:367 +#: inc/classes/admin/settings/class-page.php:364 msgid "Email address" msgstr "Endereço de e-mail" -#: inc/classes/admin/settings/class-page.php:396 +#: inc/classes/admin/settings/class-page.php:393 msgid "Dashboard" msgstr "Painel" -#: inc/classes/admin/settings/class-page.php:397 +#: inc/classes/admin/settings/class-page.php:394 msgid "Get help, account info" msgstr "Obter ajuda, informações da conta" -#: inc/classes/admin/settings/class-page.php:406 +#: inc/classes/admin/settings/class-page.php:403 msgid "My Status" msgstr "Meu Status" -#: inc/classes/admin/settings/class-page.php:416 views/settings/page.php:71 +#: inc/classes/admin/settings/class-page.php:413 views/settings/page.php:72 msgid "Rocket Tester" msgstr "Testador do Rocket" -#: inc/classes/admin/settings/class-page.php:417 +#: inc/classes/admin/settings/class-page.php:414 msgid "I am part of the WP Rocket Beta Testing Program." msgstr "Participo do Programa de Testadores Beta do WP Rocket." -#: inc/classes/admin/settings/class-page.php:425 views/settings/page.php:89 +#: inc/classes/admin/settings/class-page.php:422 views/settings/page.php:90 msgid "Rocket Analytics" msgstr "Analytics do Rocket" -#: inc/classes/admin/settings/class-page.php:427 +#: inc/classes/admin/settings/class-page.php:424 #, php-format msgid "" "I agree to share anonymous data with the development team to help improve WP" @@ -794,23 +958,23 @@ msgstr "" "desenvolvimento para ajudar a melhorar o WP Rocket. %1$sQuais informações " "iremos coletar?%2$s" -#: inc/classes/admin/settings/class-page.php:454 +#: inc/classes/admin/settings/class-page.php:451 msgid "Cache" msgstr "Cache" -#: inc/classes/admin/settings/class-page.php:455 +#: inc/classes/admin/settings/class-page.php:452 msgid "Basic cache options" msgstr "Opções básica de cache" -#: inc/classes/admin/settings/class-page.php:462 +#: inc/classes/admin/settings/class-page.php:459 msgid "Mobile Cache" msgstr "Cache Móvel" -#: inc/classes/admin/settings/class-page.php:464 +#: inc/classes/admin/settings/class-page.php:461 msgid "Speed up your site for mobile visitors." msgstr "Acelera seu site em dispositivos móveis." -#: inc/classes/admin/settings/class-page.php:469 +#: inc/classes/admin/settings/class-page.php:466 msgid "" "We detected you use a plugin that requires a separate cache for mobile, and " "automatically enabled this option for compatibility." @@ -818,11 +982,11 @@ msgstr "" "Detectamos que você usa um plugin que requer um cache separado para " "dispositivos móveis, e habilitamos esta opção para compatibilidade." -#: inc/classes/admin/settings/class-page.php:473 +#: inc/classes/admin/settings/class-page.php:470 msgid "User Cache" msgstr "Cache de Usuário" -#: inc/classes/admin/settings/class-page.php:476 +#: inc/classes/admin/settings/class-page.php:473 #, php-format msgid "" "%1$sUser cache%2$s is great when you have user-specific or restricted " @@ -831,11 +995,11 @@ msgstr "" "O %1$scache de usuário%2$s é excelente quando você tem conteúdo específico " "do usuário ou restrito no seu site." -#: inc/classes/admin/settings/class-page.php:484 +#: inc/classes/admin/settings/class-page.php:481 msgid "Cache Lifespan" msgstr "Vida útil do cache" -#: inc/classes/admin/settings/class-page.php:487 +#: inc/classes/admin/settings/class-page.php:484 #, php-format msgid "" "Cache files older than the specified lifespan will be deleted.
    Enable " @@ -846,19 +1010,19 @@ msgstr "" "excluídos.
    Ative o %1$spré-carregamento%2$s para o cache ser " "reconstruído automaticamente após a expiração da sua vida útil." -#: inc/classes/admin/settings/class-page.php:501 +#: inc/classes/admin/settings/class-page.php:498 msgid "Enable caching for logged-in WordPress users" msgstr "Ativar armazenamento em cache para usuários conectados no WordPress" -#: inc/classes/admin/settings/class-page.php:509 +#: inc/classes/admin/settings/class-page.php:506 msgid "Enable caching for mobile devices" msgstr "Ativar cache para dispositivos móveis" -#: inc/classes/admin/settings/class-page.php:524 +#: inc/classes/admin/settings/class-page.php:521 msgid "Separate cache files for mobile devices" msgstr "Arquivos de cache separados para dispositivos móveis" -#: inc/classes/admin/settings/class-page.php:526 +#: inc/classes/admin/settings/class-page.php:523 #, php-format msgid "" "Most modern themes are responsive and should work without a separate cache. " @@ -869,13 +1033,13 @@ msgstr "" "separado. Habilite isso apenas se tem um tema ou plugin dedicado a " "dispositivos móveis. %1$sMais informações%2$s" -#: inc/classes/admin/settings/class-page.php:542 +#: inc/classes/admin/settings/class-page.php:539 msgid "" "Specify time after which the global cache is cleared
    (0 = unlimited )" msgstr "" "Especifique o tempo após o qual o Cache Global é limpo
    (0=ilimitado)" -#: inc/classes/admin/settings/class-page.php:544 +#: inc/classes/admin/settings/class-page.php:541 #, php-format msgid "" "Reduce lifespan to 10 hours or less if you notice issues that seem to appear" @@ -884,34 +1048,34 @@ msgstr "" "Reduza a vida útil para 10 horas ou menos se notar erros que parecem surgir " "periodicamente. %1$sPor que?%2$s" -#: inc/classes/admin/settings/class-page.php:550 +#: inc/classes/admin/settings/class-page.php:547 msgid "Minutes" msgstr "Minutos" -#: inc/classes/admin/settings/class-page.php:551 +#: inc/classes/admin/settings/class-page.php:548 msgid "Hours" msgstr "Horas" -#: inc/classes/admin/settings/class-page.php:552 +#: inc/classes/admin/settings/class-page.php:549 msgid "Days" msgstr "Dias" -#: inc/classes/admin/settings/class-page.php:580 +#: inc/classes/admin/settings/class-page.php:578 #: views/settings/page-sections/tutorials.php:22 msgid "File Optimization" msgstr "Otimizar Arquivos" -#: inc/classes/admin/settings/class-page.php:581 +#: inc/classes/admin/settings/class-page.php:579 msgid "Optimize CSS & JS" msgstr "Otimizar CSS e JS" -#: inc/classes/admin/settings/class-page.php:588 +#: inc/classes/admin/settings/class-page.php:586 msgid "Basic Settings" msgstr "Configurações Básicas" -#: inc/classes/admin/settings/class-page.php:595 -#: inc/classes/admin/settings/class-page.php:605 -#: inc/classes/admin/settings/class-page.php:615 +#: inc/classes/admin/settings/class-page.php:593 +#: inc/classes/admin/settings/class-page.php:603 +#: inc/classes/admin/settings/class-page.php:613 #, php-format msgid "" "%1$s Minification is currently activated in Autoptimize. If" @@ -920,33 +1084,38 @@ msgstr "" "No momento a Minificação %1$s está ativada no Autoptimize. " "Se deseja usar a minificação do %2$s, desabilite esta opção no Autoptimize." -#: inc/classes/admin/settings/class-page.php:598 +#: inc/classes/admin/settings/class-page.php:596 msgid "CSS Files" msgstr "Arquivos CSS" -#: inc/classes/admin/settings/class-page.php:608 +#: inc/classes/admin/settings/class-page.php:606 msgid "JavaScript Files" msgstr "Arquivos JavaScript" -#: inc/classes/admin/settings/class-page.php:628 +#: inc/classes/admin/settings/class-page.php:626 msgid "Minifying HTML removes whitespace and comments to reduce the size." msgstr "" "Minificar o HTML remove espaços em branco e comentários para reduzir o " "tamanho." -#: inc/classes/admin/settings/class-page.php:639 -msgid "Combine Google Fonts files" -msgstr "Combinar os arquivos de Fontes Google" +#: inc/classes/admin/settings/class-page.php:637 +msgid "Optimize Google Fonts" +msgstr "Otimizar Fontes Google" -#: inc/classes/admin/settings/class-page.php:640 -msgid "Combining Google Fonts will reduce the number of HTTP requests." -msgstr "Combinar as Fontes Google irá reduzir o número de requisições HTTP." +#: inc/classes/admin/settings/class-page.php:639 +#, php-format +msgid "" +"Improves font performance and combines multiple font requests to reduce the " +"number of HTTP requests. %1$sMore info%2$s" +msgstr "" +"Melhora o desempeno das fontes e combina múltiplas solicitações de fontes " +"para reduzir o número de solicitações HTTP. %1$sMais informações%2$s" -#: inc/classes/admin/settings/class-page.php:648 +#: inc/classes/admin/settings/class-page.php:647 msgid "Remove query strings from static resources" msgstr "Remover parâmetros de consulta dos recursos estáticos" -#: inc/classes/admin/settings/class-page.php:650 +#: inc/classes/admin/settings/class-page.php:649 #, php-format msgid "" "Removes the version query string from static files (e.g. style.css?ver=1.0) " @@ -957,27 +1126,27 @@ msgstr "" "style.css?ver=1.0) e condifica-o no nome do arquivo (ex: style-1.0.css). " "Pode melhorar seu score no GTMetrix. %1$sMais informações%2$s" -#: inc/classes/admin/settings/class-page.php:658 +#: inc/classes/admin/settings/class-page.php:657 msgid "Minify CSS files" msgstr "Minificar os arquivos CSS" -#: inc/classes/admin/settings/class-page.php:659 +#: inc/classes/admin/settings/class-page.php:658 msgid "Minify CSS removes whitespace and comments to reduce the file size." msgstr "" "Minificar o CSS remove espaços em branco e comentários para reduzir o " "tamanho do arquivo." +#: inc/classes/admin/settings/class-page.php:671 +#: inc/classes/admin/settings/class-page.php:693 +#: inc/classes/admin/settings/class-page.php:773 +#: inc/classes/admin/settings/class-page.php:795 +msgid "This could break things!" +msgstr "Isto poderia quebrar coisas!" + #: inc/classes/admin/settings/class-page.php:672 #: inc/classes/admin/settings/class-page.php:694 #: inc/classes/admin/settings/class-page.php:774 #: inc/classes/admin/settings/class-page.php:796 -msgid "This could break things!" -msgstr "Isto poderia quebrar coisas!" - -#: inc/classes/admin/settings/class-page.php:673 -#: inc/classes/admin/settings/class-page.php:695 -#: inc/classes/admin/settings/class-page.php:775 -#: inc/classes/admin/settings/class-page.php:797 msgid "" "If you notice any errors on your website after having activated this " "setting, just deactivate it again, and your site will be back to normal." @@ -985,17 +1154,17 @@ msgstr "" "Se notar quaisquer erros no seu site após ter ativado esta configuração, " "basta desativá-la novamente e o seu site voltará ao normal." -#: inc/classes/admin/settings/class-page.php:674 +#: inc/classes/admin/settings/class-page.php:673 msgid "Activate minify CSS" msgstr "Ativar minificar o CSS" -#: inc/classes/admin/settings/class-page.php:679 +#: inc/classes/admin/settings/class-page.php:678 msgid "Combine CSS files (Enable Minify CSS files to select)" msgstr "" "Combinar os arquivos CSS (Ative Minificar os arquivos CSS pra " "selecionar)" -#: inc/classes/admin/settings/class-page.php:681 +#: inc/classes/admin/settings/class-page.php:680 #, php-format msgid "" "Combine CSS merges all your files into 1, reducing HTTP requests. Not " @@ -1004,11 +1173,11 @@ msgstr "" "Combinar o CSS mescla todos os seus arquivos em 1, reduzindo as requisições " "HTTP. Não recomendamos se o seu site usa HTTP/2. %1$sMais informações%2$s" -#: inc/classes/admin/settings/class-page.php:696 +#: inc/classes/admin/settings/class-page.php:695 msgid "Activate combine CSS" msgstr "Ativar Combinar o CSS" -#: inc/classes/admin/settings/class-page.php:702 +#: inc/classes/admin/settings/class-page.php:701 msgid "" "Specify URLs of CSS files to be excluded from minification and concatenation" " (one per line)." @@ -1016,7 +1185,7 @@ msgstr "" "Especifique URLs de arquivos CSS a serem excluídos da minificação e " "concatenação (um por linha)." -#: inc/classes/admin/settings/class-page.php:703 +#: inc/classes/admin/settings/class-page.php:702 msgid "" "The domain part of the URL will be stripped automatically.
    Use (.*).css " "wildcards to exclude all CSS files located at a specific path." @@ -1025,11 +1194,11 @@ msgstr "" "(.*).css para excluir todos os arquivos CSS localizados em um caminho " "específico." -#: inc/classes/admin/settings/class-page.php:716 +#: inc/classes/admin/settings/class-page.php:715 msgid "Optimize CSS delivery" msgstr "Otimizar a entrega do CSS" -#: inc/classes/admin/settings/class-page.php:723 +#: inc/classes/admin/settings/class-page.php:722 #, php-format msgctxt "WP Critical CSS compatibility" msgid "" @@ -1040,7 +1209,7 @@ msgstr "" "deseja usar a opção de Otimização da Entrega do CSS do WP Rocket, desabilite" " o plugin %1$s" -#: inc/classes/admin/settings/class-page.php:725 +#: inc/classes/admin/settings/class-page.php:724 #, php-format msgid "" "Optimize CSS delivery eliminates render-blocking CSS on your website for " @@ -1050,11 +1219,11 @@ msgstr "" "para um tempo percebido de carregamento mais rápido. %1$sMais " "informações%2$s" -#: inc/classes/admin/settings/class-page.php:736 +#: inc/classes/admin/settings/class-page.php:735 msgid "Fallback critical CSS" msgstr "CSS crítico opcional" -#: inc/classes/admin/settings/class-page.php:741 +#: inc/classes/admin/settings/class-page.php:740 #, php-format msgid "" "Provides a fallback if auto-generated critical path CSS is incomplete. " @@ -1063,11 +1232,11 @@ msgstr "" "Fornece uma opção se o caminho de CSS crítico gerado automaticamente estiver" " incompleto. %1$sMais informações%2$s" -#: inc/classes/admin/settings/class-page.php:750 +#: inc/classes/admin/settings/class-page.php:749 msgid "Remove jQuery Migrate" msgstr "Remover jQuery Migrate" -#: inc/classes/admin/settings/class-page.php:752 +#: inc/classes/admin/settings/class-page.php:751 #, php-format msgid "" "Remove jQuery Migrate eliminates a JS file and can improve load time. " @@ -1076,29 +1245,29 @@ msgstr "" "Remover JQuery Migrate elimina um arquivo JS e pode melhorar o tempo de " "carregamento. %1$sMais informações%2$s" -#: inc/classes/admin/settings/class-page.php:760 +#: inc/classes/admin/settings/class-page.php:759 msgid "Minify JavaScript files" msgstr "Minificar os arquivos JavaScript" -#: inc/classes/admin/settings/class-page.php:761 +#: inc/classes/admin/settings/class-page.php:760 msgid "" "Minify JavaScript removes whitespace and comments to reduce the file size." msgstr "" "Minificar o JavaScript remove os espaços em branco e comentários para " "reduzir o tamanho do arquivo." -#: inc/classes/admin/settings/class-page.php:776 +#: inc/classes/admin/settings/class-page.php:775 msgid "Activate minify JavaScript" msgstr "Ativar minificar o JavaScript" -#: inc/classes/admin/settings/class-page.php:781 +#: inc/classes/admin/settings/class-page.php:780 msgid "" "Combine JavaScript files (Enable Minify JavaScript files to select)" msgstr "" "Combinar os arquivos JavaScript (Ative Minificar arquivos JavaScript " "para selecionar)" -#: inc/classes/admin/settings/class-page.php:783 +#: inc/classes/admin/settings/class-page.php:782 #, php-format msgid "" "Combine JavaScript files combines your site’s internal, 3rd party and inline" @@ -1109,11 +1278,11 @@ msgstr "" "reduzindo as chamadas HTTP. Não é recomendado se o seu site usa HTTP/2. " "%1$sMais informações%2$s" -#: inc/classes/admin/settings/class-page.php:798 +#: inc/classes/admin/settings/class-page.php:797 msgid "Activate combine JavaScript" msgstr "Ativar combinar o JavaScript" -#: inc/classes/admin/settings/class-page.php:805 +#: inc/classes/admin/settings/class-page.php:804 #, php-format msgid "" "Specify patterns of inline JavaScript to be excluded from concatenation (one" @@ -1122,7 +1291,7 @@ msgstr "" "Especifique padrões de JavaScript inline a serem excluídos da concatenação " "(um por linha). %1$sMais informações%2$s" -#: inc/classes/admin/settings/class-page.php:822 +#: inc/classes/admin/settings/class-page.php:821 msgid "" "Specify URLs of JavaScript files to be excluded from minification and " "concatenation (one per line)." @@ -1130,7 +1299,7 @@ msgstr "" "Especifique URLs de arquivos JavaScript a serem excluídos da minificação e " "concatenação (um por linha)." -#: inc/classes/admin/settings/class-page.php:823 +#: inc/classes/admin/settings/class-page.php:822 msgid "" "Internal: The domain part of the URL will be stripped " "automatically. Use (.*).js wildcards to exclude all JS files located at a " @@ -1140,7 +1309,7 @@ msgstr "" "automaticamente. Use wildcards (.*).js para excluir todos os arquivos JS " "localizados em um caminho específico." -#: inc/classes/admin/settings/class-page.php:825 +#: inc/classes/admin/settings/class-page.php:824 #, php-format msgid "" "3rd Party: Use either the full URL path or only the domain " @@ -1149,11 +1318,11 @@ msgstr "" "Terceiros Use o caminho completo do URL ou apenas o " "domínio, para excluir JS externo. %1$sMais Informações%2$s" -#: inc/classes/admin/settings/class-page.php:841 +#: inc/classes/admin/settings/class-page.php:840 msgid "Load JavaScript deferred" msgstr "Adiar o carregamento do JavaScript" -#: inc/classes/admin/settings/class-page.php:843 +#: inc/classes/admin/settings/class-page.php:842 #, php-format msgid "" "Load JavaScript deferred eliminates render-blocking JS on your site and can " @@ -1162,11 +1331,11 @@ msgstr "" "Adiar o carregamento do JavaScript elimina JS bloqueando a renderização no " "seu site e pode melhorar o tempo de carregamento. %1$sMais informações%2$s" -#: inc/classes/admin/settings/class-page.php:854 +#: inc/classes/admin/settings/class-page.php:853 msgid "Safe Mode for jQuery (recommended)" msgstr "Modo Seguro para jQuery (recomendado)" -#: inc/classes/admin/settings/class-page.php:855 +#: inc/classes/admin/settings/class-page.php:854 msgid "" "Safe mode for jQuery for deferred JS ensures support for inline jQuery " "references from themes and plugins by loading jQuery at the top of the " @@ -1178,23 +1347,23 @@ msgstr "" " documento como um script que bloqueia a renderização.
    Desativar pode" " quebrar a funcionalidade, teste extensivamente!" -#: inc/classes/admin/settings/class-page.php:887 +#: inc/classes/admin/settings/class-page.php:886 msgid "Media" msgstr "Mídia" -#: inc/classes/admin/settings/class-page.php:888 +#: inc/classes/admin/settings/class-page.php:887 msgid "LazyLoad, emojis, embeds, WebP" msgstr "LazyLoad, emojis, incorporações, WebP" -#: inc/classes/admin/settings/class-page.php:894 +#: inc/classes/admin/settings/class-page.php:893 msgid "Autoptimize" msgstr "Autoptimize" -#: inc/classes/admin/settings/class-page.php:911 +#: inc/classes/admin/settings/class-page.php:910 msgid "LazyLoad" msgstr "LazyLoad" -#: inc/classes/admin/settings/class-page.php:914 +#: inc/classes/admin/settings/class-page.php:913 #, php-format msgid "" "It can improve actual and perceived loading time as images, iframes, and " @@ -1206,7 +1375,7 @@ msgstr "" " na área visualizada na tela, e reduz o número de requisições HTTP. %1$sMais" " Informações%2$s" -#: inc/classes/admin/settings/class-page.php:921 +#: inc/classes/admin/settings/class-page.php:920 #, php-format msgid "" "Lazyload is currently activated in %2$s. If you want to use" @@ -1215,11 +1384,11 @@ msgstr "" "No momento o Lazyload está ativo em %2$s. Se deseja usar o " "lazyload de %1$s, desative esta opção em %2$s." -#: inc/classes/admin/settings/class-page.php:924 +#: inc/classes/admin/settings/class-page.php:923 msgid "Emoji 👻" msgstr "Emoji 👻" -#: inc/classes/admin/settings/class-page.php:926 +#: inc/classes/admin/settings/class-page.php:925 msgid "" "Use default emoji of visitor's browser instead of loading emoji from " "WordPress.org" @@ -1227,11 +1396,11 @@ msgstr "" "Use o emoji padrão do navegador do visitante ao invés de carregar emoji de " "WordPress.org" -#: inc/classes/admin/settings/class-page.php:930 +#: inc/classes/admin/settings/class-page.php:929 msgid "Embeds" msgstr "Incorporações" -#: inc/classes/admin/settings/class-page.php:932 +#: inc/classes/admin/settings/class-page.php:931 msgid "" "Prevents others from embedding content from your site, prevents you from " "embedding content from other (non-whitelisted) sites, and removes JavaScript" @@ -1241,11 +1410,11 @@ msgstr "" "conteúdo de outros sites (fora da lista-branca), e remove as requisições de " "JavaScript relacionadas às incorporações do WordPress" -#: inc/classes/admin/settings/class-page.php:936 +#: inc/classes/admin/settings/class-page.php:935 msgid "WebP compatibility" msgstr "Compatibilidade com WebP" -#: inc/classes/admin/settings/class-page.php:940 +#: inc/classes/admin/settings/class-page.php:939 #, php-format msgid "" "Enable this option if you would like WP Rocket to serve WebP images to " @@ -1258,11 +1427,11 @@ msgstr "" "para você. Para criar imagens WebP nós recomendamos o %1$sImagify%2$s. " "%3$sMais informações%2$s" -#: inc/classes/admin/settings/class-page.php:968 +#: inc/classes/admin/settings/class-page.php:967 msgid "Enable for images" msgstr "Habilitar para imagens" -#: inc/classes/admin/settings/class-page.php:979 +#: inc/classes/admin/settings/class-page.php:978 msgctxt "Avada" msgid "" "Lazyload for images is currently activated in Avada. If you want to use WP " @@ -1271,15 +1440,15 @@ msgstr "" "No momento o lazyload para imagens está ativo no Avada. Se deseja usar o " "LazyLoad do WP Rocket, desative esta opção no Avada." -#: inc/classes/admin/settings/class-page.php:987 +#: inc/classes/admin/settings/class-page.php:986 msgid "Enable for iframes and videos" msgstr "Habilitar para iframes e vídeos" -#: inc/classes/admin/settings/class-page.php:1002 +#: inc/classes/admin/settings/class-page.php:1001 msgid "Replace YouTube iframe with preview image" msgstr "Substituir o iframe do YouTube pela imagem de pré-visualização" -#: inc/classes/admin/settings/class-page.php:1003 +#: inc/classes/admin/settings/class-page.php:1002 msgid "" "This can significantly improve your loading time if you have a lot of " "YouTube videos on a page." @@ -1287,35 +1456,35 @@ msgstr "" "Isso pode melhorar de forma significativa o tempo de carregamento se você " "tem muitos vídeos do YouTube em uma página." -#: inc/classes/admin/settings/class-page.php:1015 +#: inc/classes/admin/settings/class-page.php:1014 msgid "Disable Emoji" msgstr "Desabilitar Emoji" -#: inc/classes/admin/settings/class-page.php:1016 +#: inc/classes/admin/settings/class-page.php:1015 msgid "Disable Emoji will reduce the number of external HTTP requests." msgstr "Desabilitar Emoji irá reduzir o número de requisições HTTP externas." -#: inc/classes/admin/settings/class-page.php:1024 +#: inc/classes/admin/settings/class-page.php:1023 msgid "Disable WordPress embeds" msgstr "Desabilitar incorporações do WordPress" -#: inc/classes/admin/settings/class-page.php:1034 +#: inc/classes/admin/settings/class-page.php:1033 #: inc/classes/subscriber/Media/class-webp-subscriber.php:362 msgid "Enable WebP caching" msgstr "Ativar cache de WebP" -#: inc/classes/admin/settings/class-page.php:1057 -#: inc/classes/admin/settings/class-page.php:1067 +#: inc/classes/admin/settings/class-page.php:1056 +#: inc/classes/admin/settings/class-page.php:1066 #: inc/deprecated/deprecated.php:1776 #: views/settings/page-sections/tutorials.php:30 msgid "Preload" msgstr "Pré-Carregar" -#: inc/classes/admin/settings/class-page.php:1058 +#: inc/classes/admin/settings/class-page.php:1057 msgid "Generate cache files" msgstr "Gerar arquivos de cache" -#: inc/classes/admin/settings/class-page.php:1070 +#: inc/classes/admin/settings/class-page.php:1069 #, php-format msgid "" "When you enable preloading WP Rocket will generate the cache starting with " @@ -1330,11 +1499,11 @@ msgstr "" "adiciona ou atualiza conteúdo, e pode ser iniciado manualmente a partir da " "barra de administração ou do %1$sPainel do WP Rocket%2$s." -#: inc/classes/admin/settings/class-page.php:1078 +#: inc/classes/admin/settings/class-page.php:1077 msgid "Prefetch DNS Requests" msgstr "Pré-captura das Requisições de DNS" -#: inc/classes/admin/settings/class-page.php:1080 +#: inc/classes/admin/settings/class-page.php:1079 msgid "" "DNS prefetching can make external files load faster, especially on mobile " "networks" @@ -1342,27 +1511,27 @@ msgstr "" "A pré-captura do DNS pode carregar mais rápido arquivos externos, " "especialmente em redes móveis" -#: inc/classes/admin/settings/class-page.php:1094 +#: inc/classes/admin/settings/class-page.php:1093 msgid "Activate Preloading" msgstr "Ativar o Pré-Carregamento" -#: inc/classes/admin/settings/class-page.php:1113 +#: inc/classes/admin/settings/class-page.php:1112 msgid "Activate sitemap-based cache preloading" msgstr "Ativar o pré-carregamento em cache do sitemap" -#: inc/classes/admin/settings/class-page.php:1132 +#: inc/classes/admin/settings/class-page.php:1131 msgid "Sitemaps for preloading" msgstr "Sitemaps para pré-carregamento" -#: inc/classes/admin/settings/class-page.php:1136 +#: inc/classes/admin/settings/class-page.php:1135 msgid "Specify XML sitemap(s) to be used for preloading" msgstr "Especifique sitemap(s) XML a ser(em) usado(s) para o pré-carregamento" -#: inc/classes/admin/settings/class-page.php:1146 +#: inc/classes/admin/settings/class-page.php:1145 msgid "URLs to prefetch" msgstr "URLs a pré-capturar" -#: inc/classes/admin/settings/class-page.php:1147 +#: inc/classes/admin/settings/class-page.php:1146 msgid "" "Specify external hosts to be prefetched (no http:, one per " "line)" @@ -1370,47 +1539,47 @@ msgstr "" "Especifique os servidores externos a serem pré-carregados (sem " "http:, um por linha)" -#: inc/classes/admin/settings/class-page.php:1170 +#: inc/classes/admin/settings/class-page.php:1169 msgid "Advanced Rules" msgstr "Regras Avançadas" -#: inc/classes/admin/settings/class-page.php:1171 +#: inc/classes/admin/settings/class-page.php:1170 msgid "Fine-tune cache rules" msgstr "Ajuste fino das regras de cache" -#: inc/classes/admin/settings/class-page.php:1180 +#: inc/classes/admin/settings/class-page.php:1179 msgid "" "Sensitive pages like custom login/logout URLs should be excluded from cache." msgstr "" "URLs de páginas dinâmicas como personalizadas de login/logout devem ser " "excluídas do cache." -#: inc/classes/admin/settings/class-page.php:1183 +#: inc/classes/admin/settings/class-page.php:1182 msgctxt "plugin name" msgid "WooCommerce" msgstr "WooCommerce" -#: inc/classes/admin/settings/class-page.php:1185 +#: inc/classes/admin/settings/class-page.php:1184 msgctxt "plugin name" msgid "Easy Digital Downloads" msgstr "Easy Digital Downloads" -#: inc/classes/admin/settings/class-page.php:1187 +#: inc/classes/admin/settings/class-page.php:1186 msgctxt "plugin name" msgid "iThemes Exchange" msgstr "iThemes Exchange" -#: inc/classes/admin/settings/class-page.php:1189 +#: inc/classes/admin/settings/class-page.php:1188 msgctxt "plugin name" msgid "Jigoshop" msgstr "Jigoshop" -#: inc/classes/admin/settings/class-page.php:1191 +#: inc/classes/admin/settings/class-page.php:1190 msgctxt "plugin name" msgid "WP-Shop" msgstr "WP-Shop" -#: inc/classes/admin/settings/class-page.php:1197 +#: inc/classes/admin/settings/class-page.php:1196 #, php-format msgid "" "
    Cart, checkout and \"my account\" pages set in " @@ -1420,15 +1589,15 @@ msgstr "" "%1$s%2$s%3$s serão detectadas e por padrão nunca serão " "armazenadas em cache." -#: inc/classes/admin/settings/class-page.php:1218 +#: inc/classes/admin/settings/class-page.php:1217 msgid "Never Cache Cookies" msgstr "Cookies Jamais em Cache" -#: inc/classes/admin/settings/class-page.php:1237 +#: inc/classes/admin/settings/class-page.php:1236 msgid "Cache Query String(s)" msgstr "String(s) de Consulta em Cache" -#: inc/classes/admin/settings/class-page.php:1240 +#: inc/classes/admin/settings/class-page.php:1239 #, php-format msgid "" "%1$sCache for query strings%2$s enables you to force caching for specific " @@ -1437,15 +1606,15 @@ msgstr "" "%1$sStrings de consulta em cache%2$s permite forçar o cache de certos " "parâmetros GET." -#: inc/classes/admin/settings/class-page.php:1254 +#: inc/classes/admin/settings/class-page.php:1253 msgid "" "Specify URLs of pages or posts that should never be cached (one per line)" msgstr "" "Especifique os URLs de páginas ou posts que deseja que jamais sejam " "armazenados em cache (um por linha)" -#: inc/classes/admin/settings/class-page.php:1255 -#: inc/classes/admin/settings/class-page.php:1283 +#: inc/classes/admin/settings/class-page.php:1254 +#: inc/classes/admin/settings/class-page.php:1282 msgid "" "The domain part of the URL will be stripped automatically.
    Use (.*) " "wildcards to address multiple URLs under a given path." @@ -1453,7 +1622,7 @@ msgstr "" "A parte do domínio do URL será removida automaticamente.
    Use wildcards " "(.*) para se referir a múltiplos URLs em um dado caminho." -#: inc/classes/admin/settings/class-page.php:1264 +#: inc/classes/admin/settings/class-page.php:1263 msgid "" "Specify the IDs of cookies that, when set in the visitor's browser, should " "prevent a page from getting cached (one per line)" @@ -1461,19 +1630,19 @@ msgstr "" "Especifique os IDs de cookies que irão evitar uma página ser armazenada em " "cache quando definidos no navegador do visitante (um por linha)" -#: inc/classes/admin/settings/class-page.php:1272 +#: inc/classes/admin/settings/class-page.php:1271 msgid "" "Specify user agent strings that should never see cached pages (one per line)" msgstr "" "Especifique strings de agentes de usuário que nunca devem ter páginas " "armazenadas em cache (uma por linha)" -#: inc/classes/admin/settings/class-page.php:1273 +#: inc/classes/admin/settings/class-page.php:1272 msgid "Use (.*) wildcards to detect parts of UA strings." msgstr "" "Use wildcards (.*) para detectar partes de strings de agentes de usuário." -#: inc/classes/admin/settings/class-page.php:1282 +#: inc/classes/admin/settings/class-page.php:1281 msgid "" "Specify URLs you always want purged from cache whenever you update any post " "or page (one per line)" @@ -1481,26 +1650,26 @@ msgstr "" "Especifique os URLs que deseja esvaziar cache sempre que atualizar qualquer " "post ou página (um por linha)" -#: inc/classes/admin/settings/class-page.php:1291 +#: inc/classes/admin/settings/class-page.php:1290 msgid "Specify query strings for caching (one per line)" msgstr "" "Especifique parâmetros de consulta para armazenamento em cache (um por " "linha)" -#: inc/classes/admin/settings/class-page.php:1319 +#: inc/classes/admin/settings/class-page.php:1318 #: inc/deprecated/deprecated.php:1775 msgid "Database" msgstr "Banco de Dados" -#: inc/classes/admin/settings/class-page.php:1320 +#: inc/classes/admin/settings/class-page.php:1319 msgid "Optimize, reduce bloat" msgstr "Otimize, reduza o excesso" -#: inc/classes/admin/settings/class-page.php:1329 +#: inc/classes/admin/settings/class-page.php:1328 msgid "Post Cleanup" msgstr "Limpeza de Post" -#: inc/classes/admin/settings/class-page.php:1331 +#: inc/classes/admin/settings/class-page.php:1330 msgid "" "Post revisions and drafts will be permanently deleted. Do not use this " "option if you need to retain revisions or drafts." @@ -1508,19 +1677,19 @@ msgstr "" "As revisões e rascunhos de posts serão excluídos permanentemente. Não use " "esta opção se precisa manter as revisões e rascunhos." -#: inc/classes/admin/settings/class-page.php:1339 +#: inc/classes/admin/settings/class-page.php:1338 msgid "Comments Cleanup" msgstr "Limpeza de Comentários" -#: inc/classes/admin/settings/class-page.php:1341 +#: inc/classes/admin/settings/class-page.php:1340 msgid "Spam and trashed comments will be permanently deleted." msgstr "Os comentários spam e na lixeira serão excluídos permanentemente." -#: inc/classes/admin/settings/class-page.php:1345 +#: inc/classes/admin/settings/class-page.php:1344 msgid "Transients Cleanup" msgstr "Limpeza de Transientes" -#: inc/classes/admin/settings/class-page.php:1347 +#: inc/classes/admin/settings/class-page.php:1346 msgid "" "Transients are temporary options; they are safe to remove. They will be " "automatically regenerated as your plugins require them." @@ -1528,107 +1697,107 @@ msgstr "" "Transientes são opções temporárias e é seguro removê-los. Serão regenerados " "automaticamente quando seus plugins precisarem deles." -#: inc/classes/admin/settings/class-page.php:1351 +#: inc/classes/admin/settings/class-page.php:1350 msgid "Database Cleanup" msgstr "Limpeza do Banco de Dados" -#: inc/classes/admin/settings/class-page.php:1353 +#: inc/classes/admin/settings/class-page.php:1352 msgid "Reduces overhead of database tables" msgstr "Reduz o excesso de informações nas tabelas do banco de dados" -#: inc/classes/admin/settings/class-page.php:1357 +#: inc/classes/admin/settings/class-page.php:1356 msgid "Automatic cleanup" msgstr "Limpeza automática" -#: inc/classes/admin/settings/class-page.php:1370 +#: inc/classes/admin/settings/class-page.php:1369 #, php-format msgid "%s revision in your database." msgid_plural "%s revisions in your database." msgstr[0] "%s revisão no seu banco de dados." msgstr[1] "%s revisões no seu banco de dados." -#: inc/classes/admin/settings/class-page.php:1380 +#: inc/classes/admin/settings/class-page.php:1379 #, php-format msgid "%s draft in your database." msgid_plural "%s drafts in your database." msgstr[0] "%s rascunho no seu banco de dados." msgstr[1] "%s rascunhos no seu banco de dados." -#: inc/classes/admin/settings/class-page.php:1390 +#: inc/classes/admin/settings/class-page.php:1389 #, php-format msgid "%s trashed post in your database." msgid_plural "%s trashed posts in your database." msgstr[0] "%s post na lixeira no seu banco de dados." msgstr[1] "%s posts na lixeira no seu banco de dados." -#: inc/classes/admin/settings/class-page.php:1400 +#: inc/classes/admin/settings/class-page.php:1399 #, php-format msgid "%s spam comment in your database." msgid_plural "%s spam comments in your database." msgstr[0] "%s comentário spam no seu banco de dados." msgstr[1] "%s comentários spam no seu banco de dados:" -#: inc/classes/admin/settings/class-page.php:1410 +#: inc/classes/admin/settings/class-page.php:1409 #, php-format msgid "%s trashed comment in your database." msgid_plural "%s trashed comments in your database." msgstr[0] "%s comentário na lixeira no seu banco de dados." msgstr[1] "%s comentários na lixeira no seu banco de dados." -#: inc/classes/admin/settings/class-page.php:1420 +#: inc/classes/admin/settings/class-page.php:1419 #, php-format msgid "%s expired transient in your database." msgid_plural "%s expired transients in your database." msgstr[0] "%s transiente expirado no seu banco de dados." msgstr[1] "%s transientes expirados no seu banco de dados." -#: inc/classes/admin/settings/class-page.php:1428 +#: inc/classes/admin/settings/class-page.php:1427 msgid "All transients" msgstr "Todos os transientes" -#: inc/classes/admin/settings/class-page.php:1430 +#: inc/classes/admin/settings/class-page.php:1429 #, php-format msgid "%s transient in your database." msgid_plural "%s transients in your database." msgstr[0] "%s transiente no seu banco de dados." msgstr[1] "%s transientes no seu banco de dados." -#: inc/classes/admin/settings/class-page.php:1438 +#: inc/classes/admin/settings/class-page.php:1437 msgid "Optimize Tables" msgstr "Otimizar Tabelas" -#: inc/classes/admin/settings/class-page.php:1440 +#: inc/classes/admin/settings/class-page.php:1439 #, php-format msgid "%s table to optimize in your database." msgid_plural "%s tables to optimize in your database." msgstr[0] "%s tabela a otimizar no seu banco de dados." msgstr[1] "%s tabelas a otimizar no seu banco de dados." -#: inc/classes/admin/settings/class-page.php:1451 +#: inc/classes/admin/settings/class-page.php:1450 msgid "Schedule Automatic Cleanup" msgstr "Agendar Limpeza Automática" -#: inc/classes/admin/settings/class-page.php:1463 +#: inc/classes/admin/settings/class-page.php:1462 msgid "Frequency" msgstr "Frequência" -#: inc/classes/admin/settings/class-page.php:1471 +#: inc/classes/admin/settings/class-page.php:1470 msgid "Daily" msgstr "Diária" -#: inc/classes/admin/settings/class-page.php:1472 +#: inc/classes/admin/settings/class-page.php:1471 msgid "Weekly" msgstr "Semanal" -#: inc/classes/admin/settings/class-page.php:1473 +#: inc/classes/admin/settings/class-page.php:1472 msgid "Monthly" msgstr "Mensal" -#: inc/classes/admin/settings/class-page.php:1493 +#: inc/classes/admin/settings/class-page.php:1492 msgid "Integrate your CDN" msgstr "Integrar a sua CDN" -#: inc/classes/admin/settings/class-page.php:1505 +#: inc/classes/admin/settings/class-page.php:1504 msgid "" "All URLs of static files (CSS, JS, images) will be rewritten to the CNAME(s)" " you provide." @@ -1636,7 +1805,7 @@ msgstr "" "Todos os URLs de arquivos estáticos (CSS, JS, imagens) serão reescritos " "no(s) CNAME(s) que você fornecer." -#: inc/classes/admin/settings/class-page.php:1507 +#: inc/classes/admin/settings/class-page.php:1506 #, php-format msgid "" "Not required for services like Cloudflare and Sucuri. Please see our " @@ -1645,7 +1814,7 @@ msgstr "" "Não necessário para serviços como Cloudflare e Sucuri. Por favor veja os " "%1$scomplementos%2$s disponíveis." -#: inc/classes/admin/settings/class-page.php:1548 +#: inc/classes/admin/settings/class-page.php:1547 #, php-format msgid "" "%1$s%2$s Add-on%3$s is currently enabled. Configuration of the CDN settings " @@ -1660,28 +1829,28 @@ msgstr[1] "" "Os %1$s %2$s Complementos %3$s estão ativos no momento. Não é necessário " "configurar o CDN para %2$s funcionar no seu site." -#: inc/classes/admin/settings/class-page.php:1573 +#: inc/classes/admin/settings/class-page.php:1572 msgid "Enable Content Delivery Network" msgstr "Ativar a CDN" -#: inc/classes/admin/settings/class-page.php:1582 +#: inc/classes/admin/settings/class-page.php:1581 #: inc/classes/subscriber/CDN/RocketCDN/AdminPageSubscriber.php:147 msgid "CDN CNAME(s)" msgstr "CNAME(s) da CDN" -#: inc/classes/admin/settings/class-page.php:1583 +#: inc/classes/admin/settings/class-page.php:1582 #: inc/classes/subscriber/CDN/RocketCDN/AdminPageSubscriber.php:148 msgid "Specify the CNAME(s) below" msgstr "Especifique abaixo a(s) CNAME(s)" -#: inc/classes/admin/settings/class-page.php:1590 +#: inc/classes/admin/settings/class-page.php:1589 msgid "" "Specify URL(s) of files that should not get served via CDN (one per line)." msgstr "" "Especifique URL(s) de arquivos que não devem ser servidos pela CDN (um por " "linha)." -#: inc/classes/admin/settings/class-page.php:1591 +#: inc/classes/admin/settings/class-page.php:1590 msgid "" "The domain part of the URL will be stripped automatically.
    Use (.*) " "wildcards to exclude all files of a given file type located at a specific " @@ -1691,16 +1860,16 @@ msgstr "" "(.*) para excluir todos os arquivos de um dado tipo de arquivo localizado em" " um caminho específico." -#: inc/classes/admin/settings/class-page.php:1615 -#: inc/classes/admin/settings/class-page.php:1623 +#: inc/classes/admin/settings/class-page.php:1614 +#: inc/classes/admin/settings/class-page.php:1622 msgid "Heartbeat" msgstr "Heartbeat" -#: inc/classes/admin/settings/class-page.php:1616 +#: inc/classes/admin/settings/class-page.php:1615 msgid "Control WordPress Heartbeat API" msgstr "Controla a API Heartbeat do WordPress" -#: inc/classes/admin/settings/class-page.php:1624 +#: inc/classes/admin/settings/class-page.php:1623 msgid "" "Reducing or disabling the Heartbeat API’s activity can help save some of " "your server’s resources." @@ -1708,11 +1877,11 @@ msgstr "" "Reduzir ou desabilitar a atividade da API Hartbeat pode economizar alguns " "recursos do seu servidor." -#: inc/classes/admin/settings/class-page.php:1633 +#: inc/classes/admin/settings/class-page.php:1632 msgid "Reduce or disable Heartbeat activity" msgstr "Reduz ou desabilita a atividade Heartbeat" -#: inc/classes/admin/settings/class-page.php:1634 +#: inc/classes/admin/settings/class-page.php:1633 msgid "" "Reducing activity will change Heartbeat frequency from one hit each minute " "to one hit every 2 minutes." @@ -1720,55 +1889,55 @@ msgstr "" "Reduzir a atividade modifica a frequência do Heartbeat de um hit por minuto " "para um hit a cada 2 minutos." -#: inc/classes/admin/settings/class-page.php:1634 +#: inc/classes/admin/settings/class-page.php:1633 msgid "" "Disabling Heartbeat entirely may break plugins and themes using this API." msgstr "" "Desabilitar totalmente Heartbeat pode quebrar plugins e temas que usem esta " "API." -#: inc/classes/admin/settings/class-page.php:1648 +#: inc/classes/admin/settings/class-page.php:1647 msgid "Do not limit" msgstr "Não limitar" -#: inc/classes/admin/settings/class-page.php:1649 +#: inc/classes/admin/settings/class-page.php:1648 msgid "Reduce activity" msgstr "Reduzir atividade" -#: inc/classes/admin/settings/class-page.php:1650 +#: inc/classes/admin/settings/class-page.php:1649 msgid "Disable" msgstr "Desativar" -#: inc/classes/admin/settings/class-page.php:1658 +#: inc/classes/admin/settings/class-page.php:1657 msgid "Control Heartbeat" msgstr "Controlar Heartbeat" -#: inc/classes/admin/settings/class-page.php:1667 +#: inc/classes/admin/settings/class-page.php:1666 msgid "Behavior in backend" msgstr "Comportamento no painel" -#: inc/classes/admin/settings/class-page.php:1674 +#: inc/classes/admin/settings/class-page.php:1673 msgid "Behavior in post editor" msgstr "Comportamento no editor de post" -#: inc/classes/admin/settings/class-page.php:1680 +#: inc/classes/admin/settings/class-page.php:1679 msgid "Behavior in frontend" msgstr "Comportamento na interface" -#: inc/classes/admin/settings/class-page.php:1699 +#: inc/classes/admin/settings/class-page.php:1698 #: views/settings/page-sections/tutorials.php:36 msgid "Add-ons" msgstr "Complementos" -#: inc/classes/admin/settings/class-page.php:1700 +#: inc/classes/admin/settings/class-page.php:1699 msgid "Add more features" msgstr "Adicione mais recursos" -#: inc/classes/admin/settings/class-page.php:1707 +#: inc/classes/admin/settings/class-page.php:1706 msgid "One-click Rocket Add-ons" msgstr "Complementos de um clique do Rocket" -#: inc/classes/admin/settings/class-page.php:1708 +#: inc/classes/admin/settings/class-page.php:1707 msgid "" "One-Click Add-ons are features extending available options without " "configuration needed. Switch the option \"on\" to enable from this screen." @@ -1777,25 +1946,25 @@ msgstr "" "sem a necessidade de configurações. Ative a opção para ativar a partir desta" " tela." -#: inc/classes/admin/settings/class-page.php:1718 +#: inc/classes/admin/settings/class-page.php:1717 msgid "Rocket Add-ons" msgstr "Complementos do Rocket" -#: inc/classes/admin/settings/class-page.php:1719 +#: inc/classes/admin/settings/class-page.php:1718 msgid "Rocket Add-ons are complementary features extending available options." msgstr "" "Os Complementos do Rocket são recursos complementares extendendo as opções " "disponíveis." -#: inc/classes/admin/settings/class-page.php:1732 +#: inc/classes/admin/settings/class-page.php:1731 msgid "Google Tracking" msgstr "Rastreamento do Google" -#: inc/classes/admin/settings/class-page.php:1738 +#: inc/classes/admin/settings/class-page.php:1737 msgid "Improve browser caching for Google Analytics" msgstr "Melhora o cache de navegador para o Google Analytics" -#: inc/classes/admin/settings/class-page.php:1740 +#: inc/classes/admin/settings/class-page.php:1739 #, php-format msgid "" "WP Rocket will host these Google scripts locally on your server to help " @@ -1806,15 +1975,15 @@ msgstr "" "para ajudar a satisfazer a recomendação do PageSpeed para Beneficiar-se " "do cache do navegador.
    %1$sSaiba mais%2$s" -#: inc/classes/admin/settings/class-page.php:1755 +#: inc/classes/admin/settings/class-page.php:1754 msgid "Facebook Pixel" msgstr "Pixel do Facebook" -#: inc/classes/admin/settings/class-page.php:1761 +#: inc/classes/admin/settings/class-page.php:1760 msgid "Improve browser caching for Facebook Pixel" msgstr "Melhora o cache de navegador para o Pixel do Facebook" -#: inc/classes/admin/settings/class-page.php:1763 +#: inc/classes/admin/settings/class-page.php:1762 #, php-format msgid "" "WP Rocket will host these Facebook Pixels locally on your server to help " @@ -1825,16 +1994,16 @@ msgstr "" " para satisfazer as recomendações de PageSpeed para Aproveitar o cache " "do navegador.
    %1$sAprenda Mais%2$s" -#: inc/classes/admin/settings/class-page.php:1776 -#: inc/classes/admin/settings/class-page.php:1880 +#: inc/classes/admin/settings/class-page.php:1775 +#: inc/classes/admin/settings/class-page.php:1879 msgid "Cloudflare" msgstr "Cloudflare" -#: inc/classes/admin/settings/class-page.php:1782 +#: inc/classes/admin/settings/class-page.php:1781 msgid "Integrate your Cloudflare account with this add-on." msgstr "Integre a sua conta Cloudflare com este complemento." -#: inc/classes/admin/settings/class-page.php:1783 +#: inc/classes/admin/settings/class-page.php:1782 msgid "" "Provide your account email, global API key, and domain to use options such " "as clearing the Cloudflare cache and enabling optimal settings with WP " @@ -1844,15 +2013,15 @@ msgstr "" "opções como esvaziar o cache do Cloudflare e ativar as configurações " "otimizadas com o WP Rocket." -#: inc/classes/admin/settings/class-page.php:1817 +#: inc/classes/admin/settings/class-page.php:1816 msgid "Varnish" msgstr "Varnish" -#: inc/classes/admin/settings/class-page.php:1823 +#: inc/classes/admin/settings/class-page.php:1822 msgid "If Varnish runs on your server, you must activate this add-on." msgstr "Você deve ativar este complemento se roda o Varnish no seu servidor." -#: inc/classes/admin/settings/class-page.php:1825 +#: inc/classes/admin/settings/class-page.php:1824 #, php-format msgid "" "Varnish cache will be purged each time WP Rocket clears its cache to ensure " @@ -1861,11 +2030,11 @@ msgstr "" "O cache Varnish será esvaziado sempre que o WP Rocket esvaziar o seu cache " "para garantir que o conteúdo esteja sempre atualizado.
    %1$sSaiba mais%2$s" -#: inc/classes/admin/settings/class-page.php:1839 +#: inc/classes/admin/settings/class-page.php:1838 msgid "Clear the Sucuri cache when WP Rocket’s cache is cleared." msgstr "Esvazia o cache Sucuri quando o cache do WP Rocket é esvaziado." -#: inc/classes/admin/settings/class-page.php:1842 +#: inc/classes/admin/settings/class-page.php:1841 msgid "" "Provide your API key to clear the Sucuri cache when WP Rocket’s cache is " "cleared." @@ -1873,48 +2042,48 @@ msgstr "" "Forneça a sua chave da API para limpar o cache Sucuri quando o cache do WP " "Rocket é limpo." -#: inc/classes/admin/settings/class-page.php:1850 -#: inc/classes/admin/settings/class-page.php:2000 +#: inc/classes/admin/settings/class-page.php:1849 +#: inc/classes/admin/settings/class-page.php:1999 msgid "Sucuri" msgstr "Sucuri" -#: inc/classes/admin/settings/class-page.php:1856 +#: inc/classes/admin/settings/class-page.php:1855 msgid "Synchronize Sucuri cache with this add-on." msgstr "Sincronize o cache Sucuri com este complemento." -#: inc/classes/admin/settings/class-page.php:1897 +#: inc/classes/admin/settings/class-page.php:1896 msgid "Cloudflare credentials" msgstr "Credenciais do Cloudflare" -#: inc/classes/admin/settings/class-page.php:1906 +#: inc/classes/admin/settings/class-page.php:1905 msgid "Cloudflare settings" msgstr "Configurações do Cloudflare" -#: inc/classes/admin/settings/class-page.php:1920 +#: inc/classes/admin/settings/class-page.php:1919 msgctxt "Cloudflare" msgid "Global API key:" msgstr "Chave global da API:" -#: inc/classes/admin/settings/class-page.php:1921 +#: inc/classes/admin/settings/class-page.php:1920 msgctxt "Cloudflare" msgid "Find your API key" msgstr "Encontre a sua chave da API" -#: inc/classes/admin/settings/class-page.php:1933 +#: inc/classes/admin/settings/class-page.php:1932 msgctxt "Cloudflare" msgid "Account email" msgstr "E-mail da Conta" -#: inc/classes/admin/settings/class-page.php:1942 +#: inc/classes/admin/settings/class-page.php:1941 msgctxt "Cloudflare" msgid "Zone ID" msgstr "ID de Zona" -#: inc/classes/admin/settings/class-page.php:1952 +#: inc/classes/admin/settings/class-page.php:1951 msgid "Development mode" msgstr "Modo de desenvolvimento" -#: inc/classes/admin/settings/class-page.php:1954 +#: inc/classes/admin/settings/class-page.php:1953 #, php-format msgid "" "Temporarily activate development mode on your website. This setting will " @@ -1923,11 +2092,11 @@ msgstr "" "Ativa temporariamente o modo de desenvolvimento no seu site. Esta opção se " "desativa automaticamente após 3 horas. %1$sSaiba mais%2$s" -#: inc/classes/admin/settings/class-page.php:1962 +#: inc/classes/admin/settings/class-page.php:1961 msgid "Optimal settings" msgstr "Configurações ótimas" -#: inc/classes/admin/settings/class-page.php:1963 +#: inc/classes/admin/settings/class-page.php:1962 msgid "" "Automatically enhances your Cloudflare configuration for speed, performance " "grade and compatibility." @@ -1935,11 +2104,11 @@ msgstr "" "Melhora automaticamente as suas configurações no Cloudflare para velocidade," " desempenho e compatibilidade." -#: inc/classes/admin/settings/class-page.php:1971 +#: inc/classes/admin/settings/class-page.php:1970 msgid "Relative protocol" msgstr "Protocolo relativo" -#: inc/classes/admin/settings/class-page.php:1972 +#: inc/classes/admin/settings/class-page.php:1971 msgid "" "Should only be used with Cloudflare's flexible SSL feature. URLs of static " "files (CSS, JS, images) will be rewritten to use // instead of http:// or " @@ -1949,11 +2118,11 @@ msgstr "" "arquivos estáticos (CSS, JS, imagens) serão reescritos para usar // ao invés" " de http:// ou https://." -#: inc/classes/admin/settings/class-page.php:2013 +#: inc/classes/admin/settings/class-page.php:2012 msgid "Sucuri credentials" msgstr "Credenciais Sucuri" -#: inc/classes/admin/settings/class-page.php:2026 +#: inc/classes/admin/settings/class-page.php:2025 msgctxt "Sucuri" msgid "" "Firewall API key (for plugin), must be in format {32 characters}/{32 " @@ -1962,7 +2131,7 @@ msgstr "" "A chave da API do Firewal (do plugin) precisa estar no formato{32 " "caracteres}/{32 caracteres}:" -#: inc/classes/admin/settings/class-page.php:2027 +#: inc/classes/admin/settings/class-page.php:2026 msgctxt "Sucuri" msgid "Find your API key" msgstr "Encontre a sua chave da API" @@ -1972,7 +2141,7 @@ msgstr "Encontre a sua chave da API" msgid "Upload file and import settings" msgstr "Enviar e importar configurações" -#: inc/classes/admin/settings/class-settings.php:387 +#: inc/classes/admin/settings/class-settings.php:381 msgid "" "Sucuri Add-on: The API key for the Sucuri firewall must be in format " "{32 characters}/{32 characters}." @@ -1980,7 +2149,7 @@ msgstr "" "Complemento Sucuri. A chave da API para o firewall Sucuri precisa estar no " "formato {32 caracteres}/{32 caracteres}." -#: inc/classes/admin/settings/class-settings.php:478 +#: inc/classes/admin/settings/class-settings.php:472 #: inc/deprecated/deprecated.php:1245 msgid "Settings saved." msgstr "Configurações salvas." @@ -2063,129 +2232,6 @@ msgstr "O conteúdo do CSS crítico não pôde ser gravado como um arquivo em %s msgid "Critical CSS for %s generated." msgstr "Foi gerado o CSS crítico para %s." -#: inc/classes/preload/class-homepage.php:152 -#, php-format -msgid "" -"Preload encountered an error. Could not gather links on %1$s because of the " -"following error: %2$s. %3$sLearn more%4$s." -msgstr "" -"O pré-carregamento encontrou um erro. Não foi possível obter os links em " -"%1$s devido ao seguinte erro: %2$s. %3$sSaiba mais%4$s." - -#: inc/classes/preload/class-homepage.php:165 -#, php-format -msgid "" -"Preload encountered an error. %1$s is not accessible to due to the following" -" response code: %2$s. Security measures could be preventing access. " -"%3$sLearn more%4$s." -msgstr "" -"O pré-carregamento encontrou um erro: %1$s não está acessível devido ao " -"seguinte código de resposta: %2$s. Medidas de segurança podem estar " -"impedindo o acesso. %3$sSaiba mais%4$s." - -#: inc/classes/preload/class-homepage.php:171 -#, php-format -msgid "" -"Preload encountered an error. %1$s is not accessible to due to the following" -" response code: 404. Please make sure your homepage is accessible in your " -"browser. %2$sLearn more%3$s." -msgstr "" -"O pré-carregamento encontrou um erro. %1$s não está acessível devido ao " -"seguinte código de resposta: 404. Por favor certifique-se que sua homepage " -"está acessível no seu navegador. %2$sSaiba mais%3$s." - -#: inc/classes/preload/class-homepage.php:177 -#, php-format -msgid "" -"Preload encountered an error. %1$s is not accessible to due to the following" -" response code: 500. Please check with your web host about server access. " -"%2$sLearn more%3$s." -msgstr "" -"O pré-carregamento encontrou um erro. %1$s não está acessível devido ao " -"seguinte código de resposta: 500. Por favor verifique com seu host web sobre" -" o acesso ao servidor. %2$sSaiba mais%3$s." - -#: inc/classes/preload/class-homepage.php:183 -#, php-format -msgid "" -"Preload encountered an error. Could not gather links on %1$s because it " -"returned the following response code: %2$s. %3$sLearn more%4$s." -msgstr "" -"O pré-carregamento encontrou um erro: Não foi possível obter os links em " -"%1$s pois retornou o seguinte código de resposta: %2$s. %3$sSaiba mais%4$s." - -#: inc/classes/preload/class-sitemap.php:149 -#, php-format -msgid "" -"Sitemap preload encountered an error. Could not gather links on %1$s because" -" of the following error: %2$s. %3$sLearn more%4$s." -msgstr "" -"O pré-carregamento do sitemap encontrou um erro. Não foi possível obter os " -"links em %1$s devido ao seguinte erro: %2$s. %3$sSaiba mais%4$s." - -#: inc/classes/preload/class-sitemap.php:164 -#, php-format -msgid "" -"Sitemap preload encountered an error. %1$s is not accessible to due to the " -"following response code: %2$s. Security measures could be preventing access." -" %3$sLearn more%4$s." -msgstr "" -"O pré-carregamento do sitemap encontrou um erro. %1$s não está acessível " -"devido ao seguinte código de resposta: %2$s. Medidas de segurança podem " -"estar impedindo o acesso. %3$sSaiba mais%4$s." - -#: inc/classes/preload/class-sitemap.php:169 -#, php-format -msgid "" -"Sitemap preload encountered an error. %1$s is not accessible to due to the " -"following response code: 404. Please make sure you entered the correct " -"sitemap URL and it is accessible in your browser. %2$sLearn more%3$s." -msgstr "" -"O pré-carregamento do sitemap encontrou um erro: %1$s não está acessível " -"devido ao seguinte código de resposta: 404. Por favor certifique-se de ter " -"inserido corretamente o URL do sitemap e que ela está acessível no seu " -"navegador. %2$sSaiba mais%3$s." - -#: inc/classes/preload/class-sitemap.php:174 -#, php-format -msgid "" -"Sitemap preload encountered an error. %1$s is not accessible to due to the " -"following response code: 500. Please check with your web host about server " -"access. %2$sLearn more%3$s." -msgstr "" -"O pré-carregameto do sitemap encontrou um erro. %1$s não está acessível " -"devido ao seguinte código de resposta: 500. Por favor verifique com seu host" -" web sobre o acesso ao servidor. %2$sSaiba mais%3$s." - -#: inc/classes/preload/class-sitemap.php:179 -#, php-format -msgid "" -"Sitemap preload encountered an error. Could not gather links on %1$s because" -" it returned the following response code: %2$s. %3$sLearn more%4$s." -msgstr "" -"O pré-carregamento do sitemap encontrou um erro. Não foi possível obter os " -"links em %1$s porque retornou o seguinte código de resposta: %2$s. %3$sSaiba" -" mais%4$s." - -#: inc/classes/preload/class-sitemap.php:195 -#, php-format -msgid "" -"Sitemap preload encountered an error. Could not collect links from %1$s " -"because the file is empty. %2$sLearn more%3$s." -msgstr "" -"O pré-carregamento do sitemap encontrou um erro. Não foi possível coletar os" -" links de %1$s porque o arquivo está vazio. %2$sSaiba mais%3$s." - -#: inc/classes/preload/class-sitemap.php:216 -#, php-format -msgid "" -"Sitemap preload encountered an error. Could not collect links from %1$s " -"because of an error during the XML sitemap parsing. %2$sLearn more%3$s." -msgstr "" -"O pré-carregamento do sitemap encontrou um erro. Não foi possível coletar os" -" links de %1$s devido a um erro durante a análise do sitemap XML. %2$sSaiba " -"mais%3$s." - #: inc/classes/subscriber/CDN/RocketCDN/AdminPageSubscriber.php:81 msgid "Next Billing Date" msgstr "Próxima data de cobrança" @@ -2317,18 +2363,11 @@ msgstr "" "O WP Rocket irá criar arquivos de cache separados para servir as suas " "imagens WebP." -#: inc/classes/subscriber/Optimization/class-critical-css-subscriber.php:82 +#: inc/classes/subscriber/Optimization/class-critical-css-subscriber.php:102 msgid "Critical CSS generation is currently running." msgstr "A geração do CSS crítico está sendo executada." -#: inc/classes/subscriber/Optimization/class-critical-css-subscriber.php:87 -#: inc/classes/subscriber/preload/class-preload-subscriber.php:242 -#, php-format -msgid "Go to the %1$sWP Rocket settings%2$s page to track progress." -msgstr "" -"Vá até as %1$sConfigurações do WP Rocket%2$s para acompanhar o progresso." - -#: inc/classes/subscriber/Optimization/class-critical-css-subscriber.php:191 +#: inc/classes/subscriber/Optimization/class-critical-css-subscriber.php:223 #, php-format msgid "" "Critical CSS generation is currently running: %1$d of %2$d page types " @@ -2337,16 +2376,16 @@ msgstr "" "A geração do CSS crítico está sendo executada: %1$d de %2$d tipos de páginas" " concluídos. (Atualize a página para ver o progresso)" -#: inc/classes/subscriber/Optimization/class-critical-css-subscriber.php:242 +#: inc/classes/subscriber/Optimization/class-critical-css-subscriber.php:274 #, php-format msgid "Critical CSS generation finished for %1$d of %2$d page types." msgstr "Geração de CSS crítico concluída para %1$d de %2$d tipos de página." -#: inc/classes/subscriber/Optimization/class-critical-css-subscriber.php:256 +#: inc/classes/subscriber/Optimization/class-critical-css-subscriber.php:288 msgid "Critical CSS generation encountered one or more errors." msgstr "A geração de CSS crítico encontrou um ou mais erros." -#: inc/classes/subscriber/Optimization/class-critical-css-subscriber.php:256 +#: inc/classes/subscriber/Optimization/class-critical-css-subscriber.php:288 msgid "Learn more." msgstr "Saiba mais." @@ -2430,48 +2469,6 @@ msgstr "Tutoriais" msgid "Getting started and how to videos" msgstr "Comece a usar e vídeos didáticos" -#: inc/classes/subscriber/preload/class-preload-subscriber.php:237 -msgid "Preload: WP Rocket has started preloading your website." -msgstr "Pré-carregamento: o WP Rocket começou a pré-carregar o seu website." - -#: inc/classes/subscriber/preload/class-preload-subscriber.php:281 -#, php-format -msgid "" -"Preload: %1$s uncached page has now been preloaded. (refresh to see " -"progress)" -msgid_plural "" -"Preload: %1$s uncached pages have now been preloaded. (refresh to see " -"progress)" -msgstr[0] "" -"Pré-carregamento: %1$s página sem cache foi pré-carregada. (atualize a " -"página para ver o progresso)" -msgstr[1] "" -"Pré-carregamento: %1$s páginas sem cache foram pré-carregadas. (atualize a " -"página para ver o progresso)" - -#: inc/classes/subscriber/preload/class-preload-subscriber.php:290 -msgid "The following error happened during gathering of the URLs to preload:" -msgid_plural "" -"The following errors happened during gathering of the URLs to preload:" -msgstr[0] "Ocorreu o seguinte erro obtendo os URLs a pré-carregar:" -msgstr[1] "Ocorreram os seguintes erros obtendo os URLs a pré-carregar:" - -#: inc/classes/subscriber/preload/class-preload-subscriber.php:342 -#, php-format -msgid "Preload complete: %d pages have been cached." -msgstr "Pré-carregamento concluído: %d páginas foram armazenadas em cache." - -#: inc/classes/subscriber/preload/class-sitemap-preload-subscriber.php:119 -#, php-format -msgid "" -"%1$sSimpleXML PHP extension%2$s is not enabled on your server. Please " -"contact your host to enable it before running sitemap-based cache " -"preloading." -msgstr "" -"A %1$sextensão SimpleXML do PHP%2$s não está ativa no seu servidor. Por " -"favor entre em contato com o seu host e ative-a antes de executar o pré-" -"carregamento do cache baseado no sitemap." - #: inc/classes/subscriber/third-party/plugins/Optimization/class-hummingbird-subscriber.php:77 #, php-format msgctxt "Hummingbird notice" @@ -2703,7 +2700,16 @@ msgstr "Escolha um domínio da lista" msgid "No domain available in your Cloudflare account" msgstr "Nenhum domínio disponível na sua conta do Cloudflare" -#: inc/deprecated/3.5.php:30 +#: inc/deprecated/3.5.php:66 inc/deprecated/3.5.php:190 +msgid "" +"Curl is disabled on your server. Please ask your host to enable it. This is " +"required for the Cloudflare Add-on to work correctly." +msgstr "" +"O Curl está desativado no seu servidor. Peça ao seu provedor para ativá-lo. " +"Isso é necessário para que o complemento do Cloudflare funcione " +"corretamente." + +#: inc/deprecated/3.5.php:74 #, php-format msgid "" "Cloudflare email, API key and Zone ID are not set. Read the " @@ -2712,7 +2718,7 @@ msgstr "" "O e-mail, chave da API e ID da Zona não foram definidos. Leia a " "%1$sdocumentação%2$spara mais assistência." -#: inc/deprecated/3.5.php:157 +#: inc/deprecated/3.5.php:201 #, php-format msgid "" "Cloudflare email and API key are not set. Read the %1$sdocumentation%2$s for" @@ -2721,7 +2727,7 @@ msgstr "" "O e-mail e a chave da API do Cloudflare nào estão definidos. Leia a " "%1$sdocumentação%2$s para mais assistência." -#: inc/deprecated/3.5.php:222 +#: inc/deprecated/3.5.php:266 msgid "Connection to Cloudflare failed" msgstr "Falha na conexão com o Cloudflare" @@ -2898,7 +2904,7 @@ msgstr "Configurações anonimizadas do WP Rocket:" msgid "Which WP Rocket settings are active" msgstr "Quais configurações do WP Rocket estão ativas" -#: inc/functions/options.php:540 inc/functions/options.php:579 +#: inc/functions/options.php:544 inc/functions/options.php:583 msgid "" "License validation failed. Our server could not resolve the request from " "your website." @@ -2906,7 +2912,7 @@ msgstr "" "Falha na validação da licensa. Nosso servidor não pôde resolver a " "solicitação do seu website." -#: inc/functions/options.php:540 inc/functions/options.php:579 +#: inc/functions/options.php:544 inc/functions/options.php:583 #, php-format msgid "" "Try clicking %1$sSave Changes%2$s below. If the error persists, follow " @@ -2915,7 +2921,7 @@ msgstr "" "Experimente clicar abaixo em %1$sSalvar Alterações%2$s. Se o erro persistir," " siga %3$seste guia%4$s." -#: inc/functions/options.php:556 +#: inc/functions/options.php:560 msgid "" "License validation failed. You may be using a nulled version of the plugin. " "Please do the following:" @@ -2923,61 +2929,61 @@ msgstr "" "Falha na validação da licensa. Você pode estar usando uma versão " "desatualizada do plugin. Faça o seguinte:" -#: inc/functions/options.php:556 inc/functions/options.php:598 +#: inc/functions/options.php:560 inc/functions/options.php:602 #, php-format msgid "Login to your WP Rocket %1$saccount%2$s" msgstr "Conecte-se à sua %1$sconta%2$s do WP Rocket" -#: inc/functions/options.php:556 inc/functions/options.php:598 +#: inc/functions/options.php:560 inc/functions/options.php:602 msgid "Download the zip file" msgstr "Baixe o arquivo zip" -#: inc/functions/options.php:556 inc/functions/options.php:598 +#: inc/functions/options.php:560 inc/functions/options.php:602 msgid "Reinstall" msgstr "Reinstalar" -#: inc/functions/options.php:556 +#: inc/functions/options.php:560 #, php-format msgid "" "If you do not have a WP Rocket account, please %1$spurchase a license%2$s." msgstr "Se você não tem uma conta do WP Rocket, %1$scompre uma licensa%2$s." -#: inc/functions/options.php:564 +#: inc/functions/options.php:568 msgid "" "License validation failed. This user account does not exist in our database." msgstr "" "A validação da licensa falhou: Esta conta de usuário não existe em nosso " "banco de dados." -#: inc/functions/options.php:564 +#: inc/functions/options.php:568 msgid "To resolve, please contact support." msgstr "Contacte o suporte para solucionar." -#: inc/functions/options.php:572 +#: inc/functions/options.php:576 msgid "License validation failed. This user account is blacklisted." msgstr "" "A validação da licensa falhou: Esta conta de usuário está na lista-negra." -#: inc/functions/options.php:572 +#: inc/functions/options.php:576 #, php-format msgid "Please see %1$sthis guide%2$s for more info." msgstr "Veja %1$seste guia%2$spara mais informações." -#: inc/functions/options.php:592 +#: inc/functions/options.php:596 msgid "Your license is not valid." msgstr "Sua licença não é válida." -#: inc/functions/options.php:592 +#: inc/functions/options.php:596 #, php-format msgid "Make sure you have an active %1$sWP Rocket license%2$s." msgstr "Certifique-se de ter uma %1$slicensa ativa do WP Rocket%2$s." -#: inc/functions/options.php:594 +#: inc/functions/options.php:598 msgid "You have added as many sites as your current license allows." msgstr "" "Você já adicionou o máximo de sites permitidos para a sua licensa atual." -#: inc/functions/options.php:594 +#: inc/functions/options.php:598 #, php-format msgid "" "Upgrade your %1$saccount%2$s or %3$stransfer your license%2$s to this " @@ -2986,25 +2992,25 @@ msgstr "" "Atualize sua %1$sconta%2$s ou %3$stransfira a sua licensa%2$s para este " "domínio." -#: inc/functions/options.php:596 +#: inc/functions/options.php:600 msgid "This website is not allowed." msgstr "Este website não é permitido." -#: inc/functions/options.php:596 +#: inc/functions/options.php:600 #, php-format msgid "Please %1$scontact support%2$s." msgstr "Por favor %1$scontacte o suporte%2$s." -#: inc/functions/options.php:598 +#: inc/functions/options.php:602 msgid "This license key is not recognized." msgstr "Esta chave de licensa não foi reconhecida." -#: inc/functions/options.php:598 +#: inc/functions/options.php:602 #, php-format msgid "If the issue persists, please %1$scontact support%2$s." msgstr "Se o problema persistir, %1$scontacte o suporte%2$s." -#: inc/functions/options.php:604 +#: inc/functions/options.php:608 #, php-format msgid "License validation failed: %s" msgstr "A validação da licensa falhou: %s" @@ -3287,7 +3293,7 @@ msgstr "Sim" #: views/settings/fields/one-click-addon.php:41 #: views/settings/fields/rocket-addon.php:32 -#: views/settings/fields/sliding-checkbox.php:26 views/settings/page.php:55 +#: views/settings/fields/sliding-checkbox.php:26 views/settings/page.php:56 msgctxt "Inactive state of checkbox" msgid "Off" msgstr "Não" @@ -3618,15 +3624,15 @@ msgstr "Configurações do WP Rocket" msgid "version %s" msgstr "versão %s" -#: views/settings/page.php:56 +#: views/settings/page.php:57 msgid "Show Sidebar" msgstr "Exibir Barra Lateral" -#: views/settings/page.php:75 +#: views/settings/page.php:76 msgid "Thanks for choosing to participate in the WP Rocket beta program!" msgstr "Obrigado por escolher participar do programa beta do WP Rocket!" -#: views/settings/page.php:76 +#: views/settings/page.php:77 msgid "" "A beta version is usually one that has new features and improvements, but we" " want to test it a little more before full launch." @@ -3634,7 +3640,7 @@ msgstr "" "Uma versão beta costuma ter novas funções e incrementos, mas queremos testá-" "la um pouco mais antes de lançá-la." -#: views/settings/page.php:77 +#: views/settings/page.php:78 msgid "" "We’d love it if you took our beta versions for a ride, but please keep in " "mind that it might be less stable than our other releases. Don’t worry, you " @@ -3644,7 +3650,7 @@ msgstr "" "que elas podem ser menos estáveis que as versões finais. Não se preocupe, " "você pode voltar à versão final atual se desejar." -#: views/settings/page.php:78 +#: views/settings/page.php:79 msgid "" "Your mission: please send all feedback about our beta versions, including " "bug reports, to support@wp-rocket.me" @@ -3652,15 +3658,15 @@ msgstr "" "Sua missão: por favor envie todo o feedback sobre nossas versões beta, " "incluindo relatórios de bugs, para support@wp-rocket.me" -#: views/settings/page.php:80 +#: views/settings/page.php:81 msgid "If you don’t want to join the beta program, simply close this window." msgstr "Se não quiser participar do programa beta, basta fechar esta janela." -#: views/settings/page.php:82 +#: views/settings/page.php:83 msgid "Activate Rocket Tester" msgstr "Ativar Testador do Rocket" -#: views/settings/page.php:93 +#: views/settings/page.php:94 msgid "" "Below is a detailed view of all data WP Rocket will collect if " "granted permission." @@ -3668,7 +3674,7 @@ msgstr "" "Abaixo está uma visão detalhada dos dados que o WP Rocket irá coletar " "se tiver permissão." -#: views/settings/page.php:96 +#: views/settings/page.php:97 msgid "" "WP Rocket will never transmit any domain names or email addresses (except " "for license validation), IP addresses, or third-party API keys." @@ -3677,7 +3683,7 @@ msgstr "" "e-mail (exceto para a validação da licensa), endereços IP ou chaves de API " "de terceiros." -#: views/settings/page.php:98 +#: views/settings/page.php:99 msgid "Activate Rocket analytics" msgstr "Ativar analytics do Rocket" diff --git a/tests/Fixtures/inc/Engine/Admin/HealthCheck/missed-cron.php b/tests/Fixtures/inc/Engine/Admin/HealthCheck/missed-cron.php new file mode 100644 index 0000000000..6de194072d --- /dev/null +++ b/tests/Fixtures/inc/Engine/Admin/HealthCheck/missed-cron.php @@ -0,0 +1,252 @@ + [ + [ + 'cap' => false, + 'screen' => 'options_general', + 'dismissed' => [], + 'options' => [ + 'purge_cron' => 0, + 'async_css' => 0, + 'manual_preload' => 0, + 'schedule_automatic_cleanup' => 0, + ], + 'events' => [ + 'rocket_purge_time_event' => false, + 'rocket_database_optimization_time_event' => false, + 'rocket_database_optimization_cron_interval' => false, + 'rocket_preload_cron_interval' => false, + 'rocket_critical_css_generation_cron_interval' => false, + ], + 'disable_cron' => false, + 'expected' => '', + ], + ], + 'badScreen' => [ + [ + 'cap' => true, + 'screen' => 'options_general', + 'dismissed' => [], + 'options' => [ + 'purge_cron' => 0, + 'async_css' => 0, + 'manual_preload' => 0, + 'schedule_automatic_cleanup' => 0, + ], + 'events' => [ + 'rocket_purge_time_event' => false, + 'rocket_database_optimization_time_event' => false, + 'rocket_database_optimization_cron_interval' => false, + 'rocket_preload_cron_interval' => false, + 'rocket_critical_css_generation_cron_interval' => false, + ], + 'disable_cron' => false, + 'expected' => '', + ], + ], + 'dismissedWarning' => [ + [ + 'cap' => true, + 'screen' => 'settings_page_wprocket', + 'dismissed' => [ + 'rocket_warning_cron' + ], + 'options' => [ + 'purge_cron' => 0, + 'async_css' => 0, + 'manual_preload' => 0, + 'schedule_automatic_cleanup' => 0, + ], + 'events' => [ + 'rocket_purge_time_event' => false, + 'rocket_database_optimization_time_event' => false, + 'rocket_database_optimization_cron_interval' => false, + 'rocket_preload_cron_interval' => false, + 'rocket_critical_css_generation_cron_interval' => false, + ], + 'disable_cron' => false, + 'expected' => '', + ], + ], + 'disabledOptions' => [ + [ + 'cap' => true, + 'screen' => 'settings_page_wprocket', + 'dismissed' => [], + 'options' => [ + 'purge_cron' => 0, + 'async_css' => 0, + 'manual_preload' => 0, + 'schedule_automatic_cleanup' => 0, + ], + 'events' => [ + 'rocket_purge_time_event' => false, + 'rocket_database_optimization_time_event' => false, + 'rocket_database_optimization_cron_interval' => false, + 'rocket_preload_cron_interval' => false, + 'rocket_critical_css_generation_cron_interval' => false, + ], + 'disable_cron' => false, + 'expected' => '', + ], + ], + 'noScheduledEvents' => [ + [ + 'cap' => true, + 'screen' => 'settings_page_wprocket', + 'dismissed' => [], + 'options' => [ + 'purge_cron' => 1, + 'async_css' => 1, + 'manual_preload' => 1, + 'schedule_automatic_cleanup' => 1, + ], + 'events' => [ + 'rocket_purge_time_event' => false, + 'rocket_database_optimization_time_event' => false, + 'rocket_database_optimization_cron_interval' => false, + 'rocket_preload_cron_interval' => false, + 'rocket_critical_css_generation_cron_interval' => false, + ], + 'disable_cron' => false, + 'expected' => '', + ], + ], + 'noMissedEvents' => [ + [ + 'cap' => true, + 'screen' => 'settings_page_wprocket', + 'dismissed' => [], + 'options' => [ + 'purge_cron' => 1, + 'async_css' => 1, + 'manual_preload' => 1, + 'schedule_automatic_cleanup' => 1, + ], + 'disable_cron' => false, + 'events' => [ + 'rocket_purge_time_event' => time(), + 'rocket_database_optimization_time_event' => time(), + 'rocket_database_optimization_cron_interval' => time(), + 'rocket_preload_cron_interval' => time(), + 'rocket_critical_css_generation_cron_interval' => time(), + ], + 'expected' => '', + ], + ], + 'PurgeTimeMissedEvent' => [ + [ + 'cap' => true, + 'screen' => 'settings_page_wprocket', + 'dismissed' => [], + 'options' => [ + 'purge_cron' => 1, + 'async_css' => 1, + 'manual_preload' => 1, + 'schedule_automatic_cleanup' => 1, + ], + 'events' => [ + 'rocket_purge_time_event' => time() - 3600, + 'rocket_database_optimization_time_event' => time(), + 'rocket_database_optimization_cron_interval' => time(), + 'rocket_preload_cron_interval' => time(), + 'rocket_critical_css_generation_cron_interval' => time(), + ], + 'disable_cron' => false, + 'expected' => '
    +

    The following scheduled event failed to run. This may indicate the CRON system is not running properly, which can prevent some WP Rocket features from working as intended:

    +
      +
    • Scheduled Cache Purge
    • +
    +

    Please contact your host to check if CRON is working.

    +

    Dismiss this notice.

    ', + ], + ], + 'MultipleMissedEvents' => [ + [ + 'cap' => true, + 'screen' => 'settings_page_wprocket', + 'dismissed' => [], + 'options' => [ + 'purge_cron' => 1, + 'async_css' => 1, + 'manual_preload' => 1, + 'schedule_automatic_cleanup' => 1, + ], + 'events' => [ + 'rocket_purge_time_event' => time() - 3600, + 'rocket_database_optimization_time_event' => time() - 3600, + 'rocket_database_optimization_cron_interval' => time(), + 'rocket_preload_cron_interval' => time(), + 'rocket_critical_css_generation_cron_interval' => time(), + ], + 'disable_cron' => false, + 'expected' => '
    +

    The following scheduled events failed to run. This may indicate the CRON system is not running properly, which can prevent some WP Rocket features from working as intended:

    +
      +
    • Scheduled Cache Purge
    • +
    • Scheduled Database Optimization
    • +
    +

    Please contact your host to check if CRON is working.

    +

    Dismiss this notice.

    ', + ], + ], + 'PurgeTimeMissedEventDisabledCron' => [ + [ + 'cap' => true, + 'screen' => 'settings_page_wprocket', + 'dismissed' => [], + 'options' => [ + 'purge_cron' => 1, + 'async_css' => 1, + 'manual_preload' => 1, + 'schedule_automatic_cleanup' => 1, + ], + 'events' => [ + 'rocket_purge_time_event' => time() - 7200, + 'rocket_database_optimization_time_event' => time(), + 'rocket_database_optimization_cron_interval' => time(), + 'rocket_preload_cron_interval' => time(), + 'rocket_critical_css_generation_cron_interval' => time(), + ], + 'disable_cron' => true, + 'expected' => '
    +

    The following scheduled event failed to run. This may indicate the CRON system is not running properly, which can prevent some WP Rocket features from working as intended:

    +
      +
    • Scheduled Cache Purge
    • +
    +

    Please contact your host to check if CRON is working.

    +

    Dismiss this notice.

    ', + ], + ], + 'MultipleMissedEventsDisabledCron' => [ + [ + 'cap' => true, + 'screen' => 'settings_page_wprocket', + 'dismissed' => [], + 'options' => [ + 'purge_cron' => 1, + 'async_css' => 1, + 'manual_preload' => 1, + 'schedule_automatic_cleanup' => 1, + ], + 'events' => [ + 'rocket_purge_time_event' => time() - 7200, + 'rocket_database_optimization_time_event' => time() - 7200, + 'rocket_database_optimization_cron_interval' => time(), + 'rocket_preload_cron_interval' => time(), + 'rocket_critical_css_generation_cron_interval' => time(), + ], + 'disable_cron' => true, + 'expected' => '
    +

    The following scheduled events failed to run. This may indicate the CRON system is not running properly, which can prevent some WP Rocket features from working as intended:

    +
      +
    • Scheduled Cache Purge
    • +
    • Scheduled Database Optimization
    • +
    +

    Please contact your host to check if CRON is working.

    +

    Dismiss this notice.

    ', + ], + ], +]; diff --git a/tests/Fixtures/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/cleanMinify.php b/tests/Fixtures/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/cleanMinify.php new file mode 100644 index 0000000000..ad1a5c76d3 --- /dev/null +++ b/tests/Fixtures/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/cleanMinify.php @@ -0,0 +1,81 @@ + 'wp-content/cache/min/', + // Virtual filesystem structure. + 'structure' => [ + 'wp-content' => [ + 'cache' => [ + 'min' => [ + '1' => [ + 'combined1.css' => '', + 'combined2.css' => '', + ], + ], + ], + ], + ], + // Default settings. + 'settings' => [ + 'minify_css' => false, + 'exclude_css' => [], + 'cdn' => false, + 'cdn_cnames' => [], + ], + 'test_data' => [ + 'shouldNotCleanMinify' => [ + 'value' => [ + 'minify_css' => false, + 'exclude_css' => [], + 'cdn' => false, + 'cdn_cnames' => [], + ], + 'should_run' => false, + ], + 'shouldNotCleanMinifyNewCname' => [ + 'value' => [ + 'minify_css' => false, + 'exclude_css' => [], + 'cdn' => false, + 'cdn_cnames' => [ 'cname' ], + ], + 'should_run' => false, + ], + 'shouldCleanMinifyCSS' => [ + 'value' => [ + 'minify_css' => true, + 'exclude_css' => [], + 'cdn' => false, + 'cdn_cnames' => [], + ], + 'should_run' => true, + ], + 'shouldCleanMinifyExcludeCSS' => [ + 'value' => [ + 'minify_css' => true, + 'exclude_css' => [ '/wp-content/plugins/some-plugin/file.css' ], + 'cdn' => false, + 'cdn_cnames' => [], + ], + 'should_run' => true, + ], + 'shouldCleanMinifyCDN' => [ + 'value' => [ + 'minify_css' => false, + 'exclude_css' => [], + 'cdn' => true, + 'cdn_cnames' => [], + ], + 'should_run' => true, + ], + 'shouldCleanMinifyCDNCname' => [ + 'value' => [ + 'minify_css' => false, + 'exclude_css' => [], + 'cdn' => true, + 'cdn_cnames' => [ 'cname' ], + ], + 'should_run' => true, + ], + ], +]; diff --git a/tests/Fixtures/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/regenerateMinifyCssKey.php b/tests/Fixtures/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/regenerateMinifyCssKey.php new file mode 100644 index 0000000000..ce7f696892 --- /dev/null +++ b/tests/Fixtures/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/regenerateMinifyCssKey.php @@ -0,0 +1,107 @@ + [ + 'minify_css' => false, + 'exclude_css' => [], + 'cdn' => false, + 'cdn_cnames' => [], + ], + 'test_data' => [ + 'shouldNotRegenerateKey' => [ + 'value' => [ + 'minify_css' => false, + 'exclude_css' => [], + 'cdn' => false, + 'cdn_cnames' => [], + ], + 'should_run' => false, + 'expected' => [ + 'minify_css' => false, + 'exclude_css' => [], + 'cdn' => false, + 'cdn_cnames' => [], + ], + ], + 'shouldNotRegenerateKeyNewCname' => [ + 'value' => [ + 'minify_css' => false, + 'exclude_css' => [], + 'cdn' => false, + 'cdn_cnames' => [ 'cname' ], + ], + 'should_run' => false, + 'expected' => [ + 'minify_css' => false, + 'exclude_css' => [], + 'cdn' => false, + 'cdn_cnames' => [ 'cname' ], + ], + ], + 'shouldRegenerateKey' => [ + 'value' => [ + 'minify_css' => true, + 'exclude_css' => [], + 'cdn' => false, + 'cdn_cnames' => [], + ], + 'should_run' => true, + 'expected' => [ + 'minify_css' => true, + 'exclude_css' => [], + 'cdn' => false, + 'cdn_cnames' => [], + 'minify_css_key' => 'minify_css_key', + ], + ], + 'shouldRegenerateKeyExcludeCSS' => [ + 'value' => [ + 'minify_css' => true, + 'exclude_css' => [ '/wp-content/plugins/some-plugin/file.css' ], + 'cdn' => false, + 'cdn_cnames' => [], + ], + 'should_run' => true, + 'expected' => [ + 'minify_css' => true, + 'exclude_css' => [ '/wp-content/plugins/some-plugin/file.css' ], + 'cdn' => false, + 'cdn_cnames' => [], + 'minify_css_key' => 'minify_css_key', + ], + ], + 'shouldRegenerateKeyCDN' => [ + 'value' => [ + 'minify_css' => false, + 'exclude_css' => [], + 'cdn' => true, + 'cdn_cnames' => [], + ], + 'should_run' => true, + 'expected' => [ + 'minify_css' => false, + 'exclude_css' => [], + 'cdn' => true, + 'cdn_cnames' => [], + 'minify_css_key' => 'minify_css_key', + ], + ], + 'shouldRegenerateKeyCDNCname' => [ + 'value' => [ + 'minify_css' => false, + 'exclude_css' => [], + 'cdn' => true, + 'cdn_cnames' => [ 'cname' ], + ], + 'should_run' => true, + 'expected' => [ + 'minify_css' => false, + 'exclude_css' => [], + 'cdn' => true, + 'cdn_cnames' => [ 'cname' ], + 'minify_css_key' => 'minify_css_key', + ], + ], + ], +]; diff --git a/tests/Fixtures/inc/common/rocketCleanCacheThemeUpdate.php b/tests/Fixtures/inc/common/rocketCleanCacheThemeUpdate.php index 859b9b21a7..a177b18857 100644 --- a/tests/Fixtures/inc/common/rocketCleanCacheThemeUpdate.php +++ b/tests/Fixtures/inc/common/rocketCleanCacheThemeUpdate.php @@ -68,7 +68,6 @@ 'vfs://public/wp-content/cache/wp-rocket/example.org' => null, 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456' => null, 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654' => null, - 'vfs://public/wp-content/cache/wp-rocket/dots.example.org' => [], ], 'non_cleaned' => [ // fs entry => should scan the directory and get the file listings. @@ -77,7 +76,7 @@ 'vfs://public/wp-content/cache/critical-css/' => true, 'vfs://public/wp-content/cache/wp-rocket/' => false, 'vfs://public/wp-content/cache/wp-rocket/index.html' => false, - 'vfs://public/wp-content/cache/wp-rocket/dots.example.org/' => false, + 'vfs://public/wp-content/cache/wp-rocket/dots.example.org/' => true, ], 'wp_get_theme' => true, ], diff --git a/tests/Fixtures/inc/common/rocketWidgetUpdateCallback.php b/tests/Fixtures/inc/common/rocketWidgetUpdateCallback.php index f5c4fb10f9..4529d7a6b4 100644 --- a/tests/Fixtures/inc/common/rocketWidgetUpdateCallback.php +++ b/tests/Fixtures/inc/common/rocketWidgetUpdateCallback.php @@ -6,15 +6,15 @@ 'vfs://public/wp-content/cache/wp-rocket/example.org' => null, 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456' => null, 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654' => null, - 'vfs://public/wp-content/cache/wp-rocket/dots.example.org' => [], ], 'non_cleaned' => [ // fs entry => should scan the directory and get the file listings. - 'vfs://public/wp-content/cache/min/' => true, - 'vfs://public/wp-content/cache/busting/' => true, - 'vfs://public/wp-content/cache/critical-css/' => true, - 'vfs://public/wp-content/cache/wp-rocket/' => false, - 'vfs://public/wp-content/cache/wp-rocket/index.html' => false, + 'vfs://public/wp-content/cache/min/' => true, + 'vfs://public/wp-content/cache/busting/' => true, + 'vfs://public/wp-content/cache/critical-css/' => true, + 'vfs://public/wp-content/cache/wp-rocket/' => false, + 'vfs://public/wp-content/cache/wp-rocket/index.html' => false, + 'vfs://public/wp-content/cache/wp-rocket/dots.example.org/' => true, ], ]; diff --git a/tests/Fixtures/inc/functions/rocketAddUrlProtocol.php b/tests/Fixtures/inc/functions/rocketAddUrlProtocol.php new file mode 100644 index 0000000000..25a875a7fe --- /dev/null +++ b/tests/Fixtures/inc/functions/rocketAddUrlProtocol.php @@ -0,0 +1,42 @@ + 'http://example.org', + 'expected' => 'http://example.org', + ], + [ + 'url' => 'http://example.org?p=10', + 'expected' => 'http://example.org?p=10', + ], + [ + 'url' => 'https://example.org/lorem-ipsum/', + 'expected' => 'https://example.org/lorem-ipsum/', + ], + + [ + 'url' => '//example.org', + 'expected' => 'http://example.org', + ], + [ + 'url' => '//example.org?p=10', + 'expected' => 'http://example.org?p=10', + ], + [ + 'url' => '//example.org/lorem-ipsum/', + 'expected' => 'http://example.org/lorem-ipsum/', + ], + + [ + 'url' => 'example.org', + 'expected' => 'http://example.org', + ], + [ + 'url' => 'example.org?p=10', + 'expected' => 'http://example.org?p=10', + ], + [ + 'url' => 'example.org/lorem-ipsum/', + 'expected' => 'http://example.org/lorem-ipsum/', + ], +]; diff --git a/tests/Fixtures/inc/functions/rocketCleanDomain.php b/tests/Fixtures/inc/functions/rocketCleanDomain.php index d287eeaeb0..bcf9ad2f58 100644 --- a/tests/Fixtures/inc/functions/rocketCleanDomain.php +++ b/tests/Fixtures/inc/functions/rocketCleanDomain.php @@ -11,7 +11,6 @@ // Test data. 'test_data' => [ - 'shouldDeleteAll_example.org*_whenNoLangGiven' => [ 'i18n' => [ 'lang' => '', @@ -25,15 +24,15 @@ 'vfs://public/wp-content/cache/wp-rocket/example.org' => null, 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456' => null, 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654' => null, - 'vfs://public/wp-content/cache/wp-rocket/dots.example.org' => [], ], 'non_cleaned' => [ // fs entry => should scan the directory and get the file listings. - 'vfs://public/wp-content/cache/min/' => true, - 'vfs://public/wp-content/cache/busting/' => true, - 'vfs://public/wp-content/cache/critical-css/' => true, - 'vfs://public/wp-content/cache/wp-rocket/' => false, - 'vfs://public/wp-content/cache/wp-rocket/index.html' => false, + 'vfs://public/wp-content/cache/min/' => true, + 'vfs://public/wp-content/cache/busting/' => true, + 'vfs://public/wp-content/cache/critical-css/' => true, + 'vfs://public/wp-content/cache/wp-rocket/' => false, + 'vfs://public/wp-content/cache/wp-rocket/index.html' => false, + 'vfs://public/wp-content/cache/wp-rocket/dots.example.org/' => true, ], ], 'unit_test' => [ @@ -41,11 +40,10 @@ 'get_rocket_i18n_uri' => [ 'http://example.org' ], 'get_rocket_i18n_home_url' => null, 'root' => 'vfs://public/wp-content/cache/wp-rocket/example.org', - 'rocket_rrmdir' => [ + 'rocket_rrmdir' => [ 'vfs://public/wp-content/cache/wp-rocket/example.org', 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456', 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654', - 'vfs://public/wp-content/cache/wp-rocket/dots.example.org', ], ], ], @@ -63,15 +61,15 @@ 'vfs://public/wp-content/cache/wp-rocket/example.org' => null, 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456' => null, 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654' => null, - 'vfs://public/wp-content/cache/wp-rocket/dots.example.org' => [], ], 'non_cleaned' => [ // fs entry => should scan the directory and get the file listings. - 'vfs://public/wp-content/cache/min/' => true, - 'vfs://public/wp-content/cache/busting/' => true, - 'vfs://public/wp-content/cache/critical-css/' => true, - 'vfs://public/wp-content/cache/wp-rocket/' => false, - 'vfs://public/wp-content/cache/wp-rocket/index.html' => false, + 'vfs://public/wp-content/cache/min/' => true, + 'vfs://public/wp-content/cache/busting/' => true, + 'vfs://public/wp-content/cache/critical-css/' => true, + 'vfs://public/wp-content/cache/wp-rocket/' => false, + 'vfs://public/wp-content/cache/wp-rocket/index.html' => false, + 'vfs://public/wp-content/cache/wp-rocket/dots.example.org/' => true, ], ], 'unit_test' => [ @@ -79,11 +77,10 @@ 'get_rocket_i18n_uri' => null, 'get_rocket_i18n_home_url' => 'http://example.org', 'root' => 'vfs://public/wp-content/cache/wp-rocket/example.org', - 'rocket_rrmdir' => [ + 'rocket_rrmdir' => [ 'vfs://public/wp-content/cache/wp-rocket/example.org', 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456', 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654', - 'vfs://public/wp-content/cache/wp-rocket/dots.example.org', ], ], ], @@ -104,15 +101,16 @@ 'vfs://public/wp-content/cache/wp-rocket/example.org' => null, 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456' => null, 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654' => null, - 'vfs://public/wp-content/cache/wp-rocket/dots.example.org' => [], ], 'non_cleaned' => [ // fs entry => should scan the directory and get the file listings. - 'vfs://public/wp-content/cache/min/' => true, - 'vfs://public/wp-content/cache/busting/' => true, - 'vfs://public/wp-content/cache/critical-css/' => true, - 'vfs://public/wp-content/cache/wp-rocket/' => false, - 'vfs://public/wp-content/cache/wp-rocket/index.html' => false, + 'vfs://public/wp-content/cache/min/' => true, + 'vfs://public/wp-content/cache/busting/' => true, + 'vfs://public/wp-content/cache/critical-css/' => true, + + 'vfs://public/wp-content/cache/wp-rocket/' => false, + 'vfs://public/wp-content/cache/wp-rocket/index.html' => false, + 'vfs://public/wp-content/cache/wp-rocket/dots.example.org/' => true, ], ], 'unit_test' => [ @@ -120,11 +118,10 @@ 'get_rocket_i18n_uri' => null, 'get_rocket_i18n_home_url' => 'http://example.org?lang=fr', 'root' => 'vfs://public/wp-content/cache/wp-rocket/example.org', - 'rocket_rrmdir' => [ + 'rocket_rrmdir' => [ 'vfs://public/wp-content/cache/wp-rocket/example.org', 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456', 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654', - 'vfs://public/wp-content/cache/wp-rocket/dots.example.org', ], ], ], @@ -153,24 +150,29 @@ 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/index.html' => null, 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/index.html_gzip' => null, 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/nec-ullamcorper/' => null, - 'vfs://public/wp-content/cache/wp-rocket/dots.example.org/' => [], ], 'non_cleaned' => [ // fs entry => should scan the directory and get the file listings. - 'vfs://public/wp-content/cache/min/' => true, - 'vfs://public/wp-content/cache/busting/' => true, - 'vfs://public/wp-content/cache/critical-css/' => true, - 'vfs://public/wp-content/cache/wp-rocket/' => false, - 'vfs://public/wp-content/cache/wp-rocket/index.html' => false, - 'vfs://public/wp-content/cache/wp-rocket/example.org/' => false, - 'vfs://public/wp-content/cache/wp-rocket/example.org/fr/' => true, - 'vfs://public/wp-content/cache/wp-rocket/example.org/de/' => true, + 'vfs://public/wp-content/cache/min/' => true, + 'vfs://public/wp-content/cache/busting/' => true, + 'vfs://public/wp-content/cache/critical-css/' => true, + + 'vfs://public/wp-content/cache/wp-rocket/' => false, + 'vfs://public/wp-content/cache/wp-rocket/index.html' => false, + + 'vfs://public/wp-content/cache/wp-rocket/example.org/' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org/fr/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org/de/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/' => false, 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/de/' => true, 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/fr/' => true, - 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/' => false, - 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/fr/' => true, - 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/de/' => true, + + 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/fr/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/de/' => true, + + 'vfs://public/wp-content/cache/wp-rocket/dots.example.org/' => true, ], ], 'unit_test' => [ @@ -178,11 +180,10 @@ 'get_rocket_i18n_uri' => null, 'get_rocket_i18n_home_url' => 'http://example.org', 'root' => 'vfs://public/wp-content/cache/wp-rocket/example.org', - 'rocket_rrmdir' => [ + 'rocket_rrmdir' => [ 'vfs://public/wp-content/cache/wp-rocket/example.org', 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456', 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654', - 'vfs://public/wp-content/cache/wp-rocket/dots.example.org', ], ], ], @@ -200,34 +201,41 @@ 'expected' => [ 'rocket_clean_domain_urls' => [ 'http://example.org/fr' ], 'cleaned' => [ - 'vfs://public/wp-content/cache/wp-rocket/example.org/fr' => null, - 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/fr' => null, + 'vfs://public/wp-content/cache/wp-rocket/example.org/fr' => null, + 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/fr' => null, + 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/fr' => null, ], 'non_cleaned' => [ // fs entry => should scan the directory and get the file listings. - 'vfs://public/wp-content/cache/min/' => true, - 'vfs://public/wp-content/cache/busting/' => true, - 'vfs://public/wp-content/cache/critical-css/' => true, - 'vfs://public/wp-content/cache/wp-rocket/' => false, - 'vfs://public/wp-content/cache/wp-rocket/index.html' => false, - 'vfs://public/wp-content/cache/wp-rocket/example.org/' => false, - 'vfs://public/wp-content/cache/wp-rocket/example.org/index.html' => false, - 'vfs://public/wp-content/cache/wp-rocket/example.org/index.html_gzip' => false, - 'vfs://public/wp-content/cache/wp-rocket/example.org/de/' => true, - 'vfs://public/wp-content/cache/wp-rocket/example.org/hidden-files/' => true, - 'vfs://public/wp-content/cache/wp-rocket/example.org/lorem-ipsum/' => true, - 'vfs://public/wp-content/cache/wp-rocket/example.org/nec-ullamcorper/' => true, + 'vfs://public/example.org/' => true, + 'vfs://public/wp-rocket-config/' => true, + 'vfs://public/wp-content/cache/min/' => true, + 'vfs://public/wp-content/cache/busting/' => true, + 'vfs://public/wp-content/cache/critical-css/' => true, + + 'vfs://public/wp-content/cache/wp-rocket/' => false, + 'vfs://public/wp-content/cache/wp-rocket/index.html' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org/' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org/index.html' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org/index.html_gzip' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org/de/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org/hidden-files/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org/lorem-ipsum/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org/nec-ullamcorper/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/' => false, 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/index.html' => false, 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/index.html_gzip' => false, 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/de/' => true, 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/lorem-ipsum/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/' => false, 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/index.html' => false, 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/index.html_gzip' => false, 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/de/' => true, 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/nec-ullamcorper/' => true, - 'vfs://public/wp-content/cache/wp-rocket/dots.example.org/' => true, + + 'vfs://public/wp-content/cache/wp-rocket/dots.example.org/' => true, ], ], 'unit_test' => [ @@ -243,7 +251,7 @@ ], ], - 'polylang_shouldDeleteDirs_de' => [ + 'polylang_shouldDeleteDirs_de' => [ 'i18n' => [ 'lang' => 'de', 'data' => $i18n_plugins['polylang'], @@ -262,29 +270,34 @@ ], 'non_cleaned' => [ // fs entry => should scan the directory and get the file listings. - 'vfs://public/wp-content/cache/min/' => true, - 'vfs://public/wp-content/cache/busting/' => true, - 'vfs://public/wp-content/cache/critical-css/' => true, - 'vfs://public/wp-content/cache/wp-rocket/' => false, - 'vfs://public/wp-content/cache/wp-rocket/index.html' => false, - 'vfs://public/wp-content/cache/wp-rocket/example.org/' => false, - 'vfs://public/wp-content/cache/wp-rocket/example.org/index.html' => false, - 'vfs://public/wp-content/cache/wp-rocket/example.org/index.html_gzip' => false, - 'vfs://public/wp-content/cache/wp-rocket/example.org/fr/' => true, - 'vfs://public/wp-content/cache/wp-rocket/example.org/hidden-files/' => true, - 'vfs://public/wp-content/cache/wp-rocket/example.org/lorem-ipsum/' => true, - 'vfs://public/wp-content/cache/wp-rocket/example.org/nec-ullamcorper/' => true, + 'vfs://public/wp-content/cache/min/' => true, + 'vfs://public/wp-content/cache/busting/' => true, + 'vfs://public/wp-content/cache/critical-css/' => true, + + 'vfs://public/wp-content/cache/wp-rocket/' => false, + 'vfs://public/wp-content/cache/wp-rocket/index.html' => false, + + 'vfs://public/wp-content/cache/wp-rocket/example.org/' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org/index.html' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org/index.html_gzip' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org/fr/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org/hidden-files/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org/lorem-ipsum/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org/nec-ullamcorper/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/' => false, 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/index.html' => false, 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/index.html_gzip' => false, 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/fr/' => true, 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/lorem-ipsum/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/' => false, 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/index.html' => false, 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/index.html_gzip' => false, 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/fr/' => true, 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/nec-ullamcorper/' => true, - 'vfs://public/wp-content/cache/wp-rocket/dots.example.org/' => true, + + 'vfs://public/wp-content/cache/wp-rocket/dots.example.org/' => true, ], ], 'unit_test' => [ diff --git a/tests/Fixtures/inc/functions/rocketCleanFiles.php b/tests/Fixtures/inc/functions/rocketCleanFiles.php new file mode 100644 index 0000000000..cd3d942268 --- /dev/null +++ b/tests/Fixtures/inc/functions/rocketCleanFiles.php @@ -0,0 +1,210 @@ + 'wp-content/cache/', + + // Virtual filesystem structure. + 'structure' => require WP_ROCKET_TESTS_FIXTURES_DIR . '/vfs-structure/default.php', + + // Test data. + 'test_data' => [ + 'shouldBailOutWhenNoURLsToClean' => [ + 'urls' => [], + 'expected' => [ + 'cleaned' => [], + 'non_cleaned' => [ + // fs entry => should scan the directory and get the file listings. + 'vfs://public/wp-content/cache/min/' => true, + 'vfs://public/wp-content/cache/busting/' => true, + 'vfs://public/wp-content/cache/critical-css/' => true, + + 'vfs://public/wp-content/cache/wp-rocket/' => false, + 'vfs://public/wp-content/cache/wp-rocket/index.html' => false, + + 'vfs://public/wp-content/cache/wp-rocket/example.org/' => true, + + 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/' => true, + + 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/' => true, + + 'vfs://public/wp-content/cache/wp-rocket/dots.example.org/' => true, + ], + ], + ], + 'shouldDeleteSingleUrl' => [ + 'urls' => [ + 'http://dots.example.org/', + ], + 'expected' => [ + 'dump_results' => true, + 'cleaned' => [ + 'vfs://public/wp-content/cache/wp-rocket/dots.example.org/' => [], + ], + 'non_cleaned' => [ + // fs entry => should scan the directory and get the file listings. + 'vfs://public/wp-content/cache/min/' => true, + 'vfs://public/wp-content/cache/busting/' => true, + 'vfs://public/wp-content/cache/critical-css/' => true, + + 'vfs://public/wp-content/cache/wp-rocket/' => false, + 'vfs://public/wp-content/cache/wp-rocket/index.html' => false, + + 'vfs://public/wp-content/cache/wp-rocket/example.org/' => true, + + 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/' => true, + + 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/' => true, + ], + ], + ], + 'shouldDeletePageUrlInCacheAndUserCache' => [ + 'urls' => [ + 'http://example.org/lorem-ipsum/', + ], + 'expected' => [ + 'cleaned' => [ + 'vfs://public/wp-content/cache/wp-rocket/example.org/lorem-ipsum/' => null, + 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/lorem-ipsum/' => null, + ], + 'non_cleaned' => [ + // fs entry => should scan the directory and get the file listings. + 'vfs://public/wp-content/cache/min/' => true, + 'vfs://public/wp-content/cache/busting/' => true, + 'vfs://public/wp-content/cache/critical-css/' => true, + + 'vfs://public/wp-content/cache/wp-rocket/' => false, + 'vfs://public/wp-content/cache/wp-rocket/index.html' => false, + + 'vfs://public/wp-content/cache/wp-rocket/example.org/' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org/index.html' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org/index.html_gzip' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org/de/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org/fr/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org/hidden-files/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org/nec-ullamcorper/' => true, + + 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/index.html' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/index.html_gzip' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/de/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/fr/' => true, + + 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/' => true, + + 'vfs://public/wp-content/cache/wp-rocket/dots.example.org/' => true, + ], + ], + ], + 'shouldDeleteChildPageUrlInCacheAndUserCache' => [ + 'urls' => [ + 'http://example.org/nec-ullamcorper/enim-nunc-faucibus/', + ], + 'expected' => [ + 'cleaned' => [ + 'vfs://public/wp-content/cache/wp-rocket/example.org/nec-ullamcorper/enim-nunc-faucibus/' => null, + 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/nec-ullamcorper/enim-nunc-faucibus/' => null, + ], + 'non_cleaned' => [ + // fs entry => should scan the directory and get the file listings. + 'vfs://public/wp-content/cache/min/' => true, + 'vfs://public/wp-content/cache/busting/' => true, + 'vfs://public/wp-content/cache/critical-css/' => true, + 'vfs://public/wp-content/cache/wp-rocket/' => false, + 'vfs://public/wp-content/cache/wp-rocket/index.html' => false, + + 'vfs://public/wp-content/cache/wp-rocket/example.org/' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org/index.html' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org/index.html_gzip' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org/de/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org/fr/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org/hidden-files/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org/lorem-ipsum/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org/nec-ullamcorper/' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org/nec-ullamcorper/index.html' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org/nec-ullamcorper/index.html_gzip' => false, + + 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/' => true, + + 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/index.html' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/index.html_gzip' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/de/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/fr/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/nec-ullamcorper/' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/nec-ullamcorper/index.html' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/nec-ullamcorper/index.html_gzip' => false, + + 'vfs://public/wp-content/cache/wp-rocket/dots.example.org/' => true, + ], + ], + ], + 'shouldDeleteLangUrlInCacheAndUserCaches' => [ + 'urls' => [ + 'http://example.org/fr/', + ], + 'expected' => [ + 'cleaned' => [ + 'vfs://public/wp-content/cache/wp-rocket/example.org/fr/' => null, + 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/fr/' => null, + 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/fr/' => null, + ], + 'non_cleaned' => [ + // fs entry => should scan the directory and get the file listings. + 'vfs://public/wp-content/cache/min/' => true, + 'vfs://public/wp-content/cache/busting/' => true, + 'vfs://public/wp-content/cache/critical-css/' => true, + + 'vfs://public/wp-content/cache/wp-rocket/' => false, + 'vfs://public/wp-content/cache/wp-rocket/index.html' => false, + + 'vfs://public/wp-content/cache/wp-rocket/example.org/' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org/index.html' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org/index.html_gzip' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org/de/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org/hidden-files/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org/lorem-ipsum/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org/nec-ullamcorper/' => true, + + 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/index.html' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/index.html_gzip' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/de/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/lorem-ipsum/' => true, + + 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/index.html' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/index.html_gzip' => false, + 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/de/' => true, + 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/nec-ullamcorper/' => true, + + 'vfs://public/wp-content/cache/wp-rocket/dots.example.org/' => true, + ], + ], + ], + 'shouldDeleteSiteUrlInCacheAndUserCaches' => [ + 'urls' => [ + 'http://example.org/', + ], + 'expected' => [ + 'cleaned' => [ + 'vfs://public/wp-content/cache/wp-rocket/example.org/' => null, + 'vfs://public/wp-content/cache/wp-rocket/example.org-wpmedia-123456/' => null, + 'vfs://public/wp-content/cache/wp-rocket/example.org-tester-987654/' => null, + ], + 'non_cleaned' => [ + // fs entry => should scan the directory and get the file listings. + 'vfs://public/wp-content/cache/min/' => true, + 'vfs://public/wp-content/cache/busting/' => true, + 'vfs://public/wp-content/cache/critical-css/' => true, + + 'vfs://public/wp-content/cache/wp-rocket/' => false, + + 'vfs://public/wp-content/cache/wp-rocket/index.html' => false, + + 'vfs://public/wp-content/cache/wp-rocket/dots.example.org/' => true, + ], + ], + ], + ], +]; diff --git a/tests/Fixtures/inc/functions/rocketCleanMinify.php b/tests/Fixtures/inc/functions/rocketCleanMinify.php index a1fd917692..000053ce39 100644 --- a/tests/Fixtures/inc/functions/rocketCleanMinify.php +++ b/tests/Fixtures/inc/functions/rocketCleanMinify.php @@ -1,67 +1,166 @@ 'wp-content/cache/min/', - - // Virtual filesystem structure. - 'structure' => [ - 'wp-content' => [ - 'cache' => [ - 'min' => [ - '1' => [ - '5c795b0e3a1884eec34a989485f863ff.js' => '', - '5c795b0e3a1884eec34a989485f863ff.js.gz' => '', - 'fa2965d41f1515951de523cecb81f85e.css' => '', - 'fa2965d41f1515951de523cecb81f85e.css.gz' => '', - ], - '3rd-party' => [ - '2n7x3vd41f1515951de523cecb81f85e.css' => '', - '2n7x3vd41f1515951de523cecb81f85e.css.gz' => '', - 'bt937b0e3a1884eec34a989485f863ff.js' => '', - 'bt937b0e3a1884eec34a989485f863ff.js.gz' => '', - ], + 'vfs_dir' => 'wp-content/cache/min/', + + 'structure' => require WP_ROCKET_TESTS_FIXTURES_DIR . '/vfs-structure/default.php', + + // Test data. + 'test_data' => [ + 'shouldNotCleanWhenNoExtensionsGiven' => [ + 'extensions' => '', + 'expected' => [ + 'cleaned' => [], + 'non_cleaned' => [ + 'vfs://public/wp-content/cache/min/1/' => true, + 'vfs://public/wp-content/cache/min/2/' => true, + 'vfs://public/wp-content/cache/min/3rd-party/' => true, ], ], ], - ], + 'shouldNotCleanWhenExtensionDoesNotExist' => [ + 'extensions' => [ 'php', 'html' ], + 'expected' => [ + 'cleaned' => [], + 'non_cleaned' => [ + 'vfs://public/wp-content/cache/min/1/' => true, + 'vfs://public/wp-content/cache/min/2/' => true, + 'vfs://public/wp-content/cache/min/3rd-party/' => true, + ], + ], + ], + 'shouldClean_css' => [ + 'extensions' => 'css', + 'expected' => [ + 'cleaned' => [ + 'vfs://public/wp-content/cache/min/1/fa2965d41f1515951de523cecb81f85e.css' => null, + 'vfs://public/wp-content/cache/min/1/fa2965d41f1515951de523cecb81f85e.css.gz' => null, - // Test data. - // The virtual filesystem does not work with glob. Therefore, we have to specify all of the file extensions. - 'test_data' => [ - [ - [ 'css', 'css.gz' ], - [ - 'wp-content/cache/min/1/fa2965d41f1515951de523cecb81f85e.css', - 'wp-content/cache/min/1/fa2965d41f1515951de523cecb81f85e.css.gz', - 'wp-content/cache/min/3rd-party/2n7x3vd41f1515951de523cecb81f85e.css', - 'wp-content/cache/min/3rd-party/2n7x3vd41f1515951de523cecb81f85e.css.gz', - 'wp-content/cache/min/3rd-party/bt937b0e3a1884eec34a989485f863ff.js', - 'wp-content/cache/min/3rd-party/bt937b0e3a1884eec34a989485f863ff.js.gz', - ] + 'vfs://public/wp-content/cache/min/3rd-party/2n7x3vd41f1515951de523cecb81f85e.css' => null, + 'vfs://public/wp-content/cache/min/3rd-party/2n7x3vd41f1515951de523cecb81f85e.css.gz' => null, + ], + 'non_cleaned' => [ + 'vfs://public/wp-content/cache/min/1/' => false, + 'vfs://public/wp-content/cache/min/1/5c795b0e3a1884eec34a989485f863ff.js' => false, + 'vfs://public/wp-content/cache/min/1/5c795b0e3a1884eec34a989485f863ff.js.gz' => false, + + 'vfs://public/wp-content/cache/min/2/' => true, + + 'vfs://public/wp-content/cache/min/3rd-party/' => false, + 'vfs://public/wp-content/cache/min/3rd-party/bt937b0e3a1884eec34a989485f863ff.js' => false, + 'vfs://public/wp-content/cache/min/3rd-party/bt937b0e3a1884eec34a989485f863ff.js.gz' => false, + ], + ], ], - [ - [ 'js', 'js.gz' ], - [ - 'wp-content/cache/min/1/5c795b0e3a1884eec34a989485f863ff.js', - 'wp-content/cache/min/1/5c795b0e3a1884eec34a989485f863ff.js.gz', - 'wp-content/cache/min/3rd-party/2n7x3vd41f1515951de523cecb81f85e.css', - 'wp-content/cache/min/3rd-party/2n7x3vd41f1515951de523cecb81f85e.css.gz', - 'wp-content/cache/min/3rd-party/bt937b0e3a1884eec34a989485f863ff.js', - 'wp-content/cache/min/3rd-party/bt937b0e3a1884eec34a989485f863ff.js.gz', - ] + 'shouldClean_css.gz' => [ + 'extensions' => 'css.gz', + 'expected' => [ + 'cleaned' => [ + 'vfs://public/wp-content/cache/min/1/fa2965d41f1515951de523cecb81f85e.css.gz' => null, + 'vfs://public/wp-content/cache/min/3rd-party/2n7x3vd41f1515951de523cecb81f85e.css.gz' => null, + ], + 'non_cleaned' => [ + 'vfs://public/wp-content/cache/min/1/' => false, + 'vfs://public/wp-content/cache/min/1/fa2965d41f1515951de523cecb81f85e.css' => false, + 'vfs://public/wp-content/cache/min/1/5c795b0e3a1884eec34a989485f863ff.js' => false, + 'vfs://public/wp-content/cache/min/1/5c795b0e3a1884eec34a989485f863ff.js.gz' => false, + + 'vfs://public/wp-content/cache/min/2/' => true, + + 'vfs://public/wp-content/cache/min/3rd-party/' => false, + 'vfs://public/wp-content/cache/min/3rd-party/2n7x3vd41f1515951de523cecb81f85e.css' => false, + 'vfs://public/wp-content/cache/min/3rd-party/bt937b0e3a1884eec34a989485f863ff.js' => false, + 'vfs://public/wp-content/cache/min/3rd-party/bt937b0e3a1884eec34a989485f863ff.js.gz' => false, + ], + ], ], - [ - [ 'css', 'css.gz', 'js', 'js.gz' ], - [ - 'wp-content/cache/min/1/fa2965d41f1515951de523cecb81f85e.css', - 'wp-content/cache/min/1/fa2965d41f1515951de523cecb81f85e.css.gz', - 'wp-content/cache/min/1/5c795b0e3a1884eec34a989485f863ff.js', - 'wp-content/cache/min/1/5c795b0e3a1884eec34a989485f863ff.js.gz', - 'wp-content/cache/min/3rd-party/2n7x3vd41f1515951de523cecb81f85e.css', - 'wp-content/cache/min/3rd-party/2n7x3vd41f1515951de523cecb81f85e.css.gz', - 'wp-content/cache/min/3rd-party/bt937b0e3a1884eec34a989485f863ff.js', - 'wp-content/cache/min/3rd-party/bt937b0e3a1884eec34a989485f863ff.js.gz', - ] + 'shouldClean_js' => [ + 'extensions' => 'js', + 'expected' => [ + 'cleaned' => [ + 'vfs://public/wp-content/cache/min/1/5c795b0e3a1884eec34a989485f863ff.js' => null, + 'vfs://public/wp-content/cache/min/1/5c795b0e3a1884eec34a989485f863ff.js.gz' => null, + + 'vfs://public/wp-content/cache/min/3rd-party/bt937b0e3a1884eec34a989485f863ff.js' => null, + 'vfs://public/wp-content/cache/min/3rd-party/bt937b0e3a1884eec34a989485f863ff.js.gz' => null, + ], + 'non_cleaned' => [ + 'vfs://public/wp-content/cache/min/1/' => false, + 'vfs://public/wp-content/cache/min/1/fa2965d41f1515951de523cecb81f85e.css' => false, + 'vfs://public/wp-content/cache/min/1/fa2965d41f1515951de523cecb81f85e.css.gz' => false, + + 'vfs://public/wp-content/cache/min/2/' => true, + + 'vfs://public/wp-content/cache/min/3rd-party/' => false, + 'vfs://public/wp-content/cache/min/3rd-party/2n7x3vd41f1515951de523cecb81f85e.css' => false, + 'vfs://public/wp-content/cache/min/3rd-party/2n7x3vd41f1515951de523cecb81f85e.css.gz' => false, + ], + ], + ], + 'shouldClean_js.gz' => [ + 'extensions' => 'js.gz', + 'expected' => [ + 'cleaned' => [ + 'vfs://public/wp-content/cache/min/1/5c795b0e3a1884eec34a989485f863ff.js.gz' => null, + 'vfs://public/wp-content/cache/min/3rd-party/bt937b0e3a1884eec34a989485f863ff.js.gz' => null, + ], + 'non_cleaned' => [ + 'vfs://public/wp-content/cache/min/1/' => false, + 'vfs://public/wp-content/cache/min/1/5c795b0e3a1884eec34a989485f863ff.js' => false, + 'vfs://public/wp-content/cache/min/1/fa2965d41f1515951de523cecb81f85e.css' => false, + 'vfs://public/wp-content/cache/min/1/fa2965d41f1515951de523cecb81f85e.css.gz' => false, + + 'vfs://public/wp-content/cache/min/2/' => true, + + 'vfs://public/wp-content/cache/min/3rd-party/' => false, + 'vfs://public/wp-content/cache/min/3rd-party/bt937b0e3a1884eec34a989485f863ff.js' => false, + 'vfs://public/wp-content/cache/min/3rd-party/2n7x3vd41f1515951de523cecb81f85e.css' => false, + 'vfs://public/wp-content/cache/min/3rd-party/2n7x3vd41f1515951de523cecb81f85e.css.gz' => false, + ], + ], + ], + 'shouldCleanCssAndJs' => [ + 'extensions' => [ 'css', 'js' ], + 'expected' => [ + 'cleaned' => [ + 'vfs://public/wp-content/cache/min/1/5c795b0e3a1884eec34a989485f863ff.js' => null, + 'vfs://public/wp-content/cache/min/1/5c795b0e3a1884eec34a989485f863ff.js.gz' => null, + 'vfs://public/wp-content/cache/min/1/fa2965d41f1515951de523cecb81f85e.css' => null, + 'vfs://public/wp-content/cache/min/1/fa2965d41f1515951de523cecb81f85e.css.gz' => null, + + 'vfs://public/wp-content/cache/min/3rd-party/bt937b0e3a1884eec34a989485f863ff.js' => null, + 'vfs://public/wp-content/cache/min/3rd-party/bt937b0e3a1884eec34a989485f863ff.js.gz' => null, + 'vfs://public/wp-content/cache/min/3rd-party/2n7x3vd41f1515951de523cecb81f85e.css' => null, + 'vfs://public/wp-content/cache/min/3rd-party/2n7x3vd41f1515951de523cecb81f85e.css.gz' => null, + ], + 'non_cleaned' => [ + 'vfs://public/wp-content/cache/min/1/' => false, + 'vfs://public/wp-content/cache/min/2/' => true, + 'vfs://public/wp-content/cache/min/3rd-party/' => false, + ], + ], + ], + 'shouldClean_.gz' => [ + 'extensions' => 'gz', + 'expected' => [ + 'cleaned' => [ + 'vfs://public/wp-content/cache/min/1/fa2965d41f1515951de523cecb81f85e.css.gz' => null, + 'vfs://public/wp-content/cache/min/1/5c795b0e3a1884eec34a989485f863ff.js.gz' => null, + 'vfs://public/wp-content/cache/min/3rd-party/2n7x3vd41f1515951de523cecb81f85e.css.gz' => null, + 'vfs://public/wp-content/cache/min/3rd-party/bt937b0e3a1884eec34a989485f863ff.js.gz' => null, + ], + 'non_cleaned' => [ + 'vfs://public/wp-content/cache/min/1/' => false, + 'vfs://public/wp-content/cache/min/1/5c795b0e3a1884eec34a989485f863ff.js' => false, + 'vfs://public/wp-content/cache/min/1/fa2965d41f1515951de523cecb81f85e.css' => false, + + 'vfs://public/wp-content/cache/min/2/' => true, + + 'vfs://public/wp-content/cache/min/3rd-party/' => false, + 'vfs://public/wp-content/cache/min/3rd-party/bt937b0e3a1884eec34a989485f863ff.js' => false, + 'vfs://public/wp-content/cache/min/3rd-party/2n7x3vd41f1515951de523cecb81f85e.css' => false, + ], + ], ], ], ]; diff --git a/tests/Fixtures/inc/functions/rocketRrmdir.php b/tests/Fixtures/inc/functions/rocketRrmdir.php index 85e345ae95..628ba71aa1 100644 --- a/tests/Fixtures/inc/functions/rocketRrmdir.php +++ b/tests/Fixtures/inc/functions/rocketRrmdir.php @@ -327,8 +327,8 @@ 'vfs://public/wp-content/cache/wp-rocket/example.org(.*)/fr', ], 'expected' => [ - 'before_rocket_rrmdir' => 19, - 'after_rocket_rrmdir' => 19, + 'before_rocket_rrmdir' => 21, + 'after_rocket_rrmdir' => 21, 'removed' => [ 'vfs://public/wp-content/cache/min/' => null, 'vfs://public/wp-content/cache/busting' => null, diff --git a/tests/Fixtures/vfs-structure/default.php b/tests/Fixtures/vfs-structure/default.php index cba1039b01..99e48e21b0 100644 --- a/tests/Fixtures/vfs-structure/default.php +++ b/tests/Fixtures/vfs-structure/default.php @@ -81,9 +81,23 @@ ], ], 'min' => [ - '1' => [ - '123456.css' => '', - '123456.js' => '', + '1' => [ + '5c795b0e3a1884eec34a989485f863ff.js' => '', + '5c795b0e3a1884eec34a989485f863ff.js.gz' => '', + 'fa2965d41f1515951de523cecb81f85e.css' => '', + 'fa2965d41f1515951de523cecb81f85e.css.gz' => '', + ], + '2' => [ + '34a989485f863ff5c795b0e3a1884eec.js' => '', + '34a989485f863ff5c795b0e3a1884eec.js.gz' => '', + '523cecb81f85efa2965d41f1515951de.css' => '', + '523cecb81f85efa2965d41f1515951de.css.gz' => '', + ], + '3rd-party' => [ + '2n7x3vd41f1515951de523cecb81f85e.css' => '', + '2n7x3vd41f1515951de523cecb81f85e.css.gz' => '', + 'bt937b0e3a1884eec34a989485f863ff.js' => '', + 'bt937b0e3a1884eec34a989485f863ff.js.gz' => '', ], ], 'busting' => [ diff --git a/tests/GlobTrait.php b/tests/GlobTrait.php index 48ee2d8b6f..928a26afb7 100644 --- a/tests/GlobTrait.php +++ b/tests/GlobTrait.php @@ -14,7 +14,7 @@ trait GlobTrait { */ public function deleteDomainCallback( $root, $filesystem ) { $root = rtrim( $root, '*' ); - $this->deleteFiles( $root ); + $this->deleteFiles( $root, $filesystem ); } /** diff --git a/tests/Integration/FilesystemTestCase.php b/tests/Integration/FilesystemTestCase.php index ff92aea069..88735b98fd 100644 --- a/tests/Integration/FilesystemTestCase.php +++ b/tests/Integration/FilesystemTestCase.php @@ -8,6 +8,7 @@ abstract class FilesystemTestCase extends VirtualFilesystemTestCase { protected $original_entries = []; + protected $shouldNotClean = []; public function setUp() { parent::setUp(); @@ -16,39 +17,6 @@ public function setUp() { Functions\when( 'rocket_direct_filesystem' )->justReturn( $this->filesystem ); } - public function getPathToFixturesDir() { - return WP_ROCKET_TESTS_FIXTURES_DIR; - } - - public function getDefaultVfs() { - return [ - 'wp-admin' => [], - 'wp-content' => [ - 'cache' => [ - 'busting' => [ - 1 => [], - ], - 'critical-css' => [], - 'min' => [], - 'wp-rocket' => [ - 'index.html' => '', - ], - ], - 'mu-plugins' => [], - 'plugins' => [ - 'wp-rocket' => [], - ], - 'themes' => [ - 'twentytwenty' => [], - ], - 'uploads' => [], - 'wp-rocket-config' => [], - ], - 'wp-includes' => [], - 'wp-config.php' => '', - ]; - } - protected function setUpOriginalEntries() { $this->original_entries = array_merge( $this->original_files, $this->original_dirs ); $this->original_entries = array_filter( $this->original_entries ); @@ -63,15 +31,13 @@ protected function stripVfsRoot( $path ) { } protected function getShouldNotCleanEntries( array $shouldNotClean ) { - $entries = []; + $this->shouldNotClean = []; foreach ( $shouldNotClean as $entry => $scanDir ) { - $entries[] = $entry; + $this->shouldNotClean[] = $entry; if ( $scanDir && $this->filesystem->is_dir( $entry ) ) { - $entries = array_merge( $entries, $this->filesystem->getListing( $entry ) ); + $this->shouldNotClean = array_merge( $this->shouldNotClean, $this->filesystem->getListing( $entry ) ); } } - - return $entries; } protected function checkCleanedIsDeleted( array $shouldClean ) { @@ -80,16 +46,52 @@ protected function checkCleanedIsDeleted( array $shouldClean ) { if ( is_null( $contents ) ) { $this->assertFalse( $this->filesystem->exists( $dir ) ); } else { - $shouldNotClean[] = trailingslashit( $dir ); + $this->shouldNotClean[] = trailingslashit( $dir ); // Emptied, but not deleted. $this->assertSame( $contents, $this->filesystem->getFilesListing( $dir ) ); } } } - protected function checkNonCleanedExist( $shouldNotClean ) { + protected function checkNonCleanedExist( $dump_results = false ) { $entriesAfterCleaning = $this->filesystem->getListing( $this->filesystem->getUrl( $this->config['vfs_dir'] ) ); - $actual = array_diff( $entriesAfterCleaning, $shouldNotClean ); + $actual = array_diff( $entriesAfterCleaning, $this->shouldNotClean ); + if ( $dump_results ) { + var_dump( $actual ); + } $this->assertEmpty( $actual ); } + + public function getPathToFixturesDir() { + return WP_ROCKET_TESTS_FIXTURES_DIR; + } + + public function getDefaultVfs() { + return [ + 'wp-admin' => [], + 'wp-content' => [ + 'cache' => [ + 'busting' => [ + 1 => [], + ], + 'critical-css' => [], + 'min' => [], + 'wp-rocket' => [ + 'index.html' => '', + ], + ], + 'mu-plugins' => [], + 'plugins' => [ + 'wp-rocket' => [], + ], + 'themes' => [ + 'twentytwenty' => [], + ], + 'uploads' => [], + 'wp-rocket-config' => [], + ], + 'wp-includes' => [], + 'wp-config.php' => '', + ]; + } } diff --git a/tests/Integration/inc/Engine/Admin/HealthCheck/missedCron.php b/tests/Integration/inc/Engine/Admin/HealthCheck/missedCron.php new file mode 100644 index 0000000000..a675e31c9c --- /dev/null +++ b/tests/Integration/inc/Engine/Admin/HealthCheck/missedCron.php @@ -0,0 +1,122 @@ +format_the_html( ob_get_clean() ); + } + + public static function setUpBeforeClass() { + self::$container = apply_filters( 'rocket_container', null ); + } + + public function tearDown() { + parent::tearDown(); + + remove_filter( 'pre_get_rocket_option_purge_cron_interval', [ $this, 'purge_cron' ] ); + remove_filter( 'pre_get_rocket_option_async_css', [ $this, 'async_css' ] ); + remove_filter( 'pre_get_rocket_option_manual_preload', [ $this, 'manual_preload' ] ); + remove_filter( 'pre_get_rocket_option_schedule_automatic_cleanup', [ $this, 'schedule_automatic_cleanup' ] ); + + wp_clear_scheduled_hook( 'rocket_purge_time_event' ); + wp_clear_scheduled_hook( 'rocket_database_optimization_time_event' ); + wp_clear_scheduled_hook( 'rocket_database_optimization_cron_interval' ); + wp_clear_scheduled_hook( 'rocket_preload_cron_interval' ); + wp_clear_scheduled_hook( 'rocket_critical_css_generation_cron_interval' ); + } + + /** + * @dataProvider providerTestData + */ + public function testShouldReturnNullWhenNothingToDisplay( $config ) { + if ( $config['cap'] ) { + $admin = get_role( 'administrator' ); + $admin->add_cap( 'rocket_manage_options' ); + + $user_id = self::factory()->user->create( [ 'role' => 'administrator' ] ); + } else { + $user_id = self::factory()->user->create( [ 'role' => 'editor' ] ); + } + + wp_set_current_user( $user_id ); + set_current_screen( $config['screen'] ); + update_user_meta( $user_id, 'rocket_boxes', $config['dismissed'] ); + + $this->purge_cron = $config['options']['purge_cron']; + $this->async_css = $config['options']['async_css']; + $this->manual_preload = $config['options']['manual_preload']; + $this->schedule_automatic_cleanup = $config['options']['schedule_automatic_cleanup']; + + foreach ( $config['events'] as $hook => $timestamp ) { + if ( ! $timestamp ) { + continue; + } + + wp_schedule_single_event( $timestamp, $hook ); + } + + add_filter( 'pre_get_rocket_option_purge_cron_interval', [ $this, 'purge_cron' ] ); + add_filter( 'pre_get_rocket_option_async_css', [ $this, 'async_css' ] ); + add_filter( 'pre_get_rocket_option_manual_preload', [ $this, 'manual_preload' ] ); + add_filter( 'pre_get_rocket_option_schedule_automatic_cleanup', [ $this, 'schedule_automatic_cleanup' ] ); + + Functions\expect( 'rocket_get_constant' ) + ->atMost() + ->times( 1 ) + ->with( 'DISABLE_WP_CRON' ) + ->andReturn( $config['disable_cron'] ); + + Functions\expect( 'wp_create_nonce' ) + ->atMost() + ->times( 1 ) + ->with( 'rocket_ignore_rocket_warning_cron' ) + ->andReturn( '123456' ); + + if ( empty( $config['expected'] ) ) { + $this->assertNull( self::$container->get( 'health_check' )->missed_cron() ); + } else { + $this->assertContains( + $this->format_the_html( $config['expected'] ), + $this->getActualHtml() + ); + } + } + + public function providerTestData() { + return $this->getTestData( __DIR__, 'missed-cron' ); + } + + public function purge_cron() { + return $this->purge_cron; + } + + public function async_css() { + return $this->async_css; + } + + public function schedule_automatic_cleanup() { + return $this->schedule_automatic_cleanup; + } + + public function manual_preload() { + return $this->manual_preload; + } +} diff --git a/tests/Integration/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/cleanMinify.php b/tests/Integration/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/cleanMinify.php new file mode 100644 index 0000000000..aae9321de2 --- /dev/null +++ b/tests/Integration/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/cleanMinify.php @@ -0,0 +1,70 @@ + false, + 'exclude_css' => [], + 'cdn' => false, + 'cdn_cnames' => [], + ] + ) + ); + } + + public function setUp() { + parent::setUp(); + + $this->original_settings = get_option( 'wp_rocket_settings', [] ); + } + + public function tearDown() { + parent::tearDown(); + + if ( empty( $this->original_settings ) ) { + delete_option( 'wp_rocket_settings' ); + } else { + update_option( 'wp_rocket_settings', $this->original_settings ); + } + } + + /** + * @dataProvider providerTestData + */ + public function testCleanMinify( $value, $should_run ) { + $cache_files = $this->filesystem->getFilesListing( 'wp-content/cache/min' ); + + update_option( + 'wp_rocket_settings', + array_merge( $this->original_settings, $value ) + ); + + $after_cache = $this->filesystem->getFilesListing( 'wp-content/cache/min' ); + + if ( $should_run ) { + $this->assertEmpty( $after_cache ); + } else { + $this->assertEquals( $cache_files, $after_cache ); + } + } +} diff --git a/tests/Integration/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/regenerateMinifyCssKey.php b/tests/Integration/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/regenerateMinifyCssKey.php new file mode 100644 index 0000000000..0ee7105098 --- /dev/null +++ b/tests/Integration/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/regenerateMinifyCssKey.php @@ -0,0 +1,92 @@ + false, + 'exclude_css' => [], + 'cdn' => false, + 'cdn_cnames' => [], + ] + ) + ); + } + + public function setUp() { + parent::setUp(); + + if ( empty( $this->config ) ) { + $this->loadConfig(); + } + + $this->original_settings = get_option( 'wp_rocket_settings', [] ); + } + + public function tearDown() { + parent::tearDown(); + + if ( empty( $this->original_settings ) ) { + delete_option( 'wp_rocket_settings' ); + } else { + update_option( 'wp_rocket_settings', $this->original_settings ); + } + } + + /** + * @dataProvider providerTestData + */ + public function testRegenerateMinifyCssKey( $new_value, $should_run, $expected ) { + if ( $should_run ) { + Functions\expect( 'create_rocket_uniqid' ) + ->once() + ->andReturn( 'minify_css_key' ); + } else { + Functions\expect( 'create_rocket_uniqid' )->never(); + } + + update_option( + 'wp_rocket_settings', + array_merge( $this->original_settings, $new_value ) + ); + + $options = get_option( 'wp_rocket_settings', [] ); + + foreach ( $expected as $expected_key => $expected_value ) { + $this->assertSame( + $expected_value, + $options[ $expected_key ] + ); + } + } + + public function providerTestData() { + if ( empty( $this->config ) ) { + $this->loadConfig(); + } + + return $this->config['test_data']; + } + + private function loadConfig() { + $this->config = $this->getTestData( __DIR__, 'regenerateMinifyCssKey' ); + } +} diff --git a/tests/Integration/inc/common/rocketCleanCacheThemeUpdate.php b/tests/Integration/inc/common/rocketCleanCacheThemeUpdate.php index a85ed382f5..638597a6c0 100644 --- a/tests/Integration/inc/common/rocketCleanCacheThemeUpdate.php +++ b/tests/Integration/inc/common/rocketCleanCacheThemeUpdate.php @@ -38,20 +38,17 @@ public function tearDown() { /** * @dataProvider providerTestData */ - public function testShouldDoExpected( $hook_extra, $expected ) { + public function testShouldCleanExpected( $hook_extra, $expected ) { if ( empty( $expected['cleaned'] ) ) { Functions\expect( 'rocket_clean_domain' )->never(); } - $shouldNotClean = $this->getShouldNotCleanEntries( $expected['non_cleaned'] ); + $this->getShouldNotCleanEntries( $expected['non_cleaned'] ); // Update it. do_action( 'upgrader_process_complete', null, $hook_extra ); - // Check the "cleaned" directories. $this->checkCleanedIsDeleted( $expected['cleaned'] ); - - // Check the non-cleaned files/directories still exist. - $this->checkNonCleanedExist( $shouldNotClean ); + $this->checkNonCleanedExist( isset( $expected['dump_results'] ) ); } } diff --git a/tests/Integration/inc/common/rocketWidgetUpdateCallback.php b/tests/Integration/inc/common/rocketWidgetUpdateCallback.php index 4707ff3847..9b462c55ab 100644 --- a/tests/Integration/inc/common/rocketWidgetUpdateCallback.php +++ b/tests/Integration/inc/common/rocketWidgetUpdateCallback.php @@ -31,41 +31,12 @@ public function testShouldInvokeRocketCleanDomainOnWidgetUpdate( $instance, $exp $widget = new WP_Widget_Text(); $_POST["widget-{$widget->id_base}"] = $instance; - $shouldNotClean = $this->getNonCleaned( $expected['non_cleaned'] ); + $shouldNotClean = $this->getShouldNotCleanEntries( $expected['non_cleaned'] ); // Update it. $widget->update_callback(); - // Check the "cleaned" directories. - foreach ( $expected['cleaned'] as $dir => $contents ) { - // Deleted. - if ( is_null( $contents ) ) { - $this->assertFalse( $this->filesystem->exists( $dir ) ); - } else { - $shouldNotClean[] = trailingslashit( $dir ); - // Emptied, but not deleted. - $this->assertSame( $contents, $this->filesystem->getFilesListing( $dir ) ); - } - } - - // Check the non-cleaned files/directories still exist. - $entriesAfterCleaning = $this->filesystem->getListing( $this->filesystem->getUrl( $this->config['vfs_dir'] ) ); - $actual = array_diff( $entriesAfterCleaning, $shouldNotClean ); - if ( ! empty( $expected['test_it'] ) ) { - var_dump( $actual ); - } else { - $this->assertEmpty( $actual ); - } - } - - private function getNonCleaned( $config ) { - $entries = []; - foreach( $config as $entry => $scanDir ) { - $entries[] = $entry; - if ( $scanDir && $this->filesystem->is_dir( $entry ) ) { - $entries = array_merge( $entries, $this->filesystem->getListing( $entry ) ); - } - } - return $entries; + $this->checkCleanedIsDeleted( $expected['cleaned']); + $this->checkNonCleanedExist( $shouldNotClean, isset( $expected['dump_results'] ) ); } } diff --git a/tests/Integration/inc/functions/rocketAddUrlProtocol.php b/tests/Integration/inc/functions/rocketAddUrlProtocol.php new file mode 100644 index 0000000000..0eedb8957b --- /dev/null +++ b/tests/Integration/inc/functions/rocketAddUrlProtocol.php @@ -0,0 +1,24 @@ +assertSame( $expected, rocket_add_url_protocol( $url ) ); + } + + public function providerTestData() { + return $this->getTestData( __DIR__, 'rocketAddUrlProtocol' ); + } +} diff --git a/tests/Integration/inc/functions/rocketCleanDomain.php b/tests/Integration/inc/functions/rocketCleanDomain.php index fce6b2acbf..3e6cbecc7a 100644 --- a/tests/Integration/inc/functions/rocketCleanDomain.php +++ b/tests/Integration/inc/functions/rocketCleanDomain.php @@ -52,7 +52,7 @@ public function testShouldCleanSingleDomain( $i18n, $expected ) { $this->toPreserve = $i18n['dirs_to_preserve']; $this->dirsToClean = $expected['cleaned']; - $shouldNotClean = $this->getNonCleaned( $expected['non_cleaned'] ); + $this->getShouldNotCleanEntries( $expected['non_cleaned'] ); $this->setUpI18nPlugin( $i18n['lang'], $i18n ); add_filter( 'rocket_clean_domain_urls', [ $this, 'checkRocketCleaDomainUrls' ], PHP_INT_MAX ); @@ -60,37 +60,8 @@ public function testShouldCleanSingleDomain( $i18n, $expected ) { // Run it. rocket_clean_domain( $i18n['lang'] ); - // Check the "cleaned" directories. - foreach ( $expected['cleaned'] as $dir => $contents ) { - // Deleted. - if ( is_null( $contents ) ) { - $this->assertFalse( $this->filesystem->exists( $dir ) ); - } else { - $shouldNotClean[] = trailingslashit( $dir ); - // Emptied, but not deleted. - $this->assertSame( $contents, $this->filesystem->getFilesListing( $dir ) ); - } - } - - // Check the non-cleaned files/directories still exist. - $entriesAfterCleaning = $this->filesystem->getListing( $this->filesystem->getUrl( $this->config['vfs_dir'] ) ); - $actual = array_diff( $entriesAfterCleaning, $shouldNotClean ); - if ( ! empty( $expected['test_it'] ) ) { - var_dump( $actual ); - } else { - $this->assertEmpty( $actual ); - } - } - - private function getNonCleaned( $config ) { - $entries = []; - foreach( $config as $entry => $scanDir ) { - $entries[] = $entry; - if ( $scanDir && $this->filesystem->is_dir( $entry ) ) { - $entries = array_merge( $entries, $this->filesystem->getListing( $entry ) ); - } - } - return $entries; + $this->checkCleanedIsDeleted( $expected['cleaned'] ); + $this->checkNonCleanedExist( isset( $expected['dump_results'] ) ); } public function checkRocketCleaDomainUrls( $urls ) { diff --git a/tests/Integration/inc/functions/rocketCleanFiles.php b/tests/Integration/inc/functions/rocketCleanFiles.php new file mode 100644 index 0000000000..2aafffbb33 --- /dev/null +++ b/tests/Integration/inc/functions/rocketCleanFiles.php @@ -0,0 +1,43 @@ +with( 'WP_ROCKET_CACHE_PATH' )->andReturn( WP_ROCKET_CACHE_PATH ); + + $this->dirsToClean = []; + } + + /** + * @dataProvider providerTestData + */ + public function testShouldCleanExpectedFiles( $urls, $expected ) { + $this->dirsToClean = $expected['cleaned']; + $this->getShouldNotCleanEntries( $expected['non_cleaned'] ); + + // Run it. + rocket_clean_files( $urls ); + + $this->checkCleanedIsDeleted( $expected['cleaned'] ); + $this->checkNonCleanedExist(); + } +} diff --git a/tests/Integration/inc/functions/rocketCleanMinify.php b/tests/Integration/inc/functions/rocketCleanMinify.php index 2e341cc02c..74e805b443 100644 --- a/tests/Integration/inc/functions/rocketCleanMinify.php +++ b/tests/Integration/inc/functions/rocketCleanMinify.php @@ -6,6 +6,8 @@ /** * @covers ::rocket_clean_minify + * @uses ::rocket_direct_filesystem + * * @group Functions * @group Files * @group vfs @@ -13,58 +15,15 @@ class Test_RocketCleanMinify extends FilesystemTestCase { protected $path_to_test_data = '/inc/functions/rocketCleanMinify.php'; - public function tearDown() { - delete_option( 'wp_rocket_settings' ); - - parent::tearDown(); - } - - public function testPath() { - $this->assertSame( 'vfs://public/wp-content/cache/min/', WP_ROCKET_MINIFY_CACHE_PATH ); - } - - public function testShouldFireEventsForEachExt() { - rocket_clean_minify( [ 'css' ] ); - - $expected = 1; - $this->assertEquals( $expected, did_action( 'before_rocket_clean_minify' ) ); - $this->assertEquals( $expected, did_action( 'after_rocket_clean_minify' ) ); - - rocket_clean_minify( [ 'css', 'js' ] ); - - $expected += 2; - $this->assertEquals( $expected, did_action( 'before_rocket_clean_minify' ) ); - $this->assertEquals( $expected, did_action( 'after_rocket_clean_minify' ) ); - } - /** * @dataProvider providerTestData */ - public function testShouldCleanMinified( $config, $filesToClean ) { - $cache = $this->stripRoot( $this->filesystem->getFilesListing( 'wp-content/cache/min' ) ); - - // Check files before cleaning. - $this->assertSame( $this->original_files, $cache ); - - rocket_clean_minify( $config ); + public function testShouldCleanMinified( $extensions, $expected ) { + $this->getShouldNotCleanEntries( $expected['non_cleaned'] ); - $after_cache = $this->stripRoot( $this->filesystem->getFilesListing( 'wp-content/cache/min' ) ); - - // Check the "cleaned" files were deleted. - $this->assertEquals( $filesToClean, array_intersect( $filesToClean, $cache ) ); - $this->assertEquals( $filesToClean, array_diff( $filesToClean, $after_cache ) ); - $this->assertNotContains( $filesToClean, $after_cache ); - - // Check that non-cleaned files still exists, i.e. were not deleted. - $this->assertEquals( $after_cache, array_intersect( $after_cache, $cache ) ); - } + rocket_clean_minify( $extensions ); - private function stripRoot( $files ) { - return array_map( - function( $file ) { - return str_replace( 'vfs://public/', '', $file ); - }, - $files - ); + $this->checkCleanedIsDeleted( $expected['cleaned'] ); + $this->checkNonCleanedExist( isset( $expected['dump_results'] ) ); } } diff --git a/tests/Unit/FilesystemTestCase.php b/tests/Unit/FilesystemTestCase.php index 161024d512..9bf6320e15 100644 --- a/tests/Unit/FilesystemTestCase.php +++ b/tests/Unit/FilesystemTestCase.php @@ -7,7 +7,8 @@ use WPMedia\PHPUnit\Unit\VirtualFilesystemTestCase; abstract class FilesystemTestCase extends VirtualFilesystemTestCase { - protected $original_entries; + protected $original_entries = []; + protected $shouldNotClean = []; public function setUp() { parent::setUp(); @@ -16,6 +17,55 @@ public function setUp() { Functions\when( 'rocket_direct_filesystem' )->justReturn( $this->filesystem ); } + protected function setUpOriginalEntries() { + $this->original_entries = array_merge( $this->original_files, $this->original_dirs ); + $this->original_entries = array_filter( $this->original_entries ); + sort( $this->original_entries ); + } + + protected function stripVfsRoot( $path ) { + $search = vfsStream::SCHEME . "://{$this->rootVirtualDir}"; + $search = rtrim( $search, '/\\' ) . '/'; + + return str_replace( $search, '', $path ); + } + + protected function getShouldNotCleanEntries( array $shouldNotClean ) { + $this->shouldNotClean = []; + foreach ( $shouldNotClean as $entry => $scanDir ) { + $this->shouldNotClean[] = $entry; + if ( $scanDir && $this->filesystem->is_dir( $entry ) ) { + $this->shouldNotClean = array_merge( $this->shouldNotClean, $this->filesystem->getListing( $entry ) ); + } + } + } + + protected function checkCleanedIsDeleted( array $shouldClean ) { + foreach ( $shouldClean as $dir => $contents ) { + // Deleted. + if ( is_null( $contents ) ) { + if ( false !== $this->filesystem->exists( $dir ) ) { + echo "\n {$dir} \n"; + } + $this->assertFalse( $this->filesystem->exists( $dir ) ); + + } else { + $this->shouldNotClean[] = trailingslashit( $dir ); + // Emptied, but not deleted. + $this->assertSame( $contents, $this->filesystem->getFilesListing( $dir ) ); + } + } + } + + protected function checkNonCleanedExist( $dump_results = false ) { + $entriesAfterCleaning = $this->filesystem->getListing( $this->filesystem->getUrl( $this->config['vfs_dir'] ) ); + $actual = array_diff( $entriesAfterCleaning, $this->shouldNotClean ); + if ( $dump_results ) { + var_dump( $actual ); + } + $this->assertEmpty( $actual ); + } + public function getPathToFixturesDir() { return WP_ROCKET_TESTS_FIXTURES_DIR; } @@ -48,17 +98,4 @@ public function getDefaultVfs() { 'wp-config.php' => '', ]; } - - protected function setUpOriginalEntries() { - $this->original_entries = array_merge( $this->original_files, $this->original_dirs ); - $this->original_entries = array_filter( $this->original_entries ); - sort( $this->original_entries ); - } - - protected function stripVfsRoot( $path ) { - $search = vfsStream::SCHEME . "://{$this->rootVirtualDir}"; - $search = rtrim( $search, '/\\' ) . '/'; - - return str_replace( $search, '', $path ); - } } diff --git a/tests/Unit/inc/Engine/Admin/HealthCheck/missedCron.php b/tests/Unit/inc/Engine/Admin/HealthCheck/missedCron.php new file mode 100644 index 0000000000..5562e12804 --- /dev/null +++ b/tests/Unit/inc/Engine/Admin/HealthCheck/missedCron.php @@ -0,0 +1,87 @@ +options = Mockery::mock( Options_Data::class ); + $this->health = new HealthCheck( $this->options ); + } + + private function getActualHtml() { + ob_start(); + $this->health->missed_cron(); + + return $this->format_the_html( ob_get_clean() ); + } + + /** + * @dataProvider providerTestData + */ + public function testShouldReturnNullWhenNothingToDisplay( $config ) { + Functions\when( 'current_user_can' )->justReturn( $config['cap'] ); + Functions\when( 'get_current_screen' )->alias( function() use ( $config ) { + return (object) [ + 'id' => $config['screen'], + ]; + } ); + Functions\when( 'get_current_user_id' )->justReturn( 1 ); + Functions\when( 'get_user_meta' )->justReturn( $config['dismissed'] ); + + $this->options->shouldReceive( 'get' ) + ->atMost() + ->times( 4 ) + ->andReturnValues( $config['options'] ); + + Functions\expect( 'rocket_get_constant' ) + ->atMost() + ->times( 1 ) + ->andReturn( $config['disable_cron'] ); + + Functions\expect( 'wp_next_scheduled' ) + ->atMost() + ->times( 5 ) + ->andReturnValues( $config['events'] ); + + Functions\when( '_n' )->alias( function( $singular, $plural, $count ) { + if ( $count > 1 ) { + return $plural; + } + + return $singular; + } ); + + Functions\when( 'rocket_notice_html' )->alias( function( $args ) { + echo '
    ' . $args['message'] . '

    Dismiss this notice.

    '; + } ); + + if ( empty( $config['expected'] ) ) { + $this->assertNull( $this->health->missed_cron() ); + } else { + $this->assertSame( + $this->format_the_html( $config['expected'] ), + $this->getActualHtml() + ); + } + } + + public function providerTestData() { + return $this->getTestData( __DIR__, 'missed-cron' ); + } +} diff --git a/tests/Unit/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/cleanMinify.php b/tests/Unit/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/cleanMinify.php new file mode 100644 index 0000000000..7a61cae914 --- /dev/null +++ b/tests/Unit/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/cleanMinify.php @@ -0,0 +1,52 @@ +admin_subcriber = new AdminSubscriber(); + + if ( empty( $this->config ) ) { + $this->loadConfig(); + } + } + + /** + * @dataProvider providerTestData + */ + public function testCleanMinify( $value, $should_run ) { + if ( $should_run ) { + Functions\expect( 'rocket_clean_minify' ) + ->once() + ->with( 'css' ); + } else { + Functions\expect( 'rocket_clean_minify' )->never(); + } + $this->admin_subcriber->clean_minify( $this->config['settings'], $value ); + } + + public function providerTestData() { + if ( empty( $this->config ) ) { + $this->loadConfig(); + } + + return $this->config['test_data']; + } + + private function loadConfig() { + $this->config = $this->getTestData( __DIR__, 'cleanMinify' ); + } +} diff --git a/tests/Unit/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/regenerateMinifyCssKey.php b/tests/Unit/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/regenerateMinifyCssKey.php new file mode 100644 index 0000000000..2b06354749 --- /dev/null +++ b/tests/Unit/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/regenerateMinifyCssKey.php @@ -0,0 +1,56 @@ +admin_subcriber = new AdminSubscriber(); + + if ( empty( $this->config ) ) { + $this->loadConfig(); + } + } + + /** + * @dataProvider providerTestData + */ + public function testRegenerateMinifyCssKey( $value, $should_run, $expected ) { + if ( $should_run ) { + Functions\expect( 'create_rocket_uniqid' ) + ->once() + ->andReturn( 'minify_css_key' ); + } else { + Functions\expect( 'create_rocket_uniqid' )->never(); + } + + $this->assertSame( + $expected, + $this->admin_subcriber->regenerate_minify_css_key( $value, $this->config['settings'] ) + ); + } + + public function providerTestData() { + if ( empty( $this->config ) ) { + $this->loadConfig(); + } + + return $this->config['test_data']; + } + + private function loadConfig() { + $this->config = $this->getTestData( __DIR__, 'regenerateMinifyCssKey' ); + } +} diff --git a/tests/Unit/inc/functions/rocketAddUrlProtocol.php b/tests/Unit/inc/functions/rocketAddUrlProtocol.php new file mode 100644 index 0000000000..40af3b875b --- /dev/null +++ b/tests/Unit/inc/functions/rocketAddUrlProtocol.php @@ -0,0 +1,36 @@ +once() + ->andReturnUsing( + function ( $url ) { + return "http:{$url}"; + } + ); + } else { + Functions\expect( 'set_url_scheme' )->never(); + } + $this->assertSame( $expected, rocket_add_url_protocol( $url ) ); + } + + public function providerTestData() { + return $this->getTestData( __DIR__, 'rocketAddUrlProtocol' ); + } +} diff --git a/tests/Unit/inc/functions/rocketCleanFiles.php b/tests/Unit/inc/functions/rocketCleanFiles.php new file mode 100644 index 0000000000..317c89ee31 --- /dev/null +++ b/tests/Unit/inc/functions/rocketCleanFiles.php @@ -0,0 +1,103 @@ +with( 'WP_ROCKET_CACHE_PATH' ) + ->andReturn( 'vfs://public/wp-content/cache/wp-rocket/' ); + } + + /** + * @dataProvider providerTestData + */ + public function testShouldCleanExpectedFiles( $urls, $expected ) { + if ( empty( $urls ) ) { + $this->doBailOutTest( $urls ); + } else { + $this->doCleanFilesTest( $urls, $expected ); + } + + // Run it. + rocket_clean_files( $urls ); + } + + private function doBailOutTest( $urls ) { + Filters\expectApplied( 'rocket_clean_files' ) + ->once() + ->with( $urls ) + ->andReturn( [] ); + Filters\expectApplied( 'rocket_url_no_dots' )->never(); + Actions\expectDone( 'before_rocket_clean_files' )->never(); + Actions\expectDone( 'before_rocket_clean_file' )->never(); + Functions\expect( 'get_rocket_parse_url' )->never(); + Actions\expectDone( 'after_rocket_clean_file' )->never(); + Functions\expect( 'rocket_rrmdir' )->never(); + } + + private function doCleanFilesTest( $urls, $expected ) { + $regex_urls = []; + foreach ( $urls as $url ) { + $host = parse_url( $url, PHP_URL_HOST ); + $regex_urls[] = str_replace( $host, "{$host}*", $url ); + } + + Filters\expectApplied( 'rocket_clean_files' ) + ->once() + ->with( $urls ) + ->andReturn( $regex_urls ); + Filters\expectApplied( 'rocket_url_no_dots' ) + ->once() + ->with( false ) + ->andReturnFirstArg(); + Actions\expectDone( 'before_rocket_clean_files' )->once()->with( $regex_urls ); + foreach ( $regex_urls as $url ) { + Actions\expectDone( 'before_rocket_clean_file' )->once()->with( $url ); + Functions\expect( 'get_rocket_parse_url' ) + ->once() + ->with( $url ) + ->andReturnUsing( + function ( $url ) { + return array_merge( + [ + 'host' => '', + 'path' => '', + 'scheme' => '', + 'query' => '', + ], + parse_url( $url ) + ); + } + ); + Actions\expectDone( 'after_rocket_clean_file' )->once()->with( $url ); + } + + foreach ( array_keys( $expected['cleaned'] ) as $file ) { + $file = rtrim( $file, '/\\' ); + Functions\expect( 'rocket_rrmdir' ) + ->once() + ->with( $file ) + ->andReturnNull(); + } + } +} diff --git a/tests/Unit/inc/functions/rocketCleanMinify.php b/tests/Unit/inc/functions/rocketCleanMinify.php new file mode 100644 index 0000000000..35477fcc47 --- /dev/null +++ b/tests/Unit/inc/functions/rocketCleanMinify.php @@ -0,0 +1,47 @@ +justReturn( 1 ); + Functions\expect( 'rocket_get_constant' )->with( 'WP_ROCKET_MINIFY_CACHE_PATH' )->andReturn( 'vfs://public/wp-content/cache/min/' ); + } + + /** + * @dataProvider providerTestData + */ + public function testShouldCleanMinified( $extensions, $expected ) { + $this->getShouldNotCleanEntries( $expected['non_cleaned'] ); + + foreach ( (array) $extensions as $ext ) { + if ( ! in_array( $ext, $this->valid_extensions, true ) ) { + continue; + } + Actions\expectDone( 'before_rocket_clean_minify' )->once()->with( $ext ); + Actions\expectDone( 'after_rocket_clean_minify' )->once()->with( $ext ); + } + + rocket_clean_minify( $extensions ); + + $this->checkCleanedIsDeleted( $expected['cleaned'] ); + $this->checkNonCleanedExist( isset( $expected['dump_results'] ) ); + } +} diff --git a/wp-rocket.php b/wp-rocket.php index 073660b0d0..f5434fa4b7 100755 --- a/wp-rocket.php +++ b/wp-rocket.php @@ -3,7 +3,7 @@ * Plugin Name: WP Rocket * Plugin URI: https://wp-rocket.me * Description: The best WordPress performance plugin. - * Version: 3.5.3 + * Version: 3.5.4 * Code Name: Coruscant * Author: WP Media * Author URI: https://wp-media.me @@ -18,7 +18,7 @@ defined( 'ABSPATH' ) || exit; // Rocket defines. -define( 'WP_ROCKET_VERSION', '3.5.3' ); +define( 'WP_ROCKET_VERSION', '3.5.4' ); define( 'WP_ROCKET_WP_VERSION', '4.9' ); define( 'WP_ROCKET_WP_VERSION_TESTED', '5.3.2' ); define( 'WP_ROCKET_PHP_VERSION', '5.6' );