WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 895 | $file_base = $domain === 'default' ? $locale : $domain . '-' . $locale; |
| 896 | $handle_filename = $file_base . '-' . $handle . '.json'; |
| 897 | if ( $path && file_exists( $path . '/' . $handle_filename ) ) { |
| 898 | return file_get_contents( $path . '/' . $handle_filename ); |
| 899 | } |
| 900 | |
| 901 | $obj = $wp_scripts->registered[ $handle ]; |
| 902 | |
| 903 | /** This filter is documented in wp-includes/class.wp-scripts.php */ |
| 904 | $src = esc_url( apply_filters( 'script_loader_src', $obj->src, $handle ) ); |
| 905 | |
| 906 | $relative = false; |
| 907 | $languages_path = WP_LANG_DIR; |
| 908 | |
| 909 | $src_url = wp_parse_url( $src ); |
| 910 | $content_url = wp_parse_url( content_url() ); |
| 911 | $site_url = wp_parse_url( site_url() ); |
| 912 | |
| 913 | // If the host is the same or it's a relative URL. |