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
1487
1488      if (count($smiley) == 0) {
1489           return '';
1490      }
1491
1492      $smiley = trim(reset($smiley));
1493      $img = $wpsmiliestrans[$smiley];
1494      $smiley_masked = esc_attr($smiley);
1495
1496      $srcurl = apply_filters('smilies_src', includes_url("images/smilies/$img"), $img, site_url());
1497
1498      return " <img src='$srcurl' alt='$smiley_masked' class='wp-smiley' /> ";
1499 }
1500
1501 /**
1502  * Convert text equivalent of smilies to images.
1503  *
1504  * Will only convert smilies if the option 'use_smilies' is true and the global
1505  * used in the function isn't empty.