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
1862      /**
1863       * Filter the Smiley image URL before it's used in the image element.
1864       *
1865       * @since 2.9.0
1866       *
1867       * @param string $smiley_url URL for the smiley image.
1868       * @param string $img        Filename for the smiley image.
1869       * @param string $site_url   Site URL, as returned by site_url().
1870       */
1871      $src_url = apply_filters( 'smilies_src', includes_url( "images/smilies/$img" ), $img, site_url() );
1872
1873      return sprintf( ' <img src="%s" alt="%s" class="wp-smiley" /> ', esc_url( $src_url ), esc_attr( $smiley ) );
1874 }
1875
1876 /**
1877  * Convert text equivalent of smilies to images.
1878  *
1879  * Will only convert smilies if the option 'use_smilies' is true and the global
1880  * used in the function isn't empty.