Ticket #5689: 5689.diff
| File 5689.diff, 1.8 KB (added by wojtek.szkutnik, 3 years ago) |
|---|
-
wp-includes/formatting.php
1436 1436 } 1437 1437 1438 1438 /** 1439 * Convert text equivalent of smilies to images .1439 * Convert text equivalent of smilies to images and make sure text smilies are not wrapped. 1440 1440 * 1441 * Will only convert smilies if the option 'use_smilies' is true and the global1441 * Will only convert smilies to images if the option 'use_smilies' is true and the globals 1442 1442 * used in the function isn't empty. 1443 1443 * 1444 1444 * @since 0.71 1445 1445 * @uses $wp_smiliessearch 1446 1446 * 1447 1447 * @param string $text Content to convert smilies from text. 1448 * @return string Converted content with text smilies replaced with images.1448 * @return string Converted content with text smilies replaced. 1449 1449 */ 1450 1450 function convert_smilies($text) { 1451 1451 global $wp_smiliessearch; … … 1462 1462 $output .= $content; 1463 1463 } 1464 1464 } else { 1465 // return default text. 1466 $output = $text; 1465 // If smilies are not converted to images, make sure they're not wrapped 1466 $output = preg_replace_callback( 1467 $wp_smiliessearch, 1468 create_function( 1469 '$matches', 1470 'return "<span style=\"white-space:nowrap\">$matches[0]</span>";' 1471 ), 1472 $text 1473 ); 1467 1474 } 1468 1475 return $output; 1469 1476 } -
wp-includes/functions.php
2849 2849 function smilies_init() { 2850 2850 global $wpsmiliestrans, $wp_smiliessearch; 2851 2851 2852 // don't bother setting up smilies if they are disabled2853 if ( !get_option( 'use_smilies' ) )2854 return;2855 2856 2852 if ( !isset( $wpsmiliestrans ) ) { 2857 2853 $wpsmiliestrans = array( 2858 2854 ':mrgreen:' => 'icon_mrgreen.gif',
