Changeset 1522660
- Timestamp:
- 10/26/2016 08:26:06 PM (9 years ago)
- Location:
- aitch-ref/trunk
- Files:
-
- 3 edited
-
_plugin.php (modified) (1 diff)
-
index.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
aitch-ref/trunk/_plugin.php
r1502994 r1522660 4 4 Plugin URI: http://wordpress.org/extend/plugins/aitch-ref/ 5 5 Description: href junk. Requires PHP >= 5.3 and Wordpress >= 3.0 6 Version: 0.9. 46 Version: 0.9.5 7 7 Author: postpostmodern, pinecone-dot-io 8 8 Author URI: http://pinecone.io/ -
aitch-ref/trunk/index.php
r1502994 r1522660 60 60 public static function site_url( $url ){ 61 61 if( is_array($url) ){ 62 // this is to fix an issue in 'upload_dir' filter, 63 // $url[error] needs to be a boolean but str_replace casts to string 64 $url2 = str_replace( self::$possible, '', array_filter($url) ); 65 $url2 = array_merge( $url, $url2 ); 66 } else { 67 $url2 = str_replace( self::$possible, '', $url ); 62 return array_map( array(__NAMESPACE__.'\AitchRef', 'site_url'), $url ); 63 } elseif( is_string($url) ){ 64 $url = str_replace( self::$possible, '', $url ); 68 65 } 69 70 return $url 2;66 67 return $url; 71 68 } 72 69 … … 78 75 public static function site_url_absolute( $url ){ 79 76 if( is_array($url) ){ 80 // this is to fix a bug in 'upload_dir' filter, 81 // $url[error] needs to be a boolean but str_replace casts to string 82 $url2 = str_replace( self::$possible, self::$baseurl, array_filter($url) ); 83 $url2 = array_merge( $url, $url2 ); 77 return array_map( array(__NAMESPACE__.'\AitchRef', 'site_url_absolute'), $url ); 84 78 } else { 85 $url 2= str_replace( self::$possible, self::$baseurl, $url );79 $url = str_replace( self::$possible, self::$baseurl, $url ); 86 80 } 87 81 88 return $url 2;82 return $url; 89 83 } 90 84 } -
aitch-ref/trunk/readme.txt
r844729 r1522660 20 20 21 21 == Changelog == 22 = .91 = 23 fixed typo in absolute filter, fix absolute check with offsite https links 24 22 25 = .9 = 23 26 refactor to namespace
Note: See TracChangeset
for help on using the changeset viewer.