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
1704
1705      if (count($smiley) == 0) {
1706           return '';
1707      }
1708
1709      $smiley = trim(reset($smiley));
1710      $img = $wpsmiliestrans[$smiley];
1711      $smiley_masked = esc_attr($smiley);
1712
1713      $srcurl = apply_filters('smilies_src', includes_url("images/smilies/$img"), $img, site_url());
1714
1715      return " <img src='$srcurl' alt='$smiley_masked' class='wp-smiley' /> ";
1716 }
1717
1718 /**
1719  * Convert text equivalent of smilies to images.
1720  *
1721  * Will only convert smilies if the option 'use_smilies' is true and the global
1722  * used in the function isn't empty.