Plugin Directory

Changeset 2432926


Ignore:
Timestamp:
12/07/2020 07:51:31 AM (5 years ago)
Author:
tourbillonlabs
Message:

fix persistence issues

Location:
simple-widget-title-links/tags/1.0.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • simple-widget-title-links/tags/1.0.1/README.txt

    r2432922 r2432926  
    55Requires at least: 4.8
    66Tested up to: 5.5
    7 Stable tag: 1.0.0
     7Stable tag: 1.0.1
    88Requires PHP: 7.0
    99License: GPLv2 or later
  • simple-widget-title-links/tags/1.0.1/src/UI/Admin.php

    r2060924 r2432926  
    146146        public static function save_widget_options( $instance, $new_instance ) {
    147147            if ( isset( $new_instance['url'] ) && ! empty( $new_instance['url'] ) ) {
    148                 $instance['url'] = trim(
    149                     strip_tags(
    150                         stripslashes(
    151                             filter_var( $new_instance['url'], FILTER_VALIDATE_URL )
    152                         )
    153                     )
    154                 );
     148                $url = trim(strip_tags(stripslashes($new_instance['url'])));
     149                $url = filter_var($url, FILTER_SANITIZE_URL);
     150                $instance['url'] = $url;
    155151            }
    156             if ( isset( $new_instance['blank'] ) && $new_instance['blank'] === 'on' ) {
    157                 $instance['blank'] = 'on';
    158             } else {
    159                 unset( $instance['blank'] );
    160             }
    161             if ( isset( $new_instance['nofollow'] ) && $new_instance['nofollow'] === 'on' ) {
    162                 $instance['nofollow'] = 'on';
    163             } else {
    164                 unset( $instance['nofollow'] );
    165             }
     152            $instance['blank'] = isset( $new_instance['blank'] );
     153            $instance['nofollow'] = isset( $new_instance['nofollow'] );
    166154
    167155            return $instance;
Note: See TracChangeset for help on using the changeset viewer.