Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: smilies_src

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1758      global $wpsmiliestrans;
1759
1760      if ( count( $matches ) == 0 )
1761           return '';
1762
1763      $smiley = trim( reset( $matches ) );
1764      $img = $wpsmiliestrans[ $smiley ];
1765      $smiley_masked = esc_attr( $smiley );
1766
1767      $src_url = apply_filters( 'smilies_src', includes_url( "images/smilies/$img" ), $img, site_url() );
1768
1769      return " <img src='$src_url' alt='$smiley_masked' class='wp-smiley' /> ";
1770 }
1771
1772 /**
1773  * Convert text equivalent of smilies to images.
1774  *
1775  * Will only convert smilies if the option 'use_smilies' is true and the global
1776  * used in the function isn't empty.