ludovico
Forum Replies Created
-
thanks for your answer Takayuki, it actually helps
thanks Raul!
Forum: Plugins
In reply to: [Fast Velocity Minify] Disable FVM programmatically, for a specific pagethanks Raul, that got me in the right direction.
As a suggestion, it’d be great to have a hook to disable all the functionality for specific pages/posts.
Forum: Plugins
In reply to: [Fast Velocity Minify] Disable FVM on a single page?thanks for sharing @utrenkner.
I had a similar issue but, in my case, it was CSS optimization which was causing some trouble.
In order to fix, I had to use some hooks that have not been mentioned in this thread:
remove_action('wp_footer', 'fvm_add_loadcss', PHP_INT_MAX); remove_action('admin_enqueue_scripts', 'fastvelocity_min_load_admin_jscss', PHP_INT_MAX); remove_action('style_loader_tag', 'fastvelocity_optimizecss', PHP_INT_MAX);In case it can help someone else, this is the code I had to add to my functions.php:
function disable_fvm_functionality() { $current_path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); if( strpos($current_path, '/newsletter/') !== false ) { remove_action('wp_print_scripts', 'fastvelocity_min_merge_header_scripts', PHP_INT_MAX ); remove_action('wp_print_footer_scripts', 'fastvelocity_min_merge_footer_scripts', PHP_INT_MAX); remove_action('wp_print_styles', 'fastvelocity_min_merge_header_css', PHP_INT_MAX ); remove_action('wp_print_footer_scripts', 'fastvelocity_min_merge_footer_css', PHP_INT_MAX); remove_action('wp_print_styles', 'fastvelocity_add_google_fonts_merged', PHP_INT_MAX); remove_action('wp_print_footer_scripts', 'fastvelocity_add_google_fonts_merged', PHP_INT_MAX ); remove_action('init', 'fastvelocity_min_disable_wp_emojicons', PHP_INT_MAX); remove_action('template_redirect', 'fastvelocity_min_html_compression_start', PHP_INT_MAX); remove_filter('style_loader_src', 'fastvelocity_remove_cssjs_ver', PHP_INT_MAX); remove_filter('script_loader_tag', 'fastvelocity_min_defer_js', PHP_INT_MAX); remove_action('wp_footer', 'fvm_add_loadcss', PHP_INT_MAX); remove_action('admin_enqueue_scripts', 'fastvelocity_min_load_admin_jscss', PHP_INT_MAX); remove_action('style_loader_tag', 'fastvelocity_optimizecss', PHP_INT_MAX); } } add_action('template_redirect', 'disable_fvm_functionality');In my case, I’ve disabled the plugin for all pages that match “/newsletter/” in the URL (replace “/newsletter/” according to your needs or use a different expression to match against).
hi Scott, thanks for the details!
>> it will not be re-instated to the .org repository due to the approach the plugin uses for obtaining data.
@scottsweb, could you please give some more details on this?
I’m trying to understand if the plugin is safe to use or there are any security/privacy issues.
Thanks in advance.