Changeset 3481926
- Timestamp:
- 03/13/2026 11:28:22 AM (2 weeks ago)
- Location:
- blinkspeed
- Files:
-
- 15 added
- 11 edited
-
assets/screenshot-1.png (added)
-
assets/screenshot-10.png (added)
-
assets/screenshot-11.png (added)
-
assets/screenshot-12.png (added)
-
assets/screenshot-13.png (added)
-
assets/screenshot-2.png (added)
-
assets/screenshot-3.png (added)
-
assets/screenshot-4.png (added)
-
assets/screenshot-5.png (added)
-
assets/screenshot-6.png (added)
-
assets/screenshot-7.png (added)
-
assets/screenshot-8.png (added)
-
assets/screenshot-9.png (added)
-
trunk/admin/admin-page.php (modified) (2 diffs)
-
trunk/assets/css/admin-style.css (modified) (1 diff)
-
trunk/assets/css/admin.css (modified) (32 diffs)
-
trunk/assets/images/Blinkspeed-logo-final-white.webp (added)
-
trunk/assets/images/transparent-logo.png (modified) (previous)
-
trunk/assets/js/bs-admin-core.js (modified) (3 diffs)
-
trunk/blinkspeed.php (modified) (2 diffs)
-
trunk/includes/Core.php (modified) (12 diffs)
-
trunk/includes/CssOptimize.php (modified) (5 diffs)
-
trunk/includes/HtmlOptimize.php (modified) (5 diffs)
-
trunk/includes/JsOptimize.php (modified) (6 diffs)
-
trunk/languages/blinkspeed.pot (modified) (1 diff)
-
trunk/readme.txt (added)
Legend:
- Unmodified
- Added
- Removed
-
blinkspeed/trunk/admin/admin-page.php
r3478468 r3481926 36 36 <div class="top_panel d-none"> 37 37 <div class="logo_container"> 38 <img class="logo" src="<?php $blinkSpeed_admin->core->blinkspeed_esc_url_echo( BLINKSPEED_URL . 'assets/images/ transparent-logo.png' ); ?>">38 <img class="logo" src="<?php $blinkSpeed_admin->core->blinkspeed_esc_url_echo( BLINKSPEED_URL . 'assets/images/Blinkspeed-logo-final-white.webp' ); ?>"> 39 39 </div> 40 40 … … 66 66 </div> 67 67 <div class="logo_container"> 68 <img class="logo" src="<?php $blinkSpeed_admin->core->blinkspeed_esc_url_echo( BLINKSPEED_URL . 'assets/images/ transparent-logo.png' ); ?>">68 <img class="logo" src="<?php $blinkSpeed_admin->core->blinkspeed_esc_url_echo( BLINKSPEED_URL . 'assets/images/Blinkspeed-logo-final-white.webp' ); ?>"> 69 69 </div> 70 70 <?php include 'includes/tabs.php'; ?> -
blinkspeed/trunk/assets/css/admin-style.css
r3478468 r3481926 160 160 } 161 161 162 li#toplevel_page_blinkspeed .wp-menu-image > img, li#toplevel_page_settings-page-blinkspeed .wp-menu-image > img { 163 filter: brightness(0) invert(1); 164 min-width: 25px; 165 } 166 162 167 /*** Media Image Optimize Css :End */ -
blinkspeed/trunk/assets/css/admin.css
r3478468 r3481926 102 102 padding: 25px 35px 50px; 103 103 border-top: 2px solid #fff; 104 background: #1d212a;104 background: transparent; 105 105 border-radius: 0 0 20px 0; 106 106 } … … 154 154 155 155 main.admin-blinkSpeed ul.nav.nav-tabs { 156 background: #1d212a;156 background: transparent; 157 157 border: none !important; 158 158 padding: 25px 0; … … 187 187 main.admin-blinkSpeed .nav > li > a:hover, 188 188 main.admin-blinkSpeed .nav > li.active a { 189 color: # 11429C!important;189 color: #0192e2 !important; 190 190 } 191 191 main.admin-blinkSpeed .show:not(.active) { … … 275 275 font-size: 12px; 276 276 font-weight: bold; 277 color: # 11429C;277 color: #0192e2; 278 278 text-decoration: underline; 279 279 } … … 290 290 font-family: FontAwesome; 291 291 margin-right: 5px; 292 color: # 11429C;292 color: #0192e2; 293 293 } 294 294 main.admin-blinkSpeed .icon_container img { … … 376 376 } 377 377 main.admin-blinkSpeed .bstext-skyblue { 378 color: # 11429C;378 color: #0192e2; 379 379 } 380 380 main.admin-blinkSpeed .bsw-100 { 381 381 width: 100%; 382 } 383 .admin-blinkSpeed .row { 384 margin: 0; 382 385 } 383 386 main.admin-blinkSpeed label { … … 458 461 } 459 462 main.admin-blinkSpeed label.switch input:checked + .checked { 460 background-color: # 11429C;463 background-color: #0192e2; 461 464 } 462 465 main.admin-blinkSpeed .blinkspeed-cdn .bsd-flex.gap20, … … 486 489 content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512' height='13' width='13' fill='%23fff'%3E%3Cpath d='M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 108.4c12.5-12.5 32.8-12.5 45.3 0z'/%3E%3C/svg%3E"); 487 490 padding: 2px; 488 background: # 11429C;491 background: #0192e2; 489 492 line-height: 16px; 490 493 position: absolute; 491 494 left: 0; 492 495 top: 0; 493 border: 1px solid # 11429C;496 border: 1px solid #0192e2; 494 497 } 495 498 main.admin-blinkSpeed input[type="checkbox"]:focus, … … 528 531 font-family: 'FontAwesome'; 529 532 font-size: 22px; 530 color: # 11429C;533 color: #0192e2; 531 534 font-weight: 700; 532 535 } … … 585 588 position: sticky; 586 589 top: 50px; 590 background: linear-gradient(57deg, hsl(203, 100%, 46%), hsl(142, 76%, 36%)); 591 padding: 0; 587 592 } 588 593 main.admin-blinkSpeed .tab-content > section { … … 624 629 user-select: none; 625 630 /* background-color: transparent; */ 626 background: # 11429C;631 background: #0192e2; 627 632 border: 1px solid transparent; 628 633 padding: 6px 12px; … … 678 683 main.admin-blinkSpeed textarea:focus { 679 684 box-shadow: none !important; 680 border-color: # 11429C!important;685 border-color: #0192e2 !important; 681 686 } 682 687 … … 699 704 line-height: normal; 700 705 } 701 706 .blinkspeed_optimize_ai span.new-feature { 707 display: none; 708 } 702 709 main.admin-blinkSpeed small.default-fn { 703 710 font-size: 15px; 704 711 } 705 712 main.admin-blinkSpeed textarea.hook_before_start.error_textarea,main.admin-blinkSpeed .CodeMirror.cm-s-default.CodeMirror-wrap.error_textarea { 706 border: 1px solid red;707 }708 709 main.admin-blinkSpeed img.loader-img {710 max-width: 26px;711 border-radius: 50%;712 }713 main.admin-blinkSpeed small.extra-small {714 /* font-size: 85%; */715 color: #11429C;716 }717 main.admin-blinkSpeed .single-hook > label {718 margin-bottom: 5px;719 display: block;720 }721 main.admin-blinkSpeed .single-hook code {722 margin: 5px 0;723 display: inline-block;724 background-color: transparent;725 }726 main.admin-blinkSpeed .single-hook textarea{727 display: block;728 }729 main.admin-blinkSpeed .single-hook span.blinkspeed-info-display {730 font-size: 14px;731 font-weight: normal;732 letter-spacing: 0.5px;733 padding: 10px;734 /* width: max-content; */735 }736 main.admin-blinkSpeed .single-hook span.blinkspeed-info-display p {737 margin-bottom: 5px;738 }739 main.admin-blinkSpeed span.progress-percent {740 font-size: 14px;741 }742 /* .cdn_resources textarea {743 min-width: 100px;744 height: 35px;745 resize: vertical;746 overflow-y: auto;747 margin: 5px 0;748 } */749 main.admin-blinkSpeed input#cache_path + small {713 border: 1px solid red; 714 } 715 716 main.admin-blinkSpeed img.loader-img { 717 max-width: 26px; 718 border-radius: 50%; 719 } 720 main.admin-blinkSpeed small.extra-small { 721 /* font-size: 85%; */ 722 color: #0192e2; 723 } 724 main.admin-blinkSpeed .single-hook > label { 725 margin-bottom: 5px; 726 display: block; 727 } 728 main.admin-blinkSpeed .single-hook code { 729 margin: 5px 0; 730 display: inline-block; 731 background-color: transparent; 732 } 733 main.admin-blinkSpeed .single-hook textarea{ 734 display: block; 735 } 736 main.admin-blinkSpeed .single-hook span.blinkspeed-info-display { 737 font-size: 14px; 738 font-weight: normal; 739 letter-spacing: 0.5px; 740 padding: 10px; 741 /* width: max-content; */ 742 } 743 main.admin-blinkSpeed .single-hook span.blinkspeed-info-display p { 744 margin-bottom: 5px; 745 } 746 main.admin-blinkSpeed span.progress-percent { 747 font-size: 14px; 748 } 749 /* .cdn_resources textarea { 750 min-width: 100px; 751 height: 35px; 752 resize: vertical; 753 overflow-y: auto; 754 margin: 5px 0; 755 } */ 756 main.admin-blinkSpeed input#cache_path + small { 750 757 word-break: break-word; 751 758 } … … 778 785 } 779 786 main.admin-blinkSpeed .logo_container { 780 background: #1d212a;787 background: transparent; 781 788 padding-top: 15px; 789 text-align: center; 782 790 } 783 791 784 792 main.admin-blinkSpeed .logo_container img.logo { 785 793 width: 100%; 786 max-width: 2 50px;794 max-width: 230px; 787 795 } 788 796 … … 860 868 } 861 869 main.admin-blinkSpeed .search_hooks > button.clear_field svg { 862 fill: # 11429C;870 fill: #0192e2; 863 871 } 864 872 main.admin-blinkSpeed .advance-cache-exist-error, … … 904 912 main.admin-blinkSpeed .search_hooks input.pl_search_field { 905 913 font-size: 16px; 906 border: 1px solid # 11429C;914 border: 1px solid #0192e2; 907 915 padding: 8px 12px; 908 color: # 11429C;916 color: #0192e2; 909 917 line-height: normal; 910 918 } 911 919 main.admin-blinkSpeed .search_hooks input.pl_search_field::placeholder { 912 color: # 11429C;920 color: #0192e2; 913 921 font-style: italic; 914 922 letter-spacing:.5px … … 1036 1044 border: none; 1037 1045 text-decoration: underline; 1038 color: # 11429C;1046 color: #0192e2; 1039 1047 padding: 0; 1040 1048 font-weight: 500; … … 1138 1146 main.admin-blinkSpeed .tab-panel { 1139 1147 width: 100%; 1140 max-width: 2 90px;1148 max-width: 260px; 1141 1149 } 1142 1150 /*.tab-content { … … 1224 1232 } 1225 1233 main.admin-blinkSpeed .support_section { 1226 display: block;1234 display: flex; 1227 1235 padding: 0; 1228 1236 border-radius: 0; 1229 1237 background: no-repeat; 1238 flex-direction: column; 1239 align-items: center; 1230 1240 } 1231 1241 main.admin-blinkSpeed .support_section a { … … 1239 1249 align-items: center; 1240 1250 justify-content: center; 1241 margin: 20px 8px;1251 margin: 10px 8px 10px; 1242 1252 background-image: linear-gradient(45deg, #24a4cc, #1286da) !important; 1243 1253 position: relative; … … 1245 1255 text-indent: -18px; 1246 1256 } 1257 1247 1258 main.admin-blinkSpeed .support_section a.doc.btn i:before { 1248 1259 content: "\f0f6 "; … … 1264 1275 transform: translate(-50%, -50%); 1265 1276 animation: ring 2s infinite; 1266 }1277 } 1267 1278 1268 @keyframes ring {1279 @keyframes ring { 1269 1280 0% { 1270 1281 box-shadow:0 0 0 0px rgb(25 146 213); … … 1273 1284 box-shadow:0 0 0 10px rgb(239 74 41 / 0%) 1274 1285 } 1275 } 1286 } 1287 main.admin-blinkSpeed .logo_container img.logo { 1288 max-width: 70px; 1289 object-fit: contain; 1290 } 1276 1291 } 1277 1292 … … 1483 1498 main.admin-blinkSpeed button.btn.btn-rem-filter { 1484 1499 background: transparent; 1485 color: # 11429C!important;1500 color: #0192e2 !important; 1486 1501 border: 1px solid; 1487 1502 } … … 1578 1593 main.admin-blinkSpeed .pagination button.active, 1579 1594 main.admin-blinkSpeed .pagination button:hover { 1580 background-image: linear-gradient(90deg, # 11429C, #11429C);1595 background-image: linear-gradient(90deg, #0192e2, #0192e2); 1581 1596 color: #fff; 1582 border-color: # 11429C;1597 border-color: #0192e2; 1583 1598 } 1584 1599 main.admin-blinkSpeed button#btn.expend-textarea { … … 1586 1601 border: none; 1587 1602 fill: #fff; 1588 background-image: linear-gradient(90deg, # 11429C, #11429C);1603 background-image: linear-gradient(90deg, #0192e2, #0192e2); 1589 1604 height: 40px; 1590 1605 width: 40px; … … 1717 1732 height: 40px; 1718 1733 background: conic-gradient( 1719 # 11429Ccalc(var(--percentage) * 1%),1734 #0192e2 calc(var(--percentage) * 1%), 1720 1735 rgba(17, 66, 156, 0.1) calc(var(--percentage) * 1%) 1721 1736 ); … … 1741 1756 position: absolute; 1742 1757 font-weight: 600; 1743 color: # 11429C;1758 color: #0192e2; 1744 1759 text-align: center; 1745 1760 z-index: 2; … … 1775 1790 } 1776 1791 } 1777 1792 #blinkspeedChangeLog > .bsd-flex { 1793 margin-bottom: 16px; 1794 } 1778 1795 main.admin-blinkSpeed .cst-loader-container.no-animate .cst-loader::before{ 1779 1796 animation: none; … … 1797 1814 main.admin-blinkSpeed a.n_help_a { 1798 1815 margin-right: 70px; 1799 /* background: # 11429C; */1800 background: linear-gradient(90deg, # 11429C 30%, #11429C100%);1816 /* background: #0192e2; */ 1817 background: linear-gradient(90deg, #0192e2 30%, #0192e2 100%); 1801 1818 color: #fff; 1802 1819 padding: 8px; … … 1854 1871 .admin-blinkSpeed :is(:focus, :focus-visible) { 1855 1872 box-shadow: none !important; 1856 border-color: # 11429C!important;1873 border-color: #0192e2 !important; 1857 1874 outline: none; 1858 1875 } … … 2218 2235 } 2219 2236 main.admin-blinkSpeed .selected-item { 2220 background-color: # 11429C;2237 background-color: #0192e2; 2221 2238 } 2222 2239 main.admin-blinkSpeed .selected-item button { -
blinkspeed/trunk/assets/js/bs-admin-core.js
r3478468 r3481926 104 104 105 105 jQuery("ul.blinkSpeednav li a").click(function (e) { 106 107 106 e.preventDefault(); 108 107 var url = document.location.href; … … 110 109 var updatedUrl = updateQueryStringParameter(url, 'tab', newTab); 111 110 history.pushState({}, '', updatedUrl); 111 jQuery('.blinkSpeednav li').removeClass('active'); 112 jQuery(this).parent().addClass('active in'); 112 113 jQuery('.tab-pane').removeClass('active in'); 113 114 jQuery('#' + newTab).addClass('active in'); 114 115 }); 116 115 117 var hash = window.location.href.match(/[?&]tab=([^&]+)/); 116 118 if (hash && hash[1] && hash[1].length > 0) { … … 118 120 jQuery('#' + hash[1]).addClass('active in'); 119 121 } 120 121 122 122 123 function updateQueryStringParameter(uri, key, value) { -
blinkspeed/trunk/blinkspeed.php
r3478468 r3481926 3 3 * Plugin Name: BlinkSpeed 4 4 * Description: Boost your WordPress site speed with advanced AI optimization techniques. Improve Core Web Vitals, achieve higher scores on Google PageSpeed Insights and GTmetrix, and deliver a faster, smoother browsing experience for your visitors. 5 * Version: 1.0. 45 * Version: 1.0.5 6 6 * Author: BlinkSpeed 7 7 * Author URI: https://blinkspeed.ai/ … … 24 24 25 25 // Define plugin constants 26 define( 'BLINKSPEED_VERSION', '1.0. 4' );26 define( 'BLINKSPEED_VERSION', '1.0.5' ); 27 27 define( 'BLINKSPEED_FILE', __FILE__ ); 28 28 define( 'BLINKSPEED_DIR', plugin_dir_path( __FILE__ ) ); -
blinkspeed/trunk/includes/Core.php
r3478468 r3481926 944 944 $ignore_critical_css = $this->blinkspeed_check_ignore_critical_css_callback($this->addSettings['full_url'],$ignore_critical_css); 945 945 } 946 947 $ignore_critical_css = $this->blinkspeed_no_critical_css($ignore_critical_css, $this->addSettings['full_url']); 946 948 947 949 $this->addSettings['ignoreCriticalCss'] = $ignore_critical_css; … … 1313 1315 $img_obj['src'] = 'about:blank'; 1314 1316 $img_obj['data-class'] = 'LazyLoad'; 1315 $this->blinkspeed_str_replace_set_img($img, $this->blinkspeed_implode_link_array('iframe', $img_obj) . $iframe_html); 1317 1318 $iframe_lazy = 0; 1319 $iframe_lazy = $this->blinkspeed_change_iframe_to_iframe_lazy($iframe_lazy); 1320 1321 if($iframe_lazy){ 1322 $this->blinkspeed_str_replace_set_img($img, $this->blinkspeed_implode_link_array('iframelazy', $img_obj) . $iframe_html); 1323 } else { 1324 $this->blinkspeed_str_replace_set_img($img, $this->blinkspeed_implode_link_array('iframe', $img_obj) . $iframe_html); 1325 } 1316 1326 } 1317 1327 } … … 1367 1377 ); 1368 1378 $video_new = str_replace('<video ', '<video data-class="LazyLoad" ', $video_new); 1379 1380 $videolazy = 0; 1381 $videolazy = $this->blinkspeed_change_video_to_videolazy($videolazy); 1382 // Apply videolazy conversion if enabled 1383 if ($videolazy) { 1384 $video_new = str_replace(array('<video', '</video>'), array('<videolazy', '</videolazy>'), $video_new); 1385 } 1369 1386 1370 1387 $videoObj = $this->blinkspeed_parse_link('video', $video); … … 1567 1584 1568 1585 // Handle mobile responsive images 1569 if (!empty($this->addSettings['is_mobile']) && !empty($this->settings['resp_bg_img']) ) {1586 if (!empty($this->addSettings['is_mobile']) && !empty($this->settings['resp_bg_img']) && !$this->blinkspeed_exclude_image_from_convert_to_webp($imgsrc_filepath)) { 1570 1587 if (!empty($img_size[0]) && $img_size[0] > 600) { 1571 1588 [$imgnn_arr, $imgsrc_filepath] = $this->blinkspeed_convert_to_smaller_image($img_root_path, $imgsrc_filepath, $imgnn_arr); … … 1581 1598 1582 1599 // Handle WebP conversion 1583 if (count($webp_enable) > 0 && in_array($blinkSpeed_img_ext, $webp_enable) ) {1600 if (count($webp_enable) > 0 && in_array($blinkSpeed_img_ext, $webp_enable) && !$this->blinkspeed_exclude_image_from_convert_to_webp($imgsrc_filepath)) { 1584 1601 $imgsrc_webpfilepath = $this->blinkspeed_get_img_webp_path($img_root_path, $imgsrc_filepath); 1585 1602 if (file_exists($imgsrc_webpfilepath)) { … … 1629 1646 $this->addSettings['preload_resources']['all'][] = $imgSrcArr['path']; 1630 1647 } 1648 1649 $imgnn = $this->blinkspeed_customize_image($imgnn, $img, $imgnn_arr); 1631 1650 1632 1651 // Set high priority loading for excluded images … … 1666 1685 } 1667 1686 } 1687 1688 $imgnn = $this->blinkspeed_customize_image($imgnn, $img, $imgnn_arr); 1668 1689 1669 1690 $this->blinkspeed_str_replace_set_img($img, $imgnn); … … 2029 2050 $exclude_image = 1; 2030 2051 } 2052 $exclude_image = $this->blinkspeed_exclude_image_to_lazyload($exclude_image, $img, $imgnn_arr); 2031 2053 return $exclude_image; 2032 2054 } … … 2244 2266 $critical_css = $this->blinkspeed_get_contents($this->blinkspeed_preload_css_path() . '/' . $this->addSettings['critical_css']); 2245 2267 if (!empty($critical_css)) { 2268 $critical_css = $this->blinkspeed_customize_critical_css($critical_css); 2246 2269 $criticalCssInsertion = 1; 2247 2270 $critical_css_modified = $this->blinkspeed_convert_webp_in_critical($critical_css); … … 2787 2810 } 2788 2811 $url = $this->blinkspeed_preload_css_customize_path($url); 2812 $url = $this->blinkspeed_customize_critical_css_url($url, $orgurl); 2789 2813 $full_url = str_replace($this->addSettings['secure'], '', rtrim($url, '/')); 2790 2814 $path = urldecode($this->blinkspeed_get_critical_cache_path($full_url)); … … 2841 2865 $file_name = count($combined_css_files); 2842 2866 $main_css_file_name = md5($file_name) . $this->addSettings['css_ext']; 2867 $main_css_file_name = $this->blinkspeed_customize_critical_css_filename($main_css_file_name, $combined_css_files); 2843 2868 return $main_css_file_name; 2844 2869 } … … 5304 5329 } 5305 5330 } 5331 5332 public function blinkspeed_apply_pre_optimization_hooks() { 5333 $this->html = apply_filters('blinkspeed_apply_pre_optimization_hooks', $this->html); 5334 } 5335 5336 public function blinkspeed_apply_before_optimization_hooks() { 5337 $this->html = apply_filters('blinkspeed_apply_before_optimization_hooks', $this->html); 5338 } 5339 5340 public function blinkspeed_apply_after_optimization_hooks() { 5341 $this->html = apply_filters('blinkspeed_apply_after_optimization_hooks', $this->html); 5342 } 5343 5344 public function blinkspeed_inner_js_customize($script_text) { 5345 return apply_filters('blinkspeed_inner_js_customize', $script_text); 5346 } 5347 5348 public function blinkspeed_inner_js_excluded($exclude_js_bool, $inner_js) { 5349 return apply_filters('blinkspeed_inner_js_excluded', $exclude_js_bool, $inner_js); 5350 } 5351 5352 public function blinkspeed_internal_js_customize($string, $path) { 5353 return apply_filters('blinkspeed_internal_js_customize', $string, $path); 5354 } 5355 5356 public function blinkspeed_internal_css_customize($css, $path) { 5357 return apply_filters('blinkspeed_internal_css_customize', $css, $path); 5358 } 5359 5360 public function blinkspeed_internal_css_minify($css_minify, $css, $path) { 5361 return apply_filters('blinkspeed_internal_css_minify', $css_minify, $css, $path); 5362 } 5363 5364 public function blinkspeed_no_critical_css($ignore_critical_css, $url) { 5365 return apply_filters('blinkspeed_no_critical_css', $ignore_critical_css, $url); 5366 } 5367 5368 public function blinkspeed_customize_critical_css($critical_css) { 5369 return apply_filters('blinkspeed_customize_critical_css', $critical_css); 5370 } 5371 5372 public function blinkspeed_disable_htaccess_webp() { 5373 $this->addSettings['disable_htaccess_webp'] = apply_filters('blinkspeed_disable_htaccess_webp', $this->settings['hook_disable_htaccess_webp']); 5374 } 5375 5376 public function blinkspeed_customize_add_settings($addSettings) { 5377 return apply_filters('blinkspeed_customize_add_settings', $addSettings); 5378 } 5379 5380 public function blinkspeed_customize_main_settings($settings) { 5381 return apply_filters('blinkspeed_customize_main_settings', $settings); 5382 } 5383 5384 public function blinkspeed_change_video_to_videolazy($video_lazy) { 5385 return apply_filters('blinkspeed_change_video_to_videolazy', $video_lazy); 5386 } 5387 5388 public function blinkspeed_change_iframe_to_iframe_lazy($iframe_lazy) { 5389 return apply_filters('blinkspeed_change_iframe_to_iframe_lazy', $iframe_lazy); 5390 } 5391 5392 public function blinkspeed_exclude_image_to_lazyload($exclude_image, $img, $imgnn_arr) { 5393 return apply_filters('blinkspeed_exclude_image_to_lazyload', $exclude_image, $img, $imgnn_arr); 5394 } 5395 5396 public function blinkspeed_customize_image($imgnn, $img, $imgnn_arr) { 5397 return apply_filters('blinkspeed_customize_image', $imgnn, $img, $imgnn_arr); 5398 } 5399 5400 public function blinkspeed_exclude_css_filter($exclude_css, $css_obj, $css, $html) { 5401 return apply_filters('blinkspeed_exclude_css_filter', $exclude_css, $css_obj, $css, $html); 5402 } 5403 5404 public function blinkspeed_customize_force_lazy_css($force_lazyload_css) { 5405 return apply_filters('blinkspeed_customize_force_lazy_css', $force_lazyload_css); 5406 } 5407 5408 public function blinkspeed_external_javascript_customize($script_obj, $script) { 5409 return apply_filters('blinkspeed_external_javascript_customize', $script_obj, $script); 5410 } 5411 5412 public function blinkspeed_external_javascript_filter($exclude_js,$script_obj,$script,$html) { 5413 return apply_filters('blinkspeed_external_javascript_filter', $exclude_js,$script_obj,$script,$html); 5414 } 5415 5416 public function blinkspeed_customize_script_object($script_obj, $script) { 5417 return apply_filters('blinkspeed_customize_script_object', $script_obj, $script); 5418 } 5419 5420 public function blinkspeed_exclude_internal_js_changes($exclude_from_blinkspeed_changes, $path, $string) { 5421 return apply_filters('blinkspeed_exclude_internal_js_changes', $exclude_from_blinkspeed_changes, $path, $string); 5422 } 5423 5424 public function blinkspeed_exclude_page_optimization($html) { 5425 $exclude_page_optimization = 0; 5426 $exclude_page_optimization = apply_filters('blinkspeed_exclude_page_optimization', $exclude_page_optimization, $html); 5427 if ( $exclude_page_optimization ) { 5428 return true; 5429 } 5430 return false; 5431 } 5432 5433 public function blinkspeed_customize_critical_css_url($url, $orgurl) { 5434 return apply_filters('blinkspeed_customize_critical_css_url', $url, $orgurl); 5435 } 5436 5437 public function blinkspeed_customize_critical_css_filename($main_css_file_name, $combined_css_files) { 5438 return apply_filters('blinkspeed_customize_critical_css_filename', $main_css_file_name, $combined_css_files); 5439 } 5440 5441 public function blinkspeed_exclude_image_from_convert_to_webp($path) { 5442 return apply_filters('blinkspeed_exclude_image_from_convert_to_webp', false, $path); 5443 } 5306 5444 } -
blinkspeed/trunk/includes/CssOptimize.php
r3478468 r3481926 182 182 continue; 183 183 } 184 if(in_array($ext, ['.jpg', '.webp', '.jpeg', '.png']) ){184 if(in_array($ext, ['.jpg', '.webp', '.jpeg', '.png']) && !$this->blinkspeed_exclude_image_from_convert_to_webp($match1)){ 185 185 list($img_root_path, $img_root_url) = $this->blinkspeed_get_img_root_path(); 186 186 $webp_enable = $this->addSettings['webp_enable']; … … 260 260 if( !file_exists($cache_file_path) ){ 261 261 $css = $this->blinkspeed_get_contents($root_path.$path); 262 $css = $this->blinkspeed_internal_css_customize($css, $path); 262 263 263 264 $css = $this->blinkspeed_remove_css_comments($css); … … 265 266 $css_minify = 1; 266 267 268 $css_minify = $this->blinkspeed_internal_css_minify($css_minify, $css, $path); 267 269 if($css_minify){ 268 270 $minify = $this->blinkspeed_css_compress($minify); … … 303 305 } 304 306 $force_lazyload_css = !empty($this->settings['force_lazyload_css']) && is_array($this->settings['force_lazyload_css']) ? $this->settings['force_lazyload_css'] : array(); 305 $force_lazyload_css = $force_lazyload_css; 307 308 $force_lazyload_css = $this->blinkspeed_customize_force_lazy_css($force_lazyload_css); 306 309 307 310 $enable_cdn = $this->blinkspeed_check_enable_cdn('css'); … … 558 561 } 559 562 563 $exclude_css = $this->blinkspeed_exclude_css_filter($exclude_css,$css_obj,$css,$this->html); 564 560 565 if($exclude_css){ 561 566 if($this->blinkspeed_endswith($css_obj['href'], '.css')){ -
blinkspeed/trunk/includes/HtmlOptimize.php
r3478468 r3481926 72 72 // Set cache file path 73 73 $this->blinkspeed_set_cache_file_path(); 74 75 $this->blinkspeed_apply_pre_optimization_hooks(); 74 76 75 77 // Check if optimization should be skipped … … 80 82 return $this->html; 81 83 } 84 85 // Apply customization hooks 86 $this->blinkspeed_apply_customization_hooks(); 82 87 83 88 // Clean script tags 84 89 $this->html = $this->blinkspeed_clean_script_tags( $this->html ); 90 91 $this->blinkspeed_apply_before_optimization_hooks(); 85 92 86 93 // Handle lazy loading for background images … … 131 138 // Performance timing for BS script 132 139 $this->blinkspeed_debug_time( 'bs script' ); 140 141 $this->blinkspeed_apply_after_optimization_hooks(); 133 142 134 143 // Handle HTML caching … … 216 225 // Check admin user status 217 226 if ( $this->addSettings['admin_user'] ) { 227 return 1; 228 } 229 230 if ($this->blinkspeed_exclude_page_optimization( $this->html ) ) { 218 231 return 1; 219 232 } … … 275 288 $this->blinkspeed_create_html_cache_file(); 276 289 } 290 } 291 292 /** 293 * Apply customization hooks 294 * 295 * Executes hooks for customizing addSettings and main settings. 296 */ 297 private function blinkspeed_apply_customization_hooks(){ 298 // Customize addSettings 299 $this->addSettings = $this->blinkspeed_customize_add_settings($this->addSettings); 300 301 // Customize settings 302 $this->settings = $this->blinkspeed_customize_main_settings($this->settings); 303 304 // Apply custom htaccess webp hook 305 $this->blinkspeed_disable_htaccess_webp(); 277 306 } 278 307 -
blinkspeed/trunk/includes/JsOptimize.php
r3478468 r3481926 44 44 if(!empty($this->settings['load_combined_js'])){ 45 45 $exclude_from_blinkspeed_changes = 0; 46 $exclude_from_blinkspeed_changes = $this->blinkspeed_exclude_internal_js_changes($exclude_from_blinkspeed_changes, $path,$string); 46 47 if(stripos($string,'holdready') === false && !$exclude_from_blinkspeed_changes){ 47 48 $string = $this->blinkspeed_changes_in_js($string,$path); 48 49 } 49 50 } 51 52 $string = $this->blinkspeed_internal_js_customize($string, $path); 50 53 return $string; 51 54 } … … 170 173 continue; 171 174 } 175 176 $script_obj = $this->blinkspeed_customize_script_object($script_obj, $script); 172 177 173 178 if(!empty($script_obj['src'])){ … … 199 204 } 200 205 } 201 if(function_exists('blinkspeed_exclude_javascript_filter')){ 202 $exclude_js = blinkspeed_exclude_javascript_filter($exclude_js,$script_obj,$script,$this->html); 203 } 206 207 $exclude_js = $this->blinkspeed_external_javascript_filter($exclude_js,$script_obj,$script,$html); 204 208 205 209 if($exclude_js){ … … 272 276 $script_obj['src'] = $enable_cdn && $enable_cdn_path ? str_replace($this->addSettings['site_url'],$this->addSettings['js_cdn_url'] ,$script_obj['src']) : $script_obj['src']; 273 277 $script_obj['type'] = 'lazyExJs'; 278 $script_obj = $this->blinkspeed_external_javascript_customize($script_obj, $script); 274 279 $this->blinkspeed_preconnect_external_url($script_obj['src']); 275 280 $this->blinkspeed_str_replace_set_js($script,$this->blinkspeed_implode_link_array('script',$script_obj)); … … 314 319 */ 315 320 public function blinkspeed_get_modified_script_tag( $script, $script_obj, $script_text, $si, $exclude_js_bool, $force_js_bool ) { 321 $script_text = $this->blinkspeed_inner_js_customize($script_text); 322 316 323 if($tag = $this->blinkspeed_load_script_tag_in_url($script_text,$si)){ 317 324 $this->blinkspeed_get_url_from_inline_script($script); … … 418 425 } 419 426 } 427 $exclude_js_bool = $this->blinkspeed_inner_js_excluded($exclude_js_bool, $inner_js); 420 428 return $exclude_js_bool; 421 429 } -
blinkspeed/trunk/languages/blinkspeed.pot
r3478468 r3481926 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: BlinkSpeed 1.0. 4\n"5 "Project-Id-Version: BlinkSpeed 1.0.5\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/blinkspeed/\n" 7 7 "POT-Creation-Date: 2026-02-04 00:00+0000\n"
Note: See TracChangeset
for help on using the changeset viewer.