Plugin Directory

Changeset 1919567


Ignore:
Timestamp:
08/03/2018 07:40:19 PM (8 years ago)
Author:
digitalarbyter
Message:

Added new feature "disable login-shake"

Location:
wp-tweaker/trunk
Files:
3 edited

Legend:

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

    r1914287 r1919567  
    205205            'Disable url auto-linking in comments',
    206206            array( $this, 'callback_wptweaker_setting_16' ),
     207            'my-setting-admin',
     208            'wptweaker_setting_section_security'
     209        );
     210        add_settings_field(
     211            'wptweaker_setting_17',
     212            'Remove the login-shake for wrong credentials',
     213            array( $this, 'callback_wptweaker_setting_17' ),
    207214            'my-setting-admin',
    208215            'wptweaker_setting_section_security'
     
    245252        if( isset( $wptweaker_input['wptweaker_setting_16'] ) )
    246253            $wptweaker_new_input['wptweaker_setting_16'] = absint( $wptweaker_input['wptweaker_setting_16'] );
     254        if( isset( $wptweaker_input['wptweaker_setting_17'] ) )
     255            $wptweaker_new_input['wptweaker_setting_17'] = absint( $wptweaker_input['wptweaker_setting_17'] );
    247256        return $wptweaker_new_input;
    248257    }
     
    444453             );
    445454     }
     455     public function callback_wptweaker_setting_17()
     456     {
     457         printf(
     458             '<input type="radio" id="wptweaker_setting_17" name="wptweaker_settings[wptweaker_setting_17]" value="0" %s /> off ',
     459             $this->wptweaker_options['wptweaker_setting_17'] == 0  ? "checked" : ''
     460             );
     461         printf(
     462             '<input type="radio" id="wptweaker_setting_17" name="wptweaker_settings[wptweaker_setting_17]" value="1" %s /> on ',
     463             $this->wptweaker_options['wptweaker_setting_17'] == 1  ? "checked" : ''
     464             );
     465     }
    446466}
    447467?>
  • wp-tweaker/trunk/readme.txt

    r1914287 r1919567  
    3030* Remove the url-field from comments
    3131* Disable url auto-linking in comments
     32* Disable login-shake for wrong credentials
    3233
    3334All you need to do to control this features/functions is
  • wp-tweaker/trunk/wp-tweaker.php

    r1914287 r1919567  
    88
    99Description: 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.5
     10Version: 1.2.6
    1111Author: digitalarbyter
    1212Author URI:  https://digitalarbyter.de
     
    303013: Disable the XML-RPC
    313114: Remove post by email function
     3215: Disable URL-fields on comments
     3316: Disable URL auto-linking in comments
     3417: Remove login-shake on errors
    3235*/
    3336
     
    138141}
    139142
     143function wptweaker_setting_17()
     144{
     145  function wpt_login_shake()
     146  {
     147       remove_action('login_head', 'wp_shake_js', 12);
     148  }
     149  add_action('login_head', 'wpt_login_shake');
     150}
     151
    140152//Fire!
    141153$wptweaker_options=get_option('wptweaker_settings');
Note: See TracChangeset for help on using the changeset viewer.