Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: script_loader_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

This hook occurs 3 times in this file.

Line Code
5770            */
5771           'svgExt'  => apply_filters( 'emoji_svg_ext', '.svg' ),
5772      );
5773
5774      $version = 'ver=' . get_bloginfo( 'version' );
5775
5776      if ( SCRIPT_DEBUG ) {
5777           $settings['source'] = array(
5778                /** This filter is documented in wp-includes/class.wp-scripts.php */
5779                'wpemoji' => apply_filters( 'script_loader_src', includes_url( "js/wp-emoji.js?$version" ), 'wpemoji' ),
5780                /** This filter is documented in wp-includes/class.wp-scripts.php */
5781                'twemoji' => apply_filters( 'script_loader_src', includes_url( "js/twemoji.js?$version" ), 'twemoji' ),
5782           );
5783      } else {
5784           $settings['source'] = array(
5785                /** This filter is documented in wp-includes/class.wp-scripts.php */
5786                'concatemoji' => apply_filters( 'script_loader_src', includes_url( "js/wp-emoji-release.min.js?$version" ), 'concatemoji' ),
5787           );
5788      }
5789
5790      wp_print_inline_script_tag(
5791           sprintf( 'window._wpemojiSettings = %s;', wp_json_encode( $settings ) ) . "\n" .
5792                file_get_contents( sprintf( ABSPATH . WPINC . '/js/wp-emoji-loader' . wp_scripts_get_suffix() . '.js' ) )
5793      );
5794 }
5795