Changeset 1441096
- Timestamp:
- 06/21/2016 04:49:25 PM (10 years ago)
- Location:
- anylink/trunk
- Files:
-
- 5 edited
-
al_setting.php (modified) (2 diffs)
-
anyLink.php (modified) (1 diff)
-
classes/al_filter.php (modified) (1 diff)
-
functions.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
anylink/trunk/al_setting.php
r1439893 r1441096 17 17 $rules['rules'] = ''; 18 18 } 19 $rules['rules'] = array_map( 'sanitize_text_field', $rules['rules'] ); 19 20 update_option( 'anylink_options', $rules ); 20 21 } … … 39 40 <?php wp_nonce_field( 'anylink_rules' ); ?> 40 41 <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> 42 48 <p> 43 49 <ul> -
anylink/trunk/anyLink.php
r1439882 r1441096 4 4 Plugin URI: http://dudo.org/anylink 5 5 Description: 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. 06 Version: 0.3.1 7 7 Author: dudo 8 8 Author URI: http://dudo.org/about -
anylink/trunk/classes/al_filter.php
r1439859 r1441096 57 57 //2016.6.19 58 58 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; 63 67 } 64 if( $this->needle == 1 )65 break;66 68 } 67 69 $matches['URL'] = $U2S[$matches['URL']]; -
anylink/trunk/functions.php
r1439859 r1441096 155 155 } 156 156 if( (float )$al_option['version'] < 20 ) { 157 157 158 $al_option['filter-comment'] = 1; 158 159 $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; 159 165 update_option( 'anylink_options', $al_option ); 160 166 } … … 175 181 if( indexOf( 'http:', $url ) ) 176 182 $url = substr( $url, 7 ); 183 elseif( indexOf( 'https:', $url ) ) 184 $url = substr( $url, 8 ); 177 185 if( indexOf( 'www.', $url ) ) 178 186 $url = substr( $url, 4 ); -
anylink/trunk/readme.txt
r1439859 r1441096 5 5 Requires at least: 3.4 6 6 Tested up to: 4.5.2 7 Stable tag: 0.3. 07 Stable tag: 0.3.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 43 43 44 44 == Changelog == 45 46 = 0.3.1 = 47 * 修复了上一个版本中一些问题 45 48 46 49 = 0.3.0 =
Note: See TracChangeset
for help on using the changeset viewer.