|
@@ 359-363 (lines=5) @@
|
| 356 |
|
public function register_inline_script( $handle, $file, $plugin_file, $deps = false, $ver = false, $in_footer = false ) { |
| 357 |
|
$registered = wp_register_script( $handle, plugins_url( $file, $plugin_file ), $deps, $ver, $in_footer ); |
| 358 |
|
|
| 359 |
|
if ( $registered ) { |
| 360 |
|
$file_full_path = dirname( $plugin_file ) . '/' . $file; |
| 361 |
|
wp_script_add_data( $handle, 'jetpack-inline', true ); |
| 362 |
|
wp_script_add_data( $handle, 'jetpack-inline-file', $file_full_path ); |
| 363 |
|
} |
| 364 |
|
|
| 365 |
|
return $registered; |
| 366 |
|
} |
|
@@ 376-380 (lines=5) @@
|
| 373 |
|
public function register_inline_style( $handle, $file, $plugin_file, $deps = array(), $ver = false, $media = 'all' ) { |
| 374 |
|
$registered = wp_register_style( $handle, plugins_url( $file, $plugin_file ), $deps, $ver, $media ); |
| 375 |
|
|
| 376 |
|
if ( $registered ) { |
| 377 |
|
$file_full_path = dirname( $plugin_file ) . '/' . $file; |
| 378 |
|
wp_style_add_data( $handle, 'jetpack-inline', true ); |
| 379 |
|
wp_style_add_data( $handle, 'jetpack-inline-file', $file_full_path ); |
| 380 |
|
} |
| 381 |
|
} |
| 382 |
|
} |
| 383 |
|
|