Plugin Directory

Changeset 1975671


Ignore:
Timestamp:
11/16/2018 07:18:54 PM (7 years ago)
Author:
digitalarbyter
Message:

Added the new function to automatically empty the WP-trash every 7 days.

Location:
wp-tweaker/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-tweaker/trunk/inc/wp-tweaker-admin.php

    r1919567 r1975671  
    214214            'my-setting-admin',
    215215            'wptweaker_setting_section_security'
     216        );
     217        add_settings_field(
     218            'wptweaker_setting_18',
     219            'Automatically empty the WP-trash every 7 days',
     220            array( $this, 'callback_wptweaker_setting_18' ),
     221            'my-setting-admin',
     222            'wptweaker_setting_section_loading_time'
    216223        );
    217224    }
     
    254261        if( isset( $wptweaker_input['wptweaker_setting_17'] ) )
    255262            $wptweaker_new_input['wptweaker_setting_17'] = absint( $wptweaker_input['wptweaker_setting_17'] );
     263        if( isset( $wptweaker_input['wptweaker_setting_18'] ) )
     264            $wptweaker_new_input['wptweaker_setting_18'] = absint( $wptweaker_input['wptweaker_setting_18'] );
    256265        return $wptweaker_new_input;
    257266    }
     
    464473             );
    465474     }
     475     public function callback_wptweaker_setting_18()
     476     {
     477         printf(
     478             '<input type="radio" id="wptweaker_setting_18" name="wptweaker_settings[wptweaker_setting_18]" value="0" %s /> off ',
     479             $this->wptweaker_options['wptweaker_setting_18'] == 0  ? "checked" : ''
     480             );
     481         printf(
     482             '<input type="radio" id="wptweaker_setting_18" name="wptweaker_settings[wptweaker_setting_18]" value="1" %s /> on ',
     483             $this->wptweaker_options['wptweaker_setting_18'] == 1  ? "checked" : ''
     484             );
     485     }
    466486}
    467487?>
  • wp-tweaker/trunk/readme.txt

    r1919567 r1975671  
    3131* Disable url auto-linking in comments
    3232* Disable login-shake for wrong credentials
     33* Empty the WP-Trash every 7 days
    3334
    3435All you need to do to control this features/functions is
     
    6263
    6364== Changelog ==
     65= 1.2.6 16.11.18=
     66* added function to empty the WP-trash automatically every 7 days
     67
    6468= 1.2.5 24.7.18 =
    6569* added feature to remove the url-field from comments
  • wp-tweaker/trunk/wp-tweaker.php

    r1919567 r1975671  
    77Plugin Name: WP-Tweaker
    88
    9 Description: This slim plugin removes many (unneeded) standard features from WordPress to give your blog the ultimate performance boost! Currently you can disable 16 WordPress functions each with one mouse click.
    10 Version: 1.2.6
     9Description: This slim plugin removes many (unneeded) standard features from WordPress to give your blog the ultimate performance boost! Currently you can disable 18 WordPress functions each with one mouse click.
     10Version: 1.2.7
    1111Author: digitalarbyter
    1212Author URI:  https://digitalarbyter.de
     
    333316: Disable URL auto-linking in comments
    343417: Remove login-shake on errors
     3518: Empty WP-Trash every 7 days
    3536*/
    3637
     
    150151}
    151152
     153function wptweaker_setting_18()
     154{
     155  define('EMPTY_TRASH_DAYS', 7 );
     156}
     157
    152158//Fire!
    153159$wptweaker_options=get_option('wptweaker_settings');
Note: See TracChangeset for help on using the changeset viewer.