Plugin Directory

Changeset 1849152


Ignore:
Timestamp:
03/29/2018 09:37:06 AM (8 years ago)
Author:
veradeveloper
Message:

Wow scroll up V1.2

Location:
wow-scroll-up/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wow-scroll-up/trunk/readme.txt

    r1846971 r1849152  
    3333* Add Image property
    3434
     35= 1.2 =
     36* Add enable property
     37
    3538== Upgrade Notice ==
    3639
    37 = 1.2 =
     40= 1.3 =
    3841* Add animations
    3942
  • wow-scroll-up/trunk/wow-scroll-button.php

    r1846971 r1849152  
    33?>
    44
     5
     6<?php if($wsu_main_option['wsu_button_enable_b'] == '1'){ ?>
    57<div class="wsu-scrollup-bttn <?php if($wsu_main_option['wsu_button_position'] == 'bottom-left'){echo 'left ';} if($wsu_main_option['wsu_button_style'] == 'circle'){echo 'circle';} if(trim($wsu_main_option['wsu_button_mobile']) == '1'){echo ' mobile';} ?>" style="width: <?php echo $wsu_main_option['wsu_width'] . 'px'; ?>; height: <?php echo $wsu_main_option['wsu_height'] . 'px'; ?>; line-height: <?php echo $wsu_main_option['wsu_height'] . 'px'; ?>; background: <?php echo $wsu_main_option['wsu_bg_color']; ?>;">
    68    <div class="wsu-hover" style="background: <?php echo $wsu_main_option['wsu_bg_color_hover']; ?>"></div>
     
    1315    </div>
    1416</div>
     17<?php } ?>
  • wow-scroll-up/trunk/wow-scroll-up.php

    r1847002 r1849152  
    33Plugin Name: Wow scroll up
    44Description: This plugin allows you to easily scroll back to the top of the page.
    5 Version: 1.1
     5Version: 1.2
    66Author: WebArea | Vera Nedvyzhenko
    77Author URI: https://profiles.wordpress.org/veradeveloper/
     
    8989    add_settings_section('wsu_section_effects_st', 'Effects Settings', '', 'wsu_settings_page' );
    9090
     91    add_settings_field('wsu_button_enable_b', 'Enable Button', 'wsu_button_enable_fill', 'wsu_settings_page', 'wsu_section_general_st' );
    9192    add_settings_field('wsu_button_icon_type', 'Button Icon Type', 'wsu_button_icon_type_fill', 'wsu_settings_page', 'wsu_section_general_st' );
    9293
     
    108109
    109110add_action('admin_init', 'wsu_register_settings');
     111
     112function wsu_button_enable_fill(){
     113    $val = get_option('wsu_options')['wsu_button_enable_b'];
     114    ?>
     115    <input type="hidden" name="wsu_options[wsu_button_enable_noval]" value="1">
     116    <div class="wsu-checkbox">
     117        <input type="checkbox" name="wsu_options[wsu_button_enable_b]" value="1"<?php checked( 1 == $val ); ?> />
     118        <label></label>
     119    </div>
     120    <?php
     121}
    110122
    111123function wsu_button_icon_type_fill(){
     
    270282    $wsu_main_option = get_option('wsu_options');
    271283    if(empty($wsu_main_option)){
     284        $wsu_main_option['wsu_button_enable_b'] = 1;
    272285        $wsu_main_option['wsu_button_icon_type'] = 'icon';
    273286        $wsu_main_option['wsu_button_icon'] = 'up-arrow';
     
    289302        if(!array_key_exists('wsu_button_icon_type', $wsu_main_option)){
    290303            $wsu_main_option['wsu_button_icon_type'] = 'icon';
    291             update_option('wsu_options', $wsu_main_option);
    292304        }
     305
     306        if(!array_key_exists('wsu_button_enable_noval', $wsu_main_option)){
     307            $wsu_main_option['wsu_button_enable_b'] = 1;
     308            $wsu_main_option['wsu_button_enable_noval'] = 1;
     309        }
     310        update_option('wsu_options', $wsu_main_option);
    293311    }
    294312}
Note: See TracChangeset for help on using the changeset viewer.