Changeset 3244381
- Timestamp:
- 02/21/2025 10:05:28 AM (13 months ago)
- Location:
- sitelint/trunk
- Files:
-
- 6 edited
-
README.txt (modified) (2 diffs)
-
includes/sitelint-audits-deactivator.php (modified) (1 diff)
-
includes/sitelint-audits-loader.php (modified) (1 diff)
-
includes/sitelint-audits.php (modified) (1 diff)
-
public/sitelint-public.php (modified) (1 diff)
-
sitelint.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sitelint/trunk/README.txt
r3235310 r3244381 4 4 Requires at least: 4.7 5 5 Tested up to: 6.6.2 6 Stable tag: 1.5.1 56 Stable tag: 1.5.16 7 7 License: GPLv2 or later 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 29 29 30 30 == Changelog == 31 32 = 1.5.16 = 33 34 * Enqueuing the SiteLint loader through the wp_loaded hook and creating the script file. 31 35 32 36 = 1.5.15 = -
sitelint/trunk/includes/sitelint-audits-deactivator.php
r3223115 r3244381 15 15 public static function deactivate() { 16 16 SiteLint_Loader::remove_all_filters_and_actions(); 17 SiteLint_Loader::remove_js_loader(); 17 18 } 18 19 -
sitelint/trunk/includes/sitelint-audits-loader.php
r3223115 r3244381 120 120 } 121 121 122 public static function remove_js_loader() { 123 $plugin_path = plugin_dir_path(__FILE__); 124 $js_loader_path = $plugin_path . '../public/scripts/loader.js'; 125 126 if (file_exists($js_loader_path)) { 127 try { 128 unlink($js_loader_path); 129 } catch (Exception $e) { 130 error_log('An error occurred while trying to remove SiteLint loader.js: ' . $e->getMessage()); 131 } 132 } 133 } 122 134 } -
sitelint/trunk/includes/sitelint-audits.php
r3235310 r3244381 146 146 147 147 SiteLint_Loader::add_action('wp_footer', $plugin_public, 'add_logo'); 148 149 148 $plugin_public->enqueue_styles(); 150 $plugin_public->enqueue_scripts();149 SiteLint_Loader::add_action('wp_loaded', $plugin_public, 'enqueue_scripts'); 151 150 } 152 151 -
sitelint/trunk/public/sitelint-public.php
r3235310 r3244381 128 128 })(window, document, 'script');"; 129 129 130 function enqueue_sitelint_loader($sitelintLoaderId, $sitelintLoader) { 131 wp_register_script($sitelintLoaderId, ''); 132 wp_enqueue_script($sitelintLoaderId); 133 wp_add_inline_script($sitelintLoaderId, $sitelintLoader); 130 $loaderFilePath = __DIR__ . '/scripts/loader.js'; 131 $loaderFileDir = dirname($loaderFilePath); 132 133 if (file_exists($loaderFileDir) === false) { 134 wp_mkdir_p($loaderFileDir); 134 135 } 135 136 136 add_action('wp_enqueue_scripts', function() use ($sitelintLoaderId, $sitelintLoader) { 137 enqueue_sitelint_loader($sitelintLoaderId, $sitelintLoader); 138 }); 137 file_put_contents($loaderFilePath, $sitelintLoader); 138 139 wp_register_script($sitelintLoaderId, plugins_url('scripts/loader.js', __FILE__), [], SITELINT_VERSION, [ 140 'strategy' => 'defer' 141 ]); 142 wp_enqueue_script($sitelintLoaderId); 139 143 } 140 144 -
sitelint/trunk/sitelint.php
r3235310 r3244381 10 10 * Plugin Name: SiteLint 11 11 * Description: SiteLint - official plugin. Accessibility, SEO, Performance, Security, Privacy, Technical issues in one place. Client-side & real-time checker. 12 * Version: 1.5.1 512 * Version: 1.5.16 13 13 * Author: SiteLint 14 14 * Author URI: https://www.sitelint.com … … 27 27 * Currently plugin version. Use SemVer - https://semver.org 28 28 */ 29 define('SITELINT_VERSION', '1.5.1 5');29 define('SITELINT_VERSION', '1.5.16'); 30 30 31 31 /**
Note: See TracChangeset
for help on using the changeset viewer.