Changeset 14109
- Timestamp:
- 04/16/2010 02:15:16 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-oembed.php
r13996 r14109 57 57 ) ); 58 58 59 // Fix Scribd embeds. They contain new lines in the middle of the HTML which breaks wpautop().60 add_filter( 'oembed_dataparse', array(&$this, ' strip_scribd_newlines'), 10, 3 );59 // Fix Scribd and Viddler embeds. They contain new lines in the middle of the HTML which breaks wpautop(). 60 add_filter( 'oembed_dataparse', array(&$this, '_strip_newlines'), 10, 3 ); 61 61 } 62 62 … … 264 264 265 265 /** 266 * Strip new lines from the HTML if it's a Scribd embed. 267 * 266 * Strip new lines from the HTML if it's a Scribd or Viddler embed. 267 * 268 * @access private 268 269 * @param string $html Existing HTML. 269 270 * @param object $data Data object from WP_oEmbed::data2html() … … 271 272 * @return string Possibly modified $html 272 273 */ 273 function strip_scribd_newlines( $html, $data, $url ) {274 if ( preg_match( '#http://(www\.)?scribd.com/.*#i', $url ) )274 function _strip_newlines( $html, $data, $url ) { 275 if ( preg_match( '#http://(www\.)?scribd.com/.*#i', $url ) || preg_match( '#http://(www\.)?viddler\.com/.*#i', $url ) ) 275 276 $html = str_replace( array( "\r\n", "\n" ), '', $html ); 276 277
Note: See TracChangeset
for help on using the changeset viewer.