Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
<?php
/**
* Plugin Name: Your Custom Functionality Plugin
* Description: Short description of your plugin here.
* Author: your name here
* License: GNU General Public License v3 or later
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/
// Basic security, prevents file from being loaded directly.
defined( 'ABSPATH' ) or die( 'Cheatin’ uh?' );
/* Prefix your custom functions!
*
* Function names must be unique in PHP.
* In order to make sure the name of your function does not
* exist anywhere else in WordPress, or in other plugins,
* give your function a unique custom prefix.
* Example prefix: wpr20151231
* Example function name: wpr20151231__do_something
*
* For the rest of your function name after the prefix,
* make sure it is as brief and descriptive as possible.
* When in doubt, do not fear a longer function name if it
* is going to remind you at once of what the function does.
* Imagine you’ll be reading your own code in some years, so
* treat your future self with descriptive naming. ;)
*/
/**
* Pass your custom function to the wp_rocket_loaded action hook.
*
* Note: wp_rocket_loaded itself is hooked into WordPress’ own
* plugins_loaded hook.
* Depending what kind of functionality your custom plugin
* should implement, you can/should hook your function(s) into
* different action hooks, such as for example
* init, after_setup_theme, or template_redirect.
*
* Learn more about WordPress actions and filters here:
* https://developer.wordpress.org/plugins/hooks/
*
* @param string 'wp_rocket_loaded' Hook name to hook function into
* @param string 'yourprefix__do_something' Function name to be hooked
*/
add_action( 'wp_rocket_loaded', 'yourprefix__do_something' );
/**
* Define your custom function here.
* This example just returns true.
*
* @return bool Boolean value TRUE
*/
function yourprefix__do_something() {
return true;
}
// Basic security, prevents file from being loaded directly.
// defined( 'ABSPATH' ) or die( 'Cheatin’ uh?' );
add_filter( 'rocket_htaccess_mod_rewrite' , '__return_false' );
add_filter( 'rocket_cache_dynamic_cookies', '__rocket_dynamic_cache_wc_recently_viewed_products' );
function __rocket_dynamic_cache_wc_recently_viewed_products( $dynamic_cookies ) {
$dynamic_cookies[] = 'woocommerce_recently_viewed';
return $dynamic_cookies;
}
?>
возможно загрузка страницы увеличилась, гугл спид не всегда все видит. сравните загрузку через dev-tools, у меня небольшое изменение есть, правда очень незначитательное, .08sОбновил тему до 20.4 — скорость в гуглспид как была 67/78 так и осталась. Из настроек только Минифай HTML, Google Font, Remove query strings.
А что именно происходит, есть ли вообще ставить плагины кеширования если стоит NGINX сервер?Будьте осторожны. Этот плагин просто деньги на ветер если у вас NGINX сервер