mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 06:57:35 +01:00
Correct phpdoc for translate_smiley(). props toscho. fixes #25440.
Built from https://develop.svn.wordpress.org/trunk@25646 git-svn-id: http://core.svn.wordpress.org/trunk@25563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4128a1a170
commit
bcb43b77d0
@ -1744,29 +1744,29 @@ function wp_rel_nofollow_callback( $matches ) {
|
||||
/**
|
||||
* Convert one smiley code to the icon graphic file equivalent.
|
||||
*
|
||||
* Callback handler for {@link convert_smilies()}.
|
||||
* Looks up one smiley code in the $wpsmiliestrans global array and returns an
|
||||
* <img> string for that smiley.
|
||||
*
|
||||
* @global array $wpsmiliestrans
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @param string $smiley Smiley code to convert to image.
|
||||
* @param array $matches Single match. Smiley code to convert to image.
|
||||
* @return string Image string for smiley.
|
||||
*/
|
||||
function translate_smiley($smiley) {
|
||||
function translate_smiley( $matches ) {
|
||||
global $wpsmiliestrans;
|
||||
|
||||
if (count($smiley) == 0) {
|
||||
if ( count( $matches ) == 0 )
|
||||
return '';
|
||||
}
|
||||
|
||||
$smiley = trim(reset($smiley));
|
||||
$img = $wpsmiliestrans[$smiley];
|
||||
$smiley_masked = esc_attr($smiley);
|
||||
$smiley = trim( reset( $matches ) );
|
||||
$img = $wpsmiliestrans[ $smiley ];
|
||||
$smiley_masked = esc_attr( $smiley );
|
||||
|
||||
$srcurl = apply_filters('smilies_src', includes_url("images/smilies/$img"), $img, site_url());
|
||||
$src_url = apply_filters( 'smilies_src', includes_url( "images/smilies/$img" ), $img, site_url() );
|
||||
|
||||
return " <img src='$srcurl' alt='$smiley_masked' class='wp-smiley' /> ";
|
||||
return " <img src='$src_url' alt='$smiley_masked' class='wp-smiley' /> ";
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user