Changeset 7934
- Timestamp:
- 05/15/08 00:20:27 (6 months ago)
- Files:
-
- trunk/wp-admin/press-this.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/press-this.php
r7933 r7934 88 88 return ''; 89 89 90 $pattern = '/ img.+?src=[\'"]?([^\'" >]+)[\'" >]/';90 $pattern = '/<img[^>]+src=[\'"]([^\'" >]+?)[\'" >]/is'; 91 91 preg_match_all($pattern, $content, $matches); 92 92 if ( empty($matches[1]) ) 93 93 return ''; 94 94 95 /* 95 96 $from_host = parse_url($uri); 96 97 $from_host = $from_host['host']; … … 98 99 $count = count($from_host); 99 100 $from_host = $from_host[$count - 2] . '.' . $from_host[$count - 1]; 101 */ 100 102 101 103 $sources = array(); … … 104 106 continue; 105 107 108 /* 106 109 $img_host = parse_url($src); 107 110 $img_host = $img_host['host']; 108 111 if ( false === strpos($img_host, $from_host) ) 109 112 continue; 113 */ 110 114 111 115 $sources[] = $src; … … 230 234 jQuery(document).ready(function() { 231 235 <?php if ( preg_match("/youtube\.com\/watch/i", $_GET['u']) ) { ?> 232 jQuery('#container > ul').tabs({ selected: 3 , fx: { height: 'toggle', opacity: 'toggle', fxSpeed: 'fast' }});236 jQuery('#container > ul').tabs({ selected: 3 }); 233 237 <?php } elseif ( preg_match("/flickr\.com/i", $_GET['u']) ) { ?> 234 jQuery('#container > ul').tabs({ selected: 1 , fx: { height: 'toggle', opacity: 'toggle', fxSpeed: 'fast' }});238 jQuery('#container > ul').tabs({ selected: 1 }); 235 239 <?php } else { ?> 236 jQuery('#container > ul').tabs( { selected: 1, fx: { height: 'toggle', opacity: 'toggle', fxSpeed: 'fast' } });240 jQuery('#container > ul').tabs(); 237 241 <?php } ?> 238 242 }); … … 255 259 <div id="container"> 256 260 <ul> 257 <li><a href="<?php echo clean_url(add_query_arg('tab', 'text' )) ?>"><span><?php _e('Text/Link') ?></span></a></li>258 <li><a href="<?php echo clean_url(add_query_arg('tab', 'photo' )) ?>"><span><?php _e('Photo') ?></span></a></li>259 <li><a href="<?php echo clean_url(add_query_arg('tab', 'quote' )) ?>"><span><?php _e('Quote') ?></span></a></li>260 <li><a href="<?php echo clean_url(add_query_arg('tab', 'video' )) ?>"><span><?php _e('Video') ?></span></a></li>261 <li><a href="<?php echo clean_url(add_query_arg('tab', 'text', stripslashes($_SERVER['REQUEST_URI']))) ?>"><span><?php _e('Text/Link') ?></span></a></li> 262 <li><a href="<?php echo clean_url(add_query_arg('tab', 'photo', stripslashes($_SERVER['REQUEST_URI']))) ?>"><span><?php _e('Photo') ?></span></a></li> 263 <li><a href="<?php echo clean_url(add_query_arg('tab', 'quote', stripslashes($_SERVER['REQUEST_URI']))) ?>"><span><?php _e('Quote') ?></span></a></li> 264 <li><a href="<?php echo clean_url(add_query_arg('tab', 'video', stripslashes($_SERVER['REQUEST_URI']))) ?>"><span><?php _e('Video') ?></span></a></li> 261 265 </ul> 262 266 </div>
