Plugin Directory

Changeset 1835742


Ignore:
Timestamp:
03/07/2018 09:12:01 PM (8 years ago)
Author:
nre
Message:
  • fix: wrong domain cookie
  • add: default values for dialogue text, yes-no-buttons
Location:
cookie-optin-interface
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • cookie-optin-interface/tags/1.0/README.md

    r1835700 r1835742  
    66* Requires at least: 4.9.4
    77* Tested up to: 4.9.4
    8 * Stable tag: 4.9.4
     8* Stable tag: 1.0.2
    99* License: GPLv3 or later
    1010* License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    3131### Changelog
    3232
     33#### 1.0.2
     34* fix: wrong domain cookie
     35* add: default values for dialogue text, yes-no-buttons
     36
     37#### 1.0.1
     38* fatal error when installing plugin because hook-function „add“
     39requires 6 instead of 4 parameters
     40* renamed debug-functions globally
     41* changed short description text
     42
    3343#### 1.0
    3444* first release with all basic features
  • cookie-optin-interface/tags/1.0/README.txt

    r1835717 r1835742  
    55Requires at least: 4.9.4
    66Tested up to: 4.9.4
    7 Stable tag: 1.0.1
     7Stable tag: 1.0.2
    88License: GPLv3 or later
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    3030== Changelog ==
    3131
     32= 1.0.2 =
     33* fix: wrong domain cookie
     34* add: default values for dialogue text, yes-no-buttons
     35
    3236= 1.0.1 =
    3337* fatal error when installing plugin because hook-function „add“
  • cookie-optin-interface/tags/1.0/admin/class-coii-admin.php

    r1835698 r1835742  
    5050    private $version;
    5151
     52        /**
     53         * The default dialogue text
     54         *
     55         * @since   1.0.0
     56         * @access  private
     57         * @var     string      $default_dialogue_text  default dialogue text
     58         */
     59    private $default_dialogue_text = 'Do you want to allow tracking?';
     60
     61        /**
     62         * The default text for the accept button
     63         *
     64         * @since   1.0.0
     65         * @access  private
     66         * @var     string      $default_yes_button_text    default accept button text
     67         */
     68    private $default_yes_button_text = 'yes';
     69
     70        /**
     71         * The The default text for the disallow button
     72         *
     73         * @since   1.0.0
     74         * @access  private
     75         * @var     string      $default_no_button_text     default disallow button text
     76         */
     77    private $default_no_button_text = 'no';
     78
    5279    /**
    5380     * Initialize the class and set its properties.
     
    260287
    261288        $dialogue_text = get_option( $this->option_name . '_dialogue', NULL);
     289       
     290        if ($dialogue_text == '') {
     291       
     292            $dialogue_text = $this->default_dialogue_text;
     293           
     294        }
     295       
    262296        echo '<textarea name="' . $this->option_name . '_dialogue' . '" id="' . $this->option_name . '_dialogue' . '" cols="50" rows="10"> ';
    263297        echo $dialogue_text;
     
    276310        $yes_button_text = get_option( $this->option_name . '_yes_button', NULL);
    277311
     312        if ($yes_button_text == '') {
     313       
     314            $yes_button_text = $this->default_yes_button_text;
     315           
     316        }
     317       
    278318        echo '<input type="text" value="'.$yes_button_text.'"name="' . $this->option_name . '_yes_button' . '" id="' . $this->option_name . '_yes_button' . '"/> ';
    279319    }
     
    289329        $no_button_text = get_option( $this->option_name . '_no_button', NULL);
    290330
     331        if ($no_button_text == '') {
     332       
     333            $no_button_text = $this->default_no_button_text;
     334           
     335        }       
     336
    291337        echo '<input type="text" value="'.$no_button_text.'" name="' . $this->option_name . '_no_button' . '" id="' . $this->option_name . '_no_button' . '"/> ';
    292338
  • cookie-optin-interface/tags/1.0/public/js/coii-public.js

    r1835698 r1835742  
    4444        }
    4545
    46         document.cookie = name+"="+value+expires+"; path=/; domain=development";
     46        document.cookie = name+"="+value+expires+"; path=/;";
    4747    }
    4848
  • cookie-optin-interface/trunk/README.md

    r1835698 r1835742  
    66* Requires at least: 4.9.4
    77* Tested up to: 4.9.4
    8 * Stable tag: 4.9.4
     8* Stable tag: 1.0.2
    99* License: GPLv3 or later
    1010* License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    3131### Changelog
    3232
     33#### 1.0.2
     34* fix: wrong domain cookie
     35* add: default values for dialogue text, yes-no-buttons
     36
     37#### 1.0.1
     38* fatal error when installing plugin because hook-function „add“
     39requires 6 instead of 4 parameters
     40* renamed debug-functions globally
     41* changed short description text
     42
    3343#### 1.0
    3444* first release with all basic features
  • cookie-optin-interface/trunk/README.txt

    r1835701 r1835742  
    55Requires at least: 4.9.4
    66Tested up to: 4.9.4
    7 Stable tag: 1.0
     7Stable tag: 1.0.2
    88License: GPLv3 or later
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    3030== Changelog ==
    3131
     32= 1.0.2 =
     33* fix: wrong domain cookie
     34* add: default values for dialogue text, yes-no-buttons
     35
     36= 1.0.1 =
     37* fatal error when installing plugin because hook-function „add“
     38requires 6 instead of 4 parameters
     39* renamed debug-functions globally
     40* changed short description text
     41
    3242= 1.0 =
    3343* first release with all basic features
  • cookie-optin-interface/trunk/admin/class-coii-admin.php

    r1835698 r1835742  
    5050    private $version;
    5151
     52        /**
     53         * The default dialogue text
     54         *
     55         * @since   1.0.0
     56         * @access  private
     57         * @var     string      $default_dialogue_text  default dialogue text
     58         */
     59    private $default_dialogue_text = 'Do you want to allow tracking?';
     60
     61        /**
     62         * The default text for the accept button
     63         *
     64         * @since   1.0.0
     65         * @access  private
     66         * @var     string      $default_yes_button_text    default accept button text
     67         */
     68    private $default_yes_button_text = 'yes';
     69
     70        /**
     71         * The The default text for the disallow button
     72         *
     73         * @since   1.0.0
     74         * @access  private
     75         * @var     string      $default_no_button_text     default disallow button text
     76         */
     77    private $default_no_button_text = 'no';
     78
    5279    /**
    5380     * Initialize the class and set its properties.
     
    260287
    261288        $dialogue_text = get_option( $this->option_name . '_dialogue', NULL);
     289       
     290        if ($dialogue_text == '') {
     291       
     292            $dialogue_text = $this->default_dialogue_text;
     293           
     294        }
     295       
    262296        echo '<textarea name="' . $this->option_name . '_dialogue' . '" id="' . $this->option_name . '_dialogue' . '" cols="50" rows="10"> ';
    263297        echo $dialogue_text;
     
    276310        $yes_button_text = get_option( $this->option_name . '_yes_button', NULL);
    277311
     312        if ($yes_button_text == '') {
     313       
     314            $yes_button_text = $this->default_yes_button_text;
     315           
     316        }
     317       
    278318        echo '<input type="text" value="'.$yes_button_text.'"name="' . $this->option_name . '_yes_button' . '" id="' . $this->option_name . '_yes_button' . '"/> ';
    279319    }
     
    289329        $no_button_text = get_option( $this->option_name . '_no_button', NULL);
    290330
     331        if ($no_button_text == '') {
     332       
     333            $no_button_text = $this->default_no_button_text;
     334           
     335        }       
     336
    291337        echo '<input type="text" value="'.$no_button_text.'" name="' . $this->option_name . '_no_button' . '" id="' . $this->option_name . '_no_button' . '"/> ';
    292338
  • cookie-optin-interface/trunk/public/js/coii-public.js

    r1835698 r1835742  
    4444        }
    4545
    46         document.cookie = name+"="+value+expires+"; path=/; domain=development";
     46        document.cookie = name+"="+value+expires+"; path=/;";
    4747    }
    4848
Note: See TracChangeset for help on using the changeset viewer.