Plugin Directory

Changeset 2309158


Ignore:
Timestamp:
05/20/2020 10:31:53 PM (6 years ago)
Author:
rom4i
Message:

version 1.14

Location:
scrolltotop/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • scrolltotop/trunk/includes/scrolltotop-admin-sidebar.php

    r2188887 r2309158  
    1111
    1212<aside class="plugin-sidebar">
    13     <div class="sidebar-inner">
     13    <div class="sidebar-inner">
    1414        <?php
    15             $sarvarov_plugins = array(
    16                 array( 'name' => 'scrollToTop', 'slug' => 'scrolltotop', 'url' => 'scrolltotop', 'description' => esc_html__( 'Displays cool back to top button or bar', 'scrolltotop' ) ),
    17                 array( 'name' => 'Lazy Load', 'slug' => 'sarvarov_lazy_load', 'url' => 'sarvarov-lazy-load', 'description' => esc_html__( 'Make all your images and iframes lazy', 'scrolltotop' ) )
    18             );
     15        $sarvarov_plugins = array(
     16            array( 'name'        => 'scrollToTop',
     17                   'slug'        => 'scrolltotop',
     18                   'url'         => 'scrolltotop',
     19                   'description' => esc_html__( 'Displays cool back to top button or bar', 'scrolltotop' )
     20            ),
     21            array( 'name'        => 'Lazy Load',
     22                   'slug'        => 'sarvarov_lazy_load',
     23                   'url'         => 'sarvarov-lazy-load',
     24                   'description' => esc_html__( 'Make all your images and iframes lazy', 'scrolltotop' )
     25            )
     26        );
    1927        ?>
    20         <div class="paypal-donate">
    21             <div class="widget-header">
     28        <div class="paypal-donate">
     29            <div class="widget-header">
    2230                <?php _e( 'Like the plugin? Support the developer.', 'scrolltotop' ); ?>
    23             </div>
    24            
    25             <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
    26                 <input type="hidden" name="cmd" value="_s-xclick" />
    27                 <input type="hidden" name="hosted_button_id" value="LNVRV7LL39E2E" />
    28                 <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" title="PayPal - The safer, easier way to pay online!" alt="Donate with PayPal button" />
    29                 <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" />
    30             </form>
    31            
    32             <div style="margin-top: 20px; opacity: .5;">
     31            </div>
     32
     33            <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
     34                <input type="hidden" name="cmd" value="_s-xclick"/>
     35                <input type="hidden" name="hosted_button_id" value="LNVRV7LL39E2E"/>
     36                <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0"
     37                       name="submit" title="PayPal - The safer, easier way to pay online!"
     38                       alt="Donate with PayPal button"/>
     39                <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"/>
     40            </form>
     41
     42            <div style="margin-top: 20px; opacity: .5;">
    3343                <?php _e( 'Even 1 dollar will make me happy :)', 'scrolltotop' ); ?>
    34             </div>
    35            
     44            </div>
     45
    3646            <?php
    37                 foreach( $sarvarov_plugins as $key => $value ) {
    38                    
    39                     if( $value['slug'] != 'scrolltotop' )
    40                         continue;
    41                    
    42                     printf( '<a class="button button-primary" href="https://wordpress.org/plugins/%1$s/" target="_blank">&#11088; %2$s</a>', $value['url'], esc_html__( 'Rate the plugin or ask a question', 'scrolltotop' ) );
    43                    
     47            foreach ( $sarvarov_plugins as $key => $value ) {
     48
     49                if ( $value['slug'] != 'scrolltotop' ) {
     50                    continue;
    4451                }
     52
     53                printf( '<a class="button button-primary" href="https://wordpress.org/plugins/%1$s/" target="_blank">&#11088; %2$s</a>', $value['url'], esc_html__( 'Rate the plugin or ask a question', 'scrolltotop' ) );
     54
     55            }
    4556            ?>
    46         </div>
    47        
    48         <div class="more-plugins">
    49             <div class="widget-header">
     57        </div>
     58
     59        <div class="more-plugins">
     60            <div class="widget-header">
    5061                <?php _e( 'Check out other plugins:', 'scrolltotop' ); ?>
    51             </div>
    52            
     62            </div>
     63
    5364            <?php
    54                 foreach( $sarvarov_plugins as $key => $value ) {
    55                    
    56                     if( $value['slug'] == 'scrolltotop' )
    57                         continue;
    58                    
    59                     printf( '<a href="https://wordpress.org/plugins/%1$s/" target="_blank">%2$s<span>%3$s</span></a>', $value['url'], $value['name'], $value['description'] );
    60                    
     65            foreach ( $sarvarov_plugins as $key => $value ) {
     66
     67                if ( $value['slug'] == 'scrolltotop' ) {
     68                    continue;
    6169                }
     70
     71                printf( '<a href="https://wordpress.org/plugins/%1$s/" target="_blank">%2$s<span>%3$s</span></a>', $value['url'], $value['name'], $value['description'] );
     72
     73            }
    6274            ?>
    63         </div>
    64        
    65         <div class="twitter-widget">
    66             <a class="twitter-timeline" data-height="400" data-theme="light" href="https://twitter.com/sarvarovdev?ref_src=twsrc%5Etfw">Tweets by sarvarovdev</a>
    67             <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
    68         </div>
    69     </div>
     75        </div>
     76
     77        <div class="twitter-widget">
     78            <a class="twitter-timeline" data-height="400" data-theme="light"
     79               href="https://twitter.com/sarvarovdev?ref_src=twsrc%5Etfw">Tweets by sarvarovdev</a>
     80            <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
     81        </div>
     82    </div>
    7083</aside>
  • scrolltotop/trunk/includes/scrolltotop-admin.php

    r2188887 r2309158  
    44function scrolltotop_admin_menu() {
    55    $settings = add_options_page( esc_html__( 'scrollToTop Settings', 'scrolltotop' ), 'scrollToTop', 'manage_options', 'scrolltotop_settings_page', 'scrolltotop_settings' );
    6     if( ! $settings ) {
     6    if ( ! $settings ) {
    77        return;
    88    }
     
    1919    wp_enqueue_script( 'wp-color-picker-alpha', $global_scrolltotop_dir_url . 'assets/js/wp-color-picker-alpha.min.js', array(
    2020        'wp-color-picker'
    21     ) , '1.0.0', true );
     21    ), '1.0.0', true );
    2222}
    2323
     
    2828}
    2929
    30 function scrolltotop_settings() { 
     30function scrolltotop_settings() {
    3131    global $global_scrolltotop_version;
    32 ?>
    33     <div class="wrap sarvarov-wrap">
    34 
    35         <h2 class="scrolltotop-title"><?php esc_html_e( 'scrollToTop Settings', 'scrolltotop' ); ?> <span class="scrolltotop-version">v<?php echo $global_scrolltotop_version; ?></span></h2>
    36        
    37         <section class="plugin-settings" role="main">
    38 
    39             <form method="post" action="options.php">
     32    ?>
     33    <div class="wrap sarvarov-wrap">
     34
     35        <h2 class="scrolltotop-title"><?php esc_html_e( 'scrollToTop Settings', 'scrolltotop' ); ?> <span
     36                    class="scrolltotop-version">v<?php echo $global_scrolltotop_version; ?></span></h2>
     37
     38        <section class="plugin-settings" role="main">
     39
     40            <form method="post" action="options.php">
    4041                <?php settings_fields( 'scrolltotop_settings' ); ?>
    4142                <?php do_settings_sections( 'scrolltotop' ); ?>
    4243                <?php submit_button(); ?>
    43             </form>
    44            
     44            </form>
     45
    4546            <?php require_once plugin_dir_path( __FILE__ ) . 'scrolltotop-admin-sidebar.php'; ?>
    46        
    47             <div id="loader" class="loader loader-inprogress">
    48                 <div class="loader-activity"></div>
    49                 <noscript>
    50                     <style>#loader { display: none !important; }</style>
    51                 </noscript>
    52             </div>
    53 
    54         </section>
    55 
    56     </div>
    57    
     47
     48            <div id="loader" class="loader loader-inprogress">
     49                <div class="loader-activity"></div>
     50                <noscript>
     51                    <style>#loader {
     52                            display: none !important;
     53                        }</style>
     54                </noscript>
     55            </div>
     56
     57        </section>
     58
     59    </div>
     60
    5861    <?php
    5962}
     
    6669    add_settings_field( 'stt_mode', esc_html__( 'Mode', 'scrolltotop' ), 'stt_mode_field', 'scrolltotop', 'stt_general' );
    6770    add_settings_field( 'stt_scroll_offset', esc_html__( 'Scroll offset', 'scrolltotop' ), 'stt_scroll_offset_field', 'scrolltotop', 'stt_general' );
    68            
     71
    6972    // bar settings
    7073    add_settings_section( 'stt_bar_settings', esc_html__( 'Bar Settings', 'scrolltotop' ), '__return_false', 'scrolltotop' );
     
    9194    add_settings_field( 'stt_bar_make_smaller', esc_html__( 'Make smaller', 'scrolltotop' ), 'stt_bar_make_smaller_field', 'scrolltotop', 'stt_bar_settings' );
    9295    add_settings_field( 'stt_bar_hide', esc_html__( 'Hide on small devices', 'scrolltotop' ), 'stt_bar_hide_field', 'scrolltotop', 'stt_bar_settings' );
    93    
     96
    9497    // transformed button
    9598    add_settings_field( 'stt_bar_transformed_size', esc_html__( 'Transformed bar size', 'scrolltotop' ), 'stt_bar_transformed_size_field', 'scrolltotop', 'stt_bar_settings', array( 'class' => 'stt-transformed' ) );
     
    99102    add_settings_field( 'stt_bar_transformed_vertical_offset', esc_html__( 'Transformed bar vertical offset', 'scrolltotop' ), 'stt_bar_transformed_vertical_offset_field', 'scrolltotop', 'stt_bar_settings', array( 'class' => 'stt-transformed' ) );
    100103    add_settings_field( 'stt_bar_transformed_border_radius', esc_html__( 'Transformed bar border radius', 'scrolltotop' ), 'stt_bar_transformed_border_radius_field', 'scrolltotop', 'stt_bar_settings', array( 'class' => 'stt-transformed' ) );
    101        
     104
    102105    // button settings
    103106    add_settings_section( 'stt_button_settings', esc_html__( 'Button Settings', 'scrolltotop' ), '__return_false', 'scrolltotop' );
     
    116119    add_settings_field( 'stt_button_make_smaller', esc_html__( 'Make smaller', 'scrolltotop' ), 'stt_button_make_smaller_field', 'scrolltotop', 'stt_button_settings' );
    117120    add_settings_field( 'stt_button_hide', esc_html__( 'Hide on small devices', 'scrolltotop' ), 'stt_button_hide_field', 'scrolltotop', 'stt_button_settings' );
    118    
     121
    119122    // advanced settings
    120123    add_settings_section( 'stt_advanced', esc_html__( 'Advanced Settings', 'scrolltotop' ), '__return_false', 'scrolltotop' );
     
    129132function stt_bar_position_field() {
    130133    $settings = scrolltotop_get_plugin_settings( 'stt_bar_position' );
    131 ?>
    132     <fieldset>
    133         <p>
    134             <label>
    135                 <input type="radio" name="scrolltotop_plugin_settings[stt_bar_position]" value="0" <?php checked( 0, $settings ); ?> />
     134    ?>
     135    <fieldset>
     136        <p>
     137            <label>
     138                <input type="radio" name="scrolltotop_plugin_settings[stt_bar_position]"
     139                       value="0" <?php checked( 0, $settings ); ?> />
    136140                <?php esc_html_e( 'Left', 'scrolltotop' ); ?>
    137             </label>
    138             <br />
    139             <label>
    140                 <input type="radio" name="scrolltotop_plugin_settings[stt_bar_position]" value="1" <?php checked( 1, $settings ); ?> />
     141            </label>
     142            <br/>
     143            <label>
     144                <input type="radio" name="scrolltotop_plugin_settings[stt_bar_position]"
     145                       value="1" <?php checked( 1, $settings ); ?> />
    141146                <?php esc_html_e( 'Right', 'scrolltotop' ); ?>
    142             </label>
    143         </p>
    144     </fieldset>
    145 
    146 <?php
     147            </label>
     148        </p>
     149    </fieldset>
     150
     151    <?php
    147152}
    148153
    149154function stt_bar_element_position_field() {
    150155    $settings = scrolltotop_get_plugin_settings( 'stt_bar_element_position' );
    151 ?>
    152     <fieldset>
    153         <p>
    154             <label>
    155                 <input type="radio" name="scrolltotop_plugin_settings[stt_bar_element_position]" value="0" <?php checked( 0, $settings ); ?> />
     156    ?>
     157    <fieldset>
     158        <p>
     159            <label>
     160                <input type="radio" name="scrolltotop_plugin_settings[stt_bar_element_position]"
     161                       value="0" <?php checked( 0, $settings ); ?> />
    156162                <?php esc_html_e( 'Top', 'scrolltotop' ); ?>
    157             </label>
    158             <br />
    159             <label>
    160                 <input type="radio" name="scrolltotop_plugin_settings[stt_bar_element_position]" value="1" <?php checked( 1, $settings ); ?> />
     163            </label>
     164            <br/>
     165            <label>
     166                <input type="radio" name="scrolltotop_plugin_settings[stt_bar_element_position]"
     167                       value="1" <?php checked( 1, $settings ); ?> />
    161168                <?php esc_html_e( 'Bottom', 'scrolltotop' ); ?>
    162             </label>
    163         </p>
    164     </fieldset>
    165 
    166 <?php
     169            </label>
     170        </p>
     171    </fieldset>
     172
     173    <?php
    167174}
    168175
    169176function stt_bar_top_offset_field() {
    170177    $settings = scrolltotop_get_plugin_settings( 'stt_bar_top_offset' );
    171 ?>
    172     <input name="scrolltotop_plugin_settings[stt_bar_top_offset]" type="number" min="0" id="stt_bar_top_offset" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
    173 <?php
     178    ?>
     179    <input name="scrolltotop_plugin_settings[stt_bar_top_offset]" type="number" min="0" id="stt_bar_top_offset"
     180           value="<?php echo (int) $settings; ?>" class="small-text"/> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
     181    <?php
    174182}
    175183
    176184function stt_bar_horizontal_offset_field() {
    177185    $settings = scrolltotop_get_plugin_settings( 'stt_bar_horizontal_offset' );
    178 ?>
    179 
    180     <input name="scrolltotop_plugin_settings[stt_bar_horizontal_offset]" type="number" min="0" id="stt_bar_horizontal_offset" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
    181    
    182 <?php
     186    ?>
     187
     188    <input name="scrolltotop_plugin_settings[stt_bar_horizontal_offset]" type="number" min="0"
     189           id="stt_bar_horizontal_offset" value="<?php echo (int) $settings; ?>"
     190           class="small-text"/> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
     191
     192    <?php
    183193}
    184194
    185195function stt_mode_field() {
    186196    $settings = scrolltotop_get_plugin_settings( 'stt_mode' );
    187 ?>
    188     <fieldset>
    189         <p>
    190             <label>
    191                 <input type="radio" name="scrolltotop_plugin_settings[stt_mode]" value="0" <?php checked( 0, $settings ); ?> />
     197    ?>
     198    <fieldset>
     199        <p>
     200            <label>
     201                <input type="radio" name="scrolltotop_plugin_settings[stt_mode]"
     202                       value="0" <?php checked( 0, $settings ); ?> />
    192203                <?php esc_html_e( 'Bar', 'scrolltotop' ); ?>
    193             </label>
    194             <br />
    195             <label>
    196                 <input type="radio" name="scrolltotop_plugin_settings[stt_mode]" value="1" <?php checked( 1, $settings ); ?> />
     204            </label>
     205            <br/>
     206            <label>
     207                <input type="radio" name="scrolltotop_plugin_settings[stt_mode]"
     208                       value="1" <?php checked( 1, $settings ); ?> />
    197209                <?php esc_html_e( 'Button', 'scrolltotop' ); ?>
    198             </label>
    199         </p>
    200     </fieldset>
    201 <?php
     210            </label>
     211        </p>
     212    </fieldset>
     213    <?php
    202214}
    203215
    204216function stt_advanced_background_width_field() {
    205217    $settings = scrolltotop_get_plugin_settings( 'stt_advanced_background_width' );
    206 ?>
    207     <label>
    208     <?php esc_html_e( "Width:", 'scrolltotop' ); ?> <input name="scrolltotop_plugin_settings[stt_advanced_background_width]" type="number" min="0" id="stt_advanced_background_width" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
    209     </label>
    210    
    211     <p class="description"><?php esc_html_e( "0 – disable advanced background", 'scrolltotop' ); ?></p>
    212    
     218    ?>
     219    <label>
     220        <?php esc_html_e( "Width:", 'scrolltotop' ); ?> <input
     221                name="scrolltotop_plugin_settings[stt_advanced_background_width]" type="number" min="0"
     222                id="stt_advanced_background_width" value="<?php echo (int) $settings; ?>"
     223                class="small-text"/> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
     224    </label>
     225
     226    <p class="description"><?php esc_html_e( "0 – disable advanced background", 'scrolltotop' ); ?></p>
     227
    213228    <?php $settings = scrolltotop_get_plugin_settings( 'stt_advanced_background_sticky' ); ?>
    214229
    215     <label class="stt_margin_top_15px">
    216     <input name="scrolltotop_plugin_settings[stt_advanced_background_sticky]" type="checkbox" id="stt_advanced_background_sticky" value="1" <?php checked( 1, $settings ); ?> /><?php esc_html_e( 'Enable sticky width', 'scrolltotop' ); ?>
    217     </label>
    218    
     230    <label class="stt_margin_top_15px">
     231        <input name="scrolltotop_plugin_settings[stt_advanced_background_sticky]" type="checkbox"
     232               id="stt_advanced_background_sticky"
     233               value="1" <?php checked( 1, $settings ); ?> /><?php esc_html_e( 'Enable sticky width', 'scrolltotop' ); ?>
     234    </label>
     235
    219236    <?php $settings = scrolltotop_get_plugin_settings( 'stt_advanced_background_hide' ); ?>
    220237
    221     <label class="stt_margin_top_15px"><?php esc_html_e( "Hide advanced background if user's screen is less than", 'scrolltotop' ); ?>
    222     <input name="scrolltotop_plugin_settings[stt_advanced_background_hide]" type="number" min="0" id="stt_advanced_background_hide" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
    223     </label>
    224    
    225     <p class="description"><?php esc_html_e( "0 – don't hide", 'scrolltotop' ); ?></p>
     238    <label class="stt_margin_top_15px"><?php esc_html_e( "Hide advanced background if user's screen is less than", 'scrolltotop' ); ?>
     239        <input name="scrolltotop_plugin_settings[stt_advanced_background_hide]" type="number" min="0"
     240               id="stt_advanced_background_hide" value="<?php echo (int) $settings; ?>"
     241               class="small-text"/> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
     242    </label>
     243
     244    <p class="description"><?php esc_html_e( "0 – don't hide", 'scrolltotop' ); ?></p>
    226245    <?php
    227246}
     
    229248function stt_scroll_offset_field() {
    230249    $settings = scrolltotop_get_plugin_settings( 'stt_scroll_offset' );
    231 ?>
    232     <label><?php esc_html_e( 'Show scrollToTop after scrolling', 'scrolltotop' ); ?>
    233     <input name="scrolltotop_plugin_settings[stt_scroll_offset]" type="number" min="0" id="stt_scroll_offset" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
    234     </label>
    235     <p class="description"><?php esc_html_e( '0 – is always visible', 'scrolltotop' ); ?></p>
    236 <?php
     250    ?>
     251    <label><?php esc_html_e( 'Show scrollToTop after scrolling', 'scrolltotop' ); ?>
     252        <input name="scrolltotop_plugin_settings[stt_scroll_offset]" type="number" min="0" id="stt_scroll_offset"
     253               value="<?php echo (int) $settings; ?>" class="small-text"/> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
     254    </label>
     255    <p class="description"><?php esc_html_e( '0 – is always visible', 'scrolltotop' ); ?></p>
     256    <?php
    237257}
    238258
    239259function stt_bar_text_field() {
    240260    $settings = scrolltotop_get_plugin_settings( 'stt_bar_text' );
    241 ?>
    242     <input name="scrolltotop_plugin_settings[stt_bar_text]" type="text" placeholder="Scroll to Top" id="stt_bar_text" value="<?php echo $settings; ?>" />
    243 <?php
     261    ?>
     262    <input name="scrolltotop_plugin_settings[stt_bar_text]" type="text" placeholder="Scroll to Top" id="stt_bar_text"
     263           value="<?php echo $settings; ?>"/>
     264    <?php
    244265}
    245266
    246267function stt_bar_text_distance_field() {
    247268    $settings = scrolltotop_get_plugin_settings( 'stt_bar_text_distance' );
    248 ?>
    249     <input name="scrolltotop_plugin_settings[stt_bar_text_distance]" type="number" min="0" id="stt_bar_text_distance" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
    250 <?php
     269    ?>
     270    <input name="scrolltotop_plugin_settings[stt_bar_text_distance]" type="number" min="0" id="stt_bar_text_distance"
     271           value="<?php echo (int) $settings; ?>" class="small-text"/> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
     272    <?php
    251273}
    252274
    253275function stt_bar_fade_duration_field() {
    254276    $settings = scrolltotop_get_plugin_settings( 'stt_bar_fade_duration' );
    255 ?>
    256     <input name="scrolltotop_plugin_settings[stt_bar_fade_duration]" type="number" min="0" step="100" max="1000" id="stt_bar_fade_duration" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'ms', 'scrolltotop' ); ?>
    257     <p class="description"><?php esc_html_e( '0 – disable fade effect', 'scrolltotop' ); ?></p>
    258    
     277    ?>
     278    <input name="scrolltotop_plugin_settings[stt_bar_fade_duration]" type="number" min="0" step="100" max="1000"
     279           id="stt_bar_fade_duration" value="<?php echo (int) $settings; ?>"
     280           class="small-text"/> <?php esc_html_e( 'ms', 'scrolltotop' ); ?>
     281    <p class="description"><?php esc_html_e( '0 – disable fade effect', 'scrolltotop' ); ?></p>
     282
    259283    <?php $settings = scrolltotop_get_plugin_settings( 'stt_bar_animation_on_load' ); ?>
    260    
    261     <label class="stt_margin_top_15px">
    262         <input name="scrolltotop_plugin_settings[stt_bar_animation_on_load]" type="checkbox" id="stt_bar_animation_on_load" value="1" <?php checked( 1, $settings ); ?> /><?php esc_html_e( 'Disable fade effect on page load', 'scrolltotop' ); ?>
    263     </label>
    264 <?php
     284
     285    <label class="stt_margin_top_15px">
     286        <input name="scrolltotop_plugin_settings[stt_bar_animation_on_load]" type="checkbox"
     287               id="stt_bar_animation_on_load"
     288               value="1" <?php checked( 1, $settings ); ?> /><?php esc_html_e( 'Disable fade effect on page load', 'scrolltotop' ); ?>
     289    </label>
     290    <?php
    265291}
    266292
    267293function stt_bar_allow_back_field() {
    268294    $settings = scrolltotop_get_plugin_settings( 'stt_bar_allow_back' );
    269 ?>
    270     <fieldset>
    271         <p>
    272             <label>
    273                 <input type="radio" name="scrolltotop_plugin_settings[stt_bar_allow_back]" value="0" <?php checked( 0, $settings ); ?> />
     295    ?>
     296    <fieldset>
     297        <p>
     298            <label>
     299                <input type="radio" name="scrolltotop_plugin_settings[stt_bar_allow_back]"
     300                       value="0" <?php checked( 0, $settings ); ?> />
    274301                <?php esc_html_e( 'Yes', 'scrolltotop' ); ?>
    275             </label>
    276             <br />
    277             <label>
    278                 <input type="radio" name="scrolltotop_plugin_settings[stt_bar_allow_back]" value="1" <?php checked( 1, $settings ); ?> />
     302            </label>
     303            <br/>
     304            <label>
     305                <input type="radio" name="scrolltotop_plugin_settings[stt_bar_allow_back]"
     306                       value="1" <?php checked( 1, $settings ); ?> />
    279307                <?php esc_html_e( 'No', 'scrolltotop' ); ?>
    280             </label>
    281         </p>
    282     </fieldset>
    283 <?php
     308            </label>
     309        </p>
     310    </fieldset>
     311    <?php
    284312}
    285313
    286314function stt_script_loading_field() {
    287315    $settings = scrolltotop_get_plugin_settings( 'stt_script_loading' );
    288 ?>
    289     <select name="scrolltotop_plugin_settings[stt_script_loading]" id="stt_script_loading">
    290         <option value="0" <?php selected( 0, $settings ); ?>><?php esc_html_e( 'Normal', 'scrolltotop' ); ?></option>
    291         <option value="1" <?php selected( 1, $settings ); ?>><?php esc_html_e( 'Async', 'scrolltotop' ); ?></option>
    292         <option value="2" <?php selected( 2, $settings ); ?>><?php esc_html_e( 'Defer', 'scrolltotop' ); ?></option>
    293     </select>
    294     <p class="description"><span class="stt-warning"><?php esc_html_e( "Warning!", 'scrolltotop' ); ?></span> <?php esc_html_e( "Don't change this unless you know what you're doing", 'scrolltotop' ); ?></p>
    295 <?php
     316    ?>
     317    <select name="scrolltotop_plugin_settings[stt_script_loading]" id="stt_script_loading">
     318        <option value="0" <?php selected( 0, $settings ); ?>><?php esc_html_e( 'Normal', 'scrolltotop' ); ?></option>
     319        <option value="1" <?php selected( 1, $settings ); ?>><?php esc_html_e( 'Async', 'scrolltotop' ); ?></option>
     320        <option value="2" <?php selected( 2, $settings ); ?>><?php esc_html_e( 'Defer', 'scrolltotop' ); ?></option>
     321    </select>
     322    <p class="description"><span
     323                class="stt-warning"><?php esc_html_e( "Warning!", 'scrolltotop' ); ?></span> <?php esc_html_e( "Don't change this unless you know what you're doing", 'scrolltotop' ); ?>
     324    </p>
     325    <?php
    296326}
    297327
    298328function stt_bar_width_field() {
    299329    $settings = scrolltotop_get_plugin_settings( 'stt_bar_width' );
    300 ?>
    301     <input name="scrolltotop_plugin_settings[stt_bar_width]" type="number" id="stt_bar_width" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
     330    ?>
     331    <input name="scrolltotop_plugin_settings[stt_bar_width]" type="number" id="stt_bar_width"
     332           value="<?php echo (int) $settings; ?>" class="small-text"/> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
    302333
    303334    <?php $settings = scrolltotop_get_plugin_settings( 'stt_bar_sticky' ); ?>
    304    
    305     <label class="stt_margin_top_15px">
    306         <input name="scrolltotop_plugin_settings[stt_bar_sticky]" type="checkbox" id="stt_bar_sticky" value="1" <?php checked( 1, $settings ); ?> /><?php esc_html_e( 'Enable sticky width', 'scrolltotop' ); ?>
    307     </label>
    308 <?php
     335
     336    <label class="stt_margin_top_15px">
     337        <input name="scrolltotop_plugin_settings[stt_bar_sticky]" type="checkbox" id="stt_bar_sticky"
     338               value="1" <?php checked( 1, $settings ); ?> /><?php esc_html_e( 'Enable sticky width', 'scrolltotop' ); ?>
     339    </label>
     340    <?php
    309341}
    310342
    311343function stt_bar_opacity_field() {
    312344    $settings = scrolltotop_get_plugin_settings( 'stt_bar_opacity' );
    313 ?>
    314     <input name="scrolltotop_plugin_settings[stt_bar_opacity]" type="number" min="5" max="100" step="5" id="stt_bar_opacity" value="<?php echo (int)$settings; ?>" class="small-text" /> %
    315 <?php
     345    ?>
     346    <input name="scrolltotop_plugin_settings[stt_bar_opacity]" type="number" min="5" max="100" step="5"
     347           id="stt_bar_opacity" value="<?php echo (int) $settings; ?>" class="small-text"/> %
     348    <?php
    316349}
    317350
    318351function stt_bar_arrow_icon_field() {
    319352    $settings = scrolltotop_get_plugin_settings( 'stt_bar_arrow_icon' );
    320 ?>
    321     <fieldset class="arrow-icon-select">
    322         <p>
    323             <label>
    324                 <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]" value="f077" <?php checked( 'f077', $settings ); ?> />
    325                 <i class="arrow-style-icon f077"></i>
    326             </label><br />
    327 
    328             <label>
    329                 <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]" value="e800" <?php checked( 'e800', $settings ); ?> />
    330                 <i class="arrow-style-icon e800"></i>
    331             </label><br />
    332            
    333             <label>
    334                 <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]" value="e801" <?php checked( 'e801', $settings ); ?> />
    335                 <i class="arrow-style-icon e801"></i>
    336             </label><br />
    337 
    338             <label>
    339                 <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]" value="f106" <?php checked( 'f106', $settings ); ?> />
    340                 <i class="arrow-style-icon f106"></i>
    341             </label><br />
    342            
    343             <label>
    344                 <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]" value="f102" <?php checked( 'f102', $settings ); ?> />
    345                 <i class="arrow-style-icon f102"></i>
    346             </label><br />
    347            
    348             <label>
    349                 <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]" value="e80d" <?php checked( 'e80d', $settings ); ?> />
    350                 <i class="arrow-style-icon e80d"></i>
    351             </label><br />
    352 
    353             <label>
    354                 <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]" value="f0aa" <?php checked( 'f0aa', $settings ); ?> />
    355                 <i class="arrow-style-icon f0aa"></i>
    356             </label><br />
    357 
    358             <label>
    359                 <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]" value="f148" <?php checked( 'f148', $settings ); ?> />
    360                 <i class="arrow-style-icon f148"></i>
    361             </label><br />
    362 
    363             <label>
    364                 <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]" value="e802" <?php checked( 'e802', $settings ); ?> />
    365                 <i class="arrow-style-icon e802"></i>
    366             </label><br />
    367 
    368             <label>
    369                 <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]" value="e805" <?php checked( 'e805', $settings ); ?> />
    370                 <i class="arrow-style-icon e805"></i>
    371             </label><br />
    372 
    373             <label>
    374                 <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]" value="e807" <?php checked( 'e807', $settings ); ?> />
    375                 <i class="arrow-style-icon e807"></i>
    376             </label><br />
    377 
    378             <label>
    379                 <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]" value="e80b" <?php checked( 'e80b', $settings ); ?> />
    380                 <i class="arrow-style-icon e80b"></i>
    381             </label><br />
    382            
    383             <label>
    384                 <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]" value="e809" <?php checked( 'e809', $settings ); ?> />
    385                 <i class="arrow-style-icon e809"></i>
    386             </label><br />
    387            
    388             <label>
    389                 <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]" value="e803" <?php checked( 'e803', $settings ); ?> />
    390                 <i class="arrow-style-icon e803"></i>
    391             </label><br />
    392            
    393             <label>
    394                 <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]" value="e804" <?php checked( 'e804', $settings ); ?> />
    395                 <i class="arrow-style-icon e804"></i>
    396             </label>
    397         </p>
    398     </fieldset>
    399 <?php
     353    ?>
     354    <fieldset class="arrow-icon-select">
     355        <p>
     356            <label>
     357                <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]"
     358                       value="f077" <?php checked( 'f077', $settings ); ?> />
     359                <i class="arrow-style-icon f077"></i>
     360            </label><br/>
     361
     362            <label>
     363                <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]"
     364                       value="e800" <?php checked( 'e800', $settings ); ?> />
     365                <i class="arrow-style-icon e800"></i>
     366            </label><br/>
     367
     368            <label>
     369                <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]"
     370                       value="e801" <?php checked( 'e801', $settings ); ?> />
     371                <i class="arrow-style-icon e801"></i>
     372            </label><br/>
     373
     374            <label>
     375                <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]"
     376                       value="f106" <?php checked( 'f106', $settings ); ?> />
     377                <i class="arrow-style-icon f106"></i>
     378            </label><br/>
     379
     380            <label>
     381                <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]"
     382                       value="f102" <?php checked( 'f102', $settings ); ?> />
     383                <i class="arrow-style-icon f102"></i>
     384            </label><br/>
     385
     386            <label>
     387                <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]"
     388                       value="e80d" <?php checked( 'e80d', $settings ); ?> />
     389                <i class="arrow-style-icon e80d"></i>
     390            </label><br/>
     391
     392            <label>
     393                <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]"
     394                       value="f0aa" <?php checked( 'f0aa', $settings ); ?> />
     395                <i class="arrow-style-icon f0aa"></i>
     396            </label><br/>
     397
     398            <label>
     399                <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]"
     400                       value="f148" <?php checked( 'f148', $settings ); ?> />
     401                <i class="arrow-style-icon f148"></i>
     402            </label><br/>
     403
     404            <label>
     405                <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]"
     406                       value="e802" <?php checked( 'e802', $settings ); ?> />
     407                <i class="arrow-style-icon e802"></i>
     408            </label><br/>
     409
     410            <label>
     411                <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]"
     412                       value="e805" <?php checked( 'e805', $settings ); ?> />
     413                <i class="arrow-style-icon e805"></i>
     414            </label><br/>
     415
     416            <label>
     417                <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]"
     418                       value="e807" <?php checked( 'e807', $settings ); ?> />
     419                <i class="arrow-style-icon e807"></i>
     420            </label><br/>
     421
     422            <label>
     423                <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]"
     424                       value="e80b" <?php checked( 'e80b', $settings ); ?> />
     425                <i class="arrow-style-icon e80b"></i>
     426            </label><br/>
     427
     428            <label>
     429                <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]"
     430                       value="e809" <?php checked( 'e809', $settings ); ?> />
     431                <i class="arrow-style-icon e809"></i>
     432            </label><br/>
     433
     434            <label>
     435                <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]"
     436                       value="e803" <?php checked( 'e803', $settings ); ?> />
     437                <i class="arrow-style-icon e803"></i>
     438            </label><br/>
     439
     440            <label>
     441                <input type="radio" name="scrolltotop_plugin_settings[stt_bar_arrow_icon]"
     442                       value="e804" <?php checked( 'e804', $settings ); ?> />
     443                <i class="arrow-style-icon e804"></i>
     444            </label>
     445        </p>
     446    </fieldset>
     447    <?php
    400448}
    401449
    402450function stt_bar_arrow_rotate_speed_field() {
    403451    $settings = scrolltotop_get_plugin_settings( 'stt_bar_arrow_rotate_speed' );
    404 ?>
    405     <input name="scrolltotop_plugin_settings[stt_bar_arrow_rotate_speed]" type="number" min="0" step="50" id="stt_bar_arrow_rotate_speed" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'ms', 'scrolltotop' ); ?>
    406     <p class="description"><?php esc_html_e( '0 – instant rotate', 'scrolltotop' ); ?></p>
    407 <?php
     452    ?>
     453    <input name="scrolltotop_plugin_settings[stt_bar_arrow_rotate_speed]" type="number" min="0" step="50"
     454           id="stt_bar_arrow_rotate_speed" value="<?php echo (int) $settings; ?>"
     455           class="small-text"/> <?php esc_html_e( 'ms', 'scrolltotop' ); ?>
     456    <p class="description"><?php esc_html_e( '0 – instant rotate', 'scrolltotop' ); ?></p>
     457    <?php
    408458}
    409459
    410460function stt_bar_background_color_field() {
    411461    $settings = scrolltotop_get_plugin_settings( 'stt_bar_background_color' );
    412 ?>
    413    
    414     <fieldset>
    415         <input type="text" class="color-picker" data-alpha="true" data-default-color="rgba( 0,0,0,0.2 )" name="scrolltotop_plugin_settings[stt_bar_background_color]" id="stt_bar_background_color" value="<?php echo sanitize_text_field( $settings ); ?>" />
    416         <p class="description"><?php esc_html_e( 'Normal', 'scrolltotop' ); ?></p>
    417     </fieldset>
    418    
    419 <?php
     462    ?>
     463
     464    <fieldset>
     465        <input type="text" class="color-picker" data-alpha="true" data-default-color="rgba( 0,0,0,0.2 )"
     466               name="scrolltotop_plugin_settings[stt_bar_background_color]" id="stt_bar_background_color"
     467               value="<?php echo sanitize_text_field( $settings ); ?>"/>
     468        <p class="description"><?php esc_html_e( 'Normal', 'scrolltotop' ); ?></p>
     469    </fieldset>
     470
     471    <?php
    420472    $settings = scrolltotop_get_plugin_settings( 'stt_bar_background_color_on_hover' );
    421 ?>
    422     <fieldset class="stt_margin_top_15px">
    423         <input type="text" class="color-picker" data-alpha="true" data-default-color="rgba( 0,0,0,0.3 )" name="scrolltotop_plugin_settings[stt_bar_background_color_on_hover]" id="stt_bar_background_color_on_hover" value="<?php echo sanitize_text_field( $settings ); ?>" />
    424         <p class="description"><?php esc_html_e( 'On hover', 'scrolltotop' ); ?></p>
    425     </fieldset>
    426 <?php
     473    ?>
     474    <fieldset class="stt_margin_top_15px">
     475        <input type="text" class="color-picker" data-alpha="true" data-default-color="rgba( 0,0,0,0.3 )"
     476               name="scrolltotop_plugin_settings[stt_bar_background_color_on_hover]"
     477               id="stt_bar_background_color_on_hover" value="<?php echo sanitize_text_field( $settings ); ?>"/>
     478        <p class="description"><?php esc_html_e( 'On hover', 'scrolltotop' ); ?></p>
     479    </fieldset>
     480    <?php
    427481}
    428482
    429483function stt_bar_hover_transition_field() {
    430484    $settings = scrolltotop_get_plugin_settings( 'stt_bar_hover_transition' );
    431 ?>
    432     <input name="scrolltotop_plugin_settings[stt_bar_hover_transition]" type="number" min="0" step="50" id="stt_bar_hover_transition" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'ms', 'scrolltotop' ); ?>
    433     <p class="description"><?php esc_html_e( '0 – disable smooth effect', 'scrolltotop' ); ?></p>
    434 <?php
     485    ?>
     486    <input name="scrolltotop_plugin_settings[stt_bar_hover_transition]" type="number" min="0" step="50"
     487           id="stt_bar_hover_transition" value="<?php echo (int) $settings; ?>"
     488           class="small-text"/> <?php esc_html_e( 'ms', 'scrolltotop' ); ?>
     489    <p class="description"><?php esc_html_e( '0 – disable smooth effect', 'scrolltotop' ); ?></p>
     490    <?php
    435491}
    436492
    437493function stt_bar_text_offset_field() {
    438494    $settings = scrolltotop_get_plugin_settings( 'stt_bar_text_offset' );
    439 ?>
    440     <input name="scrolltotop_plugin_settings[stt_bar_text_offset]" type="number" min="0" id="stt_bar_text_offset" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
    441 <?php
     495    ?>
     496    <input name="scrolltotop_plugin_settings[stt_bar_text_offset]" type="number" min="0" id="stt_bar_text_offset"
     497           value="<?php echo (int) $settings; ?>" class="small-text"/> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
     498    <?php
    442499}
    443500
    444501function stt_bar_color_field() {
    445502    $settings = scrolltotop_get_plugin_settings( 'stt_bar_color' );
    446 ?>
    447     <fieldset>
    448         <p>
    449             <input type="text" class="color-picker" data-alpha="true" data-default-color="#000000" name="scrolltotop_plugin_settings[stt_bar_color]" id="stt_bar_color" value="<?php echo $settings; ?>" />
    450         </p>
    451     </fieldset>
    452 <?php
     503    ?>
     504    <fieldset>
     505        <p>
     506            <input type="text" class="color-picker" data-alpha="true" data-default-color="#000000"
     507                   name="scrolltotop_plugin_settings[stt_bar_color]" id="stt_bar_color"
     508                   value="<?php echo $settings; ?>"/>
     509        </p>
     510    </fieldset>
     511    <?php
    453512}
    454513
    455514function stt_bar_arrow_size_field() {
    456515    $settings = scrolltotop_get_plugin_settings( 'stt_bar_arrow_size' );
    457 ?>
    458     <input name="scrolltotop_plugin_settings[stt_bar_arrow_size]" type="number" min="0" max="100" id="stt_bar_arrow_size" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
    459     <p class="description"><?php esc_html_e( "0 – don't show the arrow", 'scrolltotop' ); ?></p>
    460 <?php
     516    ?>
     517    <input name="scrolltotop_plugin_settings[stt_bar_arrow_size]" type="number" min="0" max="100"
     518           id="stt_bar_arrow_size" value="<?php echo (int) $settings; ?>"
     519           class="small-text"/> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
     520    <p class="description"><?php esc_html_e( "0 – don't show the arrow", 'scrolltotop' ); ?></p>
     521    <?php
    461522}
    462523
    463524function stt_bar_caption_size_field() {
    464525    $settings = scrolltotop_get_plugin_settings( 'stt_bar_caption_size' );
    465 ?>
    466     <input name="scrolltotop_plugin_settings[stt_bar_caption_size]" type="number" min="0" max="30" id="stt_bar_caption_size" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
    467 <?php
     526    ?>
     527    <input name="scrolltotop_plugin_settings[stt_bar_caption_size]" type="number" min="0" max="30"
     528           id="stt_bar_caption_size" value="<?php echo (int) $settings; ?>"
     529           class="small-text"/> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
     530    <?php
    468531}
    469532
    470533function stt_bar_caption_position_field() {
    471534    $settings = scrolltotop_get_plugin_settings( 'stt_bar_caption_position' );
    472 ?>
    473     <fieldset>
    474         <p>
    475             <label>
    476                 <input type="radio" name="scrolltotop_plugin_settings[stt_bar_caption_position]" value="0" <?php checked( 0, $settings ); ?> />
     535    ?>
     536    <fieldset>
     537        <p>
     538            <label>
     539                <input type="radio" name="scrolltotop_plugin_settings[stt_bar_caption_position]"
     540                       value="0" <?php checked( 0, $settings ); ?> />
    477541                <?php esc_html_e( 'Under the arrow', 'scrolltotop' ); ?>
    478             </label>
    479             <br />
    480             <label>
    481                 <input type="radio" name="scrolltotop_plugin_settings[stt_bar_caption_position]" value="1" <?php checked( 1, $settings ); ?> />
     542            </label>
     543            <br/>
     544            <label>
     545                <input type="radio" name="scrolltotop_plugin_settings[stt_bar_caption_position]"
     546                       value="1" <?php checked( 1, $settings ); ?> />
    482547                <?php esc_html_e( 'To the right of the arrow', 'scrolltotop' ); ?>
    483             </label>
    484         </p>
    485     </fieldset>
    486 <?php
     548            </label>
     549        </p>
     550    </fieldset>
     551    <?php
    487552}
    488553
    489554function stt_bar_caption_font_field() {
    490555    $settings = scrolltotop_get_plugin_settings( 'stt_bar_caption_font' );
    491 ?>
    492     <input name="scrolltotop_plugin_settings[stt_bar_caption_font]" type="text" placeholder="&#34;Arial&#34;, sans-serif" id="stt_bar_caption_font" value="<?php echo esc_attr( $settings ); ?>" />
    493 <?php
     556    ?>
     557    <input name="scrolltotop_plugin_settings[stt_bar_caption_font]" type="text"
     558           placeholder="&#34;Arial&#34;, sans-serif" id="stt_bar_caption_font"
     559           value="<?php echo esc_attr( $settings ); ?>"/>
     560    <?php
    494561}
    495562
    496563function stt_sticky_container_field() {
    497564    $settings = scrolltotop_get_plugin_settings( 'stt_sticky_container' );
    498 ?>
    499     <input name="scrolltotop_plugin_settings[stt_sticky_container]" type="text" id="stt_sticky_container" value="<?php echo esc_attr( $settings ); ?>" />
    500     <p class="description"><?php esc_html_e( "Usually this is #primary, #wrapper, #secondary, #sidebar or #content", 'scrolltotop' ); ?></p>
    501 <?php
     565    ?>
     566    <input name="scrolltotop_plugin_settings[stt_sticky_container]" type="text" id="stt_sticky_container"
     567           value="<?php echo esc_attr( $settings ); ?>"/>
     568    <p class="description"><?php esc_html_e( "Usually this is #primary, #wrapper, #secondary, #sidebar or #content", 'scrolltotop' ); ?></p>
     569    <?php
    502570}
    503571
    504572function stt_enqueue_styles_field() {
    505573    $settings = scrolltotop_get_plugin_settings( 'stt_enqueue_styles' );
    506 ?>
    507     <fieldset>
    508         <p>
    509             <label>
    510                 <input type="radio" name="scrolltotop_plugin_settings[stt_enqueue_styles]" value="0" <?php checked( 0, $settings ); ?> />
     574    ?>
     575    <fieldset>
     576        <p>
     577            <label>
     578                <input type="radio" name="scrolltotop_plugin_settings[stt_enqueue_styles]"
     579                       value="0" <?php checked( 0, $settings ); ?> />
    511580                <?php esc_html_e( 'Yes', 'scrolltotop' ); ?>
    512             </label>
    513             <br />
    514             <label>
    515                 <input type="radio" name="scrolltotop_plugin_settings[stt_enqueue_styles]" value="1" <?php checked( 1, $settings ); ?> />
     581            </label>
     582            <br/>
     583            <label>
     584                <input type="radio" name="scrolltotop_plugin_settings[stt_enqueue_styles]"
     585                       value="1" <?php checked( 1, $settings ); ?> />
    516586                <?php esc_html_e( 'No', 'scrolltotop' ); ?>
    517             </label>
    518         </p>
    519     </fieldset>
    520 <?php
     587            </label>
     588        </p>
     589    </fieldset>
     590    <?php
    521591}
    522592
    523593function stt_inline_styles_field() {
    524594    $settings = scrolltotop_get_plugin_settings( 'stt_inline_styles' );
    525 ?>
    526     <fieldset id="stt_inline_styles">
    527         <p>
    528             <label>
    529                 <input type="radio" name="scrolltotop_plugin_settings[stt_inline_styles]" value="0" <?php checked( 0, $settings ); ?> />
     595    ?>
     596    <fieldset id="stt_inline_styles">
     597        <p>
     598            <label>
     599                <input type="radio" name="scrolltotop_plugin_settings[stt_inline_styles]"
     600                       value="0" <?php checked( 0, $settings ); ?> />
    530601                <?php esc_html_e( 'Yes', 'scrolltotop' ); ?>
    531             </label>
    532             <br />
    533             <label>
    534                 <input type="radio" name="scrolltotop_plugin_settings[stt_inline_styles]" value="1" <?php checked( 1, $settings ); ?> />
     602            </label>
     603            <br/>
     604            <label>
     605                <input type="radio" name="scrolltotop_plugin_settings[stt_inline_styles]"
     606                       value="1" <?php checked( 1, $settings ); ?> />
    535607                <?php esc_html_e( 'No', 'scrolltotop' ); ?>
    536             </label>
    537         </p>
    538     </fieldset>
    539 <?php
     608            </label>
     609        </p>
     610    </fieldset>
     611    <?php
    540612}
    541613
    542614function stt_custom_css_field() {
    543615    $settings = scrolltotop_get_plugin_settings( 'stt_custom_css' );
    544 ?>
    545     <textarea name="scrolltotop_plugin_settings[stt_custom_css]" id="stt_custom_css" placeholder="#scrollToTop {&#10;     border-right: 1px solid #bbbbbb;&#10;}" id="stt_custom_css" cols="50" rows="12"><?php echo $settings; ?></textarea>
    546 <?php
     616    ?>
     617    <textarea name="scrolltotop_plugin_settings[stt_custom_css]" id="stt_custom_css"
     618              placeholder="#scrollToTop {&#10;     border-right: 1px solid #bbbbbb;&#10;}" id="stt_custom_css" cols="50"
     619              rows="12"><?php echo $settings; ?></textarea>
     620    <?php
    547621}
    548622
    549623function stt_bar_make_smaller_field() {
    550624    $settings = scrolltotop_get_plugin_settings( 'stt_bar_make_smaller_width' );
    551 ?>
    552     <label><?php esc_html_e( "Set width to", 'scrolltotop' ); ?>
    553     <input name="scrolltotop_plugin_settings[stt_bar_make_smaller_width]" type="number" min="0" step="5" id="stt_bar_make_smaller_width" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'px', 'scrolltotop' ); ?></label>
    554    
     625    ?>
     626    <label><?php esc_html_e( "Set width to", 'scrolltotop' ); ?>
     627        <input name="scrolltotop_plugin_settings[stt_bar_make_smaller_width]" type="number" min="0" step="5"
     628               id="stt_bar_make_smaller_width" value="<?php echo (int) $settings; ?>"
     629               class="small-text"/> <?php esc_html_e( 'px', 'scrolltotop' ); ?></label>
     630
    555631    <?php $settings = scrolltotop_get_plugin_settings( 'stt_bar_make_smaller_screen' ); ?>
    556    
    557     <label>
    558         <?php esc_html_e( "if user's screen is less than", 'scrolltotop' ); ?>
    559         <input name="scrolltotop_plugin_settings[stt_bar_make_smaller_screen]" type="number" min="0" id="stt_bar_make_smaller_screen" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
    560     </label>
    561     <p class="description"><?php esc_html_e( "0 – don't make bar smaller", 'scrolltotop' ); ?></p>
    562 <?php
     632
     633    <label>
     634        <?php esc_html_e( "if user's screen is less than", 'scrolltotop' ); ?>
     635        <input name="scrolltotop_plugin_settings[stt_bar_make_smaller_screen]" type="number" min="0"
     636               id="stt_bar_make_smaller_screen" value="<?php echo (int) $settings; ?>"
     637               class="small-text"/> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
     638    </label>
     639    <p class="description"><?php esc_html_e( "0 – don't make bar smaller", 'scrolltotop' ); ?></p>
     640    <?php
    563641}
    564642
    565643function stt_button_make_smaller_field() {
    566644    $settings = scrolltotop_get_plugin_settings( 'stt_button_make_smaller_padding' );
    567 ?>
    568     <label>
    569         <?php esc_html_e( "Set padding to", 'scrolltotop' ); ?>
    570         <input name="scrolltotop_plugin_settings[stt_button_make_smaller_padding]" type="number" min="0" id="stt_button_make_smaller_padding" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
    571     </label>
    572    
     645    ?>
     646    <label>
     647        <?php esc_html_e( "Set padding to", 'scrolltotop' ); ?>
     648        <input name="scrolltotop_plugin_settings[stt_button_make_smaller_padding]" type="number" min="0"
     649               id="stt_button_make_smaller_padding" value="<?php echo (int) $settings; ?>"
     650               class="small-text"/> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
     651    </label>
     652
    573653    <?php $settings = scrolltotop_get_plugin_settings( 'stt_button_make_smaller_arrow_size' ); ?>
    574    
    575     <label>
    576         <?php esc_html_e( "and arrow size to", 'scrolltotop' ); ?>
    577         <input name="scrolltotop_plugin_settings[stt_button_make_smaller_arrow_size]" type="number" min="0" id="stt_button_make_smaller_arrow_size" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
    578     </label>
    579    
     654
     655    <label>
     656        <?php esc_html_e( "and arrow size to", 'scrolltotop' ); ?>
     657        <input name="scrolltotop_plugin_settings[stt_button_make_smaller_arrow_size]" type="number" min="0"
     658               id="stt_button_make_smaller_arrow_size" value="<?php echo (int) $settings; ?>"
     659               class="small-text"/> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
     660    </label>
     661
    580662    <?php $settings = scrolltotop_get_plugin_settings( 'stt_button_make_smaller_screen' ); ?>
    581    
    582     <label>
    583         <?php esc_html_e( "if user's screen is less than", 'scrolltotop' ); ?>
    584         <input name="scrolltotop_plugin_settings[stt_button_make_smaller_screen]" type="number" min="0" id="stt_button_make_smaller_screen" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
    585     </label>
    586     <p class="description"><?php esc_html_e( "0 – don't make button smaller", 'scrolltotop' ); ?></p>
    587 <?php
     663
     664    <label>
     665        <?php esc_html_e( "if user's screen is less than", 'scrolltotop' ); ?>
     666        <input name="scrolltotop_plugin_settings[stt_button_make_smaller_screen]" type="number" min="0"
     667               id="stt_button_make_smaller_screen" value="<?php echo (int) $settings; ?>"
     668               class="small-text"/> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
     669    </label>
     670    <p class="description"><?php esc_html_e( "0 – don't make button smaller", 'scrolltotop' ); ?></p>
     671    <?php
    588672}
    589673
    590674function stt_bar_hide_field() {
    591675    $settings = scrolltotop_get_plugin_settings( 'stt_bar_hide' );
    592 ?>
    593     <label>
    594         <?php esc_html_e( "Hide if user's screen is less than", 'scrolltotop' ); ?>
    595         <input name="scrolltotop_plugin_settings[stt_bar_hide]" type="number" min="0" id="stt_bar_hide" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
    596     </label>
    597    
    598     <p class="description"><?php esc_html_e( "0 – don't hide", 'scrolltotop' ); ?></p>
    599    
     676    ?>
     677    <label>
     678        <?php esc_html_e( "Hide if user's screen is less than", 'scrolltotop' ); ?>
     679        <input name="scrolltotop_plugin_settings[stt_bar_hide]" type="number" min="0" id="stt_bar_hide"
     680               value="<?php echo (int) $settings; ?>" class="small-text"/> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
     681    </label>
     682
     683    <p class="description"><?php esc_html_e( "0 – don't hide", 'scrolltotop' ); ?></p>
     684
    600685    <?php $settings = scrolltotop_get_plugin_settings( 'stt_bar_transform_to_button' ); ?>
    601    
    602     <label class="stt_margin_top_15px">
    603         <input name="scrolltotop_plugin_settings[stt_bar_transform_to_button]" type="checkbox" id="stt_bar_transform_to_button" value="1" <?php checked( 1, $settings ); ?> /><?php esc_html_e( "Transform into button instead of hide", 'scrolltotop' ); ?> <span class="stt-new"><?php echo esc_html__( 'NEW', 'scrolltotop' ); ?></span>
    604     </label>
    605 <?php
     686
     687    <label class="stt_margin_top_15px">
     688        <input name="scrolltotop_plugin_settings[stt_bar_transform_to_button]" type="checkbox"
     689               id="stt_bar_transform_to_button"
     690               value="1" <?php checked( 1, $settings ); ?> /><?php esc_html_e( "Transform into button instead of hide", 'scrolltotop' ); ?>
     691        <span class="stt-new"><?php echo esc_html__( 'NEW', 'scrolltotop' ); ?></span>
     692    </label>
     693    <?php
    606694}
    607695
    608696function stt_bar_transformed_size_field() {
    609697    $settings = scrolltotop_get_plugin_settings( 'stt_bar_transformed_size' );
    610 ?>
    611     <input name="scrolltotop_plugin_settings[stt_bar_transformed_size]" type="number" min="0" id="stt_bar_transformed_size" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
    612 <?php
     698    ?>
     699    <input name="scrolltotop_plugin_settings[stt_bar_transformed_size]" type="number" min="0"
     700           id="stt_bar_transformed_size" value="<?php echo (int) $settings; ?>"
     701           class="small-text"/> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
     702    <?php
    613703}
    614704
    615705function stt_bar_transformed_vertical_position_field() {
    616706    $settings = scrolltotop_get_plugin_settings( 'stt_bar_transformed_vertical_position' );
    617 ?>
    618     <fieldset>
    619         <p>
    620             <label>
    621                 <input type="radio" name="scrolltotop_plugin_settings[stt_bar_transformed_vertical_position]" value="0" <?php checked( 0, $settings ); ?> />
     707    ?>
     708    <fieldset>
     709        <p>
     710            <label>
     711                <input type="radio" name="scrolltotop_plugin_settings[stt_bar_transformed_vertical_position]"
     712                       value="0" <?php checked( 0, $settings ); ?> />
    622713                <?php esc_html_e( 'Top', 'scrolltotop' ); ?>
    623             </label>
    624             <br />
    625             <label>
    626                 <input type="radio" name="scrolltotop_plugin_settings[stt_bar_transformed_vertical_position]" value="1" <?php checked( 1, $settings ); ?> />
     714            </label>
     715            <br/>
     716            <label>
     717                <input type="radio" name="scrolltotop_plugin_settings[stt_bar_transformed_vertical_position]"
     718                       value="1" <?php checked( 1, $settings ); ?> />
    627719                <?php esc_html_e( 'Bottom', 'scrolltotop' ); ?>
    628             </label>
    629         </p>
    630     </fieldset>
    631 <?php
     720            </label>
     721        </p>
     722    </fieldset>
     723    <?php
    632724}
    633725
    634726function stt_bar_transformed_horizontal_position_field() {
    635727    $settings = scrolltotop_get_plugin_settings( 'stt_bar_transformed_horizontal_position' );
    636 ?>
    637     <fieldset>
    638         <p>
    639             <label>
    640                 <input type="radio" name="scrolltotop_plugin_settings[stt_bar_transformed_horizontal_position]" value="0" <?php checked( 0, $settings ); ?> />
     728    ?>
     729    <fieldset>
     730        <p>
     731            <label>
     732                <input type="radio" name="scrolltotop_plugin_settings[stt_bar_transformed_horizontal_position]"
     733                       value="0" <?php checked( 0, $settings ); ?> />
    641734                <?php esc_html_e( 'Left', 'scrolltotop' ); ?>
    642             </label>
    643             <br />
    644             <label>
    645                 <input type="radio" name="scrolltotop_plugin_settings[stt_bar_transformed_horizontal_position]" value="1" <?php checked( 1, $settings ); ?> />
     735            </label>
     736            <br/>
     737            <label>
     738                <input type="radio" name="scrolltotop_plugin_settings[stt_bar_transformed_horizontal_position]"
     739                       value="1" <?php checked( 1, $settings ); ?> />
    646740                <?php esc_html_e( 'Right', 'scrolltotop' ); ?>
    647             </label>
    648         </p>
    649     </fieldset>
    650 <?php
     741            </label>
     742        </p>
     743    </fieldset>
     744    <?php
    651745}
    652746
    653747function stt_bar_transformed_vertical_offset_field() {
    654748    $settings = scrolltotop_get_plugin_settings( 'stt_bar_transformed_vertical_offset' );
    655 ?>
    656     <input name="scrolltotop_plugin_settings[stt_bar_transformed_vertical_offset]" type="number" min="0" id="stt_bar_transformed_vertical_offset" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
    657 <?php
     749    ?>
     750    <input name="scrolltotop_plugin_settings[stt_bar_transformed_vertical_offset]" type="number" min="0"
     751           id="stt_bar_transformed_vertical_offset" value="<?php echo (int) $settings; ?>"
     752           class="small-text"/> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
     753    <?php
    658754}
    659755
    660756function stt_bar_transformed_horizontal_offset_field() {
    661757    $settings = scrolltotop_get_plugin_settings( 'stt_bar_transformed_horizontal_offset' );
    662 ?>
    663     <input name="scrolltotop_plugin_settings[stt_bar_transformed_horizontal_offset]" type="number" min="0" id="stt_bar_transformed_horizontal_offset" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
    664 <?php
     758    ?>
     759    <input name="scrolltotop_plugin_settings[stt_bar_transformed_horizontal_offset]" type="number" min="0"
     760           id="stt_bar_transformed_horizontal_offset" value="<?php echo (int) $settings; ?>"
     761           class="small-text"/> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
     762    <?php
    665763}
    666764
    667765function stt_bar_transformed_border_radius_field() {
    668766    $settings = scrolltotop_get_plugin_settings( 'stt_bar_transformed_border_radius' );
    669 ?>
    670     <input name="scrolltotop_plugin_settings[stt_bar_transformed_border_radius]" type="text" id="stt_bar_transformed_border_radius" value="<?php echo $settings; ?>" class="small-text" />
    671 <?php
     767    ?>
     768    <input name="scrolltotop_plugin_settings[stt_bar_transformed_border_radius]" type="text"
     769           id="stt_bar_transformed_border_radius" value="<?php echo $settings; ?>" class="small-text"/>
     770    <?php
    672771}
    673772
    674773function stt_button_hide_field() {
    675774    $settings = scrolltotop_get_plugin_settings( 'stt_button_hide' );
    676 ?>
    677     <label>
    678         <?php esc_html_e( "Hide if user's screen is less than", 'scrolltotop' ); ?>
    679         <input name="scrolltotop_plugin_settings[stt_button_hide]" type="number" min="0" id="stt_button_hide" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
    680     </label>
    681    
    682     <p class="description"><?php esc_html_e( "0 – don't hide", 'scrolltotop' ); ?></p>
    683 <?php
     775    ?>
     776    <label>
     777        <?php esc_html_e( "Hide if user's screen is less than", 'scrolltotop' ); ?>
     778        <input name="scrolltotop_plugin_settings[stt_button_hide]" type="number" min="0" id="stt_button_hide"
     779               value="<?php echo (int) $settings; ?>" class="small-text"/> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
     780    </label>
     781
     782    <p class="description"><?php esc_html_e( "0 – don't hide", 'scrolltotop' ); ?></p>
     783    <?php
    684784}
    685785
    686786function stt_button_position_field() {
    687787    $settings = scrolltotop_get_plugin_settings( 'stt_button_position' );
    688 ?>
    689     <fieldset>
    690         <p>
    691             <label>
    692                 <input type="radio" name="scrolltotop_plugin_settings[stt_button_position]" value="0" <?php checked( 0, $settings ); ?> />
     788    ?>
     789    <fieldset>
     790        <p>
     791            <label>
     792                <input type="radio" name="scrolltotop_plugin_settings[stt_button_position]"
     793                       value="0" <?php checked( 0, $settings ); ?> />
    693794                <?php esc_html_e( 'Left', 'scrolltotop' ); ?>
    694             </label>
    695             <br />
    696             <label>
    697                 <input type="radio" name="scrolltotop_plugin_settings[stt_button_position]" value="1" <?php checked( 1, $settings ); ?> />
     795            </label>
     796            <br/>
     797            <label>
     798                <input type="radio" name="scrolltotop_plugin_settings[stt_button_position]"
     799                       value="1" <?php checked( 1, $settings ); ?> />
    698800                <?php esc_html_e( 'Right', 'scrolltotop' ); ?>
    699             </label>
    700         </p>
    701     </fieldset>
    702 <?php
     801            </label>
     802        </p>
     803    </fieldset>
     804    <?php
    703805}
    704806
    705807function stt_button_padding_field() {
    706808    $settings = scrolltotop_get_plugin_settings( 'stt_button_padding' );
    707 ?>
    708     <input name="scrolltotop_plugin_settings[stt_button_padding]" type="number" min="0" id="stt_button_padding" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
    709 <?php
     809    ?>
     810    <input name="scrolltotop_plugin_settings[stt_button_padding]" type="number" min="0" id="stt_button_padding"
     811           value="<?php echo (int) $settings; ?>" class="small-text"/> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
     812    <?php
    710813}
    711814
    712815function stt_button_opacity_field() {
    713816    $settings = scrolltotop_get_plugin_settings( 'stt_button_opacity' );
    714 ?>
    715     <input name="scrolltotop_plugin_settings[stt_button_opacity]" type="number" min="5" max="100" step="5" id="stt_button_opacity" value="<?php echo (int)$settings; ?>" class="small-text" /> %
    716 <?php
     817    ?>
     818    <input name="scrolltotop_plugin_settings[stt_button_opacity]" type="number" min="5" max="100" step="5"
     819           id="stt_button_opacity" value="<?php echo (int) $settings; ?>" class="small-text"/> %
     820    <?php
    717821}
    718822
    719823function stt_button_horizontal_offset_field() {
    720824    $settings = scrolltotop_get_plugin_settings( 'stt_button_horizontal_offset' );
    721 ?>
    722     <input name="scrolltotop_plugin_settings[stt_button_horizontal_offset]" type="number" min="0" id="stt_button_horizontal_offset" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
    723 <?php
     825    ?>
     826    <input name="scrolltotop_plugin_settings[stt_button_horizontal_offset]" type="number" min="0"
     827           id="stt_button_horizontal_offset" value="<?php echo (int) $settings; ?>"
     828           class="small-text"/> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
     829    <?php
    724830}
    725831
    726832function stt_button_vertical_offset_field() {
    727833    $settings = scrolltotop_get_plugin_settings( 'stt_button_vertical_offset' );
    728 ?>
    729     <input name="scrolltotop_plugin_settings[stt_button_vertical_offset]" type="number" min="0" id="stt_button_vertical_offset" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
    730 <?php
     834    ?>
     835    <input name="scrolltotop_plugin_settings[stt_button_vertical_offset]" type="number" min="0"
     836           id="stt_button_vertical_offset" value="<?php echo (int) $settings; ?>"
     837           class="small-text"/> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
     838    <?php
    731839}
    732840
    733841function stt_button_border_radius_field() {
    734842    $settings = scrolltotop_get_plugin_settings( 'stt_button_border_radius' );
    735 ?>
    736     <input name="scrolltotop_plugin_settings[stt_button_border_radius]" type="text" id="stt_button_border_radius" value="<?php echo $settings; ?>" class="small-text" />
    737 <?php
     843    ?>
     844    <input name="scrolltotop_plugin_settings[stt_button_border_radius]" type="text" id="stt_button_border_radius"
     845           value="<?php echo $settings; ?>" class="small-text"/>
     846    <?php
    738847}
    739848
    740849function stt_button_background_color_field() {
    741850    $settings = scrolltotop_get_plugin_settings( 'stt_button_background_color' );
    742 ?>
    743     <fieldset>
    744         <input type="text" class="color-picker" data-alpha="true" data-default-color="#f44336" name="scrolltotop_plugin_settings[stt_button_background_color]" id="stt_button_background_color" value="<?php echo sanitize_text_field( $settings ); ?>" />
    745         <p class="description"><?php esc_html_e( 'Normal', 'scrolltotop' ); ?></p>
    746     </fieldset>
    747    
     851    ?>
     852    <fieldset>
     853        <input type="text" class="color-picker" data-alpha="true" data-default-color="#f44336"
     854               name="scrolltotop_plugin_settings[stt_button_background_color]" id="stt_button_background_color"
     855               value="<?php echo sanitize_text_field( $settings ); ?>"/>
     856        <p class="description"><?php esc_html_e( 'Normal', 'scrolltotop' ); ?></p>
     857    </fieldset>
     858
    748859    <?php $settings = scrolltotop_get_plugin_settings( 'stt_button_background_color_on_hover' ); ?>
    749    
    750     <fieldset class="stt_margin_top_15px">
    751         <input type="text" class="color-picker" data-alpha="true" data-default-color="#ff1744" name="scrolltotop_plugin_settings[stt_button_background_color_on_hover]" id="stt_button_background_color_on_hover" value="<?php echo sanitize_text_field( $settings ); ?>" />
    752         <p class="description"><?php esc_html_e( 'On hover', 'scrolltotop' ); ?></p>
    753     </fieldset>
    754 <?php
     860
     861    <fieldset class="stt_margin_top_15px">
     862        <input type="text" class="color-picker" data-alpha="true" data-default-color="#ff1744"
     863               name="scrolltotop_plugin_settings[stt_button_background_color_on_hover]"
     864               id="stt_button_background_color_on_hover" value="<?php echo sanitize_text_field( $settings ); ?>"/>
     865        <p class="description"><?php esc_html_e( 'On hover', 'scrolltotop' ); ?></p>
     866    </fieldset>
     867    <?php
    755868}
    756869
    757870function stt_button_animation_field() {
    758871    $settings = scrolltotop_get_plugin_settings( 'stt_button_animation' );
    759 ?>
    760     <label>
    761         <?php esc_html_e( 'Effect:', 'scrolltotop' ); ?> 
    762         <select name="scrolltotop_plugin_settings[stt_button_animation]" id="stt_button_animation">
    763             <option value="0" <?php selected( 0, $settings ); ?>><?php esc_html_e( 'None', 'scrolltotop' ); ?></option>
    764             <option value="1" <?php selected( 1, $settings ); ?>><?php esc_html_e( 'Slide', 'scrolltotop' ); ?></option>
    765             <option value="2" <?php selected( 2, $settings ); ?>><?php esc_html_e( 'Fade', 'scrolltotop' ); ?></option>
    766         </select>
    767     </label>
    768    
     872    ?>
     873    <label>
     874        <?php esc_html_e( 'Effect:', 'scrolltotop' ); ?>
     875        <select name="scrolltotop_plugin_settings[stt_button_animation]" id="stt_button_animation">
     876            <option value="0" <?php selected( 0, $settings ); ?>><?php esc_html_e( 'None', 'scrolltotop' ); ?></option>
     877            <option value="1" <?php selected( 1, $settings ); ?>><?php esc_html_e( 'Slide', 'scrolltotop' ); ?></option>
     878            <option value="2" <?php selected( 2, $settings ); ?>><?php esc_html_e( 'Fade', 'scrolltotop' ); ?></option>
     879        </select>
     880    </label>
     881
    769882    <?php $settings = scrolltotop_get_plugin_settings( 'stt_button_animation_speed' ); ?>
    770883
    771     <label class="stt_margin_top_15px">
    772         <?php esc_html_e( 'Speed:', 'scrolltotop' ); ?>
    773         <input name="scrolltotop_plugin_settings[stt_button_animation_speed]" type="number" min="1" max="1000" id="stt_button_animation_speed" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'ms', 'scrolltotop' ); ?>
    774     </label>
    775    
     884    <label class="stt_margin_top_15px">
     885        <?php esc_html_e( 'Speed:', 'scrolltotop' ); ?>
     886        <input name="scrolltotop_plugin_settings[stt_button_animation_speed]" type="number" min="1" max="1000"
     887               id="stt_button_animation_speed" value="<?php echo (int) $settings; ?>"
     888               class="small-text"/> <?php esc_html_e( 'ms', 'scrolltotop' ); ?>
     889    </label>
     890
    776891    <?php $settings = scrolltotop_get_plugin_settings( 'stt_button_animation_on_load' ); ?>
    777    
    778     <label class="stt_margin_top_15px">
    779         <input name="scrolltotop_plugin_settings[stt_button_animation_on_load]" type="checkbox" id="stt_button_animation_on_load" value="1" <?php checked( 1, $settings ); ?> /><?php esc_html_e( 'Disable animation on page load', 'scrolltotop' ); ?>
    780     </label>
    781 <?php
     892
     893    <label class="stt_margin_top_15px">
     894        <input name="scrolltotop_plugin_settings[stt_button_animation_on_load]" type="checkbox"
     895               id="stt_button_animation_on_load"
     896               value="1" <?php checked( 1, $settings ); ?> /><?php esc_html_e( 'Disable animation on page load', 'scrolltotop' ); ?>
     897    </label>
     898    <?php
    782899}
    783900
    784901function stt_button_hover_transition_field() {
    785902    $settings = scrolltotop_get_plugin_settings( 'stt_button_hover_transition' );
    786 ?>
    787     <input name="scrolltotop_plugin_settings[stt_button_hover_transition]" type="number" min="0" step="50" id="stt_button_hover_transition" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'ms', 'scrolltotop' ); ?>
    788     <p class="description"><?php esc_html_e( '0 – disable smooth effect', 'scrolltotop' ); ?></p>
    789 <?php
     903    ?>
     904    <input name="scrolltotop_plugin_settings[stt_button_hover_transition]" type="number" min="0" step="50"
     905           id="stt_button_hover_transition" value="<?php echo (int) $settings; ?>"
     906           class="small-text"/> <?php esc_html_e( 'ms', 'scrolltotop' ); ?>
     907    <p class="description"><?php esc_html_e( '0 – disable smooth effect', 'scrolltotop' ); ?></p>
     908    <?php
    790909}
    791910
    792911function stt_button_arrow_color_field() {
    793912    $settings = scrolltotop_get_plugin_settings( 'stt_button_arrow_color' );
    794 ?>
    795     <fieldset>
    796         <p>
    797             <input type="text" class="color-picker" data-alpha="true" data-default-color="#ffffff" name="scrolltotop_plugin_settings[stt_button_arrow_color]" id="stt_button_arrow_color" value="<?php echo $settings; ?>" />
    798         </p>
    799     </fieldset>
    800 <?php
     913    ?>
     914    <fieldset>
     915        <p>
     916            <input type="text" class="color-picker" data-alpha="true" data-default-color="#ffffff"
     917                   name="scrolltotop_plugin_settings[stt_button_arrow_color]" id="stt_button_arrow_color"
     918                   value="<?php echo $settings; ?>"/>
     919        </p>
     920    </fieldset>
     921    <?php
    801922}
    802923
    803924function stt_button_arrow_size_field() {
    804925    $settings = scrolltotop_get_plugin_settings( 'stt_button_arrow_size' );
    805 ?>
    806     <input name="scrolltotop_plugin_settings[stt_button_arrow_size]" type="number" min="5" max="100" id="stt_button_arrow_size" value="<?php echo (int)$settings; ?>" class="small-text" /> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
    807 <?php
     926    ?>
     927    <input name="scrolltotop_plugin_settings[stt_button_arrow_size]" type="number" min="5" max="100"
     928           id="stt_button_arrow_size" value="<?php echo (int) $settings; ?>"
     929           class="small-text"/> <?php esc_html_e( 'px', 'scrolltotop' ); ?>
     930    <?php
    808931}
    809932
    810933function stt_button_arrow_icon_field() {
    811934    $settings = scrolltotop_get_plugin_settings( 'stt_button_arrow_icon' );
    812 ?>
    813     <fieldset class="arrow-icon-select">
    814         <p>
    815             <label>
    816                 <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]" value="f077" <?php checked( 'f077', $settings ); ?> />
    817                 <i class="arrow-style-icon f077"></i>
    818             </label>
    819             <br />
    820             <label>
    821                 <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]" value="e800" <?php checked( 'e800', $settings ); ?> />
    822                 <i class="arrow-style-icon e800"></i>
    823             </label>
    824             <br />
    825             <label>
    826                 <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]" value="e801" <?php checked( 'e801', $settings ); ?> />
    827                 <i class="arrow-style-icon e801"></i>
    828             </label>
    829             <br />
    830             <label>
    831                 <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]" value="f106" <?php checked( 'f106', $settings ); ?> />
    832                 <i class="arrow-style-icon f106"></i>
    833             </label>
    834             <br />
    835             <label>
    836                 <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]" value="f102" <?php checked( 'f102', $settings ); ?> />
    837                 <i class="arrow-style-icon f102"></i>
    838             </label>
    839             <br />
    840             <label>
    841                 <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]" value="e80d" <?php checked( 'e80d', $settings ); ?> />
    842                 <i class="arrow-style-icon e80d"></i>
    843             </label>
    844             <br />
    845             <label>
    846                 <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]" value="f0aa" <?php checked( 'f0aa', $settings ); ?> />
    847                 <i class="arrow-style-icon f0aa"></i>
    848             </label>
    849             <br />
    850             <label>
    851                 <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]" value="f148" <?php checked( 'f148', $settings ); ?> />
    852                 <i class="arrow-style-icon f148"></i>
    853             </label>
    854             <br />
    855             <label>
    856                 <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]" value="e802" <?php checked( 'e802', $settings ); ?> />
    857                 <i class="arrow-style-icon e802"></i>
    858             </label>
    859             <br />
    860             <label>
    861                 <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]" value="e805" <?php checked( 'e805', $settings ); ?> />
    862                 <i class="arrow-style-icon e805"></i>
    863             </label>
    864             <br />
    865             <label>
    866                 <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]" value="e807" <?php checked( 'e807', $settings ); ?> />
    867                 <i class="arrow-style-icon e807"></i>
    868             </label>
    869             <br />
    870             <label>
    871                 <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]" value="e80b" <?php checked( 'e80b', $settings ); ?> />
    872                 <i class="arrow-style-icon e80b"></i>
    873             </label>
    874             <br />
    875             <label>
    876                 <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]" value="e809" <?php checked( 'e809', $settings ); ?> />
    877                 <i class="arrow-style-icon e809"></i>
    878             </label>
    879             <br />
    880             <label>
    881                 <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]" value="e803" <?php checked( 'e803', $settings ); ?> />
    882                 <i class="arrow-style-icon e803"></i>
    883             </label>
    884             <br />
    885             <label>
    886                 <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]" value="e804" <?php checked( 'e804', $settings ); ?> />
    887                 <i class="arrow-style-icon e804"></i>
    888             </label>
    889         </p>
    890     </fieldset>
    891 <?php
     935    ?>
     936    <fieldset class="arrow-icon-select">
     937        <p>
     938            <label>
     939                <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]"
     940                       value="f077" <?php checked( 'f077', $settings ); ?> />
     941                <i class="arrow-style-icon f077"></i>
     942            </label>
     943            <br/>
     944            <label>
     945                <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]"
     946                       value="e800" <?php checked( 'e800', $settings ); ?> />
     947                <i class="arrow-style-icon e800"></i>
     948            </label>
     949            <br/>
     950            <label>
     951                <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]"
     952                       value="e801" <?php checked( 'e801', $settings ); ?> />
     953                <i class="arrow-style-icon e801"></i>
     954            </label>
     955            <br/>
     956            <label>
     957                <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]"
     958                       value="f106" <?php checked( 'f106', $settings ); ?> />
     959                <i class="arrow-style-icon f106"></i>
     960            </label>
     961            <br/>
     962            <label>
     963                <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]"
     964                       value="f102" <?php checked( 'f102', $settings ); ?> />
     965                <i class="arrow-style-icon f102"></i>
     966            </label>
     967            <br/>
     968            <label>
     969                <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]"
     970                       value="e80d" <?php checked( 'e80d', $settings ); ?> />
     971                <i class="arrow-style-icon e80d"></i>
     972            </label>
     973            <br/>
     974            <label>
     975                <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]"
     976                       value="f0aa" <?php checked( 'f0aa', $settings ); ?> />
     977                <i class="arrow-style-icon f0aa"></i>
     978            </label>
     979            <br/>
     980            <label>
     981                <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]"
     982                       value="f148" <?php checked( 'f148', $settings ); ?> />
     983                <i class="arrow-style-icon f148"></i>
     984            </label>
     985            <br/>
     986            <label>
     987                <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]"
     988                       value="e802" <?php checked( 'e802', $settings ); ?> />
     989                <i class="arrow-style-icon e802"></i>
     990            </label>
     991            <br/>
     992            <label>
     993                <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]"
     994                       value="e805" <?php checked( 'e805', $settings ); ?> />
     995                <i class="arrow-style-icon e805"></i>
     996            </label>
     997            <br/>
     998            <label>
     999                <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]"
     1000                       value="e807" <?php checked( 'e807', $settings ); ?> />
     1001                <i class="arrow-style-icon e807"></i>
     1002            </label>
     1003            <br/>
     1004            <label>
     1005                <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]"
     1006                       value="e80b" <?php checked( 'e80b', $settings ); ?> />
     1007                <i class="arrow-style-icon e80b"></i>
     1008            </label>
     1009            <br/>
     1010            <label>
     1011                <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]"
     1012                       value="e809" <?php checked( 'e809', $settings ); ?> />
     1013                <i class="arrow-style-icon e809"></i>
     1014            </label>
     1015            <br/>
     1016            <label>
     1017                <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]"
     1018                       value="e803" <?php checked( 'e803', $settings ); ?> />
     1019                <i class="arrow-style-icon e803"></i>
     1020            </label>
     1021            <br/>
     1022            <label>
     1023                <input type="radio" name="scrolltotop_plugin_settings[stt_button_arrow_icon]"
     1024                       value="e804" <?php checked( 'e804', $settings ); ?> />
     1025                <i class="arrow-style-icon e804"></i>
     1026            </label>
     1027        </p>
     1028    </fieldset>
     1029    <?php
    8921030}
    8931031
    8941032function scrolltotop_plugin_settings_validate( $settings ) {
    895     if( ! in_array( $settings['stt_bar_position'], array( 0, 1 ) ) )
     1033    if ( ! in_array( $settings['stt_bar_position'], array( 0, 1 ) ) ) {
    8961034        $settings['stt_bar_position'] = 0;
    897 
    898     if( ! isset( $settings['stt_bar_animation_on_load']) || ! in_array( $settings['stt_bar_animation_on_load'], array( 0, 1 ) ) )
     1035    }
     1036
     1037    if ( ! isset( $settings['stt_bar_animation_on_load'] ) || ! in_array( $settings['stt_bar_animation_on_load'], array(
     1038            0,
     1039            1
     1040        ) ) ) {
    8991041        $settings['stt_bar_animation_on_load'] = 0;
    900    
    901     if( ! isset( $settings['stt_bar_transform_to_button']) || ! in_array( $settings['stt_bar_transform_to_button'], array( 0, 1 ) ) )
     1042    }
     1043
     1044    if ( ! isset( $settings['stt_bar_transform_to_button'] ) || ! in_array( $settings['stt_bar_transform_to_button'], array(
     1045            0,
     1046            1
     1047        ) ) ) {
    9021048        $settings['stt_bar_transform_to_button'] = 0;
    903    
    904     if( ! isset( $settings['stt_button_animation_on_load']) || ! in_array( $settings['stt_button_animation_on_load'], array( 0, 1 ) ) )
     1049    }
     1050
     1051    if ( ! isset( $settings['stt_button_animation_on_load'] ) || ! in_array( $settings['stt_button_animation_on_load'], array(
     1052            0,
     1053            1
     1054        ) ) ) {
    9051055        $settings['stt_button_animation_on_load'] = 0;
    906    
    907     if( ! in_array( $settings['stt_bar_element_position'], array( 0, 1 ) ) )
     1056    }
     1057
     1058    if ( ! in_array( $settings['stt_bar_element_position'], array( 0, 1 ) ) ) {
    9081059        $settings['stt_bar_element_position'] = 1;
    909    
    910     if( ! in_array( $settings['stt_bar_transformed_vertical_position'], array( 0, 1 ) ) )
     1060    }
     1061
     1062    if ( ! in_array( $settings['stt_bar_transformed_vertical_position'], array( 0, 1 ) ) ) {
    9111063        $settings['stt_bar_transformed_vertical_position'] = 1;
    912    
    913     if( ! in_array( $settings['stt_bar_transformed_horizontal_position'], array( 0, 1 ) ) )
     1064    }
     1065
     1066    if ( ! in_array( $settings['stt_bar_transformed_horizontal_position'], array( 0, 1 ) ) ) {
    9141067        $settings['stt_bar_transformed_horizontal_position'] = 1;
    915    
    916     if( ! in_array( $settings['stt_mode'], array( 0, 1 ) ) )
     1068    }
     1069
     1070    if ( ! in_array( $settings['stt_mode'], array( 0, 1 ) ) ) {
    9171071        $settings['stt_mode'] = 0;
    918    
    919     if( ! in_array( $settings['stt_custom_css'], array( 0, 1 ) ) )
     1072    }
     1073
     1074    if ( ! in_array( $settings['stt_custom_css'], array( 0, 1 ) ) ) {
    9201075        $settings['stt_custom_css'] = 0;
    921    
    922     if( ! in_array( $settings['stt_inline_styles'], array( 0, 1 ) ) )
     1076    }
     1077
     1078    if ( ! in_array( $settings['stt_inline_styles'], array( 0, 1 ) ) ) {
    9231079        $settings['stt_inline_styles'] = 0;
    924    
    925     if( ! in_array( $settings['stt_bar_allow_back'], array( 0, 1 ) ) )
     1080    }
     1081
     1082    if ( ! in_array( $settings['stt_bar_allow_back'], array( 0, 1 ) ) ) {
    9261083        $settings['stt_bar_allow_back'] = 0;
    927    
    928     if( ! in_array( $settings['stt_script_loading'], array( 0, 1, 2 ) ) )
     1084    }
     1085
     1086    if ( ! in_array( $settings['stt_script_loading'], array( 0, 1, 2 ) ) ) {
    9291087        $settings['stt_script_loading'] = 0;
    930    
    931     $icon_array = array( 'f077', 'f106', 'e801', 'e800', 'e80d', 'f0aa', 'f148', 'e802', 'e805', 'e807', 'e80b', 'e809', 'f102', 'e803', 'e804' );
    932     if( ! in_array( $settings['stt_bar_arrow_icon'], $icon_array  ) )
     1088    }
     1089
     1090    $icon_array = array(
     1091        'f077',
     1092        'f106',
     1093        'e801',
     1094        'e800',
     1095        'e80d',
     1096        'f0aa',
     1097        'f148',
     1098        'e802',
     1099        'e805',
     1100        'e807',
     1101        'e80b',
     1102        'e809',
     1103        'f102',
     1104        'e803',
     1105        'e804'
     1106    );
     1107    if ( ! in_array( $settings['stt_bar_arrow_icon'], $icon_array ) ) {
    9331108        $settings['stt_bar_arrow_icon'] = 'f077';
    934    
    935     if( ! in_array( $settings['stt_button_arrow_icon'], $icon_array  ) )
     1109    }
     1110
     1111    if ( ! in_array( $settings['stt_button_arrow_icon'], $icon_array ) ) {
    9361112        $settings['stt_button_arrow_icon'] = 'f077';
    937    
    938     if( ! in_array( $settings['stt_bar_caption_position'], array( 0, 1 ) ) )
     1113    }
     1114
     1115    if ( ! in_array( $settings['stt_bar_caption_position'], array( 0, 1 ) ) ) {
    9391116        $settings['stt_bar_caption_position'] = 0;
    940    
    941     if( isset( $settings['stt_advanced_background_sticky']) && ! in_array( $settings['stt_advanced_background_sticky'], array( 0, 1 ) ) )
     1117    }
     1118
     1119    if ( isset( $settings['stt_advanced_background_sticky'] ) && ! in_array( $settings['stt_advanced_background_sticky'], array(
     1120            0,
     1121            1
     1122        ) ) ) {
    9421123        $settings['stt_advanced_background_sticky'] = 0;
    943    
    944     if( isset( $settings['stt_bar_sticky']) && ! in_array( $settings['stt_bar_sticky'], array( 0, 1 ) ) )
     1124    }
     1125
     1126    if ( isset( $settings['stt_bar_sticky'] ) && ! in_array( $settings['stt_bar_sticky'], array( 0, 1 ) ) ) {
    9451127        $settings['stt_bar_sticky'] = 0;
    946    
    947     if( ! in_array( $settings['stt_button_position'], array( 0, 1 ) ) )
     1128    }
     1129
     1130    if ( ! in_array( $settings['stt_button_position'], array( 0, 1 ) ) ) {
    9481131        $settings['stt_button_position'] = 0;
    949 
    950     if( ! in_array( $settings['stt_button_animation'], array( 0, 1, 2 ) ) )
     1132    }
     1133
     1134    if ( ! in_array( $settings['stt_button_animation'], array( 0, 1, 2 ) ) ) {
    9511135        $settings['stt_button_animation'] = 0;
    952    
    953     $settings['stt_button_padding']                 = absint( $settings['stt_button_padding'] );
    954     $settings['stt_button_opacity']                 = absint( $settings['stt_button_opacity'] );
    955     if( (int)$settings['stt_button_opacity'] > 100 ) $settings['stt_button_opacity'] = 100;
    956     $settings['stt_button_horizontal_offset']       = absint( $settings['stt_button_horizontal_offset'] );
    957     $settings['stt_button_vertical_offset']         = absint( $settings['stt_button_vertical_offset'] );
    958     $settings['stt_button_hover_transition']        = absint( $settings['stt_button_hover_transition'] );
    959     $settings['stt_button_arrow_size']              = absint( $settings['stt_button_arrow_size'] );
    960     $settings['stt_button_animation_speed']         = absint( $settings['stt_button_animation_speed'] );
    961     if( (int)$settings['stt_button_animation_speed'] < 1 ) {
     1136    }
     1137
     1138    $settings['stt_button_padding'] = absint( $settings['stt_button_padding'] );
     1139    $settings['stt_button_opacity'] = absint( $settings['stt_button_opacity'] );
     1140    if ( (int) $settings['stt_button_opacity'] > 100 ) {
     1141        $settings['stt_button_opacity'] = 100;
     1142    }
     1143    $settings['stt_button_horizontal_offset'] = absint( $settings['stt_button_horizontal_offset'] );
     1144    $settings['stt_button_vertical_offset']   = absint( $settings['stt_button_vertical_offset'] );
     1145    $settings['stt_button_hover_transition']  = absint( $settings['stt_button_hover_transition'] );
     1146    $settings['stt_button_arrow_size']        = absint( $settings['stt_button_arrow_size'] );
     1147    $settings['stt_button_animation_speed']   = absint( $settings['stt_button_animation_speed'] );
     1148    if ( (int) $settings['stt_button_animation_speed'] < 1 ) {
    9621149        $settings['stt_button_animation_speed'] = 200;
    9631150    }
    964     $settings['stt_button_padding']                 = absint( $settings['stt_button_padding'] );
    965     $settings['stt_button_border_radius']           = trim( sanitize_text_field( $settings['stt_button_border_radius'] ) );
    966     $settings['stt_button_border_radius']           = is_numeric( substr( $settings['stt_button_border_radius'], -1 ) ) && (int)$settings['stt_button_border_radius'] > 0 ? (int)$settings['stt_button_border_radius'] . 'px' : $settings['stt_button_border_radius'];
    967     $settings['stt_bar_transformed_border_radius']  = trim( sanitize_text_field( $settings['stt_bar_transformed_border_radius'] ) );
    968     $settings['stt_bar_transformed_border_radius']  = is_numeric( substr( $settings['stt_bar_transformed_border_radius'], -1 ) ) && (int)$settings['stt_bar_transformed_border_radius'] > 0 ? (int)$settings['stt_bar_transformed_border_radius'] . 'px' : $settings['stt_bar_transformed_border_radius'];
    969     $settings['stt_bar_text']                       = trim( sanitize_text_field( $settings['stt_bar_text'] ) );
    970     $settings['stt_bar_caption_font']               = trim( sanitize_text_field( $settings['stt_bar_caption_font'] ) );
    971     $settings['stt_bar_top_offset']                 = absint( $settings['stt_bar_top_offset'] );
    972     $settings['stt_bar_horizontal_offset']          = absint( $settings['stt_bar_horizontal_offset'] );
    973     $settings['stt_scroll_offset']                  = absint( $settings['stt_scroll_offset'] );
    974     $settings['stt_bar_fade_duration']              = absint( $settings['stt_bar_fade_duration'] );
    975     $settings['stt_bar_opacity']                    = absint( $settings['stt_bar_opacity'] );
    976     if( (int)$settings['stt_bar_opacity'] > 100 ) $settings['stt_bar_opacity'] = 100;
     1151    $settings['stt_button_padding']                = absint( $settings['stt_button_padding'] );
     1152    $settings['stt_button_border_radius']          = trim( sanitize_text_field( $settings['stt_button_border_radius'] ) );
     1153    $settings['stt_button_border_radius']          = is_numeric( substr( $settings['stt_button_border_radius'], - 1 ) ) && (int) $settings['stt_button_border_radius'] > 0 ? (int) $settings['stt_button_border_radius'] . 'px' : $settings['stt_button_border_radius'];
     1154    $settings['stt_bar_transformed_border_radius'] = trim( sanitize_text_field( $settings['stt_bar_transformed_border_radius'] ) );
     1155    $settings['stt_bar_transformed_border_radius'] = is_numeric( substr( $settings['stt_bar_transformed_border_radius'], - 1 ) ) && (int) $settings['stt_bar_transformed_border_radius'] > 0 ? (int) $settings['stt_bar_transformed_border_radius'] . 'px' : $settings['stt_bar_transformed_border_radius'];
     1156    $settings['stt_bar_text']                      = trim( sanitize_text_field( $settings['stt_bar_text'] ) );
     1157    $settings['stt_bar_caption_font']              = trim( sanitize_text_field( $settings['stt_bar_caption_font'] ) );
     1158    $settings['stt_bar_top_offset']                = absint( $settings['stt_bar_top_offset'] );
     1159    $settings['stt_bar_horizontal_offset']         = absint( $settings['stt_bar_horizontal_offset'] );
     1160    $settings['stt_scroll_offset']                 = absint( $settings['stt_scroll_offset'] );
     1161    $settings['stt_bar_fade_duration']             = absint( $settings['stt_bar_fade_duration'] );
     1162    $settings['stt_bar_opacity']                   = absint( $settings['stt_bar_opacity'] );
     1163    if ( (int) $settings['stt_bar_opacity'] > 100 ) {
     1164        $settings['stt_bar_opacity'] = 100;
     1165    }
    9771166    $settings['stt_bar_hover_transition']           = absint( $settings['stt_bar_hover_transition'] );
    9781167    $settings['stt_bar_text_offset']                = absint( $settings['stt_bar_text_offset'] );
     
    9851174    $settings['stt_button_make_smaller_arrow_size'] = absint( $settings['stt_button_make_smaller_arrow_size'] );
    9861175    $settings['stt_button_make_smaller_screen']     = absint( $settings['stt_button_make_smaller_screen'] );
    987     if( isset( $settings['stt_button_make_smaller_padding']) && (int)$settings['stt_button_make_smaller_padding'] > (int)$settings['stt_button_padding']) {
    988         $settings['stt_button_make_smaller_padding']     = (int)$settings['stt_button_padding'] - 5;
    989     }
    990    
    991     $settings['stt_bar_width']                      = absint( $settings['stt_bar_width'] );
    992     if( isset( $settings['stt_bar_width']) && (int)$settings['stt_bar_make_smaller_width'] > (int)$settings['stt_bar_width'] && (int)$settings['stt_bar_width'] > 100 && (int)$settings['stt_bar_sticky'] == 0 ) {
    993         $settings['stt_bar_make_smaller_width']     = (int)$settings['stt_bar_width'] - 50;
    994     }
    995    
    996     $settings['stt_bar_make_smaller_screen']        = absint( $settings['stt_bar_make_smaller_screen'] );
    997     $settings['stt_bar_hide']                       = absint( $settings['stt_bar_hide'] );
    998     if( (int)$settings['stt_bar_hide'] > (int)$settings['stt_bar_make_smaller_screen'] && ! empty( (int)$settings['stt_bar_make_smaller_screen']) ) {
    999         $settings['stt_bar_hide'] = (int)$settings['stt_bar_make_smaller_screen'] - 100;
    1000     }
    1001    
    1002     $settings['stt_button_hide']                    = absint( $settings['stt_button_hide'] );
    1003     if( (int)$settings['stt_button_hide'] > (int)$settings['stt_button_make_smaller_screen'] && ! empty( (int)$settings['stt_button_make_smaller_screen']) ) {
    1004         $settings['stt_button_hide'] = (int)$settings['stt_button_make_smaller_screen'] - 100;
    1005     }
    1006    
    1007     if( isset( $settings['stt_advanced_background_width']) ) {
    1008         $settings['stt_advanced_background_width']  = absint( $settings['stt_advanced_background_width'] );
    1009        
    1010         if( isset( $settings['stt_bar_width']) && (int)$settings['stt_bar_width'] > (int)$settings['stt_advanced_background_width'] && (int)$settings['stt_advanced_background_width'] != 0 ) {
    1011             $settings['stt_advanced_background_width'] = (int)$settings['stt_bar_width'] + 100;
     1176    if ( isset( $settings['stt_button_make_smaller_padding'] ) && (int) $settings['stt_button_make_smaller_padding'] > (int) $settings['stt_button_padding'] ) {
     1177        $settings['stt_button_make_smaller_padding'] = (int) $settings['stt_button_padding'] - 5;
     1178    }
     1179
     1180    $settings['stt_bar_width'] = absint( $settings['stt_bar_width'] );
     1181    if ( isset( $settings['stt_bar_width'] ) && (int) $settings['stt_bar_make_smaller_width'] > (int) $settings['stt_bar_width'] && (int) $settings['stt_bar_width'] > 100 && (int) $settings['stt_bar_sticky'] == 0 ) {
     1182        $settings['stt_bar_make_smaller_width'] = (int) $settings['stt_bar_width'] - 50;
     1183    }
     1184
     1185    $settings['stt_bar_make_smaller_screen'] = absint( $settings['stt_bar_make_smaller_screen'] );
     1186    $settings['stt_bar_hide']                = absint( $settings['stt_bar_hide'] );
     1187    if ( (int) $settings['stt_bar_hide'] > (int) $settings['stt_bar_make_smaller_screen'] && ! empty( (int) $settings['stt_bar_make_smaller_screen'] ) ) {
     1188        $settings['stt_bar_hide'] = (int) $settings['stt_bar_make_smaller_screen'] - 100;
     1189    }
     1190
     1191    $settings['stt_button_hide'] = absint( $settings['stt_button_hide'] );
     1192    if ( (int) $settings['stt_button_hide'] > (int) $settings['stt_button_make_smaller_screen'] && ! empty( (int) $settings['stt_button_make_smaller_screen'] ) ) {
     1193        $settings['stt_button_hide'] = (int) $settings['stt_button_make_smaller_screen'] - 100;
     1194    }
     1195
     1196    if ( isset( $settings['stt_advanced_background_width'] ) ) {
     1197        $settings['stt_advanced_background_width'] = absint( $settings['stt_advanced_background_width'] );
     1198
     1199        if ( isset( $settings['stt_bar_width'] ) && (int) $settings['stt_bar_width'] > (int) $settings['stt_advanced_background_width'] && (int) $settings['stt_advanced_background_width'] != 0 ) {
     1200            $settings['stt_advanced_background_width'] = (int) $settings['stt_bar_width'] + 100;
    10121201        }
    10131202    }
    1014    
    1015     $settings['stt_advanced_background_hide']       = absint( $settings['stt_advanced_background_hide'] );
    1016     if( (int)$settings['stt_mode'] == 0 && (int)$settings['stt_bar_hide'] >= (int)$settings['stt_advanced_background_hide'] || (int)$settings['stt_mode'] == 1 && (int)$settings['stt_button_hide'] >= (int)$settings['stt_advanced_background_hide'] ) {
     1203
     1204    $settings['stt_advanced_background_hide'] = absint( $settings['stt_advanced_background_hide'] );
     1205    if ( ( $settings['stt_mode'] === 0 && (int) $settings['stt_bar_hide'] >= (int) $settings['stt_advanced_background_hide'] ) || ( $settings['stt_mode'] === 1 && $settings['stt_button_hide'] >= $settings['stt_advanced_background_hide'] ) ) {
    10171206        $settings['stt_advanced_background_hide'] = 0;
    10181207    }
    10191208
    1020     $settings['stt_sticky_container']               = trim( $settings['stt_sticky_container'] );
    1021     if( (int)$settings['stt_mode'] === 0 && ! empty( $settings['stt_bar_sticky'] ) && ! empty( $settings['stt_advanced_background_sticky'] ) ) {
     1209    $settings['stt_sticky_container'] = trim( $settings['stt_sticky_container'] );
     1210    if ( (int) $settings['stt_mode'] === 0 && ! empty( $settings['stt_bar_sticky'] ) && ! empty( $settings['stt_advanced_background_sticky'] ) ) {
    10221211        $settings['stt_advanced_background_sticky'] = 0;
    10231212    }
    1024    
     1213
    10251214    delete_transient( 'scrolltotop_dynamic_js' );
    10261215    delete_transient( 'scrolltotop_dynamic_css' );
    1027        
     1216
    10281217    return $settings;
    10291218}
  • scrolltotop/trunk/includes/scrolltotop-functions.php

    r2188887 r2309158  
    33function scrolltotop_get_plugin_settings( $option = '' ) {
    44    $default_settings = array(
    5         'stt_mode' => 0,
    6         'stt_bar_position' => 0,
    7         'stt_button_position' => 1,
    8         'stt_button_padding' => 14,
    9         'stt_button_opacity' => 100,
    10         'stt_button_horizontal_offset' => 25,
    11         'stt_button_vertical_offset' => 25,
    12         'stt_button_border_radius' => '5px',
    13         'stt_bar_transformed_border_radius' => '50%',
    14         'stt_bar_element_position' => 1,
    15         'stt_bar_top_offset' => 0,
    16         'stt_bar_horizontal_offset' => 0,
    17         'stt_scroll_offset' => 1,
    18         'stt_bar_text' => '',
    19         'stt_bar_text_distance' => '',
    20         'stt_bar_fade_duration' => 300,
    21         'stt_advanced_background_width' => 0,
    22         'stt_advanced_background_hide' => 1840,
    23         'stt_bar_animation_on_load' => 1,
    24         'stt_bar_allow_back' => 0,
    25         'stt_script_loading' => 0,
    26         'stt_bar_width' => 85,
    27         'stt_bar_opacity' => 20,
    28         'stt_bar_arrow_icon' => 'f077',
    29         'stt_button_arrow_icon' => 'e800',
    30         'stt_bar_arrow_rotate_speed' => 0,
    31         'stt_button_animation' => 1,
    32         'stt_button_animation_speed' => 200,
    33         'stt_button_hover_transition' => 100,
    34         'stt_button_animation_on_load' => 1,
    35         'stt_button_background_color' => '#f44336',
    36         'stt_button_background_color_on_hover' => '#ff5252',
    37         'stt_bar_background_color' => 'rgba( 0,0,0,0.2 )',
    38         'stt_bar_background_color_on_hover' => 'rgba( 0,0,0,0.3 )',
    39         'stt_bar_hover_transition' => 250,
    40         'stt_bar_text_offset' => 20,
    41         'stt_bar_color' => '#000000',
    42         'stt_button_arrow_color' => '#ffffff',
    43         'stt_bar_arrow_size' => 24,
    44         'stt_button_arrow_size' => 18,
    45         'stt_bar_caption_size' => 14,
    46         'stt_bar_caption_position' => 0,
    47         'stt_bar_caption_font' => '',
    48         'stt_sticky_container' => '',
    49         'stt_advanced_background_sticky' => 0,
    50         'stt_bar_sticky' => 0,
    51         'stt_custom_css' => '',
    52         'stt_bar_make_smaller_width' => 100,
    53         'stt_bar_make_smaller_screen' => 1680,
    54         'stt_button_make_smaller_padding' => 0,
    55         'stt_button_make_smaller_arrow_size' => 0,
    56         'stt_button_make_smaller_screen' => 600,
    57         'stt_bar_hide' => 1280,
    58         'stt_bar_transform_to_button' => 1,
    59         'stt_bar_transformed_size' => 60,
    60         'stt_bar_transformed_vertical_position' => 1,
     5        'stt_mode'                                => 0,
     6        'stt_bar_position'                        => 0,
     7        'stt_button_position'                     => 1,
     8        'stt_button_padding'                      => 14,
     9        'stt_button_opacity'                      => 100,
     10        'stt_button_horizontal_offset'            => 25,
     11        'stt_button_vertical_offset'              => 25,
     12        'stt_button_border_radius'                => '5px',
     13        'stt_bar_transformed_border_radius'       => '50%',
     14        'stt_bar_element_position'                => 1,
     15        'stt_bar_top_offset'                      => 0,
     16        'stt_bar_horizontal_offset'               => 0,
     17        'stt_scroll_offset'                       => 1,
     18        'stt_bar_text'                            => '',
     19        'stt_bar_text_distance'                   => '',
     20        'stt_bar_fade_duration'                   => 300,
     21        'stt_advanced_background_width'           => 0,
     22        'stt_advanced_background_hide'            => 1840,
     23        'stt_bar_animation_on_load'               => 1,
     24        'stt_bar_allow_back'                      => 0,
     25        'stt_script_loading'                      => 0,
     26        'stt_bar_width'                           => 85,
     27        'stt_bar_opacity'                         => 20,
     28        'stt_bar_arrow_icon'                      => 'f077',
     29        'stt_button_arrow_icon'                   => 'e800',
     30        'stt_bar_arrow_rotate_speed'              => 0,
     31        'stt_button_animation'                    => 1,
     32        'stt_button_animation_speed'              => 200,
     33        'stt_button_hover_transition'             => 100,
     34        'stt_button_animation_on_load'            => 1,
     35        'stt_button_background_color'             => '#f44336',
     36        'stt_button_background_color_on_hover'    => '#ff5252',
     37        'stt_bar_background_color'                => 'rgba( 0, 0, 0, 0.2 )',
     38        'stt_bar_background_color_on_hover'       => 'rgba( 0, 0, 0, 0.3 )',
     39        'stt_bar_hover_transition'                => 250,
     40        'stt_bar_text_offset'                     => 20,
     41        'stt_bar_color'                           => '#000000',
     42        'stt_button_arrow_color'                  => '#ffffff',
     43        'stt_bar_arrow_size'                      => 24,
     44        'stt_button_arrow_size'                   => 18,
     45        'stt_bar_caption_size'                    => 14,
     46        'stt_bar_caption_position'                => 0,
     47        'stt_bar_caption_font'                    => '',
     48        'stt_sticky_container'                    => '',
     49        'stt_advanced_background_sticky'          => 0,
     50        'stt_bar_sticky'                          => 0,
     51        'stt_custom_css'                          => '',
     52        'stt_bar_make_smaller_width'              => 100,
     53        'stt_bar_make_smaller_screen'             => 1680,
     54        'stt_button_make_smaller_padding'         => 0,
     55        'stt_button_make_smaller_arrow_size'      => 0,
     56        'stt_button_make_smaller_screen'          => 600,
     57        'stt_bar_hide'                            => 1280,
     58        'stt_bar_transform_to_button'             => 1,
     59        'stt_bar_transformed_size'                => 60,
     60        'stt_bar_transformed_vertical_position'   => 1,
    6161        'stt_bar_transformed_horizontal_position' => 1,
    62         'stt_bar_transformed_vertical_offset' => 25,
    63         'stt_bar_transformed_horizontal_offset' => 25,
    64         'stt_button_hide' => 0,
    65         'stt_enqueue_styles' => 0,
    66         'stt_inline_styles' => 0
     62        'stt_bar_transformed_vertical_offset'     => 25,
     63        'stt_bar_transformed_horizontal_offset'   => 25,
     64        'stt_button_hide'                         => 0,
     65        'stt_enqueue_styles'                      => 0,
     66        'stt_inline_styles'                       => 0
    6767    );
    68    
     68
    6969    $default_settings = apply_filters( 'scrolltotop_default_settings', $default_settings );
    70    
     70
    7171    $settings = get_option( 'scrolltotop_plugin_settings', $default_settings );
    72    
    73     if( empty( $option ) ) {
    74         if( isset( $settings ) ) {
     72
     73    if ( empty( $option ) ) {
     74        if ( isset( $settings ) ) {
    7575            return array_merge( $default_settings, $settings );
    7676        }
    7777
    7878        return $default_settings;
    79     } else {
    80         if( isset( $settings[$option] ) ) {
    81             return $settings[$option];
    82         }
     79    }
    8380
    84         return $default_settings[$option];
     81    if ( isset( $settings[ $option ] ) ) {
     82        return $settings[ $option ];
    8583    }
     84
     85    return $default_settings[ $option ];
    8686}
  • scrolltotop/trunk/index.php

    r1699756 r2309158  
    1 <?php
    2 # Silence is golden.
     1<?php // Silence is golden.
  • scrolltotop/trunk/readme.txt

    r2188887 r2309158  
    55Tags: scroll to top, back to top, scroll, to top, scroll up, bar, button
    66Requires at least: 3.0.1
    7 Tested up to: 5.2.4
    8 Stable tag: 1.13
     7Tested up to: 5.4.1
     8Stable tag: 1.14
    99License: GPLv3 or later
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    6262
    6363== Changelog ==
     64
     65= 1.14 =
     66* WordPress 5.4.x support
     67* Code refactoring
    6468
    6569= 1.13 =
  • scrolltotop/trunk/scrolltotop.php

    r2188899 r2309158  
    55Author: Roman Sarvarov
    66Author URI: https://about.me/sarvaroff
    7 Version: 1.13
     7Version: 1.14
    88Text Domain: scrolltotop
    99Domain Path: /languages/
     
    2929*/
    3030
    31 $global_scrolltotop_version = 1.13;
    32 $global_scrolltotop_dir_url = str_replace( home_url() , '', plugin_dir_url( __FILE__ ) );
    33 $global_scrolltotop_base = plugin_basename( __FILE__ );
     31$global_scrolltotop_version = 1.14;
     32$global_scrolltotop_dir_url = parse_url( plugin_dir_url( __FILE__ ), PHP_URL_PATH );
     33$global_scrolltotop_base    = plugin_basename( __FILE__ );
    3434
    3535add_action( 'plugins_loaded', 'scrolltotop_init' );
     36
    3637function scrolltotop_init() {
    37     if( is_admin() ) {
    38         require_once( plugin_dir_path( __FILE__ ) . 'includes/scrolltotop-admin.php' );
    39     }
    40 
    41     require_once( plugin_dir_path( __FILE__ ) . 'includes/scrolltotop-functions.php' );
     38    if ( is_admin() ) {
     39        require_once( plugin_dir_path( __FILE__ ) . 'includes/scrolltotop-admin.php' );
     40    }
     41
     42    require_once( plugin_dir_path( __FILE__ ) . 'includes/scrolltotop-functions.php' );
    4243}
    4344
    4445add_action( 'plugins_loaded', 'scrolltotop_i18n' );
    4546function scrolltotop_i18n() {
    46     global $global_scrolltotop_base;
    47     load_plugin_textdomain( 'scrolltotop', false, dirname( $global_scrolltotop_base ) . '/languages/' );
     47    global $global_scrolltotop_base;
     48    load_plugin_textdomain( 'scrolltotop', false, dirname( $global_scrolltotop_base ) . '/languages/' );
    4849}
    4950
    5051add_action( 'wp_enqueue_scripts', 'scrolltotop_front_init' );
    5152function scrolltotop_front_init() {
    52     if( apply_filters( 'scrolltotop_enabled', false ) )
     53    if ( apply_filters( 'scrolltotop_enabled', false ) ) {
    5354        return;
    54    
    55     global $global_scrolltotop_version, $global_scrolltotop_dir_url;
    56 
    57     $settings = scrolltotop_get_plugin_settings();
    58 
    59     // javascript
    60     wp_enqueue_script( 'scrolltotop', $global_scrolltotop_dir_url . 'assets/js/scripts.min.js', array( 'jquery' ) , $global_scrolltotop_version, apply_filters( 'scrolltotop_scripts_to_footer', true ) );
     55    }
     56
     57    global $global_scrolltotop_version, $global_scrolltotop_dir_url;
     58
     59    $settings = scrolltotop_get_plugin_settings();
     60
     61    // javascript
     62    wp_enqueue_script( 'scrolltotop', $global_scrolltotop_dir_url . 'assets/js/scripts.min.js', array( 'jquery' ), $global_scrolltotop_version, apply_filters( 'scrolltotop_scripts_to_footer', true ) );
    6163
    6264    // load cache if exist
    6365    $inline_scripts = get_transient( 'scrolltotop_dynamic_js' );
    64    
    65     if( false === $inline_scripts ) {
    66         $inline_scripts = 'var ';
     66
     67    if ( false === $inline_scripts ) {
     68        $inline_scripts       = 'var ';
    6769        $inline_scripts_array = array();
    68         if( $settings['stt_sticky_container'] && ( (int)$settings['stt_bar_sticky'] === 1 || (int)$settings['stt_advanced_background_sticky'] === 1 ) ) {
     70        if ( $settings['stt_sticky_container'] && ( (int) $settings['stt_bar_sticky'] === 1 || (int) $settings['stt_advanced_background_sticky'] === 1 ) ) {
    6971            $inline_scripts_array['sttStickyContainer'] = $settings['stt_sticky_container'];
    70            
    71             if( (int)$settings['stt_bar_sticky'] === 1 && (int)$settings['stt_advanced_background_sticky'] === 0 ) {
     72
     73            if ( (int) $settings['stt_bar_sticky'] === 1 && (int) $settings['stt_advanced_background_sticky'] === 0 ) {
    7274                $inline_scripts_array['sttBarSticky'] = 'true';
    7375            }
    7476        }
    75         if( ! empty( (int)$settings['stt_advanced_background_width'] ) || (int)$settings['stt_advanced_background_sticky'] === 1 ) {
     77        if ( ! empty( (int) $settings['stt_advanced_background_width'] ) || (int) $settings['stt_advanced_background_sticky'] === 1 ) {
    7678            $inline_scripts_array['sttAdvancedBg'] = 'true';
    77            
    78             if( (int)$settings['stt_advanced_background_sticky'] === 1 && $settings['stt_sticky_container'] ) {
     79
     80            if ( (int) $settings['stt_advanced_background_sticky'] === 1 && $settings['stt_sticky_container'] ) {
    7981                $inline_scripts_array['sttAdvancedBgSticky'] = 'true';
    8082            }
    8183        }
    82         $inline_scripts_array['sttOffset'] = (int)$settings['stt_scroll_offset'];
    83         if( (int)$settings['stt_mode'] === 0 ) {
    84             $inline_scripts_array['sttPos'] = (int)$settings['stt_bar_position'];
    85             $inline_scripts_array['sttBack'] = ( (int)$settings['stt_bar_allow_back'] == 0 ? 'true' : 'false' );
    86             $inline_scripts_array['sttOnload'] = ( (int)$settings['stt_bar_animation_on_load'] === 1 ? 'true' : 'false' );
     84        $inline_scripts_array['sttOffset'] = (int) $settings['stt_scroll_offset'];
     85        if ( (int) $settings['stt_mode'] === 0 ) {
     86            $inline_scripts_array['sttPos']    = (int) $settings['stt_bar_position'];
     87            $inline_scripts_array['sttBack']   = ( (int) $settings['stt_bar_allow_back'] == 0 ? 'true' : 'false' );
     88            $inline_scripts_array['sttOnload'] = ( (int) $settings['stt_bar_animation_on_load'] === 1 ? 'true' : 'false' );
    8789        } else {
    88             $inline_scripts_array['sttPos'] = (int)$settings['stt_button_position'];
    89             $inline_scripts_array['sttOnload'] = ( (int)$settings['stt_button_animation_on_load'] === 1 ? 'true' : 'false' );
     90            $inline_scripts_array['sttPos']    = (int) $settings['stt_button_position'];
     91            $inline_scripts_array['sttOnload'] = ( (int) $settings['stt_button_animation_on_load'] === 1 ? 'true' : 'false' );
    9092        }
    9193
    9294        $inline_scripts_row = 0;
    93         foreach( apply_filters( 'scrolltotop_inline_scripts', $inline_scripts_array ) as $script => $value ) {
    94             if( $inline_scripts_row !== 0 ) {
     95        foreach ( apply_filters( 'scrolltotop_inline_scripts', $inline_scripts_array ) as $script => $value ) {
     96            if ( $inline_scripts_row !== 0 ) {
    9597                $inline_scripts .= ',' . PHP_EOL . '    ';
    9698            }
    9799            $inline_scripts .= $script . ' = ' . $value;
    98             ++$inline_scripts_row;
     100            ++ $inline_scripts_row;
    99101        }
    100102        $inline_scripts .= ';';
    101        
     103
    102104        $inline_scripts = apply_filters( 'scrolltotop_dynamic_js', $inline_scripts );
    103        
     105
    104106        set_transient( 'scrolltotop_dynamic_js', $inline_scripts );
    105107    }
    106108
    107     wp_add_inline_script( 'scrolltotop', $inline_scripts, 'before' );
    108 
    109     // css
    110     if( apply_filters( 'scrolltotop_css_output', true ) == true ) {
    111         if( apply_filters( 'scrolltotop_stt_enqueue_styles', (int)$settings['stt_enqueue_styles'] === 0 ? true : false ) == true ) {
    112             wp_enqueue_style( 'scrolltotop', $global_scrolltotop_dir_url . 'assets/css/styles.min.css', array() , $global_scrolltotop_version );
    113         }
    114 
    115         if( apply_filters( 'scrolltotop_css_inline_output', (int)$settings['stt_inline_styles'] === 0 ? true : false ) == true ) {
     109    wp_add_inline_script( 'scrolltotop', $inline_scripts, 'before' );
     110
     111    // css
     112    if ( apply_filters( 'scrolltotop_css_output', true ) === true ) {
     113        if ( apply_filters( 'scrolltotop_stt_enqueue_styles', (int) $settings['stt_enqueue_styles'] === 0 ) === true ) {
     114            wp_enqueue_style( 'scrolltotop', $global_scrolltotop_dir_url . 'assets/css/styles.min.css', array(), $global_scrolltotop_version );
     115        }
     116
     117        if ( apply_filters( 'scrolltotop_css_inline_output', (int) $settings['stt_inline_styles'] === 0 ) === true ) {
    116118            $minify_css = apply_filters( 'scrolltotop_minify_css', true );
    117119
    118120            // load cache if exist
    119121            $scrolltotop_dynamic_css = get_transient( 'scrolltotop_dynamic_css' );
    120            
    121             if( false === $scrolltotop_dynamic_css ) {
    122                 $extra_space = '';
    123                 $newline = '';
    124                 $newline_with_space = '';
     122
     123            if ( false === $scrolltotop_dynamic_css ) {
     124                $extra_space           = '';
     125                $newline               = '';
     126                $newline_with_space    = '';
    125127                $newline_with_space_x2 = '';
    126128
    127                 if( ! $minify_css ) {
    128                     $extra_space = ' ';
    129                     $newline = PHP_EOL;
    130                     $newline_with_space = PHP_EOL . '   ';
     129                if ( ! $minify_css ) {
     130                    $extra_space           = ' ';
     131                    $newline               = PHP_EOL;
     132                    $newline_with_space    = PHP_EOL . '    ';
    131133                    $newline_with_space_x2 = PHP_EOL . '    ' . '   ';
    132134                }
    133135
    134136                // dynamic css
    135                 $scrolltotop_dynamic_css = '';
    136                 $scrolltotop_dynamic_css_array = array();
    137                 $scrolltotop_transition_array = array();
     137                $scrolltotop_dynamic_css        = '';
     138                $scrolltotop_dynamic_css_array  = array();
     139                $scrolltotop_transition_array   = array();
    138140                $scrolltotop_notransition_array = array();
    139141
    140142                // .scrolltotop
    141                 if( (int)$settings['stt_mode'] === 0 ) {
    142            
     143                if ( (int) $settings['stt_mode'] === 0 ) {
     144
    143145                    $scrolltotop_dynamic_css_array['.stt-bar'] = array(
    144146                        'background' => scrolltotop_background_color_format( $settings['stt_bar_background_color'] ),
    145                         'color' => $settings['stt_bar_color'],
    146                         'top' => ( ! empty( (int)$settings['stt_bar_top_offset'] ) ? (int)$settings['stt_bar_top_offset'] . 'px' : 0 )
    147                     );
    148                    
    149                     $scrolltotop_dynamic_css_array['.stt-bar'][( (int)$settings['stt_bar_position'] == 0 ? 'left' : 'right' ) ] = ( $settings['stt_bar_horizontal_offset'] ? (int)$settings['stt_bar_horizontal_offset'] . 'px' : 0 );
    150                    
    151                     if( ! empty( (int)$settings['stt_bar_width'] ) && empty( (int)$settings['stt_bar_sticky'] ) ) {
    152                         $scrolltotop_dynamic_css_array['.stt-bar']['width'] = (int)$settings['stt_bar_width'] . 'px';
    153                     }
    154                    
    155                     if( ! empty( (int)$settings['stt_bar_hover_transition'] ) ) {
    156                         $scrolltotop_transition_array[] = 'background ' . ( (int)$settings['stt_bar_hover_transition'] ) . 'ms ease-in-out';
    157                         $scrolltotop_notransition_array[] = 'background ' . ( (int)$settings['stt_bar_hover_transition'] ) . 'ms ease-in-out';
     147                        'color'      => $settings['stt_bar_color'],
     148                        'top'        => ( ! empty( (int) $settings['stt_bar_top_offset'] ) ? (int) $settings['stt_bar_top_offset'] . 'px' : 0 )
     149                    );
     150
     151                    $scrolltotop_dynamic_css_array['.stt-bar'][ ( (int) $settings['stt_bar_position'] === 0 ? 'left' : 'right' ) ] = ( $settings['stt_bar_horizontal_offset'] ? (int) $settings['stt_bar_horizontal_offset'] . 'px' : 0 );
     152
     153                    if ( ! empty( (int) $settings['stt_bar_width'] ) && empty( (int) $settings['stt_bar_sticky'] ) ) {
     154                        $scrolltotop_dynamic_css_array['.stt-bar']['width'] = (int) $settings['stt_bar_width'] . 'px';
     155                    }
     156
     157                    if ( ! empty( (int) $settings['stt_bar_hover_transition'] ) ) {
     158                        $scrolltotop_transition_array[]   = 'background ' . ( (int) $settings['stt_bar_hover_transition'] ) . 'ms ease-in-out';
     159                        $scrolltotop_notransition_array[] = 'background ' . ( (int) $settings['stt_bar_hover_transition'] ) . 'ms ease-in-out';
    158160                    }
    159161
    160162                    // .scrolltotop:hover
    161                     if( $settings['stt_bar_background_color'] != $settings['stt_bar_background_color_on_hover'] ) $scrolltotop_dynamic_css_array['.stt-bar:hover'] = array(
    162                         'background' => scrolltotop_background_color_format( $settings['stt_bar_background_color_on_hover'] )
    163                     );
     163                    if ( $settings['stt_bar_background_color'] !== $settings['stt_bar_background_color_on_hover'] ) {
     164                        $scrolltotop_dynamic_css_array['.stt-bar:hover'] = array(
     165                            'background' => scrolltotop_background_color_format( $settings['stt_bar_background_color_on_hover'] )
     166                        );
     167                    }
    164168
    165169                    // .scrolltotop b
    166170                    $scrolltotop_dynamic_css_array['.stt-bar b'] = array();
    167                     if( (int)$settings['stt_bar_element_position'] == 0 ) {
    168                         $scrolltotop_dynamic_css_array['.stt-bar b']['top'] = (int)$settings['stt_bar_text_offset'] . 'px';
     171                    if ( (int) $settings['stt_bar_element_position'] === 0 ) {
     172                        $scrolltotop_dynamic_css_array['.stt-bar b']['top'] = (int) $settings['stt_bar_text_offset'] . 'px';
    169173                    } else {
    170                         $scrolltotop_dynamic_css_array['.stt-bar b']['bottom'] = (int)$settings['stt_bar_text_offset'] . 'px';
     174                        $scrolltotop_dynamic_css_array['.stt-bar b']['bottom'] = (int) $settings['stt_bar_text_offset'] . 'px';
    171175                    }
    172176
     
    176180                    );
    177181
    178                     if( (int)$settings['stt_bar_arrow_rotate_speed'] != 0 ) {
    179                         $scrolltotop_dynamic_css_array['.stt-bar i:before']['-webkit-transition'] = 'all ' . ( (int)$settings['stt_bar_arrow_rotate_speed'] ) . 'ms ease-in';
    180                         $scrolltotop_dynamic_css_array['.stt-bar i:before']['-o-transition'] = 'all ' . ( (int)$settings['stt_bar_arrow_rotate_speed'] ) . 'ms ease-in';
    181                         $scrolltotop_dynamic_css_array['.stt-bar i:before']['transition'] = 'all ' . ( (int)$settings['stt_bar_arrow_rotate_speed'] ) . 'ms ease-in';
     182                    if ( (int) $settings['stt_bar_arrow_rotate_speed'] !== 0 ) {
     183                        $scrolltotop_dynamic_css_array['.stt-bar i:before']['-webkit-transition'] = 'all ' . ( (int) $settings['stt_bar_arrow_rotate_speed'] ) . 'ms ease-in';
     184                        $scrolltotop_dynamic_css_array['.stt-bar i:before']['-o-transition']      = 'all ' . ( (int) $settings['stt_bar_arrow_rotate_speed'] ) . 'ms ease-in';
     185                        $scrolltotop_dynamic_css_array['.stt-bar i:before']['transition']         = 'all ' . ( (int) $settings['stt_bar_arrow_rotate_speed'] ) . 'ms ease-in';
    182186                    }
    183187
    184188                    // .scrolltotop i
    185189                    $scrolltotop_dynamic_css_array['.stt-bar i'] = array(
    186                         'display' => ( (int)$settings['stt_bar_caption_position'] == 0 ? 'block' : 'inline' ) ,
    187                         'font-size' => (int)$settings['stt_bar_arrow_size'] . 'px',
    188                         'line-height' => (int)$settings['stt_bar_arrow_size'] . 'px'
     190                        'display'     => ( (int) $settings['stt_bar_caption_position'] === 0 ? 'block' : 'inline' ),
     191                        'font-size'   => (int) $settings['stt_bar_arrow_size'] . 'px',
     192                        'line-height' => (int) $settings['stt_bar_arrow_size'] . 'px'
    189193                    );
    190194
    191195                    // .scrolltotop u
    192196                    $scrolltotop_dynamic_css_array['.stt-bar u'] = array(
    193                         'display' => ( (int)$settings['stt_bar_caption_position'] == 0 ? 'block' : 'inline' ) ,
    194                         'font-family' => ( $settings['stt_bar_caption_font'] ? $settings['stt_bar_caption_font'] : '"Arial",' . $extra_space . 'sans-serif' ) ,
    195                         'font-size' => (int)$settings['stt_bar_caption_size'] . 'px',
    196                         'margin-' . ( (int)$settings['stt_bar_caption_position'] == 0 ? 'top' : 'left' ) => ( (int)$settings['stt_bar_text_distance'] ? (int)$settings['stt_bar_text_distance'] . 'px' : 0 )
     197                        'display'                                                                         => ( (int) $settings['stt_bar_caption_position'] === 0 ? 'block' : 'inline' ),
     198                        'font-family'                                                                     => ( $settings['stt_bar_caption_font'] ?: '"Arial",' . $extra_space . 'sans-serif' ),
     199                        'font-size'                                                                       => (int) $settings['stt_bar_caption_size'] . 'px',
     200                        'margin-' . ( (int) $settings['stt_bar_caption_position'] === 0 ? 'top' : 'left' ) => ( (int) $settings['stt_bar_text_distance'] ? (int) $settings['stt_bar_text_distance'] . 'px' : 0 )
    197201                    );
    198202
    199203                    // visible opacity
    200204                    $scrolltotop_dynamic_css_array['.stt-bar.stt-visible'] = array(
    201                         'opacity' => ( (int)$settings['stt_bar_opacity'] / 100 ) ,
     205                        'opacity' => ( (int) $settings['stt_bar_opacity'] / 100 ),
    202206                    );
    203207
    204208                    // animation transition
    205                     array_push( $scrolltotop_transition_array, 'opacity ' . (int)$settings['stt_bar_fade_duration'] . 'ms ease-in-out', 'visibility ' . (int)$settings['stt_bar_fade_duration'] . 'ms ease-in-out' );
     209                    array_push( $scrolltotop_transition_array, 'opacity ' . (int) $settings['stt_bar_fade_duration'] . 'ms ease-in-out', 'visibility ' . (int) $settings['stt_bar_fade_duration'] . 'ms ease-in-out' );
    206210                    array_push( $scrolltotop_notransition_array, 'opacity 0s', 'visibility 0s' );
    207211
    208212                    // make smaller
    209                     if( ! empty( (int)$settings['stt_bar_make_smaller_screen'] ) ) {
    210                         $bar_smaller_key = '@media only screen and (max-width:' . (int)$settings['stt_bar_make_smaller_screen'] . 'px)';
    211 
    212                         $scrolltotop_dynamic_css_array[$bar_smaller_key] = array(
     213                    if ( ! empty( (int) $settings['stt_bar_make_smaller_screen'] ) ) {
     214                        $bar_smaller_key = '@media only screen and (max-width:' . (int) $settings['stt_bar_make_smaller_screen'] . 'px)';
     215
     216                        $scrolltotop_dynamic_css_array[ $bar_smaller_key ] = array(
    213217                            'scrolltotop.stt-bar u' => array(
    214218                                'display' => 'none'
     
    216220                        );
    217221
    218                         if( empty( (int)$settings['stt_bar_sticky'] ) && ! empty( (int)$settings['stt_bar_make_smaller_width'] ) ) $scrolltotop_dynamic_css_array[$bar_smaller_key]['.stt-bar']['width'] = (int)$settings['stt_bar_make_smaller_width'] . 'px';
     222                        if ( empty( (int) $settings['stt_bar_sticky'] ) && ! empty( (int) $settings['stt_bar_make_smaller_width'] ) ) {
     223                            $scrolltotop_dynamic_css_array[ $bar_smaller_key ]['.stt-bar']['width'] = (int) $settings['stt_bar_make_smaller_width'] . 'px';
     224                        }
    219225                    }
    220226
    221227                    // hide
    222                     if( ! empty( (int)$settings['stt_bar_hide'] ) ) {
    223                
    224                         $selector = '@media only screen and (max-width:' . (int)$settings['stt_bar_hide'] . 'px)';
    225                         $scrolltotop_dynamic_css_array[$selector] = array();
    226                        
    227                         if( (int)$settings['stt_bar_transform_to_button'] === 1 ) {
    228                             $scrolltotop_dynamic_css_array[$selector]['.stt-bar'] = array(
    229                                 'width' => (int)$settings['stt_bar_transformed_size'] . 'px',
    230                                 'height' => (int)$settings['stt_bar_transformed_size'] . 'px',
    231                                 'top' => ( (int)$settings['stt_bar_transformed_vertical_position'] === 0 ? ( ! empty( (int)$settings['stt_bar_transformed_vertical_offset'] ) ? (int)$settings['stt_bar_transformed_vertical_offset'] . 'px' : 0 ) : 'auto' ),
    232                                 'bottom' => ( (int)$settings['stt_bar_transformed_vertical_position'] === 1 ? ( ! empty( (int)$settings['stt_bar_transformed_vertical_offset'] ) ? (int)$settings['stt_bar_transformed_vertical_offset'] . 'px' : 0 ) : 'auto' ),
    233                                 'left' => ( (int)$settings['stt_bar_transformed_horizontal_position'] === 0 ? ( ! empty( (int)$settings['stt_bar_transformed_horizontal_offset'] ) ? (int)$settings['stt_bar_transformed_horizontal_offset'] . 'px' : 0 ) : 'auto' ),
    234                                 'right' => ( (int)$settings['stt_bar_transformed_horizontal_position'] === 1 ? ( ! empty( (int)$settings['stt_bar_transformed_horizontal_offset'] ) ? (int)$settings['stt_bar_transformed_horizontal_offset'] . 'px' : 0 ) : 'auto' )
    235                             );
    236                            
    237                             if( ! empty( $settings['stt_bar_transformed_border_radius'] ) ) {
    238                                 $scrolltotop_dynamic_css_array[$selector]['.stt-bar']['border-radius'] = is_numeric( substr( $settings['stt_bar_transformed_border_radius'], -1 ) ) ? (int)$settings['stt_bar_transformed_border_radius'] . 'px' : $settings['stt_bar_transformed_border_radius'];
     228                    if ( ! empty( (int) $settings['stt_bar_hide'] ) ) {
     229
     230                        $selector                                   = '@media only screen and (max-width:' . (int) $settings['stt_bar_hide'] . 'px)';
     231                        $scrolltotop_dynamic_css_array[ $selector ] = array();
     232
     233                        if ( (int) $settings['stt_bar_transform_to_button'] === 1 ) {
     234                            $scrolltotop_dynamic_css_array[ $selector ]['.stt-bar'] = array(
     235                                'width'  => (int) $settings['stt_bar_transformed_size'] . 'px',
     236                                'height' => (int) $settings['stt_bar_transformed_size'] . 'px',
     237                                'top'    => ( (int) $settings['stt_bar_transformed_vertical_position'] === 0 ? ( ! empty( (int) $settings['stt_bar_transformed_vertical_offset'] ) ? (int) $settings['stt_bar_transformed_vertical_offset'] . 'px' : 0 ) : 'auto' ),
     238                                'bottom' => ( (int) $settings['stt_bar_transformed_vertical_position'] === 1 ? ( ! empty( (int) $settings['stt_bar_transformed_vertical_offset'] ) ? (int) $settings['stt_bar_transformed_vertical_offset'] . 'px' : 0 ) : 'auto' ),
     239                                'left'   => ( (int) $settings['stt_bar_transformed_horizontal_position'] === 0 ? ( ! empty( (int) $settings['stt_bar_transformed_horizontal_offset'] ) ? (int) $settings['stt_bar_transformed_horizontal_offset'] . 'px' : 0 ) : 'auto' ),
     240                                'right'  => ( (int) $settings['stt_bar_transformed_horizontal_position'] === 1 ? ( ! empty( (int) $settings['stt_bar_transformed_horizontal_offset'] ) ? (int) $settings['stt_bar_transformed_horizontal_offset'] . 'px' : 0 ) : 'auto' )
     241                            );
     242
     243                            if ( ! empty( $settings['stt_bar_transformed_border_radius'] ) ) {
     244                                $scrolltotop_dynamic_css_array[ $selector ]['.stt-bar']['border-radius'] = is_numeric( substr( $settings['stt_bar_transformed_border_radius'], - 1 ) ) ? (int) $settings['stt_bar_transformed_border_radius'] . 'px' : $settings['stt_bar_transformed_border_radius'];
    239245                            }
    240                            
    241                             $scrolltotop_dynamic_css_array[$selector]['.stt-bar b'] = array(
    242                                 ( (int)$settings['stt_bar_element_position'] == 0 ? 'top' : 'bottom' ) => 'auto', 'position' => 'relative'
    243                             );
    244                            
    245                             $scrolltotop_dynamic_css_array[$selector]['.stt-bar i'] = array(
    246                                 'line-height' => (int)$settings['stt_bar_transformed_size'] . 'px'
    247                             );
    248                            
    249                             $scrolltotop_dynamic_css_array[$selector]['.stt-bar u'] = array(
     246
     247                            $scrolltotop_dynamic_css_array[ $selector ]['.stt-bar b'] = array(
     248                                ( (int) $settings['stt_bar_element_position'] == 0 ? 'top' : 'bottom' ) => 'auto',
     249                                'position'                                                              => 'relative'
     250                            );
     251
     252                            $scrolltotop_dynamic_css_array[ $selector ]['.stt-bar i'] = array(
     253                                'line-height' => (int) $settings['stt_bar_transformed_size'] . 'px'
     254                            );
     255
     256                            $scrolltotop_dynamic_css_array[ $selector ]['.stt-bar u'] = array(
    250257                                'display' => 'none !important'
    251258                            );
    252259                        } else {
    253                             $scrolltotop_dynamic_css_array[$selector]['.stt-bar'] = array(
     260                            $scrolltotop_dynamic_css_array[ $selector ]['.stt-bar'] = array(
    254261                                'display' => 'none !important'
    255262                            );
     
    258265
    259266                    // advanced background
    260                     if( ! empty( (int)$settings['stt_advanced_background_width'] ) || ! empty( (int)$settings['stt_advanced_background_sticky'] ) ) {
     267                    if ( ! empty( (int) $settings['stt_advanced_background_width'] ) || ! empty( (int) $settings['stt_advanced_background_sticky'] ) ) {
    261268                        $scrolltotop_dynamic_css_array['.stt-bar .stt-advanced-bg'] = array(
    262                             ( (int)$settings['stt_bar_position'] === 0 ? 'left' : 'right' ) => ( ! empty( (int)$settings['stt_bar_horizontal_offset'] ) ? (int)$settings['stt_bar_horizontal_offset'] . 'px' : 0 )
    263                         );
    264 
    265                         if( ! empty( (int)$settings['stt_advanced_background_width'] ) && empty( (int)$settings['stt_advanced_background_sticky'] ) ) {
    266                             $scrolltotop_dynamic_css_array['.stt-bar .stt-advanced-bg']['width'] = (int)$settings['stt_advanced_background_width'] . 'px';
    267                         }
    268                     }
    269                 } elseif( (int)$settings['stt_mode'] === 1 ) {
     269                            ( (int) $settings['stt_bar_position'] === 0 ? 'left' : 'right' ) => ( ! empty( (int) $settings['stt_bar_horizontal_offset'] ) ? (int) $settings['stt_bar_horizontal_offset'] . 'px' : 0 )
     270                        );
     271
     272                        if ( ! empty( (int) $settings['stt_advanced_background_width'] ) && empty( (int) $settings['stt_advanced_background_sticky'] ) ) {
     273                            $scrolltotop_dynamic_css_array['.stt-bar .stt-advanced-bg']['width'] = (int) $settings['stt_advanced_background_width'] . 'px';
     274                        }
     275                    }
     276                } elseif ( (int) $settings['stt_mode'] === 1 ) {
    270277                    $scrolltotop_dynamic_css_array['.stt-button'] = array(
    271278                        'background' => $settings['stt_button_background_color'],
    272                         'padding' => ( ! empty( (int)$settings['stt_button_padding'] ) ? (int)$settings['stt_button_padding'] . 'px' : 0 ) ,
    273                         'color' => $settings['stt_button_arrow_color'],
    274                         'font-size' => (int)$settings['stt_button_arrow_size'] . 'px'
    275                     );
    276 
    277                     if( ! empty( (int)$settings['stt_button_border_radius'] ) ) {
    278                         $scrolltotop_dynamic_css_array['.stt-button']['border-radius'] = is_numeric( substr( $settings['stt_button_border_radius'], -1 ) ) ? (int)$settings['stt_button_border_radius'] . 'px' : $settings['stt_button_border_radius'];
    279                     }
    280 
    281                     if( (int)$settings['stt_button_position'] === 0 ) {
    282                         $scrolltotop_dynamic_css_array['.stt-button']['left'] = ( ! empty( (int)$settings['stt_button_horizontal_offset'] ) ? (int)$settings['stt_button_horizontal_offset'] . 'px' : 0 );
     279                        'padding'    => ( ! empty( (int) $settings['stt_button_padding'] ) ? (int) $settings['stt_button_padding'] . 'px' : 0 ),
     280                        'color'      => $settings['stt_button_arrow_color'],
     281                        'font-size'  => (int) $settings['stt_button_arrow_size'] . 'px'
     282                    );
     283
     284                    if ( ! empty( (int) $settings['stt_button_border_radius'] ) ) {
     285                        $scrolltotop_dynamic_css_array['.stt-button']['border-radius'] = is_numeric( substr( $settings['stt_button_border_radius'], - 1 ) ) ? (int) $settings['stt_button_border_radius'] . 'px' : $settings['stt_button_border_radius'];
     286                    }
     287
     288                    if ( (int) $settings['stt_button_position'] === 0 ) {
     289                        $scrolltotop_dynamic_css_array['.stt-button']['left'] = ( ! empty( (int) $settings['stt_button_horizontal_offset'] ) ? (int) $settings['stt_button_horizontal_offset'] . 'px' : 0 );
    283290                    } else {
    284                         $scrolltotop_dynamic_css_array['.stt-button']['right'] = ( ! empty( (int)$settings['stt_button_horizontal_offset'] ) ? (int)$settings['stt_button_horizontal_offset'] . 'px' : 0 );
     291                        $scrolltotop_dynamic_css_array['.stt-button']['right'] = ( ! empty( (int) $settings['stt_button_horizontal_offset'] ) ? (int) $settings['stt_button_horizontal_offset'] . 'px' : 0 );
    285292                    }
    286293
     
    290297                    );
    291298
    292                     if( ! empty( (int)$settings['stt_button_hover_transition'] ) ) {
    293                         $scrolltotop_transition_array[] = 'background ' . ( (int)$settings['stt_button_hover_transition'] ) . 'ms ease-in-out';
    294                         $scrolltotop_notransition_array[] = 'background ' . ( (int)$settings['stt_button_hover_transition'] ) . 'ms ease-in-out';
     299                    if ( ! empty( (int) $settings['stt_button_hover_transition'] ) ) {
     300                        $scrolltotop_transition_array[]   = 'background ' . ( (int) $settings['stt_button_hover_transition'] ) . 'ms ease-in-out';
     301                        $scrolltotop_notransition_array[] = 'background ' . ( (int) $settings['stt_button_hover_transition'] ) . 'ms ease-in-out';
    295302                    }
    296303
    297304                    // .scrolltotop:hover
    298                     if( $settings['stt_button_background_color'] != $settings['stt_button_background_color_on_hover'] ) {
     305                    if ( $settings['stt_button_background_color'] !== $settings['stt_button_background_color_on_hover'] ) {
    299306                        $scrolltotop_dynamic_css_array['.stt-button:hover']['background'] = $settings['stt_button_background_color_on_hover'];
    300307                    }
    301308
    302                     if( $settings['stt_button_opacity'] != 100 ) {
     309                    if ( (int) $settings['stt_button_opacity'] !== 100 ) {
    303310                        $scrolltotop_dynamic_css_array['.stt-button:hover']['opacity'] = 1;
    304311                    }
    305312
    306313                    // animation
    307                     if( isset( $settings['stt_button_animation'] ) && (int)$settings['stt_button_animation'] > 0 ) {
    308                         if( (int)$settings['stt_button_animation'] === 1 ) {
    309                             $scrolltotop_dynamic_css_array['.stt-button']['opacity'] = ( (int)$settings['stt_button_opacity'] / 100 );
     314                    if ( isset( $settings['stt_button_animation'] ) && (int) $settings['stt_button_animation'] > 0 ) {
     315                        if ( (int) $settings['stt_button_animation'] === 1 ) {
     316                            $scrolltotop_dynamic_css_array['.stt-button']['opacity'] = ( (int) $settings['stt_button_opacity'] / 100 );
    310317
    311318                            $scrolltotop_dynamic_css_array['.stt-visible'] = array(
    312                                 'bottom' => ( ! empty( (int)$settings['stt_button_vertical_offset'] ) ? (int)$settings['stt_button_vertical_offset'] . 'px' : 0 )
     319                                'bottom' => ( ! empty( (int) $settings['stt_button_vertical_offset'] ) ? (int) $settings['stt_button_vertical_offset'] . 'px' : 0 )
    313320                            );
    314321
    315322                            $scrolltotop_dynamic_css_array['.stt-hidden'] = array(
    316                                 'bottom' => ( (int)$settings['stt_button_vertical_offset'] - 100 ) . 'px'
    317                             );
    318 
    319                             $scrolltotop_transition_array[] = 'bottom ' . (int)$settings['stt_button_animation_speed'] . 'ms ease-in-out';
     323                                'bottom' => ( (int) $settings['stt_button_vertical_offset'] - 100 ) . 'px'
     324                            );
     325
     326                            $scrolltotop_transition_array[]   = 'bottom ' . (int) $settings['stt_button_animation_speed'] . 'ms ease-in-out';
    320327                            $scrolltotop_notransition_array[] = 'bottom 0s';
    321                         } else if( (int)$settings['stt_button_animation'] == 2 ) {
    322                             $scrolltotop_dynamic_css_array['.stt-button']['bottom'] = ( ! empty( (int)$settings['stt_button_vertical_offset'] ) ? (int)$settings['stt_button_vertical_offset'] . 'px' : 0 );
     328                        } else if ( (int) $settings['stt_button_animation'] === 2 ) {
     329                            $scrolltotop_dynamic_css_array['.stt-button']['bottom'] = ( ! empty( (int) $settings['stt_button_vertical_offset'] ) ? (int) $settings['stt_button_vertical_offset'] . 'px' : 0 );
    323330
    324331                            $scrolltotop_dynamic_css_array['.stt-visible'] = array(
    325332                                'visibility' => 'visible',
    326                                 'opacity' => ( (int)$settings['stt_button_opacity'] / 100 )
     333                                'opacity'    => ( (int) $settings['stt_button_opacity'] / 100 )
    327334                            );
    328335
    329336                            $scrolltotop_dynamic_css_array['.stt-hidden'] = array(
    330337                                'visibility' => 'hidden',
    331                                 'opacity' => '0 !important'
    332                             );
    333 
    334                             array_push( $scrolltotop_transition_array, 'opacity ' . (int)$settings['stt_button_animation_speed'] . 'ms ease-in-out', 'visibility ' . (int)$settings['stt_button_animation_speed'] . 'ms ease-in-out' );
     338                                'opacity'    => '0 !important'
     339                            );
     340
     341                            array_push( $scrolltotop_transition_array, 'opacity ' . (int) $settings['stt_button_animation_speed'] . 'ms ease-in-out', 'visibility ' . (int) $settings['stt_button_animation_speed'] . 'ms ease-in-out' );
    335342
    336343                            array_push( $scrolltotop_notransition_array, 'opacity 0s', 'visibility 0s' );
    337344                        }
    338345                    } else {
    339                         $scrolltotop_dynamic_css_array['.stt-button']['bottom'] = ( ! empty( (int)$settings['stt_button_vertical_offset'] ) ? (int)$settings['stt_button_vertical_offset'] . 'px' : 0 );
     346                        $scrolltotop_dynamic_css_array['.stt-button']['bottom'] = ( ! empty( (int) $settings['stt_button_vertical_offset'] ) ? (int) $settings['stt_button_vertical_offset'] . 'px' : 0 );
    340347
    341348                        $scrolltotop_dynamic_css_array['.stt-visible'] = array(
     
    349356
    350357                    // make smaller
    351                     if( ! empty( (int)$settings['stt_button_make_smaller_screen'] ) && ! empty( (int)$settings['stt_button_make_smaller_padding'] ) || ! empty( (int)$settings['stt_button_make_smaller_arrow_size'] ) ) {
    352                         $button_smaller_key = '@media only screen and (max-width:' . (int)$settings['stt_button_make_smaller_screen'] . 'px)';
    353 
    354                         if( ! empty( (int)$settings['stt_button_make_smaller_padding'] ) ) $scrolltotop_dynamic_css_array[$button_smaller_key]['.stt-button']['padding'] = ( (int)$settings['stt_button_make_smaller_padding'] > 0 ? (int)$settings['stt_button_make_smaller_padding'] . 'px' : 0 );
    355 
    356                         if( ! empty( (int)$settings['stt_button_make_smaller_arrow_size'] ) ) $scrolltotop_dynamic_css_array[$button_smaller_key]['.stt-button']['font-size'] = ( (int)$settings['stt_button_make_smaller_arrow_size'] > 0 ? (int)$settings['stt_button_make_smaller_arrow_size'] . 'px' : 0 );
     358                    if ( ( ! empty( (int) $settings['stt_button_make_smaller_screen'] ) && ! empty( (int) $settings['stt_button_make_smaller_padding'] ) ) || ! empty( (int) $settings['stt_button_make_smaller_arrow_size'] ) ) {
     359                        $button_smaller_key = '@media only screen and (max-width:' . (int) $settings['stt_button_make_smaller_screen'] . 'px)';
     360
     361                        if ( ! empty( (int) $settings['stt_button_make_smaller_padding'] ) ) {
     362                            $scrolltotop_dynamic_css_array[ $button_smaller_key ]['.stt-button']['padding'] = ( (int) $settings['stt_button_make_smaller_padding'] > 0 ? (int) $settings['stt_button_make_smaller_padding'] . 'px' : 0 );
     363                        }
     364
     365                        if ( ! empty( (int) $settings['stt_button_make_smaller_arrow_size'] ) ) {
     366                            $scrolltotop_dynamic_css_array[ $button_smaller_key ]['.stt-button']['font-size'] = ( (int) $settings['stt_button_make_smaller_arrow_size'] > 0 ? (int) $settings['stt_button_make_smaller_arrow_size'] . 'px' : 0 );
     367                        }
    357368                    }
    358369
    359370                    // hide
    360                     if( ! empty( (int)$settings['stt_button_hide'] ) ) {
    361                         $scrolltotop_dynamic_css_array['@media only screen and (max-width:' . (int)$settings['stt_button_hide'] . 'px)'] = array(
     371                    if ( ! empty( (int) $settings['stt_button_hide'] ) ) {
     372                        $scrolltotop_dynamic_css_array[ '@media only screen and (max-width:' . (int) $settings['stt_button_hide'] . 'px)' ] = array(
    362373                            'scrolltotop.stt-button' => array(
    363374                                'display' => 'none !important'
     
    367378
    368379                    // advanced background
    369                     if( ! empty( (int)$settings['stt_advanced_background_width'] ) || ! empty( (int)$settings['stt_advanced_background_sticky'] ) ) {
     380                    if ( ! empty( (int) $settings['stt_advanced_background_width'] ) || ! empty( (int) $settings['stt_advanced_background_sticky'] ) ) {
    370381                        $scrolltotop_dynamic_css_array['.stt-button .stt-advanced-bg'] = array(
    371                             ( (int)$settings['stt_button_position'] === 0 ? 'left' : 'right' ) => 0
    372                         );
    373 
    374                         if( ! empty( (int)$settings['stt_advanced_background_width'] ) && empty( (int)$settings['stt_advanced_background_sticky'] ) ) {
    375                             $scrolltotop_dynamic_css_array['.stt-button .stt-advanced-bg']['width'] = (int)$settings['stt_advanced_background_width'] . 'px';
     382                            ( (int) $settings['stt_button_position'] === 0 ? 'left' : 'right' ) => 0
     383                        );
     384
     385                        if ( ! empty( (int) $settings['stt_advanced_background_width'] ) && empty( (int) $settings['stt_advanced_background_sticky'] ) ) {
     386                            $scrolltotop_dynamic_css_array['.stt-button .stt-advanced-bg']['width'] = (int) $settings['stt_advanced_background_width'] . 'px';
    376387                        }
    377388                    }
     
    379390
    380391                // transition
    381                 if( ! empty( $scrolltotop_transition_array ) ) {
    382                     $transition = implode( ',' . $extra_space, $scrolltotop_transition_array );
     392                if ( ! empty( $scrolltotop_transition_array ) ) {
     393                    $transition                                              = implode( ',' . $extra_space, $scrolltotop_transition_array );
    383394                    $scrolltotop_dynamic_css_array['']['-webkit-transition'] = $transition;
    384                     $scrolltotop_dynamic_css_array['']['-o-transition'] = $transition;
    385                     $scrolltotop_dynamic_css_array['']['transition'] = $transition;
    386                 }
    387 
    388                 if( ! empty( $scrolltotop_notransition_array ) ) {
    389                     $transition = implode( ',' . $extra_space, $scrolltotop_notransition_array );
     395                    $scrolltotop_dynamic_css_array['']['-o-transition']      = $transition;
     396                    $scrolltotop_dynamic_css_array['']['transition']         = $transition;
     397                }
     398
     399                if ( ! empty( $scrolltotop_notransition_array ) ) {
     400                    $transition                                                               = implode( ',' . $extra_space, $scrolltotop_notransition_array );
    390401                    $scrolltotop_dynamic_css_array['.stt-notransition']['-webkit-transition'] = $transition;
    391                     $scrolltotop_dynamic_css_array['.stt-notransition']['-o-transition'] = $transition;
    392                     $scrolltotop_dynamic_css_array['.stt-notransition']['transition'] = $transition;
     402                    $scrolltotop_dynamic_css_array['.stt-notransition']['-o-transition']      = $transition;
     403                    $scrolltotop_dynamic_css_array['.stt-notransition']['transition']         = $transition;
    393404                }
    394405
    395406                // advanced bg hide
    396                 if( ! empty( (int)$settings['stt_advanced_background_width'] ) || (int)$settings['stt_advanced_background_sticky'] && ! empty( (int)$settings['stt_advanced_background_hide'] ) ) {
    397                     $scrolltotop_dynamic_css_array['@media only screen and (max-width:' . (int)$settings['stt_advanced_background_hide'] . 'px)']['scrolltotop .stt-advanced-bg'] = array(
     407                if ( ! empty( (int) $settings['stt_advanced_background_width'] ) || ( (int) $settings['stt_advanced_background_sticky'] && ! empty( (int) $settings['stt_advanced_background_hide'] ) ) ) {
     408                    $scrolltotop_dynamic_css_array[ '@media only screen and (max-width:' . (int) $settings['stt_advanced_background_hide'] . 'px)' ]['scrolltotop .stt-advanced-bg'] = array(
    398409                        'display' => 'none !important'
    399410                    );
     
    402413                $scrolltotop_dynamic_css_array = apply_filters( 'scrolltotop_dynamic_css', $scrolltotop_dynamic_css_array );
    403414
    404                 foreach( $scrolltotop_dynamic_css_array as $class => $styles ) {
    405                     if( substr( $class, 0, 1 ) !== '@' ) {
     415                foreach ( $scrolltotop_dynamic_css_array as $class => $styles ) {
     416                    if ( substr( $class, 0, 1 ) !== '@' ) {
    406417                        $scrolltotop_dynamic_css .= '#scrollToTop' . $class . $extra_space . '{';
    407418
    408                         foreach( $styles as $style => $value ) {
     419                        foreach ( $styles as $style => $value ) {
    409420                            $scrolltotop_dynamic_css .= $newline_with_space . $style . ':' . $extra_space . $value . ';';
    410421                        }
     
    413424                    } else {
    414425                        $scrolltotop_dynamic_css .= $class . $extra_space . '{';
    415                         foreach( $styles as $style => $value ) {
    416                             $scrolltotop_dynamic_css .= $newline_with_space . '#scrollToTop' .  $style . $extra_space . '{' . $newline_with_space_x2;
    417 
    418                             foreach( $value as $style_class => $style_value ) {
     426                        foreach ( $styles as $style => $value ) {
     427                            $scrolltotop_dynamic_css .= $newline_with_space . '#scrollToTop' . $style . $extra_space . '{' . $newline_with_space_x2;
     428
     429                            foreach ( $value as $style_class => $style_value ) {
    419430                                $scrolltotop_dynamic_css .= $style_class . ':' . $extra_space . $style_value . ';';
    420431                            }
     
    430441
    431442                // user custom css
    432                 if( ! empty( $settings['stt_custom_css'] ) && apply_filters( 'stt_custom_css', true ) ) {
     443                if ( ! empty( $settings['stt_custom_css'] ) && apply_filters( 'stt_custom_css', true ) ) {
    433444                    $custom_css = $settings['stt_custom_css'];
    434445
     
    436447                    $minify_custom_css = apply_filters( 'scrolltotop_minify_custom_css', true );
    437448
    438                     if( $minify_css && $minify_custom_css ) {
     449                    if ( $minify_css && $minify_custom_css ) {
    439450                        $custom_css = str_replace( array(
    440451                            "\n",
    441452                            "\r"
    442                         ) , '', $custom_css );
     453                        ), '', $custom_css );
    443454                        $custom_css = preg_replace( '!\s+!', ' ', $custom_css );
    444455                        $custom_css = str_replace( array(
     
    447458                            '{ ',
    448459                            '; '
    449                         ) , array(
     460                        ), array(
    450461                            '{',
    451462                            '}',
    452463                            '{',
    453464                            ';'
    454                         ) , $custom_css );
    455                     }
    456 
    457                     if( isset( $custom_css ) ) $scrolltotop_dynamic_css .= $custom_css;
    458                 }
    459                
     465                        ), $custom_css );
     466                    }
     467
     468                    if ( isset( $custom_css ) ) {
     469                        $scrolltotop_dynamic_css .= $custom_css;
     470                    }
     471                }
     472
    460473                set_transient( 'scrolltotop_dynamic_css', $scrolltotop_dynamic_css );
    461474            }
     
    463476            wp_add_inline_style( 'scrolltotop', $scrolltotop_dynamic_css );
    464477        }
    465     }
     478    }
    466479}
    467480
    468481function scrolltotop_background_color_format( $color = '' ) {
    469     if( ! $color || strpos( $color, ',0 )' ) ) {
     482    if ( ! $color || strpos( $color, ',0 )' ) ) {
    470483        $color = 'transparent';
    471484    }
    472    
     485
    473486    return $color;
    474487}
     
    477490function scrolltotop_container() {
    478491    $container = '';
    479    
     492
    480493    // plugin URL
    481494    $show_plugin_link = apply_filters( 'scrolltotop_link_output', true );
    482    
     495
    483496    // scroll to top container
    484     $settings = scrolltotop_get_plugin_settings();
    485    
    486     if( $show_plugin_link ) {
     497    $settings = scrolltotop_get_plugin_settings();
     498
     499    if ( $show_plugin_link ) {
    487500        global $global_scrolltotop_version;
    488        
    489         $container .= PHP_EOL . '<!-- ' . sprintf( esc_html__( 'Do you want the same scroll up %s on your WordPress blog? This site uses free scrollToTop plugin', 'scrolltotop' ), ( (int)$settings['stt_mode'] === 0 ? esc_html__( 'bar', 'scrolltotop' ) : esc_html__( 'button', 'scrolltotop' ) ) ) . ' v' . $global_scrolltotop_version . ' - https://wordpress.org/plugins/scrolltotop/ -->' . PHP_EOL;
    490     }
    491 
    492     $container .= '<div id="scrollToTop" class="scrolltotop stt-' . ( (int)$settings['stt_mode'] === 0 ? 'bar' : 'button' ) . (is_admin_bar_showing() ? ' stt-admin-bar' : '' ) . ( (int)$settings['stt_mode'] == 0 && (int)$settings['stt_bar_animation_on_load'] === 1 || (int)$settings['stt_mode'] === 1 && (int)$settings['stt_button_animation_on_load'] === 1 ? ' stt-notransition' : '' ) . ' stt-hidden">' . ( (int)$settings['stt_mode'] == 0 ? '<b>' : '' ) . '<i class="icon-up"></i>' . ( $settings['stt_bar_text'] && (int)$settings['stt_mode'] == 0 ? '<u>' . $settings['stt_bar_text'] . '</u>' : '' ) . ( (int)$settings['stt_mode'] == 0 ? '</b>' : '' ) . ( ! empty( (int)$settings['stt_advanced_background_width'] ) || (int)$settings['stt_advanced_background_sticky'] ? '<div class="stt-advanced-bg"></div>' : '' ) . '</div>' . PHP_EOL;
    493 
    494     echo apply_filters( 'scrolltotop_container_output', $container );
    495    
     501
     502        $container .= PHP_EOL . '<!-- ' . sprintf( esc_html__( 'Do you want the same scroll up %s on your WordPress site? This site uses free scrollToTop plugin', 'scrolltotop' ), ( (int) $settings['stt_mode'] === 0 ? esc_html__( 'bar', 'scrolltotop' ) : esc_html__( 'button', 'scrolltotop' ) ) ) . ' v' . $global_scrolltotop_version . ' - https://wordpress.org/plugins/scrolltotop/ -->' . PHP_EOL;
     503    }
     504
     505    $container .= '<div id="scrollToTop" class="scrolltotop stt-' . ( (int) $settings['stt_mode'] === 0 ? 'bar' : 'button' ) . ( is_admin_bar_showing() ? ' stt-admin-bar' : '' ) . ( ( (int) $settings['stt_mode'] === 0 && (int) $settings['stt_bar_animation_on_load'] === 1 ) || ( (int) $settings['stt_mode'] === 1 && (int) $settings['stt_button_animation_on_load'] === 1 ) ? ' stt-notransition' : '' ) . ' stt-hidden">' . ( (int) $settings['stt_mode'] === 0 ? '<b>' : '' ) . '<i class="icon-up"></i>' . ( $settings['stt_bar_text'] && (int) $settings['stt_mode'] === 0 ? '<u>' . $settings['stt_bar_text'] . '</u>' : '' ) . ( (int) $settings['stt_mode'] === 0 ? '</b>' : '' ) . ( ! empty( (int) $settings['stt_advanced_background_width'] ) || (int) $settings['stt_advanced_background_sticky'] ? '<div class="stt-advanced-bg"></div>' : '' ) . '</div>' . PHP_EOL;
     506
     507    echo apply_filters( 'scrolltotop_container_output', $container );
     508
    496509}
    497510
    498511add_filter( 'script_loader_tag', 'scrolltotop_async_load', 10, 2 );
    499512function scrolltotop_async_load( $tag, $handle ) {
    500     $settings = scrolltotop_get_plugin_settings( 'stt_script_loading' );
    501 
    502     if( ! empty( $settings ) && $handle == 'scrolltotop' && ! is_admin() ) {
    503         if( $settings == 1 ) {
    504             return str_replace( ' src', ' async src', $tag );
    505         } elseif( $settings == 2 ) {
    506             return str_replace( ' src', ' defer src', $tag );
    507         }
    508     }
    509 
    510     return $tag;
     513    $settings = scrolltotop_get_plugin_settings( 'stt_script_loading' );
     514
     515    if ( ! empty( $settings ) && $handle === 'scrolltotop' && ! is_admin() ) {
     516        if ( (int) $settings === 1 ) {
     517            return str_replace( ' src', ' async src', $tag );
     518        }
     519
     520        if ( (int) $settings === 2 ) {
     521            return str_replace( ' src', ' defer src', $tag );
     522        }
     523    }
     524
     525    return $tag;
    511526}
    512527
    513528add_filter( 'plugin_action_links_' . $global_scrolltotop_base, 'scrolltotop_settings_link' );
    514529function scrolltotop_settings_link( $links ) {
    515     $page = '<a href="' . admin_url( 'options-general.php?page=scrolltotop_settings_page' ) . '">' . esc_html__( 'Settings', 'scrolltotop' ) . '</a>';
    516 
    517     array_unshift( $links, $page );
    518     return $links;
    519 }
     530    $page = '<a href="' . admin_url( 'options-general.php?page=scrolltotop_settings_page' ) . '">' . esc_html__( 'Settings', 'scrolltotop' ) . '</a>';
     531
     532    array_unshift( $links, $page );
     533
     534    return $links;
     535}
  • scrolltotop/trunk/uninstall.php

    r2188887 r2309158  
    11<?php
    2 if( ! defined( 'WP_UNINSTALL_PLUGIN' ) )
     2
     3if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
    34    exit();
     5}
    46
    57delete_option( 'scrolltotop_plugin_settings' );
Note: See TracChangeset for help on using the changeset viewer.