Changeset 31739 for trunk/src/wp-admin/includes/class-wp-press-this.php
- Timestamp:
- 03/11/2015 11:36:23 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-press-this.php
r31737 r31739 383 383 // See mathtag.com and https://www.quantcast.com/how-we-do-it/iab-standard-measurement/how-we-collect-data/ 384 384 return ''; 385 } else if ( false !== strpos( $src, '/g.gif') ) {385 } else if ( preg_match( '/\/[gb]\.gif(\?.+)?$/', $src ) ) { 386 386 // Classic WP stats gif 387 387 return ''; … … 394 394 $src = $this->_limit_url( $src ); 395 395 396 if ( preg_match( '/\/\/www\.youtube\.com\/(embed|v)\/([^\?]+)\?.+$/', $src, $src_matches ) ) { 397 $src = 'https://www.youtube.com/watch?v=' . $src_matches[2]; 396 if ( preg_match( '/\/\/(m|www)\.youtube\.com\/(embed|v)\/([^\?]+)\?.+$/', $src, $src_matches ) ) { 397 // Embedded Youtube videos (www or mobile) 398 $src = 'https://www.youtube.com/watch?v=' . $src_matches[3]; 398 399 } else if ( preg_match( '/\/\/player\.vimeo\.com\/video\/([\d]+)([\?\/]{1}.*)?$/', $src, $src_matches ) ) { 400 // Embedded Vimeo iframe videos 399 401 $src = 'https://vimeo.com/' . (int) $src_matches[1]; 400 402 } else if ( preg_match( '/\/\/vimeo\.com\/moogaloop\.swf\?clip_id=([\d]+)$/', $src, $src_matches ) ) { 403 // Embedded Vimeo Flash videos 401 404 $src = 'https://vimeo.com/' . (int) $src_matches[1]; 402 405 } else if ( preg_match( '/\/\/vine\.co\/v\/([^\/]+)\/embed/', $src, $src_matches ) ) { 406 // Embedded Vine videos 403 407 $src = 'https://vine.co/v/' . $src_matches[1]; 404 408 } else if ( preg_match( '/\/\/(www\.)?dailymotion\.com\/embed\/video\/([^\/\?]+)([\/\?]{1}.+)?/', $src, $src_matches ) ) { 409 // Embedded Daily Motion videos 405 410 $src = 'https://www.dailymotion.com/video/' . $src_matches[2]; 406 } else if ( ! preg_match( '/\/\/(m \.|www\.)?youtube\.com\/watch\?/', $src)407 && ! preg_match( '/\/youtu\.be\/.+$/', $src ) 408 && ! preg_match( '/\/\/vimeo\.com\/[\d]+$/', $src ) 409 && ! preg_match( '/\/\/(www\.)?dailymotion\.com\/video\/.+$/', $src ) 410 && ! preg_match( '/\/\/soundcloud\.com\/.+$/', $src ) 411 && ! preg_match( '/\/\/twitter\.com\/[^\/]+\/status\/[\d]+$/', $src ) 412 && ! preg_match( '/\/\/vine\.co\/v\/[^\/]+/', $src ) ) { 411 } else if ( ! preg_match( '/\/\/(m|www)\.youtube\.com\/watch\?/', $src ) // Youtube video page (www or mobile) 412 && ! preg_match( '/\/youtu\.be\/.+$/', $src ) // Youtu.be video page 413 && ! preg_match( '/\/\/vimeo\.com\/[\d]+$/', $src ) // Vimeo video page 414 && ! preg_match( '/\/\/(www\.)?dailymotion\.com\/video\/.+$/', $src ) // Daily Motion video page 415 && ! preg_match( '/\/\/soundcloud\.com\/.+$/', $src ) // SoundCloud audio page 416 && ! preg_match( '/\/\/twitter\.com\/[^\/]+\/status\/[\d]+$/', $src ) // Twitter status page 417 && ! preg_match( '/\/\/vine\.co\/v\/[^\/]+/', $src ) ) { // Vine video page 413 418 $src = ''; 414 419 }
Note: See TracChangeset
for help on using the changeset viewer.