Changeset 3251676
- Timestamp:
- 03/06/2025 11:57:14 AM (12 months ago)
- Location:
- unusedcss
- Files:
-
- 14 edited
- 1 copied
-
tags/3.1.2 (copied) (copied from unusedcss/trunk)
-
tags/3.1.2/constants.php (modified) (1 diff)
-
tags/3.1.2/includes/RapidLoad_Base.php (modified) (1 diff)
-
tags/3.1.2/includes/RapidLoad_Enqueue.php (modified) (2 diffs)
-
tags/3.1.2/includes/RapidLoad_Utils.php (modified) (1 diff)
-
tags/3.1.2/includes/modules/javascript/Javascript_Enqueue.php (modified) (1 diff)
-
tags/3.1.2/readme.txt (modified) (2 diffs)
-
tags/3.1.2/unusedcss.php (modified) (1 diff)
-
trunk/constants.php (modified) (1 diff)
-
trunk/includes/RapidLoad_Base.php (modified) (1 diff)
-
trunk/includes/RapidLoad_Enqueue.php (modified) (2 diffs)
-
trunk/includes/RapidLoad_Utils.php (modified) (1 diff)
-
trunk/includes/modules/javascript/Javascript_Enqueue.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/unusedcss.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
unusedcss/tags/3.1.2/constants.php
r3249182 r3251676 26 26 27 27 if ( ! defined( 'UUCSS_VERSION' ) ) { 28 define( 'UUCSS_VERSION', '3.1. 1' );28 define( 'UUCSS_VERSION', '3.1.2' ); 29 29 } 30 30 -
unusedcss/tags/3.1.2/includes/RapidLoad_Base.php
r3238439 r3251676 158 158 $this->enqueue_diagnose_script(); 159 159 160 //add_filter('site_transient_update_plugins', [$this, 'rapidload_plugin_check_for_update']); 161 162 //add_filter('plugins_api', [$this, 'rapidload_plugin_update_info'], 10, 3); 163 164 } 165 166 public function rapidload_plugin_update_info($false, $action, $args) { 167 if ($action !== 'plugin_information') { 168 return false; 169 } 170 171 $slug = 'unusedcss'; 172 173 if(defined('RAPIDLOAD_PLUGIN_SLUG')){ 174 $slug = RAPIDLOAD_PLUGIN_SLUG; 175 } 176 177 if ($args->slug !== $slug) { 178 return false; 179 } 180 181 $response = wp_remote_get('https://plugin.rapidload.ai/download/update.json'); 182 183 if (is_wp_error($response) || wp_remote_retrieve_response_code($response) !== 200) { 184 return false; 185 } 186 187 $data = json_decode(wp_remote_retrieve_body($response), true); 188 189 if (!isset($data['version']) || !isset($data['download_url'])) { 190 return false; 191 } 192 193 return (object) [ 194 'name' => 'RapidLoad AI - Optimize Web Vitals Automatically', 195 'slug' => $slug, 196 'version' => $data['version'], 197 'author' => 'RapidLoad', 198 'author_profile' => 'https://rapidload.ai', 199 'homepage' => 'https://plugin.rapidload.ai', 200 'download_link' => $data['download_url'], 201 'requires' => $data['requires'], 202 'tested' => $data['tested'], 203 'requires_php' => isset($data['requires_php']) ? $data['requires_php'] : '', 204 'last_updated' => date('Y-m-d'), 205 'sections' => [ 206 'description' => isset($data['sections']['description']) ? $data['sections']['description'] : 'No description available.', 207 'changelog' => isset($data['sections']['changelog']) ? $data['sections']['changelog'] : 'No changelog available.', 208 'faq' => isset($data['sections']['faq']) ? $data['sections']['faq'] : 'No FAQ available.' 209 ] 210 ]; 211 } 212 213 public function rapidload_plugin_check_for_update($transient){ 214 if (empty($transient->checked)) { 215 return $transient; 216 } 217 218 $slug = 'unusedcss'; 219 220 if(defined('RAPIDLOAD_PLUGIN_SLUG')){ 221 $slug = RAPIDLOAD_PLUGIN_SLUG; 222 } 223 224 $plugin_slug = $slug . '/unusedcss.php'; // Adjust this to match your plugin's path. 225 $remote_url = 'https://plugin.rapidload.ai/download/update.json'; // The URL where update details are hosted. 226 227 $response = wp_remote_get($remote_url, array('timeout' => 10)); 228 if (is_wp_error($response) || wp_remote_retrieve_response_code($response) !== 200) { 229 return $transient; 230 } 231 232 $data = json_decode(wp_remote_retrieve_body($response), true); 233 if (!isset($data['version']) || !isset($data['download_url'])) { 234 return $transient; 235 } 236 237 $current_version = get_plugin_data(WP_PLUGIN_DIR . '/' . $plugin_slug)['Version']; 238 239 if (version_compare($current_version, $data['version'], '<')) { 240 $transient->response[$plugin_slug] = (object) [ 241 'slug' => $slug, 242 'new_version' => $data['version'], 243 'package' => $data['download_url'], 244 'url' => 'https://rapidload.ai/', // Your plugin's details page. 245 'tested' => $data['tested'], 246 'requires' => $data['requires'], 247 ]; 248 } 249 250 return $transient; 160 251 } 161 252 -
unusedcss/tags/3.1.2/includes/RapidLoad_Enqueue.php
r3238439 r3251676 176 176 } 177 177 178 $domains = array_unique($domains); 179 180 if(gettype($dom) != "string"){ 181 foreach ($domains as $domain){ 182 if(!$this->str_contains(site_url(), $domain)){ 183 $head = $dom->find('head', 0); 184 $preconnect = '<link href="//' . $domain . '" rel="dns-prefetch" crossorigin>'; 185 $first_child = $head->first_child(); 186 $first_child->__set('outertext', $preconnect . $first_child->outertext); 178 if(apply_filters('rapidload/enqueue/dns-prefetch/enabled', true)){ 179 $domains = array_unique($domains); 180 181 if(gettype($dom) != "string"){ 182 foreach ($domains as $domain){ 183 if(!$this->str_contains(site_url(), $domain)){ 184 $head = $dom->find('head', 0); 185 $preconnect = '<link href="//' . $domain . '" rel="dns-prefetch" crossorigin>'; 186 $first_child = $head->first_child(); 187 $first_child->__set('outertext', $preconnect . $first_child->outertext); 188 } 187 189 } 188 190 } 189 191 } 190 191 192 192 193 193 if (gettype($dom) == "string") { … … 235 235 236 236 if ( isset( $this->options['uucss_excluded_links'] ) && ! empty( $this->options['uucss_excluded_links'] ) ) { 237 $exploded = explode( ',', $this->options['uucss_excluded_links'] ); 238 237 238 if(is_string($this->options['uucss_excluded_links'])){ 239 $exploded = explode( ',', $this->options['uucss_excluded_links'] ); 240 }else{ 241 $exploded = $this->options['uucss_excluded_links']; 242 } 243 239 244 foreach ( $exploded as $pattern ) { 240 245 -
unusedcss/tags/3.1.2/includes/RapidLoad_Utils.php
r3238439 r3251676 576 576 577 577 if ( isset( $options['uucss_excluded_links'] ) && ! empty( $options['uucss_excluded_links'] ) ) { 578 $exploded = explode( ',', $options['uucss_excluded_links'] ); 578 579 if(is_string($options['uucss_excluded_links'])){ 580 $exploded = explode( ',', $options['uucss_excluded_links'] ); 581 }else{ 582 $exploded = $options['uucss_excluded_links']; 583 } 579 584 580 585 foreach ( $exploded as $pattern ) { -
unusedcss/tags/3.1.2/includes/modules/javascript/Javascript_Enqueue.php
r3242971 r3251676 105 105 } 106 106 107 $this->optimize_js_delivery($link); 108 109 // legacy delay starts here 110 111 if(isset($this->options['delay_javascript']) && $this->options['delay_javascript'] == "1"){ 112 113 if(!apply_filters('rapidload/js/delay-excluded', false, $link, $this->job, $this->strategy, $this->options)){ 114 $this->load_scripts_on_user_interaction($link, $original_src); 115 } 116 117 } 118 119 // legacy delay ended 120 107 121 if(isset($this->options['minify_js']) && $this->options['minify_js'] == "1"){ 108 122 $this->minify_js($link); 109 123 } 110 111 $this->optimize_js_delivery($link);112 113 // legacy delay starts here114 115 if(isset($this->options['delay_javascript']) && $this->options['delay_javascript'] == "1"){116 117 if(!apply_filters('rapidload/js/delay-excluded', false, $link, $this->job, $this->strategy, $this->options)){118 $this->load_scripts_on_user_interaction($link, $original_src);119 }120 121 }122 123 // legacy delay ended124 124 125 125 do_action('rapidload/enqueue/optimize-js', $link, $this->job, $this->strategy, $this->options); -
unusedcss/tags/3.1.2/readme.txt
r3249182 r3251676 6 6 Requires at least: 5.0 7 7 Tested up to: 6.7 8 Stable tag: 3.1. 18 Stable tag: 3.1.2 9 9 Requires PHP: 5.4 10 10 License: GPLv3 … … 144 144 == Changelog == 145 145 146 = 3.1.2 - 06/03/2025 = 147 * fix: known bugs 148 146 149 = 3.1.1 - 02/03/2025 = 147 150 * fix: minor improvements and stability updates -
unusedcss/tags/3.1.2/unusedcss.php
r3249182 r3251676 4 4 Plugin URI: https://rapidload.ai/ 5 5 Description: Supercharge your website with RapidLoad AI, featuring cutting-edge AI to automate optimizing CSS, JavaScript, images, fonts, and caching. 6 Version: 3.1. 16 Version: 3.1.2 7 7 Author: RapidLoad 8 8 Author URI: https://rapidload.ai/ -
unusedcss/trunk/constants.php
r3249182 r3251676 26 26 27 27 if ( ! defined( 'UUCSS_VERSION' ) ) { 28 define( 'UUCSS_VERSION', '3.1. 1' );28 define( 'UUCSS_VERSION', '3.1.2' ); 29 29 } 30 30 -
unusedcss/trunk/includes/RapidLoad_Base.php
r3238439 r3251676 158 158 $this->enqueue_diagnose_script(); 159 159 160 //add_filter('site_transient_update_plugins', [$this, 'rapidload_plugin_check_for_update']); 161 162 //add_filter('plugins_api', [$this, 'rapidload_plugin_update_info'], 10, 3); 163 164 } 165 166 public function rapidload_plugin_update_info($false, $action, $args) { 167 if ($action !== 'plugin_information') { 168 return false; 169 } 170 171 $slug = 'unusedcss'; 172 173 if(defined('RAPIDLOAD_PLUGIN_SLUG')){ 174 $slug = RAPIDLOAD_PLUGIN_SLUG; 175 } 176 177 if ($args->slug !== $slug) { 178 return false; 179 } 180 181 $response = wp_remote_get('https://plugin.rapidload.ai/download/update.json'); 182 183 if (is_wp_error($response) || wp_remote_retrieve_response_code($response) !== 200) { 184 return false; 185 } 186 187 $data = json_decode(wp_remote_retrieve_body($response), true); 188 189 if (!isset($data['version']) || !isset($data['download_url'])) { 190 return false; 191 } 192 193 return (object) [ 194 'name' => 'RapidLoad AI - Optimize Web Vitals Automatically', 195 'slug' => $slug, 196 'version' => $data['version'], 197 'author' => 'RapidLoad', 198 'author_profile' => 'https://rapidload.ai', 199 'homepage' => 'https://plugin.rapidload.ai', 200 'download_link' => $data['download_url'], 201 'requires' => $data['requires'], 202 'tested' => $data['tested'], 203 'requires_php' => isset($data['requires_php']) ? $data['requires_php'] : '', 204 'last_updated' => date('Y-m-d'), 205 'sections' => [ 206 'description' => isset($data['sections']['description']) ? $data['sections']['description'] : 'No description available.', 207 'changelog' => isset($data['sections']['changelog']) ? $data['sections']['changelog'] : 'No changelog available.', 208 'faq' => isset($data['sections']['faq']) ? $data['sections']['faq'] : 'No FAQ available.' 209 ] 210 ]; 211 } 212 213 public function rapidload_plugin_check_for_update($transient){ 214 if (empty($transient->checked)) { 215 return $transient; 216 } 217 218 $slug = 'unusedcss'; 219 220 if(defined('RAPIDLOAD_PLUGIN_SLUG')){ 221 $slug = RAPIDLOAD_PLUGIN_SLUG; 222 } 223 224 $plugin_slug = $slug . '/unusedcss.php'; // Adjust this to match your plugin's path. 225 $remote_url = 'https://plugin.rapidload.ai/download/update.json'; // The URL where update details are hosted. 226 227 $response = wp_remote_get($remote_url, array('timeout' => 10)); 228 if (is_wp_error($response) || wp_remote_retrieve_response_code($response) !== 200) { 229 return $transient; 230 } 231 232 $data = json_decode(wp_remote_retrieve_body($response), true); 233 if (!isset($data['version']) || !isset($data['download_url'])) { 234 return $transient; 235 } 236 237 $current_version = get_plugin_data(WP_PLUGIN_DIR . '/' . $plugin_slug)['Version']; 238 239 if (version_compare($current_version, $data['version'], '<')) { 240 $transient->response[$plugin_slug] = (object) [ 241 'slug' => $slug, 242 'new_version' => $data['version'], 243 'package' => $data['download_url'], 244 'url' => 'https://rapidload.ai/', // Your plugin's details page. 245 'tested' => $data['tested'], 246 'requires' => $data['requires'], 247 ]; 248 } 249 250 return $transient; 160 251 } 161 252 -
unusedcss/trunk/includes/RapidLoad_Enqueue.php
r3238439 r3251676 176 176 } 177 177 178 $domains = array_unique($domains); 179 180 if(gettype($dom) != "string"){ 181 foreach ($domains as $domain){ 182 if(!$this->str_contains(site_url(), $domain)){ 183 $head = $dom->find('head', 0); 184 $preconnect = '<link href="//' . $domain . '" rel="dns-prefetch" crossorigin>'; 185 $first_child = $head->first_child(); 186 $first_child->__set('outertext', $preconnect . $first_child->outertext); 178 if(apply_filters('rapidload/enqueue/dns-prefetch/enabled', true)){ 179 $domains = array_unique($domains); 180 181 if(gettype($dom) != "string"){ 182 foreach ($domains as $domain){ 183 if(!$this->str_contains(site_url(), $domain)){ 184 $head = $dom->find('head', 0); 185 $preconnect = '<link href="//' . $domain . '" rel="dns-prefetch" crossorigin>'; 186 $first_child = $head->first_child(); 187 $first_child->__set('outertext', $preconnect . $first_child->outertext); 188 } 187 189 } 188 190 } 189 191 } 190 191 192 192 193 193 if (gettype($dom) == "string") { … … 235 235 236 236 if ( isset( $this->options['uucss_excluded_links'] ) && ! empty( $this->options['uucss_excluded_links'] ) ) { 237 $exploded = explode( ',', $this->options['uucss_excluded_links'] ); 238 237 238 if(is_string($this->options['uucss_excluded_links'])){ 239 $exploded = explode( ',', $this->options['uucss_excluded_links'] ); 240 }else{ 241 $exploded = $this->options['uucss_excluded_links']; 242 } 243 239 244 foreach ( $exploded as $pattern ) { 240 245 -
unusedcss/trunk/includes/RapidLoad_Utils.php
r3238439 r3251676 576 576 577 577 if ( isset( $options['uucss_excluded_links'] ) && ! empty( $options['uucss_excluded_links'] ) ) { 578 $exploded = explode( ',', $options['uucss_excluded_links'] ); 578 579 if(is_string($options['uucss_excluded_links'])){ 580 $exploded = explode( ',', $options['uucss_excluded_links'] ); 581 }else{ 582 $exploded = $options['uucss_excluded_links']; 583 } 579 584 580 585 foreach ( $exploded as $pattern ) { -
unusedcss/trunk/includes/modules/javascript/Javascript_Enqueue.php
r3242971 r3251676 105 105 } 106 106 107 $this->optimize_js_delivery($link); 108 109 // legacy delay starts here 110 111 if(isset($this->options['delay_javascript']) && $this->options['delay_javascript'] == "1"){ 112 113 if(!apply_filters('rapidload/js/delay-excluded', false, $link, $this->job, $this->strategy, $this->options)){ 114 $this->load_scripts_on_user_interaction($link, $original_src); 115 } 116 117 } 118 119 // legacy delay ended 120 107 121 if(isset($this->options['minify_js']) && $this->options['minify_js'] == "1"){ 108 122 $this->minify_js($link); 109 123 } 110 111 $this->optimize_js_delivery($link);112 113 // legacy delay starts here114 115 if(isset($this->options['delay_javascript']) && $this->options['delay_javascript'] == "1"){116 117 if(!apply_filters('rapidload/js/delay-excluded', false, $link, $this->job, $this->strategy, $this->options)){118 $this->load_scripts_on_user_interaction($link, $original_src);119 }120 121 }122 123 // legacy delay ended124 124 125 125 do_action('rapidload/enqueue/optimize-js', $link, $this->job, $this->strategy, $this->options); -
unusedcss/trunk/readme.txt
r3249182 r3251676 6 6 Requires at least: 5.0 7 7 Tested up to: 6.7 8 Stable tag: 3.1. 18 Stable tag: 3.1.2 9 9 Requires PHP: 5.4 10 10 License: GPLv3 … … 144 144 == Changelog == 145 145 146 = 3.1.2 - 06/03/2025 = 147 * fix: known bugs 148 146 149 = 3.1.1 - 02/03/2025 = 147 150 * fix: minor improvements and stability updates -
unusedcss/trunk/unusedcss.php
r3249182 r3251676 4 4 Plugin URI: https://rapidload.ai/ 5 5 Description: Supercharge your website with RapidLoad AI, featuring cutting-edge AI to automate optimizing CSS, JavaScript, images, fonts, and caching. 6 Version: 3.1. 16 Version: 3.1.2 7 7 Author: RapidLoad 8 8 Author URI: https://rapidload.ai/
Note: See TracChangeset
for help on using the changeset viewer.