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
1730
1731      if (count($smiley) == 0) {
1732           return '';
1733      }
1734
1735      $smiley = trim(reset($smiley));
1736      $img = $wpsmiliestrans[$smiley];
1737      $smiley_masked = esc_attr($smiley);
1738
1739      $srcurl = apply_filters('smilies_src', includes_url("images/smilies/$img"), $img, site_url());
1740
1741      return " <img src='$srcurl' alt='$smiley_masked' class='wp-smiley' /> ";
1742 }
1743
1744 /**
1745  * Convert text equivalent of smilies to images.
1746  *
1747  * Will only convert smilies if the option 'use_smilies' is true and the global
1748  * used in the function isn't empty.