Changeset 2067904
- Timestamp:
- 04/12/2019 03:59:36 PM (7 years ago)
- Location:
- wp-tweaker/trunk
- Files:
-
- 3 edited
-
inc/wp-tweaker-admin.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
wp-tweaker.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-tweaker/trunk/inc/wp-tweaker-admin.php
r2067411 r2067904 234 234 'my-setting-admin', 235 235 'wptweaker_setting_section_loading_time' 236 ); 237 add_settings_field( 238 'wptweaker_setting_20', 239 'Disable auto-saving of posts', 240 array( $this, 'callback_wptweaker_setting_20' ), 241 'my-setting-admin', 242 'wptweaker_setting_section_database' 236 243 ); 237 244 … … 278 285 $wptweaker_new_input['wptweaker_setting_18'] = absint( $wptweaker_input['wptweaker_setting_18'] ); 279 286 if( isset( $wptweaker_input['wptweaker_setting_19'] ) ) 280 $wptweaker_new_input['wptweaker_setting_19'] = absint( $wptweaker_input['wptweaker_setting_19'] ); 287 $wptweaker_new_input['wptweaker_setting_19'] = absint( $wptweaker_input['wptweaker_setting_19'] ); 288 if( isset( $wptweaker_input['wptweaker_setting_20'] ) ) 289 $wptweaker_new_input['wptweaker_setting_20'] = absint( $wptweaker_input['wptweaker_setting_20'] ); 281 290 return $wptweaker_new_input; 282 291 } … … 511 520 ); 512 521 } 513 514 522 public function callback_wptweaker_setting_20() 523 { 524 printf( 525 '<input type="radio" id="wptweaker_setting_20" name="wptweaker_settings[wptweaker_setting_20]" value="0" %s /> off ', 526 $this->wptweaker_options['wptweaker_setting_20'] == 0 ? "checked" : '' 527 ); 528 printf( 529 '<input type="radio" id="wptweaker_setting_20" name="wptweaker_settings[wptweaker_setting_20]" value="1" %s /> on ', 530 $this->wptweaker_options['wptweaker_setting_20'] == 1 ? "checked" : '' 531 ); 532 } 515 533 516 534 public static function add_help() -
wp-tweaker/trunk/readme.txt
r2067411 r2067904 33 33 * Empty the WP-Trash every 7 days 34 34 * Remove query strings from ressources 35 * Disable auto-saving blogs 35 36 36 37 All you need to do to control this features/functions is … … 64 65 65 66 == Changelog == 67 68 = 1.3.2 12.04.19 = 69 * added feature to disable auto-saving of posts 66 70 67 71 = 1.3.1 11.04.19 = -
wp-tweaker/trunk/wp-tweaker.php
r2067411 r2067904 7 7 Plugin Name: WP-Tweaker 8 8 9 Description: This slim plugin removes many (unneeded) standard features from WordPress to give your blog the ultimate performance boost! Currently you can disable 19WordPress functions each with one mouse click.10 Version: 1.3. 19 Description: This slim plugin removes many (unneeded) standard features from WordPress to give your blog the ultimate performance boost! Currently you can disable 20 WordPress functions each with one mouse click. 10 Version: 1.3.2 11 11 Author: digitalarbyter 12 12 Author URI: https://digitalarbyter.de … … 35 35 18: Empty WP-Trash every 7 days 36 36 19: Remove query strings 37 20: Disable auto-saving posts 37 38 38 39 */ … … 160 161 function wptweaker_setting_19() 161 162 { 162 function _remove_script_version( $some_src ){163 function wpt_remove_query_strings ( $some_src ){ 163 164 $explode = explode( '?', $some_src ); 164 165 return $explode[0]; 165 166 } 166 add_filter( 'script_loader_src', '_remove_script_version', 15, 1 ); 167 add_filter( 'style_loader_src', '_remove_script_version', 15, 1 ); 167 add_filter( 'script_loader_src', 'wpt_remove_query_strings', 15, 1 ); 168 add_filter( 'style_loader_src', 'wpt_remove_query_strings', 15, 1 ); 169 } 170 171 function wptweaker_setting_20() 172 { 173 function wpt_disableAutoSave() 174 { 175 wp_deregister_script('autosave'); 176 } 177 add_action( 'wp_print_scripts', 'wpt_disableAutoSave' ); 168 178 } 169 179
Note: See TracChangeset
for help on using the changeset viewer.