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
1438
1439      if (count($smiley) == 0) {
1440           return '';
1441      }
1442
1443      $smiley = trim(reset($smiley));
1444      $img = $wpsmiliestrans[$smiley];
1445      $smiley_masked = esc_attr($smiley);
1446
1447      $srcurl = apply_filters('smilies_src', includes_url("images/smilies/$img"), $img, site_url());
1448
1449      return " <img src='$srcurl' alt='$smiley_masked' class='wp-smiley' /> ";
1450 }
1451
1452 /**
1453  * Convert text equivalent of smilies to images.
1454  *
1455  * Will only convert smilies if the option 'use_smilies' is true and the global
1456  * used in the function isn't empty.