Plugin Directory

Changeset 1441096


Ignore:
Timestamp:
06/21/2016 04:49:25 PM (10 years ago)
Author:
SivaDu
Message:

update to 0.3.1: fixed some bugs

Location:
anylink/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • anylink/trunk/al_setting.php

    r1439893 r1441096  
    1717            $rules['rules'] = '';
    1818        }
     19        $rules['rules'] = array_map( 'sanitize_text_field', $rules['rules'] );
    1920        update_option( 'anylink_options', $rules );
    2021    }
     
    3940            <?php wp_nonce_field( 'anylink_rules' ); ?>
    4041            <H3><?php _e( 'URL whitelist', 'anylink' ); ?></H3>
    41             <textarea class="large-text code" rows="12" id="anylink_rule" name="anylink_rule"><?php $anylink_rules = get_option( 'anylink_options' );echo implode( "\n", $anylink_rules['rules'] ); ?></textarea>
     42            <textarea class="large-text code" rows="12" id="anylink_rule" name="anylink_rule">
     43<?php
     44                $anylink_rules = get_option( 'anylink_options' );
     45                if( ! empty ( $anylink_rules['rules'] ) )
     46                    echo implode( "\n", $anylink_rules['rules'] );
     47?></textarea>
    4248            <p>
    4349                <ul>
  • anylink/trunk/anyLink.php

    r1439882 r1441096  
    44Plugin URI: http://dudo.org/anylink
    55Description: Anylink is light wordpress plugin. It can generate short urls from a post or comment without you do anything. Most important is anylink does not change your database. That means once you uninstalled this plugin everything will looks like they are before.
    6 Version: 0.3.0
     6Version: 0.3.1
    77Author: dudo
    88Author URI: http://dudo.org/about
  • anylink/trunk/classes/al_filter.php

    r1439859 r1441096  
    5757        //2016.6.19
    5858        if( array_key_exists( $matches['URL'], $U2S ) ) {
    59             foreach( $whiteList as $rule ) {
    60                 if( strpos( al_trim_http( $rule ), al_trim_http( $matches['URL'] ) ) === 0 ){
    61                     $this -> needle = 1;
    62                     return implode( '', $matches );
     59            if( ! empty($whiteList ) ) {
     60                foreach( $whiteList as $rule ) {
     61                    if( strpos( al_trim_http( $matches['URL'] ), al_trim_http( $rule ) ) === 0 ){
     62                        $this -> needle = 1;
     63                        return implode( '', $matches );
     64                    }
     65                    if( $this->needle == 1 )
     66                        break;
    6367                }
    64                 if( $this->needle == 1 )
    65                     break;
    6668            }
    6769            $matches['URL'] = $U2S[$matches['URL']];
  • anylink/trunk/functions.php

    r1439859 r1441096  
    155155        }
    156156        if( (float )$al_option['version'] < 20 ) {
     157
    157158            $al_option['filter-comment'] = 1;
    158159            $al_option['version'] = 20;
     160            update_option( 'anylink_options', $al_option );
     161        }
     162        if( (float)$al_option['version'] < 30 ) {
     163            $al_option['rules'] = '';
     164            $al_option['version'] = 30;
    159165            update_option( 'anylink_options', $al_option );
    160166        }
     
    175181    if( indexOf( 'http:', $url ) )
    176182        $url = substr( $url, 7 );
     183    elseif( indexOf( 'https:', $url ) )
     184        $url = substr( $url, 8 );
    177185    if( indexOf( 'www.', $url ) )
    178186        $url = substr( $url, 4 );
  • anylink/trunk/readme.txt

    r1439859 r1441096  
    55Requires at least: 3.4
    66Tested up to: 4.5.2
    7 Stable tag: 0.3.0
     7Stable tag: 0.3.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4343
    4444== Changelog ==
     45
     46= 0.3.1 =
     47*   修复了上一个版本中一些问题
    4548
    4649= 0.3.0 =
Note: See TracChangeset for help on using the changeset viewer.