Changeset 3446177
- Timestamp:
- 01/24/2026 03:24:48 PM (2 months ago)
- Location:
- unbloater
- Files:
-
- 8 edited
- 3 copied
-
tags/1.6.4 (copied) (copied from unbloater/trunk)
-
tags/1.6.4/classes/ub-admin.php (modified) (1 diff)
-
tags/1.6.4/classes/ub-settings.php (modified) (2 diffs)
-
tags/1.6.4/classes/ub-unbloat.php (modified) (3 diffs)
-
tags/1.6.4/readme.txt (copied) (copied from unbloater/trunk/readme.txt) (3 diffs)
-
tags/1.6.4/unbloater.php (copied) (copied from unbloater/trunk/unbloater.php) (1 diff)
-
trunk/classes/ub-admin.php (modified) (1 diff)
-
trunk/classes/ub-settings.php (modified) (2 diffs)
-
trunk/classes/ub-unbloat.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/unbloater.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
unbloater/tags/1.6.4/classes/ub-admin.php
r2557040 r3446177 185 185 $this->maybe_print_quicknav_item( 'autodescription/autodescription.php', 'The SEO Framework', 'autodescription' ); 186 186 $this->maybe_print_quicknav_item( 'woocommerce/woocommerce.php', 'WooCommerce', 'woocommerce' ); 187 $this->maybe_print_quicknav_item( 'wordpress-seo/wp-seo.php', 'Yoast SEO', 'yoast_seo' ); 188 $this->maybe_print_quicknav_item( 'wp-rocket/wp-rocket.php', 'WP Rocket', 'wp_rocket' ); 189 $this->maybe_print_quicknav_item( 'redis-cache/redis-cache.php', 'Redis Cache', 'redis_cache' ); 187 190 ?> 188 191 </p> -
unbloater/tags/1.6.4/classes/ub-settings.php
r2914734 r3446177 658 658 } 659 659 660 /****************************************************************** 661 ********* WP ROCKET SECTION *************************************** 662 ******************************************************************/ 663 664 if( Unbloater_Helper::is_plugin_active( 'wp-rocket/wp-rocket.php' ) ) { 665 666 add_settings_section( 667 'unbloater_section_wp_rocket', 668 __( 'WP Rocket', 'unbloater' ), 669 array( $this, 'cb_settings_section_wp_rocket' ), 670 'unbloater' 671 ); 672 673 add_settings_field( 674 'wp_rocket_remove_admin_bar_item', 675 __( 'Admin Bar', 'unbloater' ), 676 array( $this, 'cb_setting_wp_rocket_remove_admin_bar_item' ), 677 'unbloater', 678 'unbloater_section_wp_rocket' 679 ); 680 681 add_settings_field( 682 'wp_rocket_whitelabel_footprint', 683 __( 'Whitelabel', 'unbloater' ), 684 array( $this, 'cb_setting_wp_rocket_whitelabel_footprint' ), 685 'unbloater', 686 'unbloater_section_wp_rocket' 687 ); 688 689 add_settings_field( 690 'wp_rocket_remove_imagify_media_library_ads', 691 __( 'Media Library ads', 'unbloater' ), 692 array( $this, 'cb_setting_wp_rocket_remove_imagify_media_library_ads' ), 693 'unbloater', 694 'unbloater_section_wp_rocket' 695 ); 696 697 add_settings_field( 698 'wp_rocket_remove_plugin_repository_ads', 699 __( 'Plugin repository ads', 'unbloater' ), 700 array( $this, 'cb_setting_wp_rocket_remove_plugin_repository_ads' ), 701 'unbloater', 702 'unbloater_section_wp_rocket' 703 ); 704 705 } 706 707 /****************************************************************** 708 ********* REDIS CACHE SECTION ************************************* 709 ******************************************************************/ 710 711 if( Unbloater_Helper::is_plugin_active( 'redis-cache/redis-cache.php' ) ) { 712 713 add_settings_section( 714 'unbloater_section_redis_cache', 715 __( 'Redis Cache', 'unbloater' ), 716 array( $this, 'cb_settings_section_redis_cache' ), 717 'unbloater' 718 ); 719 720 add_settings_field( 721 'redis_cache_remove_admin_bar_item', 722 __( 'Admin Bar', 'unbloater' ), 723 array( $this, 'cb_setting_redis_cache_remove_admin_bar_item' ), 724 'unbloater', 725 'unbloater_section_redis_cache' 726 ); 727 728 add_settings_field( 729 'redis_cache_remove_html_comment', 730 __( 'HTML Comment', 'unbloater' ), 731 array( $this, 'cb_setting_redis_cache_remove_html_comment' ), 732 'unbloater', 733 'unbloater_section_redis_cache' 734 ); 735 736 } 737 660 738 } 661 739 … … 1197 1275 ); 1198 1276 } 1277 1278 /****************************************************************** 1279 ********* WP ROCKET CALLBACKS ************************************* 1280 ******************************************************************/ 1281 1282 public function cb_settings_section_wp_rocket() { 1283 echo '<p>' . sprintf( __( 'These settings are related to %s.', 'unbloater' ), '<a href="https://wp-rocket.me" target="_blank">WP Rocket</a>' ) . '</p>'; 1284 } 1285 1286 public function cb_setting_wp_rocket_remove_admin_bar_item() { 1287 $this->render_settings_field_checkbox( 1288 'wp_rocket_remove_admin_bar_item', 1289 __( 'Remove the WP Rocket admin bar item', 'unbloater' ) 1290 ); 1291 } 1292 1293 public function cb_setting_wp_rocket_whitelabel_footprint() { 1294 $this->render_settings_field_checkbox( 1295 'wp_rocket_whitelabel_footprint', 1296 __( 'Remove frontend WP Rocket footprint', 'unbloater' ) 1297 ); 1298 } 1299 1300 public function cb_setting_wp_rocket_remove_imagify_media_library_ads() { 1301 $this->render_settings_field_checkbox( 1302 'wp_rocket_remove_imagify_media_library_ads', 1303 __( 'Remove Imagify ads in the Media Library', 'unbloater' ), 1304 __( 'WP Rocket adds Imagify ads to multiple Media Library contexts.', 'unbloater' ) 1305 ); 1306 } 1307 1308 public function cb_setting_wp_rocket_remove_plugin_repository_ads() { 1309 $this->render_settings_field_checkbox( 1310 'wp_rocket_remove_plugin_repository_ads', 1311 __( 'Remove plugin repository ads', 'unbloater' ), 1312 __( 'WP Rocket adds multiple plugin ads to the Plugins section.', 'unbloater' ) 1313 ); 1314 } 1315 1316 /****************************************************************** 1317 ********* REDIS CACHE CALLBACKS *********************************** 1318 ******************************************************************/ 1319 1320 public function cb_settings_section_redis_cache() { 1321 echo '<p>' . sprintf( __( 'These settings are related to %s.', 'unbloater' ), '<a href="https://wordpress.org/plugins/redis-cache/" target="_blank">Redis Cache</a>' ) . '</p>'; 1322 } 1323 1324 public function cb_setting_redis_cache_remove_admin_bar_item() { 1325 $this->render_settings_field_checkbox( 1326 'redis_cache_remove_admin_bar_item', 1327 __( 'Remove the Redis Cache admin bar item', 'unbloater' ) 1328 ); 1329 } 1330 1331 public function cb_setting_redis_cache_remove_html_comment() { 1332 $this->render_settings_field_checkbox( 1333 'redis_cache_remove_html_comment', 1334 __( 'Remove the indicator in the site\'s HTML output', 'unbloater' ), 1335 __( 'These are HTML comments that indicate the plugin\'s existence and usage.', 'unbloater' ) 1336 ); 1337 } 1199 1338 1200 1339 } -
unbloater/tags/1.6.4/classes/ub-unbloat.php
r2914734 r3446177 321 321 if( Unbloater_Helper::is_option_activated( 'yoast_seo_remove_admin_bar_item' ) ) { 322 322 add_action( 'admin_bar_menu', array( $this, 'yoast_seo_remove_admin_bar_item' ), 999 ); 323 } 324 325 /****************************************************************** 326 ********* WP ROCKET *********************************************** 327 ******************************************************************/ 328 329 if( Unbloater_Helper::is_option_activated( 'wp_rocket_remove_admin_bar_item' ) ) { 330 add_action( 'admin_bar_menu', array( $this, 'wp_rocket_remove_admin_bar_item' ), PHP_INT_MAX ); 331 } 332 333 if( Unbloater_Helper::is_option_activated( 'wp_rocket_whitelabel_footprint' ) ) { 334 defined( 'WP_ROCKET_WHITE_LABEL_FOOTPRINT' ) || define( 'WP_ROCKET_WHITE_LABEL_FOOTPRINT', true ); 335 } 336 337 if( Unbloater_Helper::is_option_activated( 'wp_rocket_remove_imagify_media_library_ads' ) ) { 338 add_filter( 'option_plugin_family_dismiss_promote_imagify', '__return_true' ); 339 add_filter( 'default_option_plugin_family_dismiss_promote_imagify', '__return_true', 10, 3 ); 340 } 341 342 if( Unbloater_Helper::is_option_activated( 'wp_rocket_remove_plugin_repository_ads' ) ) { 343 add_action( 'wp_rocket_loaded', array( $this, 'wp_rocket_remove_plugin_repository_ads' ) ); 344 } 345 346 /****************************************************************** 347 ********* REDIS CACHE ********************************************* 348 ******************************************************************/ 349 350 if( Unbloater_Helper::is_option_activated( 'redis_cache_remove_admin_bar_item' ) ) { 351 defined( 'WP_REDIS_DISABLE_ADMINBAR' ) || define( 'WP_REDIS_DISABLE_ADMINBAR', true ); 352 } 353 354 if( Unbloater_Helper::is_option_activated( 'redis_cache_remove_html_comment' ) ) { 355 defined( 'WP_REDIS_DISABLE_COMMENT' ) || define( 'WP_REDIS_DISABLE_COMMENT', true ); 323 356 } 324 357 … … 480 513 481 514 /****************************************************************** 482 ********* WOOCOMMERCE*********************************************515 ********* YOAST SEO *********************************************** 483 516 ******************************************************************/ 484 517 … … 488 521 } 489 522 523 /****************************************************************** 524 ********* WP ROCKET *********************************************** 525 ******************************************************************/ 526 527 public function wp_rocket_remove_admin_bar_item() { 528 global $wp_admin_bar; 529 $wp_admin_bar->remove_node( 'wp-rocket' ); 530 } 531 532 public function wp_rocket_remove_plugin_repository_ads() { 533 $rocket_container = apply_filters( 'rocket_container', null ); 534 if( ! $rocket_container ) 535 return; 536 $subscribers = array( 'plugin_subscriber', 'plugin_information_subscriber', 'plugins_subscriber' ); 537 foreach( $subscribers as $id ) { 538 if( $rocket_container->has( $id ) ) { 539 remove_filter( 'plugins_api_result', array( $rocket_container->get( $id ), 'add_plugins_to_result' ), 11 ); 540 break; 541 } 542 } 543 } 544 490 545 } -
unbloater/tags/1.6.4/readme.txt
r3209410 r3446177 4 4 Tags: unbloat, bloat, clean, remove, notice 5 5 Requires at least: 4.2 6 Tested up to: 6. 77 Stable tag: 1.6. 38 Requires PHP: 5.66 Tested up to: 6.9 7 Stable tag: 1.6.4 8 Requires PHP: 7.2 9 9 License: GPLv3 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 90 90 * Yoast SEO: Remove admin bar item 91 91 * Yoast SEO: Remove plugin indicator 92 * WP Rocket: Remove admin bar item 93 * WP Rocket: Whitelabel footprint 94 * WP Rocket: Remove Imagify ads 95 * Redis Cache: Remove admin bar item 92 96 93 97 Third party options will only be shown when the applicable plugin is installed and activated. … … 110 114 111 115 == Changelog == 116 117 = 1.6.4 = 118 * Added: Remove WP Rocket admin bar item 119 * Added: Remove WP Rocket footprint (in your source code) 120 * Added: Remove Imagify ads (added by WP Rocket) 121 * Added: Remove Redis Cache admin bar item 122 * Tested up to WP 6.9 112 123 113 124 = 1.6.3 = -
unbloater/tags/1.6.4/unbloater.php
r3209410 r3446177 4 4 * Plugin Name: Unbloater 5 5 * Description: Remove unnecessary code, nags and bloat from WordPress core and certain plugins. 6 * Version: 1.6. 36 * Version: 1.6.4 7 7 * Author: Christoph Rado 8 8 * Author URI: https://christophrado.de/ 9 * Tested up to: 6. 79 * Tested up to: 6.9 10 10 * Text Domain: unbloater 11 11 */ -
unbloater/trunk/classes/ub-admin.php
r2557040 r3446177 185 185 $this->maybe_print_quicknav_item( 'autodescription/autodescription.php', 'The SEO Framework', 'autodescription' ); 186 186 $this->maybe_print_quicknav_item( 'woocommerce/woocommerce.php', 'WooCommerce', 'woocommerce' ); 187 $this->maybe_print_quicknav_item( 'wordpress-seo/wp-seo.php', 'Yoast SEO', 'yoast_seo' ); 188 $this->maybe_print_quicknav_item( 'wp-rocket/wp-rocket.php', 'WP Rocket', 'wp_rocket' ); 189 $this->maybe_print_quicknav_item( 'redis-cache/redis-cache.php', 'Redis Cache', 'redis_cache' ); 187 190 ?> 188 191 </p> -
unbloater/trunk/classes/ub-settings.php
r2914734 r3446177 658 658 } 659 659 660 /****************************************************************** 661 ********* WP ROCKET SECTION *************************************** 662 ******************************************************************/ 663 664 if( Unbloater_Helper::is_plugin_active( 'wp-rocket/wp-rocket.php' ) ) { 665 666 add_settings_section( 667 'unbloater_section_wp_rocket', 668 __( 'WP Rocket', 'unbloater' ), 669 array( $this, 'cb_settings_section_wp_rocket' ), 670 'unbloater' 671 ); 672 673 add_settings_field( 674 'wp_rocket_remove_admin_bar_item', 675 __( 'Admin Bar', 'unbloater' ), 676 array( $this, 'cb_setting_wp_rocket_remove_admin_bar_item' ), 677 'unbloater', 678 'unbloater_section_wp_rocket' 679 ); 680 681 add_settings_field( 682 'wp_rocket_whitelabel_footprint', 683 __( 'Whitelabel', 'unbloater' ), 684 array( $this, 'cb_setting_wp_rocket_whitelabel_footprint' ), 685 'unbloater', 686 'unbloater_section_wp_rocket' 687 ); 688 689 add_settings_field( 690 'wp_rocket_remove_imagify_media_library_ads', 691 __( 'Media Library ads', 'unbloater' ), 692 array( $this, 'cb_setting_wp_rocket_remove_imagify_media_library_ads' ), 693 'unbloater', 694 'unbloater_section_wp_rocket' 695 ); 696 697 add_settings_field( 698 'wp_rocket_remove_plugin_repository_ads', 699 __( 'Plugin repository ads', 'unbloater' ), 700 array( $this, 'cb_setting_wp_rocket_remove_plugin_repository_ads' ), 701 'unbloater', 702 'unbloater_section_wp_rocket' 703 ); 704 705 } 706 707 /****************************************************************** 708 ********* REDIS CACHE SECTION ************************************* 709 ******************************************************************/ 710 711 if( Unbloater_Helper::is_plugin_active( 'redis-cache/redis-cache.php' ) ) { 712 713 add_settings_section( 714 'unbloater_section_redis_cache', 715 __( 'Redis Cache', 'unbloater' ), 716 array( $this, 'cb_settings_section_redis_cache' ), 717 'unbloater' 718 ); 719 720 add_settings_field( 721 'redis_cache_remove_admin_bar_item', 722 __( 'Admin Bar', 'unbloater' ), 723 array( $this, 'cb_setting_redis_cache_remove_admin_bar_item' ), 724 'unbloater', 725 'unbloater_section_redis_cache' 726 ); 727 728 add_settings_field( 729 'redis_cache_remove_html_comment', 730 __( 'HTML Comment', 'unbloater' ), 731 array( $this, 'cb_setting_redis_cache_remove_html_comment' ), 732 'unbloater', 733 'unbloater_section_redis_cache' 734 ); 735 736 } 737 660 738 } 661 739 … … 1197 1275 ); 1198 1276 } 1277 1278 /****************************************************************** 1279 ********* WP ROCKET CALLBACKS ************************************* 1280 ******************************************************************/ 1281 1282 public function cb_settings_section_wp_rocket() { 1283 echo '<p>' . sprintf( __( 'These settings are related to %s.', 'unbloater' ), '<a href="https://wp-rocket.me" target="_blank">WP Rocket</a>' ) . '</p>'; 1284 } 1285 1286 public function cb_setting_wp_rocket_remove_admin_bar_item() { 1287 $this->render_settings_field_checkbox( 1288 'wp_rocket_remove_admin_bar_item', 1289 __( 'Remove the WP Rocket admin bar item', 'unbloater' ) 1290 ); 1291 } 1292 1293 public function cb_setting_wp_rocket_whitelabel_footprint() { 1294 $this->render_settings_field_checkbox( 1295 'wp_rocket_whitelabel_footprint', 1296 __( 'Remove frontend WP Rocket footprint', 'unbloater' ) 1297 ); 1298 } 1299 1300 public function cb_setting_wp_rocket_remove_imagify_media_library_ads() { 1301 $this->render_settings_field_checkbox( 1302 'wp_rocket_remove_imagify_media_library_ads', 1303 __( 'Remove Imagify ads in the Media Library', 'unbloater' ), 1304 __( 'WP Rocket adds Imagify ads to multiple Media Library contexts.', 'unbloater' ) 1305 ); 1306 } 1307 1308 public function cb_setting_wp_rocket_remove_plugin_repository_ads() { 1309 $this->render_settings_field_checkbox( 1310 'wp_rocket_remove_plugin_repository_ads', 1311 __( 'Remove plugin repository ads', 'unbloater' ), 1312 __( 'WP Rocket adds multiple plugin ads to the Plugins section.', 'unbloater' ) 1313 ); 1314 } 1315 1316 /****************************************************************** 1317 ********* REDIS CACHE CALLBACKS *********************************** 1318 ******************************************************************/ 1319 1320 public function cb_settings_section_redis_cache() { 1321 echo '<p>' . sprintf( __( 'These settings are related to %s.', 'unbloater' ), '<a href="https://wordpress.org/plugins/redis-cache/" target="_blank">Redis Cache</a>' ) . '</p>'; 1322 } 1323 1324 public function cb_setting_redis_cache_remove_admin_bar_item() { 1325 $this->render_settings_field_checkbox( 1326 'redis_cache_remove_admin_bar_item', 1327 __( 'Remove the Redis Cache admin bar item', 'unbloater' ) 1328 ); 1329 } 1330 1331 public function cb_setting_redis_cache_remove_html_comment() { 1332 $this->render_settings_field_checkbox( 1333 'redis_cache_remove_html_comment', 1334 __( 'Remove the indicator in the site\'s HTML output', 'unbloater' ), 1335 __( 'These are HTML comments that indicate the plugin\'s existence and usage.', 'unbloater' ) 1336 ); 1337 } 1199 1338 1200 1339 } -
unbloater/trunk/classes/ub-unbloat.php
r2914734 r3446177 321 321 if( Unbloater_Helper::is_option_activated( 'yoast_seo_remove_admin_bar_item' ) ) { 322 322 add_action( 'admin_bar_menu', array( $this, 'yoast_seo_remove_admin_bar_item' ), 999 ); 323 } 324 325 /****************************************************************** 326 ********* WP ROCKET *********************************************** 327 ******************************************************************/ 328 329 if( Unbloater_Helper::is_option_activated( 'wp_rocket_remove_admin_bar_item' ) ) { 330 add_action( 'admin_bar_menu', array( $this, 'wp_rocket_remove_admin_bar_item' ), PHP_INT_MAX ); 331 } 332 333 if( Unbloater_Helper::is_option_activated( 'wp_rocket_whitelabel_footprint' ) ) { 334 defined( 'WP_ROCKET_WHITE_LABEL_FOOTPRINT' ) || define( 'WP_ROCKET_WHITE_LABEL_FOOTPRINT', true ); 335 } 336 337 if( Unbloater_Helper::is_option_activated( 'wp_rocket_remove_imagify_media_library_ads' ) ) { 338 add_filter( 'option_plugin_family_dismiss_promote_imagify', '__return_true' ); 339 add_filter( 'default_option_plugin_family_dismiss_promote_imagify', '__return_true', 10, 3 ); 340 } 341 342 if( Unbloater_Helper::is_option_activated( 'wp_rocket_remove_plugin_repository_ads' ) ) { 343 add_action( 'wp_rocket_loaded', array( $this, 'wp_rocket_remove_plugin_repository_ads' ) ); 344 } 345 346 /****************************************************************** 347 ********* REDIS CACHE ********************************************* 348 ******************************************************************/ 349 350 if( Unbloater_Helper::is_option_activated( 'redis_cache_remove_admin_bar_item' ) ) { 351 defined( 'WP_REDIS_DISABLE_ADMINBAR' ) || define( 'WP_REDIS_DISABLE_ADMINBAR', true ); 352 } 353 354 if( Unbloater_Helper::is_option_activated( 'redis_cache_remove_html_comment' ) ) { 355 defined( 'WP_REDIS_DISABLE_COMMENT' ) || define( 'WP_REDIS_DISABLE_COMMENT', true ); 323 356 } 324 357 … … 480 513 481 514 /****************************************************************** 482 ********* WOOCOMMERCE*********************************************515 ********* YOAST SEO *********************************************** 483 516 ******************************************************************/ 484 517 … … 488 521 } 489 522 523 /****************************************************************** 524 ********* WP ROCKET *********************************************** 525 ******************************************************************/ 526 527 public function wp_rocket_remove_admin_bar_item() { 528 global $wp_admin_bar; 529 $wp_admin_bar->remove_node( 'wp-rocket' ); 530 } 531 532 public function wp_rocket_remove_plugin_repository_ads() { 533 $rocket_container = apply_filters( 'rocket_container', null ); 534 if( ! $rocket_container ) 535 return; 536 $subscribers = array( 'plugin_subscriber', 'plugin_information_subscriber', 'plugins_subscriber' ); 537 foreach( $subscribers as $id ) { 538 if( $rocket_container->has( $id ) ) { 539 remove_filter( 'plugins_api_result', array( $rocket_container->get( $id ), 'add_plugins_to_result' ), 11 ); 540 break; 541 } 542 } 543 } 544 490 545 } -
unbloater/trunk/readme.txt
r3209410 r3446177 4 4 Tags: unbloat, bloat, clean, remove, notice 5 5 Requires at least: 4.2 6 Tested up to: 6. 77 Stable tag: 1.6. 38 Requires PHP: 5.66 Tested up to: 6.9 7 Stable tag: 1.6.4 8 Requires PHP: 7.2 9 9 License: GPLv3 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 90 90 * Yoast SEO: Remove admin bar item 91 91 * Yoast SEO: Remove plugin indicator 92 * WP Rocket: Remove admin bar item 93 * WP Rocket: Whitelabel footprint 94 * WP Rocket: Remove Imagify ads 95 * Redis Cache: Remove admin bar item 92 96 93 97 Third party options will only be shown when the applicable plugin is installed and activated. … … 110 114 111 115 == Changelog == 116 117 = 1.6.4 = 118 * Added: Remove WP Rocket admin bar item 119 * Added: Remove WP Rocket footprint (in your source code) 120 * Added: Remove Imagify ads (added by WP Rocket) 121 * Added: Remove Redis Cache admin bar item 122 * Tested up to WP 6.9 112 123 113 124 = 1.6.3 = -
unbloater/trunk/unbloater.php
r3209410 r3446177 4 4 * Plugin Name: Unbloater 5 5 * Description: Remove unnecessary code, nags and bloat from WordPress core and certain plugins. 6 * Version: 1.6. 36 * Version: 1.6.4 7 7 * Author: Christoph Rado 8 8 * Author URI: https://christophrado.de/ 9 * Tested up to: 6. 79 * Tested up to: 6.9 10 10 * Text Domain: unbloater 11 11 */
Note: See TracChangeset
for help on using the changeset viewer.