diff --git a/src/wp-includes/class.wp-scripts.php b/src/wp-includes/class.wp-scripts.php
index a629248df4..06743453f7 100644
a
|
b
|
class WP_Scripts extends WP_Dependencies { |
299 | 299 | |
300 | 300 | if ( $before_handle ) { |
301 | 301 | $before_handle = sprintf( "<script%s id='%s-js-before'>\n%s\n</script>\n", $this->type_attr, esc_attr( $handle ), $before_handle ); |
| 302 | |
| 303 | /** |
| 304 | * Filters the HTML script tag of the enqueued inline scripts to be printed before the enqueued handle script. |
| 305 | * |
| 306 | * @since 5.8 |
| 307 | * |
| 308 | * @param string $before_handle The `<script>` tag for enqueued inline scripts. |
| 309 | * @param string $handle The script's registered handle. |
| 310 | */ |
| 311 | $before_handle = apply_filters( 'inline_script_before_loader_tag', $before_handle, $handle ); |
302 | 312 | } |
303 | 313 | |
304 | 314 | if ( $after_handle ) { |
305 | 315 | $after_handle = sprintf( "<script%s id='%s-js-after'>\n%s\n</script>\n", $this->type_attr, esc_attr( $handle ), $after_handle ); |
| 316 | |
| 317 | /** |
| 318 | * Filters the HTML script tag of the enqueued inline scripts to be printed after the enqueued handle script. |
| 319 | * |
| 320 | * @since 5.8 |
| 321 | * |
| 322 | * @param string $before_handle The `<script>` tag for enqueued inline scripts. |
| 323 | * @param string $handle The script's registered handle. |
| 324 | */ |
| 325 | $after_handle = apply_filters( 'inline_script_after_loader_tag', $after_handle, $handle ); |
306 | 326 | } |
307 | 327 | |
308 | 328 | if ( $before_handle || $after_handle ) { |
diff --git a/src/wp-includes/class.wp-styles.php b/src/wp-includes/class.wp-styles.php
index 2a4780222a..15cab9b0a4 100644
a
|
b
|
class WP_Styles extends WP_Dependencies { |
184 | 184 | $this->type_attr, |
185 | 185 | $inline_style |
186 | 186 | ); |
| 187 | |
| 188 | /** |
| 189 | * Filters the HTML link tag of the enqueued inline styles. |
| 190 | * |
| 191 | * @since 5.8 |
| 192 | * @param string $inline_style_tag The link tag for the enqueued inline styles. |
| 193 | * @param string $handle The style's registered handle. |
| 194 | */ |
| 195 | $inline_style_tag = apply_filters( 'inline_style_loader_tag', $inline_style_tag, $handle ); |
187 | 196 | } else { |
188 | 197 | $inline_style_tag = ''; |
189 | 198 | } |