Patch: Add filter to allow bypassing of version check
-
In configure_plugin() function
--- use-google-libraries.orig.php 2017-12-06 14:57:26.844948800 +0000 +++ use-google-libraries.php 2017-12-06 14:57:22.081676400 +0000 @@ -226,7 +226,7 @@ } static function configure_plugin() { - if ( version_compare( get_bloginfo( 'version' ), '4.8', '>=') ) { + if ( !apply_filters( 'ugl_skip_version_check', false ) && version_compare( get_bloginfo( 'version' ), '4.8', '>=') ) { self::debug( 'Not yet qualified with this version of WordPress. Bypassing UGL.' ); return; }
This can be used in a small plugin:
<?php /* Plugin Name: Skip Version Check in Use Google Libraries Plugin URI: https://www.damiencarbery.com Description: Force Use Google Libraries to run by skipping the WordPress version check. Author: Damien Carbery Version: 0.1 */ add_filter( 'ugl_skip_version_check', '__return_true' );
Would you be able to add this to the plugin?
Aside: What type of issues should I look for to see whether the plugin is working correctly?
I have a clean install with Twenty Seventeen and I see jquery.js changed to jquery.min.js but jquery.migrate.js unchanged.
- The topic ‘Patch: Add filter to allow bypassing of version check’ is closed to new replies.