Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: emoji_ext

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

This hook occurs 2 times in this file.

Line Code
4538           'baseUrl' => apply_filters( 'emoji_url', 'https://s.w.org/images/core/emoji/72x72/' ),
4539
4540           /**
4541            * Filter the extension of the emoji files.
4542            *
4543            * @since 4.2.0
4544            *
4545            * @param string The emoji extension. Default .png.
4546            */
4547           'ext' => apply_filters( 'emoji_ext', '.png' ),
4548      );
4549
4550      $version = 'ver=' . $wp_version;
4551
4552      if ( SCRIPT_DEBUG ) {
4553           $settings['source'] = array(
4554                /** This filter is documented in wp-includes/class.wp-scripts.php */
4555                'wpemoji' => apply_filters( 'script_loader_src', includes_url( "js/wp-emoji.js?$version" ), 'wpemoji' ),
4556                /** This filter is documented in wp-includes/class.wp-scripts.php */
 
Line Code
4644  * @return string The encoded content.
4645  */
4646 function wp_staticize_emoji( $text ) {
4647      $text = wp_encode_emoji( $text );
4648
4649      /** This filter is documented in wp-includes/formatting.php */
4650      $cdn_url = apply_filters( 'emoji_url', 'https://s.w.org/images/core/emoji/72x72/' );
4651
4652      /** This filter is documented in wp-includes/formatting.php */
4653      $ext = apply_filters( 'emoji_ext', '.png' );
4654
4655      $output = '';
4656      /*
4657       * HTML loop taken from smiley function, which was taken from texturize function.
4658       * It'll never be consolidated.
4659       *
4660       * First, capture the tags as well as in between.
4661       */
4662      $textarr = preg_split( '/(<.*>)/U', $text, -1, PREG_SPLIT_DELIM_CAPTURE );