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
5792            */
5793           'svgExt'  => apply_filters( 'emoji_svg_ext', '.svg' ),
5794      );
5795
5796      $version = 'ver=' . get_bloginfo( 'version' );
5797
5798      if ( SCRIPT_DEBUG ) {
5799           $settings['source'] = array(
5800                /** This filter is documented in wp-includes/class-wp-scripts.php */
5801                'wpemoji' => apply_filters( 'script_loader_src', includes_url( "js/wp-emoji.js?$version" ), 'wpemoji' ),
5802                /** This filter is documented in wp-includes/class-wp-scripts.php */
5803                'twemoji' => apply_filters( 'script_loader_src', includes_url( "js/twemoji.js?$version" ), 'twemoji' ),
5804           );
5805      } else {
5806           $settings['source'] = array(
5807                /** This filter is documented in wp-includes/class-wp-scripts.php */
5808                'concatemoji' => apply_filters( 'script_loader_src', includes_url( "js/wp-emoji-release.min.js?$version" ), 'concatemoji' ),
5809           );
5810      }
5811
5812      wp_print_inline_script_tag(
5813           sprintf( 'window._wpemojiSettings = %s;', wp_json_encode( $settings ) ) . "\n" .
5814                file_get_contents( sprintf( ABSPATH . WPINC . '/js/wp-emoji-loader' . wp_scripts_get_suffix() . '.js' ) )
5815      );
5816 }
5817