関数 translate_smiley()
2014/12/11
関数 translate_smiley()
定義ファイル :/blog/wp-includes/formatting.php 5
1 2 3 4 5 6 7 8 9 10 11 12 13 | function translate_smiley( $matches ) { global $wpsmiliestrans; if ( count( $matches ) == 0 ) return ''; $smiley = trim( reset( $matches ) ); $img = $wpsmiliestrans[ $smiley ]; $src_url = apply_filters( 'smilies_src', includes_url( "images/smilies/$img" ), $img, site_url() ); return sprintf( '<img src="%s" alt="%s" class="wp-smiley" />', esc_url( $src_url ), esc_attr( $smiley ) ); } |