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
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 */
4379                'twemoji' => apply_filters( 'script_loader_src', includes_url( "js/twemoji.js?$version" ), 'twemoji' ),
4380           );
4381
4382           ?>
4383           <script type="text/javascript">
4384                window._wpemojiSettings = <?php echo wp_json_encode( $settings ); ?>;
4385                <?php readfile( ABSPATH . WPINC . "/js/wp-emoji-loader.js" ); ?>
4386           </script>
4387           <?php
4388      } else {
4389           $settings['source'] = array(
4390                /** This filter is documented in wp-includes/class.wp-scripts.php */
4391                'concatemoji' => apply_filters( 'script_loader_src', includes_url( "js/wp-emoji-release.min.js?$version" ), 'concatemoji' ),
4392           );
4393
4394           /*
4395            * If you're looking at a src version of this file, you'll see an "include"
4396            * statement below. This is used by the `grunt build` process to directly
4397            * include a minified version of wp-emoji-loader.js, instead of using the
4398            * readfile() method from above.
4399            *
4400            * If you're looking at a build version of this file, you'll see a string of