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
4360           'baseUrl' => apply_filters( 'emoji_url', set_url_scheme( '//s.w.org/images/core/emoji/72x72/' ) ),
4361
4362           /**
4363            * Filter the extension of the emoji files.
4364            *
4365            * @since 4.2.0
4366            *
4367            * @param string The emoji extension. Default .png.
4368            */
4369           'ext' => apply_filters( 'emoji_ext', '.png' ),
4370      );
4371
4372      $version = 'ver=' . $wp_version;
4373
4374      if ( SCRIPT_DEBUG ) {
4375           $settings['source'] = array(
4376                /** This filter is documented in wp-includes/class.wp-scripts.php */
4377                'wpemoji' => apply_filters( 'script_loader_src', includes_url( "js/wp-emoji.js?$version" ), 'wpemoji' ),
4378                /** This filter is documented in wp-includes/class.wp-scripts.php */
 
Line Code
4466  * @return string The encoded content.
4467  */
4468 function wp_staticize_emoji( $text ) {
4469      $text = wp_encode_emoji( $text );
4470
4471      /** This filter is documented in wp-includes/formatting.php */
4472      $cdn_url = apply_filters( 'emoji_url', set_url_scheme( '//s.w.org/images/core/emoji/72x72/' ) );
4473
4474      /** This filter is documented in wp-includes/formatting.php */
4475      $ext = apply_filters( 'emoji_ext', '.png' );
4476
4477      $output = '';
4478      /*
4479       * HTML loop taken from smiley function, which was taken from texturize function.
4480       * It'll never be consolidated.
4481       *
4482       * First, capture the tags as well as in between.
4483       */
4484      $textarr = preg_split( '/(<.*>)/U', $text, -1, PREG_SPLIT_DELIM_CAPTURE );